Skip to content

Commit af2eb01

Browse files
committed
fix(spawnd): remove exit dependency
Closes #541
1 parent 3c388a2 commit af2eb01

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

package-lock.json

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

packages/spawnd/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"devDependencies": {
4444
"@types/exit": "^0.1.31",
4545
"@types/signal-exit": "^3.0.1",
46-
"exit": "^0.1.2",
4746
"rollup": "^3.18.0",
4847
"rollup-plugin-dts": "^5.2.0",
4948
"rollup-plugin-swc3": "^0.8.0"

packages/spawnd/src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
} from "node:child_process";
66
import { promisify } from "node:util";
77
import treeKill from "tree-kill";
8-
import exit from "exit";
98
import onExit from "signal-exit";
109

1110
const pTreeKill = promisify(treeKill);
@@ -21,9 +20,9 @@ export const spawnd = (command: string, options?: SpawndOptions) => {
2120

2221
const cleanExit = (code = 1) => {
2322
if (proc && proc.pid) {
24-
treeKill(proc.pid, () => exit(code));
23+
treeKill(proc.pid, () => process.exit(code));
2524
} else {
26-
exit(code);
25+
process.exit(code);
2726
}
2827
};
2928

0 commit comments

Comments
 (0)