diff --git a/__fixtures__/workspace-with-lockfile-dupes/pnpm-lock.yaml b/__fixtures__/workspace-with-lockfile-dupes/pnpm-lock.yaml index dd6cb069b9c..9345ce3e786 100644 --- a/__fixtures__/workspace-with-lockfile-dupes/pnpm-lock.yaml +++ b/__fixtures__/workspace-with-lockfile-dupes/pnpm-lock.yaml @@ -1,4 +1,8 @@ -lockfileVersion: '6.0' +lockfileVersion: '6.1' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false importers: diff --git a/__fixtures__/workspace-with-lockfile-subdep-dupes/pnpm-lock.yaml b/__fixtures__/workspace-with-lockfile-subdep-dupes/pnpm-lock.yaml index 3276bb9f7b6..4cdfbc30d81 100644 --- a/__fixtures__/workspace-with-lockfile-subdep-dupes/pnpm-lock.yaml +++ b/__fixtures__/workspace-with-lockfile-subdep-dupes/pnpm-lock.yaml @@ -1,4 +1,8 @@ -lockfileVersion: '6.0' +lockfileVersion: '6.1' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false importers: diff --git a/pkg-manager/core/src/install/index.ts b/pkg-manager/core/src/install/index.ts index 7921e2eada3..2b51ada00ba 100644 --- a/pkg-manager/core/src/install/index.ts +++ b/pkg-manager/core/src/install/index.ts @@ -358,6 +358,11 @@ export async function mutateModules ( ctx.wantedLockfile.onlyBuiltDependencies = opts.onlyBuiltDependencies ctx.wantedLockfile.packageExtensionsChecksum = packageExtensionsChecksum ctx.wantedLockfile.patchedDependencies = patchedDependencies + } else if (!frozenLockfile) { + ctx.wantedLockfile.settings = { + autoInstallPeers: opts.autoInstallPeers, + excludeLinksFromLockfile: opts.excludeLinksFromLockfile, + } } if ( !ctx.lockfileHadConflicts && diff --git a/pkg-manager/plugin-commands-installation/test/__snapshots__/dedupe.ts.snap b/pkg-manager/plugin-commands-installation/test/__snapshots__/dedupe.ts.snap index 45231b38e86..a7da937024e 100644 --- a/pkg-manager/plugin-commands-installation/test/__snapshots__/dedupe.ts.snap +++ b/pkg-manager/plugin-commands-installation/test/__snapshots__/dedupe.ts.snap @@ -15,7 +15,7 @@ exports[`pnpm dedupe updates old resolutions from importers block and removes ol }, @@ -20,18 +20,6 @@ }, - "lockfileVersion": "6.0", + "lockfileVersion": "6.1", "packages": Object { - "/ajv@6.10.2": Object { - "dependencies": Object { @@ -98,7 +98,7 @@ exports[`pnpm dedupe updates old resolutions from package block 1`] = ` @@ -20,15 +20,6 @@ }, - "lockfileVersion": "6.0", + "lockfileVersion": "6.1", "packages": Object { - "/punycode@2.1.1": Object { - "dev": false,