diff --git a/packages/vant-cli/package.json b/packages/vant-cli/package.json index ff3cf16ab..3105c008b 100644 --- a/packages/vant-cli/package.json +++ b/packages/vant-cli/package.json @@ -61,7 +61,7 @@ "conventional-changelog": "^3.1.25", "esbuild": "^0.16.10", "eslint": "^8.23.0", - "execa": "^5.1.1", + "execa": "^6.1.0", "fast-glob": "^3.2.11", "fs-extra": "^10.1.0", "hash-sum": "^2.0.0", diff --git a/packages/vant-cli/src/commands/build.ts b/packages/vant-cli/src/commands/build.ts index c3c19503a..b6a042686 100644 --- a/packages/vant-cli/src/commands/build.ts +++ b/packages/vant-cli/src/commands/build.ts @@ -1,5 +1,5 @@ import fse from 'fs-extra'; -import execa from 'execa'; +import { execa } from 'execa'; import { join, relative } from 'path'; import { clean } from './clean.js'; import { CSS_LANG } from '../common/css.js'; diff --git a/packages/vant-cli/src/commands/lint.ts b/packages/vant-cli/src/commands/lint.ts index 089ac2c44..d28fd782d 100644 --- a/packages/vant-cli/src/commands/lint.ts +++ b/packages/vant-cli/src/commands/lint.ts @@ -1,4 +1,4 @@ -import execa from 'execa'; +import { execa } from 'execa'; import { consola, createSpinner } from '../common/logger.js'; import { SCRIPT_EXTS } from '../common/constant.js'; @@ -18,7 +18,7 @@ function runCommand( return new Promise((resolve) => { execa(cmd, options, { preferLocal: true, - env: { FORCE_COLOR: true }, + env: { FORCE_COLOR: 'true' }, }) .then(() => { spinner.success({ text: messages.succeed }); diff --git a/packages/vant-cli/src/common/manager.ts b/packages/vant-cli/src/common/manager.ts index e660b3c08..60119d487 100644 --- a/packages/vant-cli/src/common/manager.ts +++ b/packages/vant-cli/src/common/manager.ts @@ -1,4 +1,4 @@ -import execa from 'execa'; +import { execa } from 'execa'; import { consola } from './logger.js'; import { execSync } from 'child_process'; import { getVantConfig } from './constant.js'; diff --git a/packages/vant-cli/src/module.d.ts b/packages/vant-cli/src/module.d.ts index a623ae1e7..9ddd732ad 100644 --- a/packages/vant-cli/src/module.d.ts +++ b/packages/vant-cli/src/module.d.ts @@ -1,5 +1,4 @@ // some modules with missing type definitions -declare module 'execa'; declare module 'hash-sum'; declare module '@babel/core'; declare module 'release-it'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 053130dab..e39097415 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -103,7 +103,7 @@ importers: conventional-changelog: ^3.1.25 esbuild: ^0.16.10 eslint: ^8.23.0 - execa: ^5.1.1 + execa: ^6.1.0 fast-glob: ^3.2.11 fs-extra: ^10.1.0 hash-sum: ^2.0.0 @@ -146,7 +146,7 @@ importers: conventional-changelog: 3.1.25 esbuild: 0.16.10 eslint: 8.28.0 - execa: 5.1.1 + execa: 6.1.0 fast-glob: 3.2.12 fs-extra: 10.1.0 hash-sum: 2.0.0