mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
fix(nuxt): don't prompt to install packages in CI (#22636)
This commit is contained in:
parent
d50a416304
commit
4be2ffe4aa
@ -58,9 +58,9 @@
|
||||
"@nuxt/telemetry": "^2.4.1",
|
||||
"@nuxt/ui-templates": "^1.3.1",
|
||||
"@nuxt/vite-builder": "workspace:../vite",
|
||||
"@unhead/dom": "^1.3.2",
|
||||
"@unhead/ssr": "^1.3.2",
|
||||
"@unhead/vue": "^1.3.2",
|
||||
"@unhead/dom": "^1.3.2",
|
||||
"@vue/shared": "^3.3.4",
|
||||
"acorn": "8.10.0",
|
||||
"c12": "^1.4.2",
|
||||
@ -91,6 +91,7 @@
|
||||
"pkg-types": "^1.0.3",
|
||||
"prompts": "^2.4.2",
|
||||
"scule": "^1.0.0",
|
||||
"std-env": "^3.3.3",
|
||||
"strip-literal": "^1.3.0",
|
||||
"ufo": "^1.2.0",
|
||||
"ultrahtml": "^1.3.0",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { addDependency } from 'nypm'
|
||||
import { resolvePackageJSON } from 'pkg-types'
|
||||
import { logger } from '@nuxt/kit'
|
||||
import { isCI } from 'std-env'
|
||||
import prompts from 'prompts'
|
||||
|
||||
export async function ensurePackageInstalled (rootDir: string, name: string, searchPaths?: string[]) {
|
||||
@ -9,6 +10,9 @@ export async function ensurePackageInstalled (rootDir: string, name: string, sea
|
||||
}
|
||||
|
||||
logger.info(`Package ${name} is missing`)
|
||||
if (isCI) {
|
||||
return false
|
||||
}
|
||||
|
||||
const { confirm } = await prompts({
|
||||
type: 'confirm',
|
||||
|
@ -463,6 +463,9 @@ importers:
|
||||
scule:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0
|
||||
std-env:
|
||||
specifier: ^3.3.3
|
||||
version: 3.3.3
|
||||
strip-literal:
|
||||
specifier: ^1.3.0
|
||||
version: 1.3.0
|
||||
@ -7183,7 +7186,7 @@ packages:
|
||||
graceful-fs: 4.2.11
|
||||
|
||||
/jstransformer@1.0.0:
|
||||
resolution: {integrity: sha1-7Yvwkh4vPx7U1cGkT2hwntJHIsM=}
|
||||
resolution: {integrity: sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==}
|
||||
dependencies:
|
||||
is-promise: 2.2.2
|
||||
promise: 7.3.1
|
||||
@ -10316,7 +10319,7 @@ packages:
|
||||
engines: {node: '>=0.6'}
|
||||
|
||||
/token-stream@1.0.0:
|
||||
resolution: {integrity: sha1-zCAOqyYT9BZtJ/+a/HylbUnfbrQ=}
|
||||
resolution: {integrity: sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==}
|
||||
dev: false
|
||||
|
||||
/totalist@1.1.0:
|
||||
|
Loading…
Reference in New Issue
Block a user