Skip to content

docs(deps): correct the TypeScript 7 blocker with tested evidence - #70

Merged
chriskehayias merged 1 commit into
mainfrom
docs/deps-ts7-blocker
Aug 21, 2026
Merged

docs(deps): correct the TypeScript 7 blocker with tested evidence#70
chriskehayias merged 1 commit into
mainfrom
docs/deps-ts7-blocker

Conversation

@chriskehayias

Copy link
Copy Markdown
Contributor

Follow-up to #69. Docs only — no dependency or source changes.

Why

The typescript 7.x row in .claude/references/deps-known-issues.md claimed TS 7 "breaks the Next.js 16 build worker." That was inherited from an undated earlier audit run and is wrong as of next@16.3.1 + typescript@7.0.2. A wrong entry in that file is worse than no entry — it is explicitly the state future /audit-deps runs trust instead of re-deriving.

Verified by attempt

Installed typescript@^7.0.2 and ran the full suite:

Command Result
npm run build pass — and the TypeScript check drops from ~2.8s to 933ms on the native compiler
npm run test:run pass — 279/279
npm run lint fail, before linting a single file
Error: typescript-eslint does not support TS 7.0.
    at eslint-config-next/node_modules/typescript-eslint/dist/index.js:52

So the blocker is lint, and lint alone. Next.js declares no typescript peer at all, and the build is not merely fine but measurably faster.

Root cause

That message comes from an explicit runtime guard, not a peer-range mismatch — an overrides entry or --legacy-peer-deps would not help.

TypeScript 7.0 ships no compiler API at all. It is the native rewrite and the programmatic interface did not come with it; typescript-eslint requires that API, so it hard-refuses. Same reason Vue, MDX, Astro, Svelte, and Angular tooling cannot use TS 7 yet. The new API is slated for TS 7.1, and typescript-eslint is explicitly targeting >= 7.1typescript-eslint#10940.

Neither latest (8.67.0) nor canary (8.67.1-alpha.24) has moved off typescript: >=4.8.4 <6.1.0, and there is no typescript-eslint 9.x line.

Also recorded

The documented TS 6/7 side-by-side alias workaround, and why it is not worth taking here: aliasing typescript to @typescript/typescript6 means anything calling require('typescript') gets the 6.0 API — including Next.js's own build-time type check — so the build returns to TS 6 speed and the only gain is a standalone tsc.

The re-check trigger changes from the vague "typescript-eslint widens its peer range" to the concrete TS 7.1 release plus that tracking issue. Note that ESLint 10 and TypeScript 7 are likely to unblock in the same window, since both wait on the same toolchain catching up.

Safety

The TS 7 trial was fully reverted before this commit: typescript@6.0.3, no invalid: peers, build and lint green, working tree clean. This PR touches one Markdown file.

🤖 Generated with Claude Code

The typescript 7.x entry claimed TS 7 "breaks the Next.js 16 build
worker". That was inherited from an undated earlier run and is wrong as
of next@16.3.1 + typescript@7.0.2. Verified by attempt:

- npm run build  -> passes, and the TypeScript check drops from ~2.8s
                    to 933ms on the native compiler
- npm run test:run -> passes, 279/279
- npm run lint   -> fails before linting a single file

The real blocker is lint, and lint alone:

  Error: typescript-eslint does not support TS 7.0.
    at eslint-config-next/node_modules/typescript-eslint/dist/index.js:52

That is an explicit runtime guard, not a peer-range mismatch, so an
override or --legacy-peer-deps would not help. Root cause: TypeScript
7.0 ships no compiler API at all, and typescript-eslint needs one —
the same reason Vue, MDX, Astro, Svelte, and Angular tooling cannot
use TS 7 yet. The new API is slated for TS 7.1, and typescript-eslint
is explicitly targeting >= 7.1 (typescript-eslint#10940). Neither
latest (8.67.0) nor canary (8.67.1-alpha.24) has moved off
typescript: >=4.8.4 <6.1.0, and there is no 9.x line.

Also records the documented TS 6/7 side-by-side alias workaround and
why it is not worth taking here: aliasing typescript to
@typescript/typescript6 means anything calling require('typescript')
gets the 6.0 API, including Next.js's own build-time type check, so
the build returns to TS 6 speed and the only gain is a standalone tsc.

Re-check trigger updated from "typescript-eslint widens its peer
range" to the TS 7.1 release plus typescript-eslint#10940. Note ESLint
10 and TypeScript 7 are likely to unblock in the same window, since
both wait on the same toolchain catching up.

Trial was fully reverted: typescript@6.0.3, no invalid peers, build
and lint green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chriskehayias
chriskehayias merged commit 4446294 into main Aug 21, 2026
1 check passed
@chriskehayias
chriskehayias deleted the docs/deps-ts7-blocker branch August 21, 2026 09:57
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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