Skip to content

Commit b898b1e

Browse files
committed
fix(auto-install): prevent pnpm from mutating workspace lockfile via --ignore-workspace; restore workspace lockfile (v9)
1 parent 690ba52 commit b898b1e

File tree

2 files changed

+10445
-5
lines changed

2 files changed

+10445
-5
lines changed

packages/auto-install/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export default function autoInstall(opts: RollupAutoInstallOptions = {}): Plugin
4242
// intentionally undocumented options. used for tests
4343
commands: {
4444
npm: 'npm install',
45-
pnpm: 'pnpm install',
45+
// Prevent pnpm from treating test fixtures as part of the workspace
46+
pnpm: 'pnpm install --ignore-workspace',
4647
yarn: 'yarn add'
4748
},
4849
manager: fs.existsSync('yarn.lock') ? 'yarn' : fs.existsSync('pnpm-lock.yaml') ? 'pnpm' : 'npm',

0 commit comments

Comments
 (0)