Skip to content

Commit

Permalink
Switch from ts-node to tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn committed Oct 19, 2023
1 parent 40af482 commit e6fef86
Show file tree
Hide file tree
Showing 12 changed files with 775 additions and 32 deletions.
761 changes: 736 additions & 25 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"rollup-plugin-dts": "^5.3.1",
"supertest": "^6.3.3",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tsx": "^3.14.0",
"typescript": "^5.1.6"
},
"scripts": {
Expand All @@ -28,7 +28,7 @@
"lint:prettier": "prettier --check .",
"format": "prettier --write .",
"clean": "node ./bin/clean.mjs",
"build": "ts-node-esm ./build/build-package.ts",
"build": "tsx ./build/build-package.ts",
"test": "jest"
},
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"private": true,
"type": "commonjs",
"scripts": {
"helmet:test": "ts-node --compilerOptions '{\"module\": \"commonjs\", \"moduleResolution\": \"nodenext\", \"esModuleInterop\": true}' --skipProject test.ts"
"helmet:test": "tsx test.ts"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "nodenext",
"esModuleInterop": true
}
}
2 changes: 1 addition & 1 deletion test/project-setups/typescript-commonjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"private": true,
"type": "commonjs",
"scripts": {
"helmet:test": "ts-node --compilerOptions '{\"module\": \"commonjs\", \"moduleResolution\": \"node\", \"esModuleInterop\": true}' --skipProject test.ts"
"helmet:test": "tsx test.ts"
}
}
7 changes: 7 additions & 0 deletions test/project-setups/typescript-commonjs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"esModuleInterop": true
}
}
2 changes: 1 addition & 1 deletion test/project-setups/typescript-esnext/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"private": true,
"type": "module",
"scripts": {
"helmet:test": "ts-node-esm --compilerOptions '{\"module\": \"esnext\", \"moduleResolution\": \"node\"}' --skipProject test.ts"
"helmet:test": "tsx test.ts"
}
}
6 changes: 6 additions & 0 deletions test/project-setups/typescript-esnext/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"compilerOptions": {
"module": "esnext",
"moduleResolution": "node"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"private": true,
"type": "commonjs",
"scripts": {
"helmet:test": "ts-node-esm --compilerOptions '{\"module\": \"nodenext\", \"moduleResolution\": \"nodenext\"}' --skipProject test.ts"
"helmet:test": "tsx test.ts"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"compilerOptions": {
"module": "nodenext",
"moduleResolution": "nodenext"
}
}
2 changes: 1 addition & 1 deletion test/project-setups/typescript-nodenext-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"private": true,
"type": "module",
"scripts": {
"helmet:test": "ts-node-esm --compilerOptions '{\"module\": \"nodenext\", \"moduleResolution\": \"nodenext\"}' --skipProject test.ts"
"helmet:test": "tsx test.ts"
}
}
6 changes: 6 additions & 0 deletions test/project-setups/typescript-nodenext-esm/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"compilerOptions": {
"module": "nodenext",
"moduleResolution": "nodenext"
}
}

0 comments on commit e6fef86

Please sign in to comment.