Skip to content

Commit 458c1f9

Browse files
fix: replace execa with tinyexec (#1849)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 74479ec commit 458c1f9

File tree

7 files changed

+20
-119
lines changed

7 files changed

+20
-119
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
"eslint": "catalog:",
5757
"eslint-plugin-format": "catalog:",
5858
"esno": "catalog:",
59-
"execa": "catalog:",
6059
"katex": "catalog:",
6160
"lint-staged": "catalog:",
6261
"mermaid": "catalog:",
@@ -66,6 +65,7 @@
6665
"shiki": "catalog:",
6766
"simple-git-hooks": "catalog:",
6867
"taze": "catalog:",
68+
"tinyexec": "catalog:",
6969
"ts-json-schema-generator": "catalog:",
7070
"tsup": "catalog:",
7171
"typescript": "catalog:",

packages/create-app/index.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { createRequire } from 'node:module'
99
import { fileURLToPath } from 'node:url'
1010
import minimist from 'minimist'
1111
import prompts from 'prompts'
12-
import { execa } from 'execa'
12+
import { x } from 'tinyexec'
1313
import { blue, bold, cyan, dim, green, yellow } from 'kolorist'
1414

1515
const argv = minimist(process.argv.slice(2))
@@ -123,8 +123,8 @@ async function init() {
123123
if (!agent)
124124
return
125125

126-
await execa(agent, ['install'], { stdio: 'inherit', cwd: root })
127-
await execa(agent, ['run', 'dev'], { stdio: 'inherit', cwd: root })
126+
await x(agent, ['install'], { nodeOptions: { stdio: 'inherit', cwd: root } })
127+
await x(agent, ['run', 'dev'], { nodeOptions: { stdio: 'inherit', cwd: root } })
128128
}
129129
else {
130130
console.log(dim('\n start it later by:\n'))

packages/create-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"prepublishOnly": "npm run build"
2525
},
2626
"dependencies": {
27-
"execa": "catalog:",
2827
"kolorist": "catalog:",
2928
"minimist": "catalog:",
30-
"prompts": "catalog:"
29+
"prompts": "catalog:",
30+
"tinyexec": "catalog:"
3131
}
3232
}

packages/vscode/scripts/publish.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22
import process from 'node:process'
33
import fs from 'fs-extra'
4-
import { execa } from 'execa'
4+
import { x } from 'tinyexec'
55

66
async function publish() {
77
const root = new URL('..', import.meta.url)
@@ -24,11 +24,11 @@ async function publish() {
2424

2525
console.log('Publishing VS Code extension...')
2626

27-
await execa('npm', ['run', 'build'], { cwd: root, stdio: 'inherit' })
27+
await x('npm', ['run', 'build'], { nodeOptions: { cwd: root, stdio: 'inherit' } })
2828
console.log('\nPublish to VSCE...\n')
29-
await execa('npx', ['@vscode/vsce', 'publish', '--no-dependencies', '-p', process.env.VSCE_TOKEN!], { cwd: root, stdio: 'inherit' })
29+
await x('npx', ['@vscode/vsce', 'publish', '--no-dependencies', '-p', process.env.VSCE_TOKEN!], { nodeOptions: { cwd: root, stdio: 'inherit' } })
3030
console.log('\nPublish to OVSE...\n')
31-
await execa('npx', ['ovsx', 'publish', '--no-dependencies', '-p', process.env.OVSX_TOKEN!], { cwd: root, stdio: 'inherit' })
31+
await x('npx', ['ovsx', 'publish', '--no-dependencies', '-p', process.env.OVSX_TOKEN!], { nodeOptions: { cwd: root, stdio: 'inherit' } })
3232
}
3333

3434
publish()

0 commit comments

Comments
 (0)