Skip to content

chore(deps): bump TypeScript to v6, align @types/node to ^24#132

Merged
ahanoff merged 3 commits into
mainfrom
bump-typescript-6-fix-types-node
Jun 22, 2026
Merged

chore(deps): bump TypeScript to v6, align @types/node to ^24#132
ahanoff merged 3 commits into
mainfrom
bump-typescript-6-fix-types-node

Conversation

@ahanoff

@ahanoff ahanoff commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What

Three coupled changes to keep the toolchain current and type-safe:

  1. TypeScript 5.9.3 → 6.0.3 — latest major. TS 7 (native Go port) is next; this is the transition release.
  2. @typescript-eslint 8.56 → 8.58 — required for TS 6 support (peer dep widened from <6.0.0 to <6.1.0).
  3. @types/node ^25 → ^24 — fix type-safety mismatch with the node24 runtime.

Why each change

TypeScript 6.0

TS 6.0 changes two tsconfig defaults that would break the build without config updates:

  • types now defaults to [] (was: auto-discover all @types/*) → added "types": ["node"]
  • rootDir now defaults to . (was: inferred from include) → added "rootDir": "./src"

Also fixed stale exclude pattern: "__tests__""src/__tests__" (old pattern never matched the actual path; worked by accident under TS 5.9 because all @types/* were auto-loaded).

No source code changes needed — the project's TS feature surface is minimal (just enum + standard ESM imports). No namespaces, decorators, import assertions, or deprecated tsconfig options.

@types/node ^24 (not ^26)

Version Node.js line Status (June 2026) Safe for node24 runtime?
@types/node@^24 Node 24 Active LTS ✅ Exact match
@types/node@^25 Node 25 EOL (June 1, 2026) ❌ Tracks a dead runtime
@types/node@^26 Node 26 Current (not LTS until Oct 28, 2026) ❌ Exposes Node 26-only APIs that don't exist at runtime

@types/node@^26 would let TypeScript compile calls to APIs that don't exist in Node 24 — exactly the class of bug TypeScript is supposed to prevent. The types version must match the runtime version. Bump to ^26 only when action.yml bumps to node26 (after Oct 2026 LTS).

@typescript-eslint ^8.58

v8.58.0 (2026-03-30) added TS 6 support. The old ^8.56.0 floor has peerDep typescript: <6.0.0 which would emit warnOnUnsupportedTypeScriptVersion warnings.

Verification

Check Result
npm run build (tsc --noEmit TS 6.0.3) ✅ clean
npm run lint ✅ clean
npm test (28 tests) ✅ all pass in 0.25s
npm run package ✅ 411 KB (unchanged — no source changes)

Supersedes

Closes Renovate PR #117 (bare version bump without the required tsconfig changes).

ahanoff added 3 commits June 22, 2026 23:56
TypeScript 6.0 changes two defaults that require tsconfig updates:

- types now defaults to [] (was: auto-discover all @types/*). Add types: ["node"] so process, readFileSync, fetch, etc. resolve.

- rootDir now defaults to . (was: common root of include files). Add rootDir: "./src" for hygiene.

Also fix exclude pattern: "__tests__" -> "src/__tests__" (the old pattern didn't match the actual path under src/; worked by accident under TS 5.9 because all @types were auto-loaded).
TypeScript: ^5.9.3 -> ^6.0.0 (6.0.3 installed).

@typescript-eslint/eslint-plugin and parser: ^8.56.0 -> ^8.58.0 (v8.58.0 added TS 6 support; peerDep range widened from <6.0.0 to <6.1.0).

@types/node: ^25.2.3 -> ^24.0.0. Node 25 went EOL on 2026-06-01; the action runtime is node24 (Active LTS). @types/node@^26 would expose Node 26-only APIs that don't exist at runtime — avoid until action.yml bumps to node26 (after Node 26 reaches LTS in Oct 2026).

ts-jest 29.4.x already supports TS 6 (no bump needed).

No source code changes required — TS 6 breaking changes don't affect this project's minimal feature surface (enum + standard ESM imports).
- matrix: [18, 20, 22, 24] -> [24, 26]

- bump version to 2.4.0 (2.3.0 already published)
@ahanoff ahanoff merged commit 658ba7e into main Jun 22, 2026
@ahanoff ahanoff deleted the bump-typescript-6-fix-types-node branch June 22, 2026 16:56
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