diff --git a/.changeset/eighty-squids-mate.md b/.changeset/eighty-squids-mate.md new file mode 100644 index 0000000000..7191e4e6d9 --- /dev/null +++ b/.changeset/eighty-squids-mate.md @@ -0,0 +1,6 @@ +--- +"@pnpm/plugin-commands-installation": patch +"pnpm": patch +--- + +Set `skipIfHasSideEffectsCache` to `true` when calling rebuild, fixing side effect caching issue when lockfile isn't shared [#6890](https://github.com/pnpm/pnpm/issues/6890). diff --git a/pkg-manager/plugin-commands-installation/src/installDeps.ts b/pkg-manager/plugin-commands-installation/src/installDeps.ts index d2dfe13315..ca417f4f23 100644 --- a/pkg-manager/plugin-commands-installation/src/installDeps.ts +++ b/pkg-manager/plugin-commands-installation/src/installDeps.ts @@ -327,6 +327,7 @@ when running add/update with the --workspace option') pending: true, storeController: store.ctrl, storeDir: store.dir, + skipIfHasSideEffectsCache: true, } ) } diff --git a/pkg-manager/plugin-commands-installation/src/recursive.ts b/pkg-manager/plugin-commands-installation/src/recursive.ts index 95c35d3b73..8250ce03d9 100755 --- a/pkg-manager/plugin-commands-installation/src/recursive.ts +++ b/pkg-manager/plugin-commands-installation/src/recursive.ts @@ -413,6 +413,7 @@ export async function recursive ( await rebuild.handler({ ...opts, pending: opts.pending === true, + skipIfHasSideEffectsCache: true, }, []) }