fix: frozen lockfile should work with lockfile v6 (#7935)

close #7934
This commit is contained in:
Zoltan Kochan
2024-04-16 16:00:00 +02:00
committed by GitHub
parent 742ceb4050
commit 461d76a2e5
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/core": patch
"pnpm": patch
---
`pnpm install --frozen-lockfile` should work with lockfiles generated by pnpm v8, if they don't need updates [#7934](https://github.com/pnpm/pnpm/issues/7934).

View File

@@ -353,7 +353,7 @@ export async function mutateModules (
}
let needsFullResolution = outdatedLockfileSettings ||
opts.fixLockfile ||
!ctx.wantedLockfile.lockfileVersion.toString().startsWith(`${LOCKFILE_MAJOR_VERSION}.`) ||
!ctx.wantedLockfile.lockfileVersion.toString().startsWith(`${LOCKFILE_MAJOR_VERSION}.`) && ctx.wantedLockfile.lockfileVersion !== LOCKFILE_VERSION_V6 ||
opts.forceFullResolution
if (needsFullResolution) {
ctx.wantedLockfile.settings = {