mirror of
https://github.com/vitejs/vite.git
synced 2024-11-21 14:48:41 +00:00
chore(deps): update dependency execa to v9 (#16662)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
This commit is contained in:
parent
6583ad25a1
commit
76d1642c3c
@ -67,7 +67,7 @@
|
||||
"eslint-plugin-i": "^2.29.1",
|
||||
"eslint-plugin-n": "^17.6.0",
|
||||
"eslint-plugin-regexp": "^2.5.0",
|
||||
"execa": "^8.0.1",
|
||||
"execa": "^9.0.2",
|
||||
"feed": "^4.2.2",
|
||||
"fs-extra": "^11.2.0",
|
||||
"lint-staged": "^15.2.2",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { join } from 'node:path'
|
||||
import type { ExecaSyncReturnValue, SyncOptions } from 'execa'
|
||||
import type { SyncOptions, SyncResult } from 'execa'
|
||||
import { execaCommandSync } from 'execa'
|
||||
import fs from 'fs-extra'
|
||||
import { afterEach, beforeAll, expect, test } from 'vitest'
|
||||
@ -9,10 +9,10 @@ const CLI_PATH = join(__dirname, '..')
|
||||
const projectName = 'test-app'
|
||||
const genPath = join(__dirname, projectName)
|
||||
|
||||
const run = (
|
||||
const run = <SO extends SyncOptions>(
|
||||
args: string[],
|
||||
options: SyncOptions = {},
|
||||
): ExecaSyncReturnValue => {
|
||||
options?: SO,
|
||||
): SyncResult<SO> => {
|
||||
return execaCommandSync(`node ${CLI_PATH} ${args.join(' ')}`, options)
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,7 @@ export async function serve() {
|
||||
const serverProcess = execaCommand(serverCommand, {
|
||||
cwd: rootDir,
|
||||
stdio: 'pipe',
|
||||
forceKillAfterDelay: 3000,
|
||||
})
|
||||
collectStreams('server', serverProcess)
|
||||
|
||||
|
@ -73,6 +73,7 @@ export async function serve() {
|
||||
const serverProcess = execaCommand(serverCommand, {
|
||||
cwd: rootDir,
|
||||
stdio: 'pipe',
|
||||
forceKillAfterDelay: 3000,
|
||||
})
|
||||
collectStreams('server', serverProcess)
|
||||
|
||||
|
@ -14,7 +14,7 @@ import { normalizePath } from 'vite'
|
||||
import { fromComment } from 'convert-source-map'
|
||||
import type { Assertion } from 'vitest'
|
||||
import { expect } from 'vitest'
|
||||
import type { ExecaChildProcess } from 'execa'
|
||||
import type { ResultPromise as ExecaResultPromise } from 'execa'
|
||||
import { isBuild, isWindows, page, testDir } from './vitestSetup'
|
||||
|
||||
export * from './vitestSetup'
|
||||
@ -380,7 +380,7 @@ export const formatSourcemapForSnapshot = (map: any): any => {
|
||||
|
||||
// helper function to kill process, uses taskkill on windows to ensure child process is killed too
|
||||
export async function killProcess(
|
||||
serverProcess: ExecaChildProcess,
|
||||
serverProcess: ExecaResultPromise,
|
||||
): Promise<void> {
|
||||
if (isWindows) {
|
||||
try {
|
||||
@ -390,7 +390,7 @@ export async function killProcess(
|
||||
console.error('failed to taskkill:', e)
|
||||
}
|
||||
} else {
|
||||
serverProcess.kill('SIGTERM', { forceKillAfterTimeout: 2000 })
|
||||
serverProcess.kill('SIGTERM')
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,8 +103,8 @@ importers:
|
||||
specifier: ^2.5.0
|
||||
version: 2.5.0(eslint@8.57.0)
|
||||
execa:
|
||||
specifier: ^8.0.1
|
||||
version: 8.0.1
|
||||
specifier: ^9.0.2
|
||||
version: 9.0.2
|
||||
feed:
|
||||
specifier: ^4.2.2
|
||||
version: 4.2.2
|
||||
@ -4368,6 +4368,10 @@ packages:
|
||||
requiresBuild: true
|
||||
optional: true
|
||||
|
||||
/@sec-ant/readable-stream@0.4.1:
|
||||
resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==}
|
||||
dev: true
|
||||
|
||||
/@shikijs/core@1.3.0:
|
||||
resolution: {integrity: sha512-7fedsBfuILDTBmrYZNFI8B6ATTxhQAasUHllHmjvSZPnoq4bULWoTpHwmuQvZ8Aq03/tAa2IGo6RXqWtHdWaCA==}
|
||||
dev: true
|
||||
@ -4414,6 +4418,11 @@ packages:
|
||||
resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
|
||||
dev: true
|
||||
|
||||
/@sindresorhus/merge-streams@4.0.0:
|
||||
resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==}
|
||||
engines: {node: '>=18'}
|
||||
dev: true
|
||||
|
||||
/@tsconfig/node10@1.0.8:
|
||||
resolution: {integrity: sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==}
|
||||
|
||||
@ -6638,6 +6647,24 @@ packages:
|
||||
strip-final-newline: 3.0.0
|
||||
dev: true
|
||||
|
||||
/execa@9.0.2:
|
||||
resolution: {integrity: sha512-oO281GF7ksH/Ogv1xyDf1prvFta/6/XkGKxRUvA3IB2MU1rCJGlFs86HRZhdooow1ISkR0Np0rOxUCIJVw36Rg==}
|
||||
engines: {node: '>=18'}
|
||||
dependencies:
|
||||
'@sindresorhus/merge-streams': 4.0.0
|
||||
cross-spawn: 7.0.3
|
||||
figures: 6.1.0
|
||||
get-stream: 9.0.1
|
||||
human-signals: 7.0.0
|
||||
is-plain-obj: 4.1.0
|
||||
is-stream: 4.0.1
|
||||
npm-run-path: 5.3.0
|
||||
pretty-ms: 9.0.0
|
||||
signal-exit: 4.1.0
|
||||
strip-final-newline: 4.0.0
|
||||
yoctocolors: 2.0.0
|
||||
dev: true
|
||||
|
||||
/exit-hook@2.2.1:
|
||||
resolution: {integrity: sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==}
|
||||
engines: {node: '>=6'}
|
||||
@ -6729,6 +6756,13 @@ packages:
|
||||
web-streams-polyfill: 3.2.1
|
||||
dev: true
|
||||
|
||||
/figures@6.1.0:
|
||||
resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==}
|
||||
engines: {node: '>=18'}
|
||||
dependencies:
|
||||
is-unicode-supported: 2.0.0
|
||||
dev: true
|
||||
|
||||
/file-entry-cache@6.0.1:
|
||||
resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==}
|
||||
engines: {node: ^10.12.0 || >=12.0.0}
|
||||
@ -6949,6 +6983,14 @@ packages:
|
||||
engines: {node: '>=16'}
|
||||
dev: true
|
||||
|
||||
/get-stream@9.0.1:
|
||||
resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==}
|
||||
engines: {node: '>=18'}
|
||||
dependencies:
|
||||
'@sec-ant/readable-stream': 0.4.1
|
||||
is-stream: 4.0.1
|
||||
dev: true
|
||||
|
||||
/get-them-args@1.3.2:
|
||||
resolution: {integrity: sha512-LRn8Jlk+DwZE4GTlDbT3Hikd1wSHgLMme/+7ddlqKd7ldwR6LjJgTVWzBnR01wnYGe4KgrXjg287RaI22UHmAw==}
|
||||
dev: true
|
||||
@ -7208,6 +7250,11 @@ packages:
|
||||
engines: {node: '>=16.17.0'}
|
||||
dev: true
|
||||
|
||||
/human-signals@7.0.0:
|
||||
resolution: {integrity: sha512-74kytxOUSvNbjrT9KisAbaTZ/eJwD/LrbM/kh5j0IhPuJzwuA19dWvniFGwBzN9rVjg+O/e+F310PjObDXS+9Q==}
|
||||
engines: {node: '>=18.18.0'}
|
||||
dev: true
|
||||
|
||||
/iconv-lite@0.4.24:
|
||||
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@ -7370,6 +7417,11 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/is-plain-obj@4.1.0:
|
||||
resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==}
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/is-promise@2.2.2:
|
||||
resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==}
|
||||
dev: true
|
||||
@ -7399,6 +7451,16 @@ packages:
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/is-stream@4.0.1:
|
||||
resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==}
|
||||
engines: {node: '>=18'}
|
||||
dev: true
|
||||
|
||||
/is-unicode-supported@2.0.0:
|
||||
resolution: {integrity: sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==}
|
||||
engines: {node: '>=18'}
|
||||
dev: true
|
||||
|
||||
/is-what@3.14.1:
|
||||
resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==}
|
||||
dev: true
|
||||
@ -8517,6 +8579,13 @@ packages:
|
||||
path-key: 4.0.0
|
||||
dev: true
|
||||
|
||||
/npm-run-path@5.3.0:
|
||||
resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dependencies:
|
||||
path-key: 4.0.0
|
||||
dev: true
|
||||
|
||||
/npmlog@5.0.1:
|
||||
resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==}
|
||||
dependencies:
|
||||
@ -8632,6 +8701,11 @@ packages:
|
||||
type-fest: 4.18.1
|
||||
dev: true
|
||||
|
||||
/parse-ms@4.0.0:
|
||||
resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==}
|
||||
engines: {node: '>=18'}
|
||||
dev: true
|
||||
|
||||
/parse-node-version@1.0.1:
|
||||
resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==}
|
||||
engines: {node: '>= 0.10'}
|
||||
@ -8961,6 +9035,13 @@ packages:
|
||||
react-is: 18.2.0
|
||||
dev: true
|
||||
|
||||
/pretty-ms@9.0.0:
|
||||
resolution: {integrity: sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==}
|
||||
engines: {node: '>=18'}
|
||||
dependencies:
|
||||
parse-ms: 4.0.0
|
||||
dev: true
|
||||
|
||||
/printable-characters@1.0.42:
|
||||
resolution: {integrity: sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==}
|
||||
dev: true
|
||||
@ -9777,6 +9858,11 @@ packages:
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/strip-final-newline@4.0.0:
|
||||
resolution: {integrity: sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==}
|
||||
engines: {node: '>=18'}
|
||||
dev: true
|
||||
|
||||
/strip-json-comments@3.1.1:
|
||||
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
|
||||
engines: {node: '>=8'}
|
||||
@ -10663,6 +10749,11 @@ packages:
|
||||
engines: {node: '>=12.20'}
|
||||
dev: true
|
||||
|
||||
/yoctocolors@2.0.0:
|
||||
resolution: {integrity: sha512-esbDnt0Z1zI1KgvOZU90hJbL6BkoUbrP9yy7ArNZ6TmxBxydMJTYMf9FZjmwwcA8ZgEQzriQ3hwZ0NYXhlFo8Q==}
|
||||
engines: {node: '>=18'}
|
||||
dev: true
|
||||
|
||||
/youch@3.2.3:
|
||||
resolution: {integrity: sha512-ZBcWz/uzZaQVdCvfV4uk616Bbpf2ee+F/AvuKDR5EwX/Y4v06xWdtMluqTD7+KlZdM93lLm9gMZYo0sKBS0pgw==}
|
||||
dependencies:
|
||||
|
@ -2,16 +2,16 @@ import { readdirSync, writeFileSync } from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import semver from 'semver'
|
||||
import colors from 'picocolors'
|
||||
import type { Options as ExecaOptions, ExecaReturnValue } from 'execa'
|
||||
import type { Options as ExecaOptions, ResultPromise } from 'execa'
|
||||
import { execa } from 'execa'
|
||||
import fs from 'fs-extra'
|
||||
|
||||
export async function run(
|
||||
export function run<EO extends ExecaOptions>(
|
||||
bin: string,
|
||||
args: string[],
|
||||
opts: ExecaOptions = {},
|
||||
): Promise<ExecaReturnValue> {
|
||||
return execa(bin, args, { stdio: 'inherit', ...opts })
|
||||
opts?: EO,
|
||||
): ResultPromise<EO & (keyof EO extends 'stdio' ? {} : { stdio: 'inherit' })> {
|
||||
return execa(bin, args, { stdio: 'inherit', ...opts }) as any
|
||||
}
|
||||
|
||||
export async function getLatestTag(pkgName: string): Promise<string> {
|
||||
|
Loading…
Reference in New Issue
Block a user