Skip to content

chore: modernize to Node 22, Jest 30, native ESM#21

Merged
seigel merged 4 commits intomainfrom
chore/node22-modernize
Mar 4, 2026
Merged

chore: modernize to Node 22, Jest 30, native ESM#21
seigel merged 4 commits intomainfrom
chore/node22-modernize

Conversation

@seigel
Copy link
Owner

@seigel seigel commented Mar 4, 2026

Summary

  • Merge dependabot PRs for braces, minimatch, lodash, js-yaml, esbuild
  • Upgrade CI from Node 12/14/16 to Node 22; bump actions/checkout and setup-node to v4
  • Upgrade Jest 27 → 30; replace removed toThrowError() with toThrow() across all tests
  • Remove Babel (@babel/preset-env, .babelrc) — unused and had vulnerabilities
  • Remove esbuild — not needed since Node 22 runs ESM natively
  • Switch "type" from commonjs to module; rewrite src/commands/index.js from require() to ESM imports
  • Update scripts: start/demo run directly with node, no build step
  • 0 audit vulnerabilities (down from 3 high/moderate)

Test plan

  • All 20 test suites pass (246 tests)
  • npm audit reports 0 vulnerabilities

🤖 Generated with Claude Code

seigel and others added 4 commits March 4, 2026 16:30
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update CI matrix from [12.x, 14.x, 16.x] to [22.x]
- Bump actions/checkout and setup-node to v4
- Upgrade jest from ^27.5.1 to ^30.2.0
- Add engines field requiring Node >=22
- Add jest testPathIgnorePatterns to exclude .claude/ worktrees
- Replace removed toThrowError() with toThrow() in all test files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Delete .babelrc and remove @babel/preset-env (unused, had vulnerabilities)
- Remove esbuild (not needed; Node 22 runs ESM natively)
- Change package type from commonjs to module
- Update scripts: start/demo now run directly with node
- Fix src/commands/index.js: replace require() calls with ESM imports
- Add jest transform:{} to disable babel-jest
- Fix coverage script to use --experimental-vm-modules
- 0 audit vulnerabilities (down from 3)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@seigel seigel merged commit a2585ea into main Mar 4, 2026
1 check passed
@seigel seigel deleted the chore/node22-modernize branch March 4, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant