-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix JavaScript workspace lockfile generation #1237
Conversation
This patch fixes the lockfile generation for workspaces with npm, yarn, and pnpm. See #1236.
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.
The changes were tested locally and found to work for npm
(using a self-created workspace setup) and pnpm
(using a checkout of SvelteKit).
For yarn
, a checkout of Facebook's react
repo was used as an example of a modern yarn v3.x workspace project. The changes in this PR failed to parse the package.json
file from within the packages/react-art
directory (which was just selected as a quick test).
../react/packages/react-art 2 6 on main is 📦 v18.2.0 via v20.6.1
❯ /Users/maxrake/dev/phylum/localdev/cli/target/debug/phylum parse -t yarn ./package.json > parse.json
Generating lockfile for manifest "package.json" using Yarn…
❗ Error: could not parse lockfile: ./package.json
Caused by:
0: Lockfile generation failed! For details, see: https://docs.phylum.io/docs/lockfile_generation
1: package manager exited with error code 1:
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.
The code was reviewed and the changes tested locally. This time, for yarn
, the jest
project was used as a true representative example of a modern Yarn project. The changes worked as expected, for both the project root and for individual workspaces.
LGTM.
This patch fixes the lockfile generation for workspaces with npm, yarn, and pnpm.
See #1236.