Skip to content

Commit

Permalink
fix incompatibility of ts-node with node 20
Browse files Browse the repository at this point in the history
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
  • Loading branch information
swiing committed Sep 2, 2023
1 parent 0fe153c commit 4ca5b4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
- name: Install dependencies
run: npm install # npm ci
- run: npm run build --if-present
- run: npm test
- run: npm run test:ci
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"prepublishOnly": "npm run test",
"style:fix": "prettier {example,src,test}/**/*.ts --write",
"style:check": "prettier {example,src,test}/**/*.ts --check",
"test": "ts-node --esm --project ./tsconfig.esm.json ./test/index.ts"
"test": "ts-node --esm --project ./tsconfig.esm.json ./test/index.ts",
"test:ci": "TS_NODE_PROJECT='./tsconfig.esm.json' node --no-warnings=ExperimentalWarning --loader ts-node/esm ./test/index.ts"
},
"author": "swiing",
"license": "MIT",
Expand Down

0 comments on commit 4ca5b4e

Please sign in to comment.