8000 fix(nuxt): don't prompt to install packages in CI (#22636) · nuxt/nuxt@4be2ffe · GitHub
[go: up one dir, main page]

Skip to content

Commit 4be2ffe

Browse files
authored
fix(nuxt): don't prompt to install packages in CI (#22636)
1 parent d50a416 commit 4be2ffe

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

packages/nuxt/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
"@nuxt/telemetry": "^2.4.1",
5959
"@nuxt/ui-templates": "^1.3.1",
6060
"@nuxt/vite-builder": "workspace:../vite",
61+
"@unhead/dom": "^1.3.2",
6162
"@unhead/ssr": "^1.3.2",
6263
"@unhead/vue": "^1.3.2",
63-
"@unhead/dom": "^1.3.2",
6464
"@vue/shared": "^3.3.4",
6565
"acorn": "8.10.0",
6666
"c12": "^1.4.2",
@@ -91,6 +91,7 @@
9191
"pkg-types": "^1.0.3",
9292
"prompts": "^2.4.2",
9393
"scule": "^1.0.0",
94+
"std-env": "^3.3.3",
9495
"strip-literal": "^1.3.0",
9596
"ufo": "^1.2.0",
9697
"ultrahtml": "^1.3.0",

packages/nuxt/src/core/features.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { addDependency } from 'nypm'
22
import { resolvePackageJSON } from 'pkg-types'
33
import { logger } from '@nuxt/kit'
4+
import { isCI } from 'std-env'
45
import prompts from 'prompts'
56

67
export async function ensurePackageInstalled (rootDir: string, name: string, searchPaths?: string[]) {
@@ -9,6 +10,9 @@ export async function ensurePackageInstalled (rootDir: string, name: string, sea
910
}
1011

1112
logger.info(`Package ${name} is missing`)
13+
if (isCI) {
14+
return false
15+
}
1216

1317
const { confirm } = await prompts({
1418
type: 'confirm',

pnpm-lock.yaml

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0