Skip to content

Commit

Permalink
chore(deps): update dependency execa to v9 (#402)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
  • Loading branch information
renovate[bot] and sxzz authored May 30, 2024
1 parent 96c82e9 commit 4627ff0
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^14.0.0",
"eslint-plugin-regexp": "^2.6.0",
"execa": "^8.0.1",
"execa": "^9.1.0",
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
"lint-staged": "^15.2.5",
Expand Down
6 changes: 3 additions & 3 deletions playground/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { Manifest } from 'vite'
import { normalizePath } from 'vite'
import { fromComment } from 'convert-source-map'
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'
Expand Down Expand Up @@ -304,7 +304,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 {
Expand All @@ -314,6 +314,6 @@ export async function killProcess(
console.error('failed to taskkill:', e)
}
} else {
serverProcess.kill('SIGTERM', { forceKillAfterTimeout: 2000 })
serverProcess.kill('SIGTERM')
}
}
109 changes: 107 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 8 additions & 13 deletions scripts/releaseUtils.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
import { readdirSync, writeFileSync } from 'node:fs'
import path from 'node:path'
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> {
const tags = (await run('git', ['tag'], { stdio: 'pipe' })).stdout
.split(/\n/)
.filter(Boolean)
const prefix = pkgName === 'vite' ? 'v' : `${pkgName}@`
return tags
.filter((tag) => tag.startsWith(prefix))
.sort()
.reverse()[0]
const pkgJson = await fs.readJson(`packages/${pkgName}/package.json`)
const version = pkgJson.version
return `${pkgName}@${version}`
}

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

0 comments on commit 4627ff0

Please sign in to comment.