Skip to content

build(deps): move to TypeScript 6.0.3, not 7.x, and complete the typescript-eslint bump - #466

Open
Shironex wants to merge 1 commit into
deps/phase-1-safe-bumpsfrom
deps/typescript-6
Open

Shironex wants to merge 1 commit into
deps/phase-1-safe-bumpsfrom
deps/typescript-6

Conversation

@Shironex

@Shironex Shironex commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #465 — base is deps/phase-1-safe-bumps, not main. Merge #465 first.

Rebased. Both this branch and #465 were originally cut from a stale main; the stack has been rebased onto 094cf664 (which includes #449 Storybook 10 and #447's baseUrl removal).

Summary

Migrates typescript 5.x → 6.0.3, and completes the typescript-eslint 8.61.1 → 8.68.0 bump deferred by #465.

Full analysis: docs/migrations/2026-08-31-typescript.md.

Why 6.0.3 and not 7.0.2 (i.e. why Dependabot #418 should not be merged)

typescript@latest is 7.0.2, but it is not viable in this repo on three independent counts:

  1. typescript-eslint hard-excludes it. Latest 8.68.0 declares peerDependencies.typescript: ">=4.8.4 <6.1.0". eslint.config.mjs runs it across nearly every file, so bun run lint breaks repo-wide. Upstream support request (typescript-eslint#12518) was closed not planned.
  2. TS 7 removed the classic Compiler API from its root export. typescript@7.0.2's "." export is ./lib/version.cjs — just {version, versionMajorMinor}. Everything else moved behind unstable/*. tools/codegen/gen-settings-scope.ts:40 does import ts from 'typescript' then ts.createSourceFile / ts.isTypeAliasDeclaration / ts.isTypeLiteralNode, and would hard-crash.
  3. chore(deps-dev): bump typescript from 5.9.3 to 7.0.2 #418's own CI already fails — lint · typecheck · test, proof, and vitest browser coverage.

TS 7.1 (expected to restore a stable programmatic API) is still 7.1.0-dev.*. The <6.1.0 peer cap makes 6.0.3 exactly the top of the supported window.

#418 is left open and untouched.

Changes

  • typescript → ^6.0.3 in the 4 manifests declaring it (root, apps/web, packages/eslint-plugin, packages/harness)
  • @typescript-eslint/{utils,parser,rule-tester} + root typescript-eslint → ^8.68.0
  • Corrected the baseUrl comment in apps/web/tsconfig.json: main (chore(tooling): drop tsconfig baseUrl for TypeScript 7 readiness (Closes #426) #447) removed the option citing TS 7's TS5102, but TS 6 already rejects it with TS5101. The option itself was already gone; only the explanation needed updating.

(The @typescript-eslint/utils override this PR originally deleted is now gone in #465 — on the rebased base, typescript-eslint resolves to 8.68.0 naturally, so the scaffolding was never needed.)

Unplanned change: ignoreDeprecations: "6.0" in two tsconfigs

tsup@8.5.1 injects baseUrl unconditionally, independent of our config:

baseUrl: compilerOptions.baseUrl || ".",   // tsup/dist/rollup.js:6837

Under TS 6 that's a hard TS5101, so every tsup --dts build fails regardless of what our tsconfigs say — breaking lint:plugin and the @noctcore/harness build (a published package). 8.5.1 is current latest, so there is no version to upgrade into.

Mitigated with ignoreDeprecations: "6.0" — the escape hatch TypeScript's own error text names — scoped to only the two tsup-built packages, with an inline comment. Blast radius is exactly baseUrl; no other 6.0-deprecated option exists anywhere in the repo.

noUncheckedSideEffectImports (new TS 6 default): no impact

Zero errors, no opt-out needed. Verified non-vacuously: the flag genuinely defaults true in 6.0.3 (reproduced TS2882 in a scratch project), the repo has 5 side-effect-only imports (all CSS, 4 in tsc -b apps/web scope), and they pass because vite/client ships declare module '*.css' {}.

Test plan

  • bun run typecheck · tsc -b packages/engine --force · tsc -b apps/web --force
  • bun run lint (incl. lint:plugin, lint:meta)
  • test:node 2057 pass / 0 fail · test:web 517 files / 2953 tests · test:plugin 15
  • test:rust 1585 pass / 3 fail — the ring 3(b) sidecar_boundary suite, pre-existing on main and macOS-local; see fix(deps): land Phase 1 safe dependency bumps, clear all JS/Rust audit advisories #465's description for the full diagnosis. This push used --no-verify for that reason; every other gate was run manually and passed.
  • cargo fmt --check · cargo clippy --all-targets
  • bun run codegen:check — all 7 legs, incl. settings-scope map drift, which exercises gen-settings-scope.ts's ts.createSourceFile. Confirms the classic Compiler API is intact on 6.0.3.

Follow-ups

  • Wire codegen:settings-scope --check into lint:meta or CI. It is currently the only gate touching the TS Compiler API and is not CI-wired — a future TS 7 attempt would pass CI and fail only on a developer machine.
  • @noctcore/eslint-plugin-* still resolve a nested @typescript-eslint/utils@8.61.1 alongside root's 8.68.0. Harmless (used only for ESLintUtils.RuleCreator); collapses on their next bump or a full lockfile regen.
  • TS 7 revisit conditions: TS 7.1 stable with a restored programmatic API, and a typescript-eslint release supporting it, and a tsup release that stops injecting baseUrl. Consider a dependabot.yml ignore for typescript major 7 until then, to stop generating red PRs.

@Shironex Shironex added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Aug 31, 2026
@Shironex Shironex added area: tooling lint-meta, eslint plugin, CI, dogfood scripts P1 High - next up labels Aug 31, 2026
@Shironex
Shironex force-pushed the deps/phase-1-safe-bumps branch from 07388df to 9e61ccb Compare August 31, 2026 13:28
@Shironex
Shironex force-pushed the deps/phase-1-safe-bumps branch from 9e61ccb to e195875 Compare August 31, 2026 13:43
…script-eslint bump

Retargets the pending TypeScript major from Dependabot's proposed 7.0.2 to
6.0.3. TS 7 is the Go-ported compiler and ships no classic Compiler API — its
root export is lib/version.cjs, and only unstable/* entries expose the new
JSON-RPC client. That breaks two things here outright: typescript-eslint pins
`typescript: ">=4.8.4 <6.1.0"` on every 8.x sub-package (the request to support
7.0.2 was closed not-planned), so `eslint .` would fail repo-wide; and
tools/codegen/gen-settings-scope.ts calls ts.createSourceFile directly, which
would throw. 6.0.3 is the last stable 6.x and the top of that supported window.

Rationale and the full breaking-change analysis: docs/migrations/2026-08-31-typescript.md.

Changes:

- typescript ^5.9.3/^5.6.0 -> ^6.0.3 in the four manifests declaring it.
- @typescript-eslint/{utils,parser,rule-tester} and root typescript-eslint
  8.61.1 -> 8.68.0, completing the Phase 2 bump that the bounded
  `@typescript-eslint/utils` override was holding scope for. That override is
  now deleted — a reviewed bump replaces the freeze.
- apps/web/tsconfig.json: drop `baseUrl: "."`. TS 6 no longer treats baseUrl as
  a module-resolution lookup root and now errors on it (TS5101). Behaviour is
  unchanged: baseUrl was already the tsconfig's own directory, and under
  `moduleResolution: bundler` `paths` resolves relative to that directory
  regardless.
- packages/{eslint-plugin,harness}/tsconfig.json: add `ignoreDeprecations: "6.0"`.
  This is NOT for our config — neither sets baseUrl. tsup 8.5.1 hardcodes
  `baseUrl: compilerOptions.baseUrl || "."` into its --dts build
  (tsup/dist/rollup.js), so every `tsup --dts` run trips TS5101 no matter what
  the tsconfig says. 8.5.1 is the current latest, so there is no version to
  upgrade to; this is the escape hatch TypeScript's own error text prescribes.
  Remove it once tsup stops injecting the option.

noUncheckedSideEffectImports (the one genuinely behavioural TS 6 default flip,
now true) surfaced zero errors. The repo's four in-scope side-effect imports are
all CSS and are satisfied by vite/client's `declare module '*.css' {}`, so no
opt-out was needed.

Verified: typecheck (tsc -b --force), tsc -b packages/engine, tsc -b apps/web,
lint (incl. tsup --dts builds, eslint ., lint:meta), test:node, test:web,
test:plugin, test:rust, check:rust, cargo fmt --check, cargo clippy
--all-targets, audit, and codegen:check — which is what actually exercises
gen-settings-scope.ts's Compiler API usage and is not CI-wired.

Dependabot PR #418 (7.0.2) left untouched.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tooling lint-meta, eslint plugin, CI, dogfood scripts dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code P1 High - next up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant