chore: update CI matrix to Node 20, 22, 24 — drop EOL Node 18

Node 18 reached EOL April 2025. Node 24 is the current LTS target.

Changes:
- CI matrix: [18, 20, 22] → [20, 22, 24]
- package.json engines: >=16.7.0 → >=20.0.0
- Removed Node 18 conditional in CI (c8 coverage works on all 20+)
- Simplified CI to single test:coverage step for all versions

797/797 tests pass on Node 24.
This commit is contained in:
Tom Boucher
2026-03-18 23:43:28 -04:00
parent 5fd384f336
commit f656dcbd6f
2 changed files with 2 additions and 10 deletions

View File

@@ -22,7 +22,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [18, 20, 22]
node-version: [20, 22, 24]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
@@ -37,13 +37,5 @@ jobs:
run: npm ci
- name: Run tests with coverage
# c8 v11 requires Node 20+ (engines: ^20.0.0 || >=22.0.0). Node 18 EOL April 2025.
# Use bash on all platforms so shell glob expansion works on Windows.
if: matrix.node-version != 18
shell: bash
run: npm run test:coverage
- name: Run tests (Node 18, coverage not supported)
if: matrix.node-version == 18
shell: bash
run: npm test