Skip to content

Commit

Permalink
fix: replace execa with tinyexec (#1849)
Browse files Browse the repository at this point in the history
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
KermanX and autofix-ci[bot] authored Sep 27, 2024
1 parent 74479ec commit 458c1f9
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 119 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"eslint": "catalog:",
"eslint-plugin-format": "catalog:",
"esno": "catalog:",
"execa": "catalog:",
"katex": "catalog:",
"lint-staged": "catalog:",
"mermaid": "catalog:",
Expand All @@ -66,6 +65,7 @@
"shiki": "catalog:",
"simple-git-hooks": "catalog:",
"taze": "catalog:",
"tinyexec": "catalog:",
"ts-json-schema-generator": "catalog:",
"tsup": "catalog:",
"typescript": "catalog:",
Expand Down
6 changes: 3 additions & 3 deletions packages/create-app/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { createRequire } from 'node:module'
import { fileURLToPath } from 'node:url'
import minimist from 'minimist'
import prompts from 'prompts'
import { execa } from 'execa'
import { x } from 'tinyexec'
import { blue, bold, cyan, dim, green, yellow } from 'kolorist'

const argv = minimist(process.argv.slice(2))
Expand Down Expand Up @@ -123,8 +123,8 @@ async function init() {
if (!agent)
return

await execa(agent, ['install'], { stdio: 'inherit', cwd: root })
await execa(agent, ['run', 'dev'], { stdio: 'inherit', cwd: root })
await x(agent, ['install'], { nodeOptions: { stdio: 'inherit', cwd: root } })
await x(agent, ['run', 'dev'], { nodeOptions: { stdio: 'inherit', cwd: root } })
}
else {
console.log(dim('\n start it later by:\n'))
Expand Down
4 changes: 2 additions & 2 deletions packages/create-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"prepublishOnly": "npm run build"
},
"dependencies": {
"execa": "catalog:",
"kolorist": "catalog:",
"minimist": "catalog:",
"prompts": "catalog:"
"prompts": "catalog:",
"tinyexec": "catalog:"
}
}
8 changes: 4 additions & 4 deletions packages/vscode/scripts/publish.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-console */
import process from 'node:process'
import fs from 'fs-extra'
import { execa } from 'execa'
import { x } from 'tinyexec'

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

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

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

publish()
Loading

0 comments on commit 458c1f9

Please sign in to comment.