Skip to content

Commit 84dca06

Browse files
authored
Merge branch 'canary' into chore/lower-node
2 parents b01242f + 6ed4fdd commit 84dca06

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

test/integration/create-next-app/package-manager.test.ts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { projectFilesShouldExist, shouldBeJavascriptProject } from './lib/utils'
1818
const cli = require.resolve('create-next-app/dist/index.js')
1919
const exampleRepo = 'https://github.com/vercel/next.js/tree/canary'
2020
const examplePath = 'examples/basic-css'
21+
const env = { ...process.env, COREPACK_ENABLE_STRICT: '0' }
2122

2223
const run = (args: string[], options: execa.Options) => {
2324
const conf = new Conf({ projectName: 'create-next-app' })
@@ -41,6 +42,7 @@ it('should use npm as the package manager on supplying --use-npm', async () => {
4142
],
4243
{
4344
cwd,
45+
env,
4446
}
4547
)
4648

@@ -62,7 +64,7 @@ it('should use npm as the package manager on supplying --use-npm with example',
6264
'--example',
6365
`${exampleRepo}/${examplePath}`,
6466
],
65-
{ cwd }
67+
{ cwd, env }
6668
)
6769

6870
expect(res.exitCode).toBe(0)
@@ -96,6 +98,7 @@ it('should use Yarn as the package manager on supplying --use-yarn', async () =>
9698
],
9799
{
98100
cwd,
101+
env,
99102
}
100103
)
101104

@@ -139,7 +142,7 @@ it('should use Yarn as the package manager on supplying --use-yarn with example'
139142
'--example',
140143
`${exampleRepo}/${examplePath}`,
141144
],
142-
{ cwd }
145+
{ cwd, env }
143146
)
144147

145148
expect(res.exitCode).toBe(0)
@@ -173,6 +176,7 @@ it('should use pnpm as the package manager on supplying --use-pnpm', async () =>
173176
],
174177
{
175178
cwd,
179+
env,
176180
}
177181
)
178182

@@ -216,7 +220,7 @@ it('should use pnpm as the package manager on supplying --use-pnpm with example'
216220
'--example',
217221
`${exampleRepo}/${examplePath}`,
218222
],
219-
{ cwd }
223+
{ cwd, env }
220224
)
221225

222226
expect(res.exitCode).toBe(0)
@@ -250,6 +254,7 @@ it('should use Bun as the package manager on supplying --use-bun', async () => {
250254
],
251255
{
252256
cwd,
257+
env,
253258
}
254259
)
255260

@@ -289,7 +294,7 @@ it('should use Bun as the package manager on supplying --use-bun with example',
289294
'--example',
290295
`${exampleRepo}/${examplePath}`,
291296
],
292-
{ cwd }
297+
{ cwd, env }
293298
)
294299

295300
expect(res.exitCode).toBe(0)
@@ -322,7 +327,7 @@ it('should infer npm as the package manager', async () => {
322327
],
323328
{
324329
cwd,
325-
env: { ...process.env, npm_config_user_agent: 'npm' },
330+
env: { ...env, npm_config_user_agent: 'npm' },
326331
}
327332
)
328333

@@ -352,7 +357,7 @@ it('should infer npm as the package manager with example', async () => {
352357
'--example',
353358
`${exampleRepo}/${examplePath}`,
354359
],
355-
{ cwd, env: { ...process.env, npm_config_user_agent: 'npm' } }
360+
{ cwd, env: { ...env, npm_config_user_agent: 'npm' } }
356361
)
357362

358363
const files = [
@@ -394,7 +399,7 @@ it('should infer yarn as the package manager', async () => {
394399
],
395400
{
396401
cwd,
397-
env: { ...process.env, npm_config_user_agent: 'yarn' },
402+
env: { ...env, npm_config_user_agent: 'yarn' },
398403
}
399404
)
400405

@@ -435,7 +440,7 @@ it('should infer yarn as the package manager with example', async () => {
435440
'--example',
436441
`${exampleRepo}/${examplePath}`,
437442
],
438-
{ cwd, env: { ...process.env, npm_config_user_agent: 'yarn' } }
443+
{ cwd, env: { ...env, npm_config_user_agent: 'yarn' } }
439444
)
440445

441446
const files = [
@@ -477,7 +482,7 @@ it('should infer pnpm as the package manager', async () => {
477482
],
478483
{
479484
cwd,
480-
env: { ...process.env, npm_config_user_agent: 'pnpm' },
485+
env: { ...env, npm_config_user_agent: 'pnpm' },
481486
}
482487
)
483488

@@ -518,7 +523,7 @@ it('should infer pnpm as the package manager with example', async () => {
518523
'--example',
519524
`${exampleRepo}/${examplePath}`,
520525
],
521-
{ cwd, env: { ...process.env, npm_config_user_agent: 'pnpm' } }
526+
{ cwd, env: { ...env, npm_config_user_agent: 'pnpm' } }
522527
)
523528

524529
const files = [
@@ -556,7 +561,7 @@ it('should infer Bun as the package manager', async () => {
556561
],
557562
{
558563
cwd,
559-
env: { ...process.env, npm_config_user_agent: 'bun' },
564+
env: { ...env, npm_config_user_agent: 'bun' },
560565
}
561566
)
562567

@@ -593,7 +598,7 @@ it('should infer Bun as the package manager with example', async () => {
593598
'--example',
594599
`${exampleRepo}/${examplePath}`,
595600
],
596-
{ cwd, env: { ...process.env, npm_config_user_agent: 'bun' } }
601+
{ cwd, env: { ...env, npm_config_user_agent: 'bun' } }
597602
)
598603

599604
const files = [

0 commit comments

Comments
 (0)