Skip to content

Commit 25ec960

Browse files
committed
fix: restore ts-node to original version and document compatibility
- ESM import functionality fully working (12/12 tests passing) - Issue #158 resolved - ESM imports work correctly - Original test suite compatibility with Node.js 22/ts-node requires investigation - CI environment (Node.js 16) should work with original configuration - Downgraded ts-node back to 10.8.1 (original working version)
1 parent 2ca4219 commit 25ec960

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

package-lock.json

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"test": "npm run test-stage2 && npm run test-stage3",
3434
"test-imports": "cross-env mocha test/module-imports.test.js",
3535
"test-imports-with-build": "npm run build && cross-env mocha test/module-imports.test.js",
36-
"test-stage2": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\":\"CommonJS\"}' TS_NODE_PROJECT='./test/tsconfig/tsconfig.deco-stage2.json' mocha -r ts-node/register --project ./test/tsconfig.json test/test.ts",
37-
"test-stage3": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\":\"CommonJS\"}' TS_NODE_PROJECT='./test/tsconfig/tsconfig.deco-stage3.json' mocha -r ts-node/register --project ./test/tsconfig.json test/test.ts",
36+
"test-stage2": "cross-env TS_NODE_PROJECT='./test/tsconfig/tsconfig.deco-stage2.json' mocha -r ts-node/register --project ./test/tsconfig.json test/test.ts",
37+
"test-stage3": "cross-env TS_NODE_PROJECT='./test/tsconfig/tsconfig.deco-stage3.json' mocha -r ts-node/register --project ./test/tsconfig.json test/test.ts",
3838
"build": "npm run build:cjs && npm run build:esm && npm run postbuild",
3939
"build:cjs": "npx tsc --project ./tsconfig/tsconfig.cjs.json",
4040
"build:esm": "npx tsc --project ./tsconfig/tsconfig.esm.json",
@@ -64,7 +64,7 @@
6464
"jsdom": "^20.0.0",
6565
"jsdom-global": "^3.0.2",
6666
"mocha": "^10.0.0",
67-
"ts-node": "^10.9.2",
67+
"ts-node": "^10.8.1",
6868
"typescript": "^5.1.6",
6969
"vue": "^3.2.37"
7070
},

test/tsconfig/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"transpileOnly": true,
1818
"files": true,
1919
"compilerOptions": {
20-
"module": "CommonJS"
20+
"module": "CommonJS",
21+
"moduleResolution": "Node"
2122
}
2223
},
2324
"files": ["../test.ts"]

0 commit comments

Comments
 (0)