Skip to content

Commit 55b4c72

Browse files
authored
maint: set node versions to lts/*, replace ts-node with tsx (#1115)
* build: switch from ts-node to tsx ts-node is not very well maintained currrently as needs workarounds for ESM usage. TSX just works out of the box * ci: run all workflows except test matrix on lts/* * build: update lockfile
1 parent d25c164 commit 55b4c72

File tree

6 files changed

+48
-175
lines changed

6 files changed

+48
-175
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- uses: actions/setup-node@v4
3636
with:
3737
cache: npm
38-
node-version: 20
38+
node-version: lts/*
3939
- run: npm ci
4040
- run: npm run validate:ts
4141
if: ${{ always() }}

.github/workflows/update-prettier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/setup-node@v4
1212
with:
1313
cache: npm
14-
node-version: 20
14+
node-version: lts/*
1515
- run: npm ci
1616
- run: npm run lint:fix
1717
- uses: gr2m/[email protected]

.github/workflows/update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/setup-node@v4
1414
with:
1515
cache: npm
16-
node-version: 20
16+
node-version: lts/*
1717
- run: npm ci
1818
- run: npm run generate-types
1919
- name: create pull request

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"type": "module",
1010
"scripts": {
1111
"build": "node scripts/build.mjs && tsc -p tsconfig.json",
12-
"generate-types": "node --loader=ts-node/esm scripts/generate-types.ts",
12+
"generate-types": "tsx scripts/generate-types.ts",
1313
"lint": "prettier --check 'src/**/*.{ts,json}' 'scripts/**/*' 'test/**/*.ts' README.md package.json 'src/event-handler/README.md'",
1414
"lint:fix": "prettier --write 'src/**/*.{ts,json}' 'scripts/**/*' 'test/**/*.ts' README.md package.json 'src/event-handler/README.md'",
1515
"pretest": "npm run -s lint",
@@ -58,7 +58,7 @@
5858
"glob": "^11.0.0",
5959
"prettier": "3.5.3",
6060
"prettier-plugin-packagejson": "^2.2.9",
61-
"ts-node": "^10.0.0",
61+
"tsx": "^4.19.3",
6262
"typescript": "^5.0.0",
6363
"vitest": "^3.0.0"
6464
},

scripts/generate-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env ts-node-transpile-only
1+
#!/usr/bin/env -S npx tsx
22

33
import { strict as assert } from "node:assert";
44
import * as fs from "node:fs";

0 commit comments

Comments
 (0)