Skip to content

Commit 7da023f

Browse files
committed
chore: drop package lock file when preparing fixtures
1 parent 86eeae5 commit 7da023f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: tests/prepare.mjs

+5-2
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,17 @@ const promises = fixtures.map((fixture) =>
4444
})
4545
}
4646

47-
// npm is the default
48-
let cmd = `npm install --no-audit --progress=false --prefer-offline --legacy-peer-deps`
47+
let cmd = ``
4948
const { packageManager } = JSON.parse(await readFile(join(cwd, 'package.json'), 'utf8'))
5049
if (packageManager?.startsWith('pnpm')) {
5150
// We disable frozen-lockfile because we may have changed the version of Next.js
5251
cmd = `pnpm install --frozen-lockfile=false ${
5352
process.env.DEBUG || NEXT_VERSION !== 'latest' ? '' : '--reporter silent'
5453
}`
54+
} else {
55+
// npm is the default
56+
cmd = `npm install --no-audit --progress=false --prefer-offline --legacy-peer-deps`
57+
await rm(join(cwd, 'package-lock.json'), { force: true })
5558
}
5659

5760
const addPrefix = new Transform({

0 commit comments

Comments
 (0)