Skip to content

Commit 9b98a80

Browse files
committed
feat: 🎸 change ts-node to swc-node
1 parent 1a65a2a commit 9b98a80

File tree

4 files changed

+492
-275
lines changed

4 files changed

+492
-275
lines changed

.changeset/rare-pandas-laugh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperse/exec-program": minor
3+
---
4+
5+
change ts-node to swc-node

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,31 +62,32 @@
6262
}
6363
},
6464
"dependencies": {
65-
"@hyperse/ts-node-paths": "^1.0.12",
66-
"execa": "^9.5.3"
65+
"@swc-node/register": "^1.10.10",
66+
"@swc/core": "^1.11.29",
67+
"execa": "^9.6.0"
6768
},
6869
"devDependencies": {
6970
"@changesets/changelog-github": "0.5.1",
7071
"@changesets/cli": "2.29.4",
7172
"@commitlint/cli": "19.8.1",
7273
"@commitlint/config-conventional": "19.8.1",
7374
"@hyperse/eslint-config-hyperse": "^1.4.4",
74-
"@types/node": "^22.15.18",
75+
"@types/node": "^22.15.29",
7576
"commitizen": "4.3.1",
7677
"cz-conventional-changelog": "3.3.0",
77-
"eslint": "^9.27.0",
78+
"eslint": "^9.28.0",
7879
"husky": "9.1.7",
79-
"lint-staged": "16.0.0",
80+
"lint-staged": "16.1.0",
8081
"npm-run-all": "^4.1.5",
8182
"tsup": "^8.5.0",
8283
"typescript": "^5.8.3",
83-
"vitest": "^3.1.3"
84+
"vitest": "^3.1.4"
8485
},
86+
"packageManager": "[email protected]",
8587
"engines": {
8688
"node": ">=20"
8789
},
8890
"publishConfig": {
8991
"access": "public"
90-
},
91-
"packageManager": "[email protected]"
92+
}
9293
}

src/runTsScript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const runTsScript = <T extends ExecOptions>(
1414
): ExecResultPromise<{} & T> => {
1515
const moduleArgs = [
1616
'--import',
17-
'@hyperse/ts-node-paths/register',
17+
'@swc-node/register/esm-register',
1818
'--no-warnings',
1919
];
2020
return execa('node', moduleArgs.concat(program, ...(args || [])), options);

0 commit comments

Comments
 (0)