-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Add script to generate peer dependency graph #4972
base: main
Are you sure you want to change the base?
Conversation
👍 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 |
* @returns The list of workspaces. | ||
*/ | ||
async function getWorkspacePackages(): Promise<WorkspacePackage[]> { | ||
const cwd = ppath.resolve('..', ppath.cwd()); |
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.
This script uses the Yarn API to build the workspaces list, instead of running yarn workspaces list
. This does something similar to what that command does, and the source is here: https://github.com/yarnpkg/berry/blob/8bfe2d545e986993e4450072bac8b1044e5ebed7/packages/plugin-essentials/sources/commands/workspaces/list.ts#L50
@SocketSecurity ignore npm/[email protected] New author is OK, their commits to |
@SocketSecurity ignore-all All of the alerts in this PR are OK, they are being added by Yarn which makes HTTP requests. All of the new authors are also OK, they are respected members of the JavaScript community. |
When upgrading controller packages in clients, some packages need to be upgraded in tandem with others to satisfy peer dependencies. This commit adds a new script that can be used to view all of the workspaces in the monorepo along with the internal peer dependencies that each workspace may rely upon. For instance, if you run ``` yarn run workspaces:list-peer-dependencies ``` you will get the following command output: ``` ├╴ @metamask/accounts-controller 19.0.0 │ └╴ @metamask/keyring-controller ^18.0.0 ├╴ @metamask/address-book-controller 6.0.1 ├╴ @metamask/announcement-controller 7.0.1 ├╴ @metamask/approval-controller 7.1.1 ├╴ @metamask/assets-controllers 44.1.0 │ ├╴ @metamask/accounts-controller ^19.0.0 │ ├╴ @metamask/approval-controller ^7.0.0 │ ├╴ @metamask/keyring-controller ^18.0.0 │ ├╴ @metamask/network-controller ^22.0.0 │ └╴ @metamask/preferences-controller ^14.0.0 ├╴ @metamask/base-controller 7.0.2 ├╴ @metamask/build-utils 3.0.1 ... ```
835f983
to
83d1179
Compare
Explanation
When upgrading controller packages in clients, some packages need to be upgraded in tandem with others to satisfy peer dependencies. This commit adds a new script that can be used to view all of the workspaces in the monorepo along with the internal peer dependencies that each workspace may rely upon.
For instance, if you run
you will get the following command output:
References
This PR is related to the work we've been recently doing around controller upgrades.
Changelog
N/A, development-only changes.
Checklist