Skip to content

Commit 4627ff0

Browse files
renovate[bot]sxzz
andauthored
chore(deps): update dependency execa to v9 (vitejs#402)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: 三咲智子 Kevin Deng <[email protected]>
1 parent 96c82e9 commit 4627ff0

File tree

4 files changed

+119
-19
lines changed

4 files changed

+119
-19
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"eslint-plugin-import": "^2.29.1",
5353
"eslint-plugin-n": "^14.0.0",
5454
"eslint-plugin-regexp": "^2.6.0",
55-
"execa": "^8.0.1",
55+
"execa": "^9.1.0",
5656
"fast-glob": "^3.3.2",
5757
"fs-extra": "^11.2.0",
5858
"lint-staged": "^15.2.5",

playground/test-utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { Manifest } from 'vite'
99
import { normalizePath } from 'vite'
1010
import { fromComment } from 'convert-source-map'
1111
import { expect } from 'vitest'
12-
import type { ExecaChildProcess } from 'execa'
12+
import type { ResultPromise as ExecaResultPromise } from 'execa'
1313
import { isBuild, isWindows, page, testDir } from './vitestSetup'
1414

1515
export * from './vitestSetup'
@@ -304,7 +304,7 @@ export const formatSourcemapForSnapshot = (map: any): any => {
304304

305305
// helper function to kill process, uses taskkill on windows to ensure child process is killed too
306306
export async function killProcess(
307-
serverProcess: ExecaChildProcess,
307+
serverProcess: ExecaResultPromise,
308308
): Promise<void> {
309309
if (isWindows) {
310310
try {
@@ -314,6 +314,6 @@ export async function killProcess(
314314
console.error('failed to taskkill:', e)
315315
}
316316
} else {
317-
serverProcess.kill('SIGTERM', { forceKillAfterTimeout: 2000 })
317+
serverProcess.kill('SIGTERM')
318318
}
319319
}

pnpm-lock.yaml

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

scripts/releaseUtils.ts

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
import { readdirSync, writeFileSync } from 'node:fs'
22
import path from 'node:path'
33
import colors from 'picocolors'
4-
import type { Options as ExecaOptions, ExecaReturnValue } from 'execa'
4+
import type { Options as ExecaOptions, ResultPromise } from 'execa'
55
import { execa } from 'execa'
66
import fs from 'fs-extra'
77

8-
export async function run(
8+
export function run<EO extends ExecaOptions>(
99
bin: string,
1010
args: string[],
11-
opts: ExecaOptions = {},
12-
): Promise<ExecaReturnValue> {
13-
return execa(bin, args, { stdio: 'inherit', ...opts })
11+
opts?: EO,
12+
): ResultPromise<EO & (keyof EO extends 'stdio' ? {} : { stdio: 'inherit' })> {
13+
return execa(bin, args, { stdio: 'inherit', ...opts }) as any
1414
}
1515

1616
export async function getLatestTag(pkgName: string): Promise<string> {
17-
const tags = (await run('git', ['tag'], { stdio: 'pipe' })).stdout
18-
.split(/\n/)
19-
.filter(Boolean)
20-
const prefix = pkgName === 'vite' ? 'v' : `${pkgName}@`
21-
return tags
22-
.filter((tag) => tag.startsWith(prefix))
23-
.sort()
24-
.reverse()[0]
17+
const pkgJson = await fs.readJson(`packages/${pkgName}/package.json`)
18+
const version = pkgJson.version
19+
return `${pkgName}@${version}`
2520
}
2621

2722
export async function logRecentCommits(pkgName: string): Promise<void> {

0 commit comments

Comments
 (0)