Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace yarn with pnpm in createTestDir() #45878

Merged
merged 4 commits into from
Feb 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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