Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace ts-node with tsx #1508

Merged
merged 20 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .depcheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ ignores:
- textrun-repo
- textrun-shell
- textrun-workspace
- ts-node
- tsx
4 changes: 2 additions & 2 deletions documentation/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ including macOS, Windows, and Linux. To get started:
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.1"
"tsx": "4.19.3"
}
}
```
Expand All @@ -23,7 +23,7 @@ including macOS, Windows, and Linux. To get started:
- install TextRunner:

<pre type="shell/command">
npm install -D text-runner ts-node
npm install -D text-runner tsx
</pre>

- make sure it works by running:
Expand Down
3 changes: 1 addition & 2 deletions documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"textrun-make": "0.2.0",
"textrun-npm": "0.2.0",
"textrun-shell": "0.2.0",
"textrun-workspace": "0.2.0",
"ts-node": "10.9.2"
"textrun-workspace": "0.2.0"
}
}
2 changes: 1 addition & 1 deletion examples/custom-action-commonjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2"
"tsx": "4.19.3"
}
}
2 changes: 1 addition & 1 deletion examples/custom-action-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2"
"tsx": "4.19.3"
}
}
2 changes: 1 addition & 1 deletion examples/custom-action-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2"
"tsx": "4.19.3"
}
}
2 changes: 1 addition & 1 deletion examples/global-tool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"textrun-shell": "0.2.0"
},
"devDependencies": {
"ts-node": "10.9.2"
"tsx": "4.19.3"
}
}
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,9 @@
"mocha": "11.1.0",
"prettier": "3.5.1",
"prettier-plugin-packagejson": "2.5.8",
"ts-node": "10.9.2",
"turbo": "2.4.2",
"typescript": "5.7.3",
"typescript-eslint": "8.24.1"
},
"peerDependencies": {
"ts-node": ">10.9.0"
},
"packageManager": "yarn@1.22.22"
}
2 changes: 1 addition & 1 deletion shared/cucumber-steps/.mocharc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/mocharc",
"loader": "ts-node/esm",
"node-option": ["import=tsx"],
"recursive": true,
"ui": "tdd"
}
2 changes: 1 addition & 1 deletion test/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This folder contains workspaces for end-to-end tests. The current ESM
implementation requires `text-runner`, `ts-node`, and `typescript` installed
implementation requires `text-runner`, `tsx`, and `typescript` installed
into a `node_modules` folder. Since it takes too much time to `yarn install`
this for every end-to-end test, the workspaces in which tests happen are now
part of the Yarn multi-workspace setup in this monorepo.
2 changes: 1 addition & 1 deletion test/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_10/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_11/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_12/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_13/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_14/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_7/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_8/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/features_9/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/make/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/repo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion test/workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"typescript": "5.7.3"
}
}
2 changes: 1 addition & 1 deletion text-runner-cli/.mocharc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/mocharc",
"loader": "ts-node/esm",
"node-option": ["import=tsx"],
"recursive": true,
"ui": "tdd"
}
2 changes: 1 addition & 1 deletion text-runner-cli/bin/text-run
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node
#!/usr/bin/env -S npx tsx

import { start } from "../dist/start.js"
start()
2 changes: 1 addition & 1 deletion text-runner-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"end-child-processes": "1.0.3",
"minimist": "1.2.8",
"text-runner-core": "6.0.0",
"ts-node": "10.9.2",
"tsx": "4.19.3",
"yamljs": "0.3.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions text-runner-cli/src/cmdline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export function parse(argv: string[]): {
if (
path.basename(argv[0] || "") === "node" ||
path.win32.basename(argv[0] || "") === "node.exe" ||
argv[0]?.includes("node_modules/ts-node") ||
argv[0]?.includes("node_modules\\ts-node") ||
argv[0]?.includes("node_modules/tsx") ||
argv[0]?.includes("node_modules\\tsx") ||
argv[0]?.startsWith("/usr/bin/node")
) {
argv.splice(0, 1)
Expand Down
2 changes: 1 addition & 1 deletion text-runner-core/.mocharc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/mocharc",
"loader": "ts-node/esm",
"node-option": ["import=tsx"],
"recursive": true,
"ui": "tdd"
}
2 changes: 1 addition & 1 deletion text-runner-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"@types/got": "9.6.12",
"@types/is-glob": "4.0.4",
"@types/markdown-it": "14.1.2",
"ts-node": "10.9.2"
"tsx": "4.19.3"
}
}
2 changes: 1 addition & 1 deletion textrun-action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
},
"devDependencies": {
"text-runner": "6.0.0",
"ts-node": "10.9.2"
"tsx": "4.19.3"
}
}
2 changes: 1 addition & 1 deletion textrun-extension/.mocharc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/mocharc",
"loader": "ts-node/esm",
"node-option": ["import=tsx"],
"recursive": true,
"ui": "tdd"
}
2 changes: 1 addition & 1 deletion textrun-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"shared-cucumber-steps": "*",
"text-runner": "6.0.0",
"textrun-action": "0.2.0",
"ts-node": "10.9.2"
"tsx": "4.19.3"
}
}
2 changes: 1 addition & 1 deletion textrun-javascript/.mocharc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/mocharc",
"loader": "ts-node/esm",
"node-option": ["import=tsx"],
"recursive": true,
"ui": "tdd"
}
2 changes: 1 addition & 1 deletion textrun-javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"text-runner": "6.0.0",
"textrun-extension": "0.2.0",
"textrun-npm": "0.2.0",
"ts-node": "10.9.2"
"tsx": "4.19.3"
}
}
2 changes: 1 addition & 1 deletion textrun-make/.mocharc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/mocharc",
"loader": "ts-node/esm",
"node-option": ["import=tsx"],
"recursive": true,
"ui": "tdd"
}
Loading