Skip to content

Commit 366c890

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 366c890

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/verify-node.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ jobs:
5454
- name: Install Playwright dependencies
5555
run: npx playwright install --with-deps
5656

57+
- name: Disable native TypeScript handling for ts-node compatibility
58+
if: matrix.node-version != '18' && matrix.node-version != '20'
59+
run: echo "NODE_OPTIONS=--no-experimental-strip-types" >> "$GITHUB_ENV"
60+
5761
- name: Test
5862
run: npm run test:node
5963

0 commit comments

Comments
 (0)