Skip to content

Commit 877889f

Browse files
committed
feat(tooling): Replace ts-node with tsimp for testing
1 parent d05eda2 commit 877889f

File tree

6 files changed

+80
-17
lines changed

6 files changed

+80
-17
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ coverage
1212
*.old
1313
@type
1414

15+
# tsimp cache
16+
.tsimp
17+
1518
/src/**/*.js
1619
/lib

ava.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
export default {
22
failFast: true,
3-
environmentVariables: {
4-
TS_NODE_PROJECT: "./tsconfig.ava.json"
5-
},
3+
nodeArguments: ["--no-warnings", "--import=tsimp"],
64
extensions: {
75
ts: "module"
86
},

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@
4343
"coverage": "c8 pnpm test",
4444
"ci": "c8 pnpm test && c8 report --reporter=json",
4545
"build": "pnpm exec del-cli lib && pnpm exec tsup",
46-
"test": "cross-env NODE_OPTIONS=\"--no-warnings --experimental-fetch --loader=ts-node/esm\" ava",
46+
"test": "ava",
47+
"report:html": "c8 -r=html pnpm test",
4748
"release": "pnpm build && pnpm changeset publish",
48-
"prepare": "npx is-in-ci || husky install"
49+
"prepare": "npx is-in-ci@latest || husky install"
4950
},
5051
"devDependencies": {
5152
"@biomejs/biome": "1.8.3",
@@ -64,7 +65,7 @@
6465
"node-fetch": "3.3.2",
6566
"sinon": "18.0.0",
6667
"ts-expect": "1.3.0",
67-
"ts-node": "10.9.2",
68+
"tsimp": "2.0.11",
6869
"tsup": "8.1.0",
6970
"ttypescript": "1.5.15",
7071
"typescript": "5.5.2",

pnpm-lock.yaml

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

tsconfig.ava.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"baseUrl": "src",
1414
"checkJs": false,
1515
"allowJs": false,
16-
"skipLibCheck": false,
16+
"skipLibCheck": true,
1717
"strict": true,
1818
"resolveJsonModule": true,
1919
"isolatedModules": true,

0 commit comments

Comments
 (0)