Skip to content

Bump typescript from 5.9.3 to 6.0.3 - #429

Merged
grahamlangford merged 1 commit into
mainfrom
bump-typescript-6
Aug 3, 2026
Merged

Bump typescript from 5.9.3 to 6.0.3#429
grahamlangford merged 1 commit into
mainfrom
bump-typescript-6

Conversation

@grahamlangford

Copy link
Copy Markdown
Collaborator

Supersedes #424, which bumped straight to TypeScript 7.0.2.

Why not 7.0.2

TS 7 is the native Go compiler and does not yet expose a public compiler API, so nothing that does require("typescript") works against it. npm run lint crashes in ts-api-utils:

TypeError: Failed to load plugin '@typescript-eslint': Cannot read properties of undefined (reading 'Intrinsic')

This is blocked upstream, not a config problem — typescript-eslint@8.65.0 and its canary both declare typescript: >=4.8.4 <6.1.0, and ts-api-utils@3.0.0-rc.1 declares <7. typescript-eslint/typescript-eslint#12518 was closed as not planned, pointing at typescript-eslint/typescript-eslint#10940 as the tracker.

TypeScript 6 is the last JS-based compiler and sits inside that peer range, so it gets the config migration done under deprecation errors instead of hard removals. The eventual 7.x bump becomes a one-line change once typescript-eslint lands support.

tsconfig changes

TS 6 turns several options into deprecation errors and drops automatic @types inclusion:

  • baseUrlrootDirbaseUrl is deprecated and removed in 7.0 (TS5101/TS5102); with it gone, rootDir must be explicit (TS5011)
  • paths values made relative — non-relative values are rejected in 7.0 (TS5090)
  • types: ["chrome"] — 5.9 auto-included all 13 packages under node_modules/@types; 6.0 includes only import-reachable ones, which dropped the chrome globals and produced ~35 TS2304 Cannot find name 'chrome'

@types/node

Refreshed 24.0.8 → 26.1.2 in the lockfile. 24.0.8 declares URLPattern incompatibly with TS 6's lib.dom.d.ts, which this project sees because it sets skipLibCheck: false. @types/tape already requests @types/node: "*", so this is a lockfile refresh with no new direct dependency.

Verification

npm test (unit + lint + build + demo:build) passes locally, and the emitted distribution/ is byte-identical to the 5.9.3 output across all 106 files — the published API is unchanged.

Supersedes #424, which bumped straight to TypeScript 7.0.2. That cannot
land yet: typescript-eslint has no TS 7 support and is blocked upstream
until the native Go compiler ships a public API
(typescript-eslint/typescript-eslint#10940), so `npm run lint` crashes in
ts-api-utils. TypeScript 6 is the last JS-based compiler and sits inside
typescript-eslint's `<6.1.0` peer range.

TypeScript 6 turns several tsconfig options into deprecation errors and
drops automatic `@types` inclusion, so the config needs three changes:

- `baseUrl` is deprecated and removed in 7.0; `rootDir` replaces it and
  has to be explicit once `baseUrl` is gone
- `paths` values must be relative in 7.0
- `types: ["chrome"]` restores the `chrome` globals, which 5.9 picked up
  by scanning all of node_modules/@types

Also refreshes @types/node 24.0.8 -> 26.1.2 in the lockfile. 24.0.8
declares `URLPattern` incompatibly with TypeScript 6's lib.dom.d.ts,
which this project sees because it sets `skipLibCheck: false`.
@types/tape already requests `@types/node: "*"`, so no direct dependency
is needed.

The emitted `distribution/` is byte-identical to the 5.9.3 output across
all 108 files, so the published API is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@grahamlangford
grahamlangford merged commit b689c61 into main Aug 3, 2026
5 checks passed
@grahamlangford
grahamlangford deleted the bump-typescript-6 branch August 3, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant