Skip to content

Commit 118ef41

Browse files
test: use tsx instead of ts-node
1 parent d19928e commit 118ef41

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
node-version:
2323
- 18
2424
- 20
25-
- 22.17.1 # experimental TS type striping in 22.18.0 breaks the build
25+
- 22
2626

2727
services:
2828
redis:

packages/engine.io-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"scripts": {
1414
"compile": "rimraf ./build && tsc && tsc -p tsconfig.esm.json && ./postcompile.sh",
1515
"test": "npm run format:check && npm run compile && if test \"$BROWSERS\" = \"1\" ; then npm run test:browser; else npm run test:node; fi",
16-
"test:node": "nyc mocha -r ts-node/register test/index.ts",
16+
"test:node": "nyc mocha --import=tsx test/index.ts",
1717
"test:browser": "zuul test/index.ts --no-coverage",
1818
"format:check": "prettier --check 'lib/**/*.ts' 'test/**/*.ts'",
1919
"format:fix": "prettier --write 'lib/**/*.ts' 'test/**/*.ts'",

packages/socket.io-adapter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"scripts": {
2424
"compile": "rimraf ./dist && tsc",
25-
"test": "npm run format:check && npm run compile && nyc mocha --require ts-node/register test/*.ts",
25+
"test": "npm run format:check && npm run compile && nyc mocha --import=tsx test/*.ts",
2626
"format:check": "prettier --parser typescript --check 'lib/**/*.ts' 'test/**/*.ts'",
2727
"format:fix": "prettier --parser typescript --write 'lib/**/*.ts' 'test/**/*.ts'",
2828
"prepack": "npm run compile"

packages/socket.io-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"scripts": {
5454
"compile": "rimraf ./build && tsc && tsc -p tsconfig.esm.json && ./postcompile.sh",
5555
"test": "npm run format:check && npm run compile && if test \"$BROWSERS\" = \"1\" ; then npm run test:browser; else npm run test:node; fi",
56-
"test:node": "mocha --require ts-node/register --require test/support/hooks.ts --exit test/index.ts",
56+
"test:node": "mocha --import=tsx --require test/support/hooks.ts --exit test/index.ts",
5757
"test:browser": "ts-node test/browser-runner.ts",
5858
"test:types": "tsd",
5959
"build": "rollup -c support/rollup.config.umd.js && rollup -c support/rollup.config.esm.js && rollup -c support/rollup.config.umd.msgpack.js",

packages/socket.io-cluster-engine/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"scripts": {
2727
"compile": "rimraf ./dist && tsc",
2828
"test": "npm run format:check && npm run compile && npm run test:unit",
29-
"test:unit": "mocha --require ts-node/register test/*.ts",
29+
"test:unit": "mocha --import=tsx test/*.ts",
3030
"format:check": "prettier --check \"lib/**/*.ts\" \"test/**/*.ts\"",
3131
"format:fix": "prettier --write \"lib/**/*.ts\" \"test/**/*.ts\"",
3232
"prepack": "npm run compile"

packages/socket.io-postgres-emitter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"types": "./dist/index.d.ts",
1616
"scripts": {
1717
"compile": "rimraf ./dist && tsc",
18-
"test": "npm run format:check && npm run compile && nyc mocha --require ts-node/register --timeout 5000 test/index.ts",
18+
"test": "npm run format:check && npm run compile && nyc mocha --import=tsx --timeout 5000 test/index.ts",
1919
"format:check": "prettier --parser typescript --check 'lib/**/*.ts' 'test/**/*.ts'",
2020
"format:fix": "prettier --parser typescript --write 'lib/**/*.ts' 'test/**/*.ts'",
2121
"prepack": "npm run compile"

packages/socket.io/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"compile": "rimraf ./dist && tsc",
4545
"test": "npm run format:check && npm run compile && npm run test:types && npm run test:unit",
4646
"test:types": "tsd",
47-
"test:unit": "nyc mocha --require ts-node/register --reporter spec --slow 200 --bail --timeout 10000 test/index.ts",
47+
"test:unit": "nyc mocha --import=tsx --reporter spec --slow 200 --bail --timeout 10000 test/index.ts",
4848
"format:check": "prettier --check \"lib/**/*.ts\" \"test/**/*.ts\"",
4949
"format:fix": "prettier --write \"lib/**/*.ts\" \"test/**/*.ts\"",
5050
"prepack": "npm run compile"

0 commit comments

Comments
 (0)