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

Support pnpm lockfileVersion: 5.4 #23

Open
tennox opened this issue Oct 17, 2022 · 2 comments
Open

Support pnpm lockfileVersion: 5.4 #23

tennox opened this issue Oct 17, 2022 · 2 comments

Comments

@tennox
Copy link

tennox commented Oct 17, 2022

Pnpm v7.9.5 generates lockfileVersion: 5.4, which errors:

error: assertion '(((pnpmlock).lockfileVersion == 5) || ((pnpmlock).lockfileVersion == 5.1))' failed

       at /home/manu/dev/stuff/pnpm2nix/default.nix:201:5:

          200|   in
          201|     assert (pnpmlock.lockfileVersion == 5 || pnpmlock.lockfileVersion == 5.1);

Did not find a way to tell pnpm to write with an older lockfile version

@phenax
Copy link

phenax commented Feb 17, 2023

+1

@EndangeredMassa
Copy link

EndangeredMassa commented Apr 8, 2024

I needed to understand the breakdown of which versions of pnpm generated and parsed which versions of their lockfile for something else, then came across this post. I figured I'd share.

I tested all versions from 6+ and confirmed it with pnpm itself. The logic checking pnpm lockfile versions should accommodate these:

| pnpm version | generates lockfile | parses lockfiles |
| ------------ | ------------------ | ---------------- |
| 6.x          | 5.3                | 5.3, 5.4         |
| 7.x          | 5.4                | 5.3, 5.4         |
| 8.x          | 6.0                | 6.0, 6.1?        |
| - 8.6.1      | 6.1                | 6.0, 6.1?        |
| - 8.6.2      | 6.1                | 6.0, 6.1?        |
| - after      | 6.0                | 6.0, 6.1?        |
| 9.x          | 7.0                | 7.0, 6.1?        |

I didn't go back and test which pnpm versions can parse lockfile version 6.1, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants