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

Add support for pnpm lockfile v6 #503

Closed
annaowens opened this issue Apr 11, 2023 · 13 comments
Closed

Add support for pnpm lockfile v6 #503

annaowens opened this issue Apr 11, 2023 · 13 comments
Assignees
Labels
detector:pnpm The pnpm detector status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)

Comments

@annaowens
Copy link
Contributor

annaowens commented Apr 11, 2023

pnpm version 8 includes an upgrade to lockfile version 6, but we currently only support up to pnpm lockfile v5.

Since we are unable to accurately parse the lockfile v6, we are not correctly detecting development dependencies for pnpm v8.

We need to update our pnpm detector to handle the new v6 lockfile. At the time of writing this issue, there isn't documentation on the lockfile v6 format: pnpm/spec#4.

This is a similar issue to #476 -- we've already seen the same problem with NPM lockfile v3.

AB#2121069

@annaowens annaowens added status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality) detector:pnpm The pnpm detector labels Apr 11, 2023
@wterpstra
Copy link

Hey, the lockfile v6 format is available now.

https://github.com/pnpm/spec/blob/master/lockfile/6.0.md

@dwelch2344
Copy link

Just came to upvote this. Would be happy to contribute, if someone would be open to some onboarding support...

@vhuseinova-msft
Copy link

Just came to upvote this too. It would be great to have support for the latest lockfile formats.

@CraigMacomber
Copy link

I looked at the relevant code and it doesn't seem too hard. I'm going to make an attempt at fixing this during the hackathon next week.

@CraigMacomber
Copy link

Pnpm 9 (currently in alpha) moves to lock file format v7: thats going to be an issue soon even if v6 support is added.

@CraigMacomber
Copy link

My work in progress for this lives in the branch https://github.com/CraigMacomber/component-detection/tree/pnpmv6

I have it working as far as I can tell. It manages to parse the included test lock file with v6 as well as a much larger test using the lock file from FluidFramework (which actually uses the shared shrinkwrap mode, file references, peer deps etc).

I still need to add unit tests v6, but otherwise I think its almost ready for review. I hope to have a PR up for review tomorrow.

@CraigMacomber
Copy link

#1028 fixes this and is currently awaiting review.

@annaowens
Copy link
Contributor Author

@CraigMacomber Pinged the team to see if we can get some traction on the PR review. Otherwise I'll plan to take a look next week.

@CraigMacomber
Copy link

@CraigMacomber Pinged the team to see if we can get some traction on the PR review. Otherwise I'll plan to take a look next week.

"Next week" happened. Any update?

@CraigMacomber
Copy link

@annaowens The PR addressing this issue been waiting for review for a response from maintainers for over a month.

Pnpm currently only provides security patches for the last two major versions. Given that pnpm 9 has been publishing release candidates for a while, I'm concerned it might come out soon, and they might drop support for pnpm 7 soon after. Since component-detection users are blocked from updating to pnpm 8 by this issue, that could force users of pnpm to choose between an unsupported package manager version, breaking component-detection and porting to a different package manger. This seems like it could be a bad situation, and we should try and to make progress on this to avoid it.

@CraigMacomber
Copy link

My above noted fear has happened: according to https://github.com/pnpm/pnpm/security all versions of pnpm supported by component-detection are no longer getting security patches.

@CraigMacomber
Copy link

I was able to get in contact with the maintainers via their listed contact email. They have been very busy with other things, but they are aware of this issue and will be prioritizing it when they can.

@cobya
Copy link
Contributor

cobya commented May 15, 2024

#1110 should resolve this here soon, apologies for the delay in this.

@cobya cobya self-assigned this May 15, 2024
@cobya cobya moved this from In progress to In review in Component Detection - Detector Improvements May 15, 2024
@cobya cobya moved this from In review to In progress in Component Detection - Detector Improvements May 15, 2024
@cobya cobya moved this from In progress to Done in Component Detection - Detector Improvements May 23, 2024
@cobya cobya moved this from Done to In review in Component Detection - Detector Improvements May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detector:pnpm The pnpm detector status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)
Development

No branches or pull requests

6 participants