diff --git a/.changeset/khaki-coats-enjoy.md b/.changeset/khaki-coats-enjoy.md new file mode 100644 index 0000000000..e08f99be5a --- /dev/null +++ b/.changeset/khaki-coats-enjoy.md @@ -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). diff --git a/pkg-manager/core/src/install/index.ts b/pkg-manager/core/src/install/index.ts index 0589138ef2..84799b3448 100644 --- a/pkg-manager/core/src/install/index.ts +++ b/pkg-manager/core/src/install/index.ts @@ -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 = {