Skip to content

deps(frontend): TypeScript 7 (lands #383, issue #388) - #428

Open
WalksWithASwagger wants to merge 1 commit into
mainfrom
codex/deps-typescript7
Open

deps(frontend): TypeScript 7 (lands #383, issue #388)#428
WalksWithASwagger wants to merge 1 commit into
mainfrom
codex/deps-typescript7

Conversation

@WalksWithASwagger

Copy link
Copy Markdown
Owner

What

Bumps the frontend typescript devDependency from ^5.8.3 to ^7.0.2.

Honesty up front: CI is RED and this is not cleanly mergeable yet

This is the riskiest item in the dep batch (a two-major TS jump to the new native/Go port). The bump itself is clean, but the repo's lint toolchain does not support TypeScript 7 yet, and that is not fixable with a surgical, in-scope change. Landing this as-is would knowingly break the test gate. Filing it review-ready so a human can decide.

What passes vs. fails (verified locally, Node 26)

Check Result Notes
tsc --noEmit (typecheck) ✅ PASS Native tsc@7 compiles the source cleanly, no type errors.
vite build ✅ PASS Builds .output/ fine; vite/rollup/esbuild don't need the TS JS API.
vitest run (test) ✅ PASS 10/10 tests pass.
npm ci (CI install step) ❌ FAIL Strict ERESOLVE peer conflict (see below).
eslint . (lint) ❌ FAIL typescript-eslint hard-refuses TS 7.0 at runtime (see below).

CI's test job runs npm --prefix frontend ci then npm run verify (which chains frontend typecheck && test && build && lint). It will fail at the install step first, and would fail at lint even if install were forced.

Root cause (single upstream issue, two symptoms)

typescript-eslint@8.65.0 declares peer typescript: ">=4.8.4 <6.1.0", which TypeScript 7 violates, and it also throws at runtime:

typescript-eslint does not support TS 7.0.
Please see https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0
to run typescript-eslint using the TS 6 API.
See also https://github.com/typescript-eslint/typescript-eslint/issues/10940 for tracking typescript-eslint's support for TS >=7.1
  1. Install failsnpm ci (strict peers) errors:
    Conflicting peer dependency: typescript@6.0.3
    peer typescript@">=4.8.4 <6.1.0" from typescript-eslint@8.65.0
    
    (npm install only downgrades this to a warning; npm ci, which CI uses, is strict.)
  2. Lint fails — even past install, eslint . throws typescript-eslint does not support TS 7.0.

Additional context: the typescript@7 npm package is the native Go port — it ships only a native tsc binary (no tsserver) and no longer exports the JS compiler API at the main entry ("." → lib/version.cjs; the real API moved to ./unstable/*). Tools that require('typescript') for the classic API (typescript-eslint) therefore break.

Why I did not "fix" it

Per the task's guardrails (no blanket any/@ts-ignore, no unrelated dep bumps, change only what TS7 requires): there is no released typescript-eslint that supports TS 7.0 (support is tracked for TS >=7.1 in typescript-eslint#10940). Every real workaround is out of scope for a surgical bump. Deliberately left for maintainer decision.

Options for a maintainer

  • A. Hold (recommended). Keep TypeScript at 5.9.x until typescript-eslint ships TS 7.x support (typescript-eslint#10940), then revisit. Lowest risk.
  • B. TS6-API side-by-side. Adopt the MS-documented pattern (run typescript-eslint against a co-installed typescript@6, use typescript@7's tsc for typecheck). Architectural change beyond a dep bump; would need its own issue.
  • C. Degrade the lint gate. Add .npmrc legacy-peer-deps=true and drop typescript-eslint / TS-aware lint. Makes CI green but weakens the lint gate — not recommended.

Verification commands run

npm --prefix frontend install      # regenerated lockfile (ERESOLVE warnings)
npm --prefix frontend run typecheck # PASS
npm --prefix frontend run build     # PASS
npm --prefix frontend run test      # PASS (10/10)
npm --prefix frontend run lint      # FAIL — typescript-eslint refuses TS 7.0
npm --prefix frontend ci            # FAIL — ERESOLVE peer conflict

Refs #388. Supersedes #383. Do not merge until the lint-toolchain blocker is resolved.

🤖 Generated with Claude Code

https://claude.ai/code/session_017F63bPvWRFR4iVEm83Pzoj

Bumps the frontend `typescript` devDependency from ^5.8.3 to ^7.0.2,
landing Dependabot #383 and tracked by #388.

Verified locally (Node 26): `tsc --noEmit` typecheck, `vite build`, and
`vitest run` all pass under TypeScript 7. The lint toolchain is NOT yet
TS7-compatible: typescript-eslint@8.65.0 declares peer
`typescript >=4.8.4 <6.1.0` and hard-refuses TS 7.0 at runtime, so both
`npm ci` (strict peer resolution) and `eslint .` fail. No released
typescript-eslint supports TS 7.0 yet (tracked upstream in
typescript-eslint#10940, targeting TS >=7.1 via a TS6-API side-by-side
setup). Left for human decision — see PR body and #388.

Refs #388
Supersedes #383

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017F63bPvWRFR4iVEm83Pzoj
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