Commit 1403e08
chore(snaps): drop XMLSerializer/DOMParser yarn patch on snaps-execution-environments
The .yarn patch on @metamask/snaps-execution-environments@11.0.2 added
"XMLSerializer" and "DOMParser" to the LavaMoat scuttleGlobalThis
exceptions list inside dist/webpack/webview/index.html. Verified the
patch was solving a phantom problem: nothing on the iframe path actually
reads either global at runtime.
Empirical check (literal grep for "XMLSerializer"/"DOMParser"):
- @metamask/snaps-execution-environments@11.0.2 bundle 0 hits
- ses 0 hits
- @metamask/snaps-controllers@20.0.3 0 hits
- @metamask/post-message-stream@10.0.0 0 hits
- @metamask/react-native-webview@14.6.0 0 hits
- @metamask/bitcoin-wallet-snap@1.10.1 dist/bundle.js 0 hits
- @metamask/tron-wallet-snap@1.25.3 dist/bundle.js 0 hits
- app code on the snap WebView path 0 hits
Snaps run successfully on main against the same @MetaMask/snaps-
execution-environments@11.0.2 with the same allow-list and no patch,
which is the strongest possible evidence the entry was unnecessary.
Pin the dep to "11.0.2" exact (matching main's resolved version in
yarn.lock) so the descriptor differs from main's "^11.0.2" only in the
caret. Resolution, transitive graph, and installed bytes are identical
to main for this package.
If snap E2Es regress in CI on this branch, capture the actual WebView
console stack trace from the failing spec — the LavaMoat error names
the offending property in its message — and re-introduce a targeted
allow-list change with concrete evidence behind it.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 44bfa43 commit 1403e08
3 files changed
Lines changed: 2 additions & 32 deletions
File tree
- .yarn/patches
Lines changed: 0 additions & 12 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10157 | 10157 | | |
10158 | 10158 | | |
10159 | 10159 | | |
10160 | | - | |
10161 | | - | |
10162 | | - | |
10163 | | - | |
10164 | | - | |
10165 | | - | |
10166 | | - | |
10167 | | - | |
10168 | | - | |
10169 | | - | |
10170 | | - | |
10171 | | - | |
10172 | | - | |
10173 | | - | |
10174 | | - | |
10175 | | - | |
10176 | | - | |
10177 | | - | |
10178 | 10160 | | |
10179 | 10161 | | |
10180 | 10162 | | |
| |||
35964 | 35946 | | |
35965 | 35947 | | |
35966 | 35948 | | |
35967 | | - | |
| 35949 | + | |
35968 | 35950 | | |
35969 | 35951 | | |
35970 | 35952 | | |
| |||
0 commit comments