Skip to content

Commit

Permalink
Replace yarn with pnpm in createTestDir() (#45878)
Browse files Browse the repository at this point in the history
Co-authored-by: JJ Kasper <[email protected]>
  • Loading branch information
styfle and ijjk authored Feb 14, 2023
1 parent b9b556e commit 3c8dcfd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/lib/next-modes/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class NextInstance {
...pkgScripts,
build:
(pkgScripts['build'] || this.buildCommand || 'next build') +
' && yarn post-build',
' && pnpm post-build',
// since we can't get the build id as a build artifact, make it
// available under the static files
'post-build': 'cp .next/BUILD_ID .next/static/__BUILD_ID',
Expand Down Expand Up @@ -285,7 +285,12 @@ export class NextInstance {
throw new Error(`stop() must be called before cleaning`)
}

const keptFiles = ['node_modules', 'package.json', 'yarn.lock']
const keptFiles = [
'node_modules',
'package.json',
'yarn.lock',
'pnpm-lock.yaml',
]
for (const file of await fs.readdir(this.testDir)) {
if (!keptFiles.includes(file)) {
await fs.remove(path.join(this.testDir, file))
Expand Down

0 comments on commit 3c8dcfd

Please sign in to comment.