Skip to content
9 changes: 2 additions & 7 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ ignores:
- 'react-compiler-runtime'
- '@fortawesome/fontawesome-free'
- 'punycode'
# peer deps of @mui/material v5, consumed internally by MUI (not imported directly)
# peer deps of @mui/material v5; no direct imports in app source (MUI resolves them)
- '@emotion/react'
- '@emotion/styled'
# v5 pre-installed ahead of migration from @material-ui/core (v4 path);
# imports switch to @mui/material in the migration branch
- '@mui/material'
# future use for Snaps date pickers; v7 supports React 17 + MUI v5
# present for upcoming date-picker migration; not imported yet — depcheck would flag unused
- '@mui/x-date-pickers'

#
Expand Down Expand Up @@ -116,8 +113,6 @@ ignores:
- '@metamask/institutional-wallet-snap'
- '@metamask/gator-permissions-snap'
- '@metamask/permissions-kernel-snap'
# perps poc
- '@metamask/perps-controller'

# files depcheck should not parse
ignorePatterns:
Expand Down
192 changes: 174 additions & 18 deletions lavamoat/browserify/beta/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,79 @@
"luxon": true
}
},
"@emotion/react>@emotion/cache": {
"globals": {
"document": true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@naugtur webpack's policy build has narrowed the document usages here down to a reasonable subset, usual just one or two properties on document. With webpack aiming to be released in about 1-2 weeks, do you think we should still bother with locking this down in the browserify build today?

},
"packages": {
"@emotion/react>@emotion/cache>@emotion/memoize": true,
"@emotion/react>@emotion/cache>@emotion/sheet": true,
"@emotion/react>@emotion/weak-memoize": true,
"@emotion/react>@emotion/cache>stylis": true
}
},
"@emotion/styled>@emotion/is-prop-valid": {
"packages": {
"@emotion/react>@emotion/cache>@emotion/memoize": true
}
},
"@emotion/react": {
"globals": {
"HTMLElement": true,
"document": true
},
"packages": {
"@babel/runtime": true,
"@emotion/react>@emotion/cache": true,
"@emotion/react>@emotion/serialize": true,
"@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true,
"@emotion/react>@emotion/utils": true,
"@emotion/react>@emotion/weak-memoize": true,
"react-redux>hoist-non-react-statics": true,
"react": true
}
},
"@emotion/react>@emotion/serialize": {
"packages": {
"@emotion/react>@emotion/serialize>@emotion/hash": true,
"@emotion/react>@emotion/cache>@emotion/memoize": true,
"@emotion/react>@emotion/serialize>@emotion/unitless": true
}
},
"@emotion/react>@emotion/cache>@emotion/sheet": {
"globals": {
"document.createElement": true,
"document.createTextNode": true,
"document.styleSheets": true
}
},
"@emotion/styled": {
"globals": {
"document": true
},
"packages": {
"@babel/runtime": true,
"@emotion/styled>@emotion/is-prop-valid": true,
"@emotion/react": true,
"@emotion/react>@emotion/serialize": true,
"@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true,
"@emotion/react>@emotion/utils": true,
"react": true
}
},
"@emotion/react>@emotion/use-insertion-effect-with-fallbacks": {
"globals": {
"document": true
},
"packages": {
"react": true
}
},
"@emotion/react>@emotion/utils": {
"globals": {
"document": true
}
},
"@ensdomains/content-hash": {
"globals": {
"console.warn": true
Expand Down Expand Up @@ -698,7 +771,6 @@
"@material-ui/core>@material-ui/system": true,
"@material-ui/core>@material-ui/utils": true,
"@material-ui/core>clsx": true,
"@material-ui/core>popper.js": true,
"prop-types": true,
"react": true,
"react-dom": true,
Expand Down Expand Up @@ -2723,6 +2795,102 @@
"semver": true
}
},
"@mui/material": {
"globals": {
"DocumentFragment": true,
"ResizeObserver": true,
"addEventListener": true,
"cancelAnimationFrame": true,
"clearInterval": true,
"console.error": true,
"console.warn": true,
"document.addEventListener": true,
"document.body": true,
"document.removeEventListener": true,
"getSelection": true,
"navigator": true,
"performance.now": true,
"removeEventListener": true,
"requestAnimationFrame": true,
"setInterval": true
},
"packages": {
"@babel/runtime": true,
"@mui/material>@mui/system": true,
"@mui/material>@mui/utils": true,
"@popperjs/core": true,
"clsx": true,
"prop-types": true,
"react": true,
"react-dom": true,
"@mui/material>react-is": true,
"react-transition-group": true
}
},
"@mui/material>@mui/system>@mui/private-theming": {
"globals": {
"console.error": true
},
"packages": {
"@babel/runtime": true,
"@mui/material>@mui/utils": true,
"prop-types": true,
"react": true
}
},
"@mui/material>@mui/system>@mui/styled-engine": {
"globals": {
"console.error": true,
"document": true
},
"packages": {
"@babel/runtime": true,
"@emotion/react>@emotion/cache": true,
"@emotion/react": true,
"@emotion/react>@emotion/serialize": true,
"@emotion/styled": true,
"prop-types": true,
"react": true
}
},
"@mui/material>@mui/system": {
"globals": {
"clearTimeout": true,
"console.error": true,
"console.warn": true,
"document": true,
"getComputedStyle": true,
"localStorage.getItem": true,
"localStorage.setItem": true,
"matchMedia": true,
"setTimeout": true
},
"packages": {
"@babel/runtime": true,
"@mui/material>@mui/system>@mui/private-theming": true,
"@mui/material>@mui/system>@mui/styled-engine": true,
"@mui/material>@mui/utils": true,
"clsx": true,
"prop-types": true,
"react": true
}
},
"@mui/material>@mui/utils": {
"globals": {
"clearTimeout": true,
"console.error": true,
"document": true,
"innerWidth": true,
"setTimeout": true
},
"packages": {
"@babel/runtime": true,
"clsx": true,
"prop-types": true,
"react": true,
"@mui/material>@mui/utils>react-is": true
}
},
"@ngraveio/bc-ur": {
"packages": {
"@ngraveio/bc-ur>@keystonehq/alias-sampling": true,
Expand Down Expand Up @@ -5451,23 +5619,6 @@
"@ngraveio/bc-ur>sha.js>to-buffer": true
}
},
"@material-ui/core>popper.js": {
"globals": {
"MSInputMethodContext": true,
"Node.DOCUMENT_POSITION_FOLLOWING": true,
"cancelAnimationFrame": true,
"console.warn": true,
"define": true,
"devicePixelRatio": true,
"document": true,
"getComputedStyle": true,
"innerHeight": true,
"innerWidth": true,
"navigator": true,
"requestAnimationFrame": true,
"setTimeout": true
}
},
"react-tippy>popper.js": {
"globals": {
"MSInputMethodContext": true,
Expand Down Expand Up @@ -6394,6 +6545,11 @@
"react-markdown>style-to-object>inline-style-parser": true
}
},
"@emotion/react>@emotion/cache>stylis": {
"globals": {
"define": true
}
},
"@metamask/snaps-controllers>tar-stream": {
"packages": {
"@metamask/snaps-controllers>tar-stream>b4a": true,
Expand Down
Loading
Loading