Skip to content

chore: upgrade TypeScript to 6.0.3 - #437

Merged
kevinccbsg merged 1 commit into
mainfrom
chore/typescript-6
Nov 16, 2026
Merged

kevinccbsg merged 1 commit into
mainfrom
chore/typescript-6

Conversation

@kevinccbsg

Copy link
Copy Markdown
Member

Upgrades TypeScript from ~5.9.3 to ~6.0.3, the latest 6.x release.

Why it works now

The previous attempt (#187) shipped empty declarations (export {}) because @microsoft/api-extractor did not support TypeScript 6. #436 brought api-extractor back as a direct devDependency, and version 7.60.1 bundles TypeScript 6.0.3.

Changes

  • typescript: ~5.9.3 to ~6.0.3.
  • tsconfig.json: remove baseUrl. TypeScript 6 deprecates it (TS5101, stops working in 7.0) and nothing relies on it, as every import inside src/ is relative.

Verification

  • npm run build emits all six declaration files with the same size as on 5.9 (index 705 lines, vite-plugin 321, runner 109, runner-ci 74, ui 42, bundled 41).
  • npm run check:types: nodenext, node16 and bundler pass.
  • Vitest (544 tests), ESLint (0 errors) and Prettier pass.
  • npm ls typescript reports no invalid peer ranges.
  • tsc --noEmit reports the same 17 diagnostics at the same locations on 5.9 and 6.0, so the upgrade introduces none. They are pre-existing and not part of CI: missing @types/node, and two in src/tests/e2e/url.spec.ts.

Why not TypeScript 7

Tried 7.0.2 first. Two independent blockers:

The Dependabot rule ignoring TypeScript majors stays as is.

TypeScript 6 broke the declaration build in #187 because api-extractor did
not support it yet. api-extractor 7.60.1, added in #436, bundles TypeScript
6.0.3, and the build now emits the same declarations as on 5.9.

- Bump typescript from ~5.9.3 to ~6.0.3, the latest 6.x release.
- Drop baseUrl from tsconfig.json: TypeScript 6 deprecates it and nothing
  relies on it, as every import inside src/ is relative.

TypeScript 7 is still out of reach: its native compiler ships no JavaScript
API for vite-plugin-dts, and typescript-eslint refuses to run on it.
@kevinccbsg
kevinccbsg merged commit 3988883 into main Nov 16, 2026
10 checks passed
@kevinccbsg
kevinccbsg deleted the chore/typescript-6 branch November 16, 2026 17:17
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