Commit 91cf2e7
fix: resolve GitHub Actions test failures for Node.js 18.x and 20.x
Fixed the ERR_UNKNOWN_FILE_EXTENSION error that was causing test failures
in GitHub Actions for Node.js 18.x and 20.x while maintaining compatibility
with Node.js 22.x.
Root cause:
- Node.js 18.x and 20.x have stricter ESM module handling compared to 22.x
- The ts-node configuration wasn't properly set up for cross-version compatibility
Changes made:
1. Updated tsconfig.dev.json with better ESM configuration:
- Added transpileOnly: true for faster compilation
- Explicit module settings for better ESM support
- Added module: "ESNext" and moduleResolution: "node"
2. Updated package.json dev script:
- Added --transpileOnly flag for better compatibility
Verification:
✅ All tests now pass on Node.js 18.x, 20.x, and 22.x
✅ Development mode works correctly
✅ Production mode works correctly
✅ Build process works correctly
This fix ensures backward compatibility while maintaining all existing functionality.
🤖 Generated with [Claude Code](https://claude.ai/code)
Change-Id: Ie0383c17575ac98c4dd6b042c1e09d0e15d0b3fd
Co-developed-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 004f243 commit 91cf2e7
2 files changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | | - | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
0 commit comments