Skip to content
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

feat: yarn lock v2 support plus improvements #4222

Merged

Conversation

JamesPatrickGill
Copy link
Member

@JamesPatrickGill JamesPatrickGill commented Nov 30, 2022

This adds support for yarn lock v2 to the CLI aswell as a heavier use of depgraphs.

It also carries some slight Yarn v1 changes through due to using an outdated nodejs parser in the CLI.

@JamesPatrickGill JamesPatrickGill requested a review from a team as a code owner November 30, 2022 15:45
@JamesPatrickGill JamesPatrickGill force-pushed the feat/yarn-lock-2-support-and-depgraph-migrations branch from 86d9aa4 to 58b6a66 Compare November 30, 2022 15:47
@JamesPatrickGill JamesPatrickGill requested a review from a team as a code owner November 30, 2022 15:47
@JamesPatrickGill JamesPatrickGill force-pushed the feat/yarn-lock-2-support-and-depgraph-migrations branch 4 times, most recently from a08025b to a995edf Compare November 30, 2022 16:14
src/lib/plugins/nodejs-plugin/index.ts Outdated Show resolved Hide resolved
src/lib/plugins/nodejs-plugin/npm-lock-parser.ts Outdated Show resolved Hide resolved
src/lib/plugins/nodejs-plugin/npm-lock-parser.ts Outdated Show resolved Hide resolved
@JamesPatrickGill JamesPatrickGill force-pushed the feat/yarn-lock-2-support-and-depgraph-migrations branch 3 times, most recently from 790aa24 to 056d456 Compare December 2, 2022 13:46
src/lib/plugins/nodejs-plugin/index.ts Outdated Show resolved Hide resolved
src/lib/plugins/nodejs-plugin/index.ts Outdated Show resolved Hide resolved
@JamesPatrickGill JamesPatrickGill force-pushed the feat/yarn-lock-2-support-and-depgraph-migrations branch 2 times, most recently from 45f01e4 to 55ffd29 Compare December 19, 2022 15:38
@JamesPatrickGill JamesPatrickGill force-pushed the feat/yarn-lock-2-support-and-depgraph-migrations branch 5 times, most recently from 9c481bd to 6931061 Compare December 20, 2022 12:17
src/lib/plugins/nodejs-plugin/index.ts Outdated Show resolved Hide resolved
src/lib/plugins/nodejs-plugin/index.ts Outdated Show resolved Hide resolved
@JamesPatrickGill JamesPatrickGill force-pushed the feat/yarn-lock-2-support-and-depgraph-migrations branch from 6931061 to 38dbe8b Compare December 20, 2022 13:07
Copy link
Contributor

@PeterSchafer PeterSchafer left a comment

Choose a reason for hiding this comment

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

Suggestion: As you have added new logic and control flows, it would be important to add new tests for it. From the description, I would assume to find at least one additional acceptance test that uses a yarn v2 file. Unit tests would be great too.

This adds support for yarn.lock v2, that yaml-like format. This means
initial support for yarn2 and yarn3 as at time of writing they use this
version.

Additionally support for depgraph for yarn lock v1 (Yarn1) has been
added which should improve performance for these older projects.
@JamesPatrickGill JamesPatrickGill force-pushed the feat/yarn-lock-2-support-and-depgraph-migrations branch from 38dbe8b to 798abf1 Compare December 20, 2022 15:12
Copy link
Contributor

@PeterSchafer PeterSchafer left a comment

Choose a reason for hiding this comment

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

As discussed with @JamesPatrickGill, adding additional tests will be done in a separate task. Approving to unblock.

@JamesPatrickGill JamesPatrickGill merged commit 7800441 into master Dec 20, 2022
@JamesPatrickGill JamesPatrickGill deleted the feat/yarn-lock-2-support-and-depgraph-migrations branch December 20, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants