Skip to content

Commit 4ca5b4e

Browse files
committed
fix incompatibility of ts-node with node 20
close #31 solution as per TypeStrong/ts-node#1997 (comment) and passing option as per https://stackoverflow.com/a/73433625 Note: I add an adhoc test script for ci (instead of replacing the existing one) because the adhoc solution seem to mix up the lines in case of errors (see TypeStrong/ts-node#1997 (comment)) So this is to be used only for github actions, and not for general purpose testing. Note: when TypeStrong/ts-node#1997 is solved, this can be revert
1 parent 0fe153c commit 4ca5b4e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
- name: Install dependencies
2626
run: npm install # npm ci
2727
- run: npm run build --if-present
28-
- run: npm test
28+
- run: npm run test:ci

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"prepublishOnly": "npm run test",
3232
"style:fix": "prettier {example,src,test}/**/*.ts --write",
3333
"style:check": "prettier {example,src,test}/**/*.ts --check",
34-
"test": "ts-node --esm --project ./tsconfig.esm.json ./test/index.ts"
34+
"test": "ts-node --esm --project ./tsconfig.esm.json ./test/index.ts",
35+
"test:ci": "TS_NODE_PROJECT='./tsconfig.esm.json' node --no-warnings=ExperimentalWarning --loader ts-node/esm ./test/index.ts"
3536
},
3637
"author": "swiing",
3738
"license": "MIT",

0 commit comments

Comments
 (0)