Skip to content

Commit 70e2c0d

Browse files
Node 20 changed enperimental loaders. Fix running tests on node 20
* https://nodejs.org/en/blog/announcements/v20-release-announce * TypeStrong/ts-node#1997 * avajs/ava#2593 (comment)
1 parent afba275 commit 70e2c0d

File tree

3 files changed

+101
-2
lines changed

3 files changed

+101
-2
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [16.x, 18.x, 20.x]
18+
node-version: [16, 18, 20]
1919

2020
steps:
2121
- uses: actions/checkout@v3
@@ -27,4 +27,12 @@ jobs:
2727
- run: npm ci --timing
2828
- run: npm run lint
2929
- run: npm run build:debug
30-
- run: npm test
30+
- name: "Run tests on Node 20"
31+
run: npm test
32+
if: matrix.node-version == 20
33+
env:
34+
NODE_OPTIONS: "--loader=tsx"
35+
- name: "Run tests on Node < 20"
36+
run: npm test
37+
if: matrix.node-version < 20
38+
...

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"purs-tidy": "0.9.3",
5959
"spago": "^0.21.0",
6060
"ts-node": "10.9.1",
61+
"tsx": "^3.12.7",
6162
"typescript": "5.0.4"
6263
},
6364
"ava": {

0 commit comments

Comments
 (0)