-
Notifications
You must be signed in to change notification settings - Fork 375
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: add support for PNPM v9 lockfiles #934
Conversation
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.
since there are same codes among the tests, shall we factor out the common parts? only the file path and expected packages details are different
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.
if this wasn't Go I'd be more inclined to say "yes", but I think trying to refactor this would just be very messy and so it's probably best to just leave it for now given I've already written out the tests and we're not expecting them to change.
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 with just one nit, thanks!
This adds support for v9 PNPM lockfiles which has a different structure that looks to be similar to Yarn v2+ lockfiles. I can't find a lot of clear detail on the actual changes so I've started with just a "best effort" approach - most notably this means dev grouping is lost because that detail is not represented in the new format; we could probably successfully determine it by checking in `snapshots` but that would be a lot more work so I'm leaving that as a follow up. The good news is it seems like going forward the lockfile version should match the major verison of PNPM (pnpm/pnpm#7861) which should make it easier to track these, and we can probably drop explicit support for older versions in v2. Resolves google#931
This adds support for v9 PNPM lockfiles which has a different structure that looks to be similar to Yarn v2+ lockfiles.
I can't find a lot of clear detail on the actual changes so I've started with just a "best effort" approach - most notably this means dev grouping is lost because that detail is not represented in the new format; we could probably successfully determine it by checking in
snapshots
but that would be a lot more work so I'm leaving that as a follow up.The good news is it seems like going forward the lockfile version should match the major verison of PNPM (pnpm/pnpm#7861) which should make it easier to track these, and we can probably drop explicit support for older versions in v2.
Resolves #931