-
-
Notifications
You must be signed in to change notification settings - Fork 230
Fix peer dependency warnings #4974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
790b3ee
to
4e93fdb
Compare
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
4e93fdb
to
ae6262a
Compare
@SocketSecurity ignore npm/@lavamoat/preinstall-always-fail@2.1.0 New author is OK. Install script is expected. |
ae6262a
to
8e58c0d
Compare
When running `yarn install`, several packages generate peer dependency warnings. `@lavamoat/preinstall-always-fail` is now a peer dependency of `@lavamoat/allow-scripts`, so that makes sense, but for the other packages (`@babel/runtime`, `@metamask/providers`, `webextension-polyfill`), we really all of these packages to present as dependencies of the _client_, so they just need to be added as dev dependencies here.
8e58c0d
to
e275e3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good! Just the babel/runtime
peer dependency removal that requires adjustment, I can approve once that change is undone.
Hopefully we can get rid of some of these peer dependencies from our dependencies soon, they seem largely unhelpful
Looks reasonable to me! |
@@ -74,6 +74,7 @@ | |||
"uuid": "^8.3.2" | |||
}, | |||
"devDependencies": { | |||
"@babel/runtime": "^7.23.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not added to peerDependencies
because @metamask/ethjs-provider-http
, which requires it, is in devDependencies
.
"@metamask/snaps-controllers": "^9.7.0" | ||
"@metamask/providers": "^18.1.0", | ||
"@metamask/snaps-controllers": "^9.7.0", | ||
"webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have copied the ranges for these peer dependencies from the packages that require them instead of using new ranges.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Explanation
When running
yarn install
, several packages generate peer dependency warnings.@lavamoat/preinstall-always-fail
is now a peer dependency of@lavamoat/allow-scripts
, so we need to add it as a new dev dependency.@babel/runtime
,@metamask/providers
,webextension-polyfill
— we really expect the client to have these dependencies, so we also add them as dev and peer dependencies instead of dependencies. We have to do this because they will not get forwarded along.References
Fixes #4906.
Changelog
Changes are documented in changelogs.
Checklist