Skip to content

Commit 424cc31

Browse files
committed
perf: drop execa
We don't actually use it in the main vite package, so that one is an easy win. In the electron package, we use it only to launch a well known path, i.e. we don't use any features of `execa`. So we should be able to switch to using the built in `child_process` module directly.
1 parent 600ee7d commit 424cc31

File tree

6 files changed

+4
-138
lines changed

6 files changed

+4
-138
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@
9494
"eslint": "^9.35.0",
9595
"eslint-plugin-format": "^1.0.1",
9696
"eslint-vitest-rule-tester": "^2.2.1",
97-
"execa": "^9.6.0",
9897
"fast-glob": "^3.3.3",
9998
"fs-extra": "^11.3.1",
10099
"jsdom": "^26.1.0",

packages/electron/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"@vue/devtools-kit": "workspace:^",
4141
"@vue/devtools-shared": "workspace:^",
4242
"electron": "^36.9.0",
43-
"execa": "catalog:",
4443
"h3": "^1.15.4",
4544
"pathe": "catalog:",
4645
"socket.io": "^4.8.1",

packages/electron/src/cli.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
import { spawnSync } from 'node:child_process'
12
import electron from 'electron'
2-
import { execaSync } from 'execa'
33
import { resolve } from 'pathe'
44

55
const appPath = decodeURIComponent(resolve(new URL('../dist/app.cjs', import.meta.url).pathname))
66
const argv = process.argv.slice(2)
77

8-
const result = execaSync(electron as unknown as string, [appPath].concat(argv), {
8+
const result = spawnSync(electron as unknown as string, [appPath].concat(argv), {
99
stdio: 'inherit',
10-
windowsHide: false,
10+
shell: process.platform === 'win32',
1111
})
1212

13-
process.exit(result.exitCode)
13+
process.exit(result.status ?? 0)

packages/vite/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"@vue/devtools-core": "workspace:^",
5252
"@vue/devtools-kit": "workspace:^",
5353
"@vue/devtools-shared": "workspace:^",
54-
"execa": "catalog:",
5554
"sirv": "^3.0.2",
5655
"vite-plugin-inspect": "catalog:",
5756
"vite-plugin-vue-inspector": "^5.3.2"

0 commit comments

Comments
 (0)