Repository navigation
Pin TypeScript to 6.x: the 7.0 native port breaks Next.js build & typescript-eslint (blocks #499) #536
Description
Summary
Dependabot PR #499 bumps typescript 6.0.3 → 7.0.2 and turns every CI job red. TypeScript 7.0 is the native (Go) port ("Corsa"/tsgo), and its npm package is not a drop-in replacement for the JS-based 6.x line. This issue records the root cause, the reproduction, and the recommended handling so the bump isn't retried blindly.
Recommendation: stay on typescript@6.x for now, and tell Dependabot to ignore typescript major-version updates. Revisit when Next.js and typescript-eslint support the native port.
Why it breaks
The typescript@7.0.2 package ships the native compiler, not the classic JS API:
- Its
package.jsonexportsmap points the main entry"."at./lib/version.cjs— a version stub. The classic compiler API (createProgram,transpileModule,parseJsonConfigFileContent, …) is no longer at the main entry; only an experimental subset is exposed undertypescript/unstable/*. lib/contains only a thin launcher (tsc.js,getExePath.js) plus per-platform native binaries (@typescript/typescript-linux-x64@7.0.2, etc.). There is nolib/typescript.js.
Every type-aware tool in this repo consumes the classic programmatic API, so the bump breaks them.
Because package.json's prepare script runs bun run build (→ next build) on every bun install, the failure hits the very first step of all CI jobs (build, test×3, quality, docs, test-e2e), not just build.
Reproduction (on a throwaway branch, TS pinned to 7.0.2)
-
next buildfails — even with type-checking disabled. Next.js 16.2.x runs a "TypeScript config validation" step that needs the classic API. Withtypescript.ignoreBuildErrors: trueit does skip type-checking (✓ Compiled successfully→Skipping validation of types), but config validation still runs and still needs the API. UnderCI=true(how CI runs) Next can't self-repair and the build exits 1. Locally it only "passed" by having Next shell out tonpm installmid-build to fetch a working TypeScript — impossible under--frozen-lockfile/ no-network CI.CI error:
It looks like you're trying to use TypeScript but do not have the required package(s) installed. -
typescript-eslintrefuses TS 7.eslint-config-next@16.2.10bundlestypescript-eslint@8.64.0, whose peer dependency is:peer typescript@">=4.8.4 <6.1.0" ← doesn't allow 6.1+, let alone 7.0So
bun run lint(thequalityjob) breaks independently of Next. -
The native
tscbinary itself works.bunx tsc --noEmitruns on the native compiler — that's the one piece that is forward-compatible.
Blocked on upstream
A port would require released versions of Next.js and typescript-eslint that speak the native-port API. Those don't exist yet — typescript@7.0.2 only just became latest; the ecosystem is mid-migration. Nothing in this repo can bridge that gap.
Recommended handling
Now:
- Keep
typescriptpinned to6.x. - Add a Dependabot ignore rule so the major bump stops being re-proposed weekly:
# .github/dependabot.yml — under the `bun` ecosystem ignore: - dependency-name: "typescript" update-types: ["version-update:semver-major"]
- Close build(deps-dev): Bump typescript from 6.0.3 to 7.0.2 #499.
Later (revisit criteria): once Next.js and typescript-eslint ship native-port support. The incremental adoption path is to add @typescript/native-preview (tsgo) as a separate fast type-check tool while keeping typescript@6.x as the API the ecosystem consumes — not a straight swap of the typescript package.
References
- PR build(deps-dev): Bump typescript from 6.0.3 to 7.0.2 #499 — the Dependabot bump this issue tracks
- TypeScript native port (
typescript@7.x/@typescript/native-preview)
Activity
build(deps): pin typescript to 6.x — ignore the 7.0 native-port major…
Nitjsefnie commentedon Aug 2, 2026
This looks already done — flagging in case it just needs closing.
package.jsonhastypescript: 6.0.3, and.github/dependabot.ymlalready carries an ignore rule for TypeScript major bumps that cites this issue by number. The dependabot PR that prompted it (#499) is closed.Not opening a PR since there's nothing left to change.