fix: don't upgrade the lockfile format during frozen lockfile install (#8006)

close #7991
This commit is contained in:
Zoltan Kochan
2024-04-24 14:59:58 +02:00
committed by GitHub
parent c969f374de
commit 820934207a
2 changed files with 10 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/core": patch
"pnpm": patch
---
Don't upgrade the lockfile format on `pnpm install --frozen-lockfile` [#7991](https://github.com/pnpm/pnpm/issues/7991).

View File

@@ -471,7 +471,10 @@ Note that in CI environments, this setting is enabled by default.`,
wantedLockfile: maybeOpts.ignorePackageManifest ? undefined : ctx.wantedLockfile,
useLockfile: opts.useLockfile && ctx.wantedLockfileIsModified,
})
if (opts.useLockfile && opts.saveLockfile && opts.mergeGitBranchLockfiles || !upToDateLockfileMajorVersion) {
if (
opts.useLockfile && opts.saveLockfile && opts.mergeGitBranchLockfiles ||
!upToDateLockfileMajorVersion && !opts.frozenLockfile
) {
await writeLockfiles({
currentLockfile: ctx.currentLockfile,
currentLockfileDir: ctx.virtualStoreDir,