Skip to content

Commit 33a92c0

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 33a92c0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/verify-node.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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)