Skip to content

Commit 5f48b6c

Browse files
committed
ci: disable native strip-types on Node 22+ for ts-node compat
Node 22.18+ enables type stripping by default, preempting ts-node and causing __dirname to be undefined when detect-module reparses test files as ESM. Disable native strip-types so ts-node handles .ts files until mocha is replaced with node:test. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ff93447 commit 5f48b6c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/verify-node.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- '18'
1818
- '20'
1919
- '22'
20-
- 'latest'
20+
- '24'
2121

2222
steps:
2323
- uses: actions/checkout@v4
@@ -56,6 +56,8 @@ jobs:
5656

5757
- name: Test
5858
run: npm run test:node
59+
env:
60+
NODE_OPTIONS: ${{ (matrix.node-version != '18' && matrix.node-version != '20') && '--no-experimental-strip-types' || '' }}
5961

6062
verify-windows:
6163
timeout-minutes: 30

0 commit comments

Comments
 (0)