Repository navigation
chore: migrate the toolchain to TypeScript 7 #44
Copy link
Copy link
Open
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency fileenhancementNew feature or requestNew feature or requestjavascriptPull requests that update javascript codePull requests that update javascript code
Description
Summary
Migrate the project from TypeScript 6.0.3 to TypeScript 7 after the lint and build toolchain supports it, while preserving path aliases, generated routes, tests, Storybook, and E2E behavior.
Background
Dependabot PR #42 attempted to upgrade TypeScript to 7.0.2. The update was excluded from #43 because the current toolchain is not yet compatible.
Observed blockers:
typescript-eslint@8.67.0declares a TypeScript peer range of>=4.8.4 <6.1.0.- TypeScript 7 validation fails with
TS5102becausebaseUrlhas been removed. - TypeScript 7 validation fails with
TS5090because the existing path targets are not explicitly relative. - The errors occur in both
tsconfig.app.jsonandtsconfig.vitest.json.
Node 24.19.0 and pnpm 11.22.0 are already pinned. jsdom 30 is already supported and is not part of this migration blocker.
Scope
- Select a
typescript-eslintrelease that explicitly supports TypeScript 7, or document and approve another compatible lint strategy without suppressing peer checks. - Remove
baseUrlfromtsconfig.app.jsonandtsconfig.vitest.json. - Update the
@/*path target to an explicitly relative TypeScript 7-compatible value. - Upgrade TypeScript and regenerate
pnpm-lock.yamlwith pnpm 11.22.0. - Verify TanStack Router route generation, Vite builds, Vitest coverage, Storybook, and Playwright.
- Do not manually edit
src/routeTree.gen.ts; regenerate it withpnpm generate-routes.
Acceptance Criteria
-
pnpm peers checkreports no peer dependency issues. -
pnpm typecheckpasses withoutTS5102orTS5090. -
pnpm verifypasses. -
pnpm audit --audit-level highpasses. - GitHub CI succeeds for Validate, Storybook, Playwright E2E, and Security audit.
- Documentation reflects the supported TypeScript version if it is version-specific.
References
- Dependabot attempts (TypeScript 7.0.2 excluded/closed): chore(deps-dev): bump the dev-dependencies group across 1 directory with 24 updates #42, chore(deps-dev): bump the dev-dependencies group across 1 directory with 21 updates #54, chore(deps-dev): bump the dev-dependencies group across 1 directory with 8 updates #58, chore(deps-dev): bump the dev-dependencies group across 1 directory with 10 updates #61, chore(deps-dev): bump the dev-dependencies group across 1 directory with 10 updates #62, chore(deps-dev): bump the dev-dependencies group across 1 directory with 14 updates #69, chore(deps-dev): bump the dev-dependencies group across 1 directory with 17 updates #91, chore(deps-dev): bump the dev-dependencies group across 1 directory with 19 updates #95, chore(deps-dev): bump the dev-dependencies group across 1 directory with 2 updates #97
- Compatible dependency consolidations (retaining TypeScript 6.0.3): chore: update Node, pnpm, and compatible dependencies #43, chore(deps-dev): update compatible development dependencies #53, chore(deps-dev): bump the dev-dependencies group across 1 directory with 15 updates #71, chore(deps-dev): bump dev dependencies except typescript #96
tsconfigpath alias compatibility (baseUrlremoval and relative./src/*paths): fix: keep dependency upgrades compatible with CI #73
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency fileenhancementNew feature or requestNew feature or requestjavascriptPull requests that update javascript codePull requests that update javascript code
Activity
ydj515 commentedon Sep 10, 2026
Compatibility follow-up and relationship to #58
PR #58 is another direct TypeScript 6.0.3 → 7.0.2 upgrade, grouped with seven other dependency updates, including Vitest/coverage 5 and Playwright 1.63. It changes only
package.jsonandpnpm-lock.yaml; it does not include the configuration or compiler API compatibility changes tracked here.At PR head
c1307acc342708d05de4a9ace05ff4bebac128dc, Validate fails during typecheck withTS5102(baseUrlremoved) andTS5090(non-relative path targets) in bothtsconfig.app.jsonandtsconfig.vitest.json. Storybook, E2E, and Security audit pass, but Validate stops before lint, coverage, and the application build. Those green jobs therefore do not establish complete TS7 toolchain compatibility.Findings from an isolated migration experiment
The experiment uses a temporary copy of main at
8b4f197d5b10435adcc27fcc7fa381c11cff2a3b, not the complete dependency combination in #58. The repository working tree remains unchanged.baseUrlandignoreDeprecationsfrom both affected configs and change"@/*": ["src/*"]to"@/*": ["./src/*"]: TS7 typecheck passes without application source changes.typescript-eslint@8.70.0declarestypescript >=4.8.4 <6.1.0and explicitly refuses TS7 at runtime. Updating tsconfig alone is insufficient.Recommended migration: TS7 checking with the TS6 tooling API
Use the official side-by-side configuration:
{ "devDependencies": { "@typescript/native": "npm:typescript@7.0.2", "typescript": "npm:@typescript/typescript6@6.0.2", "typescript-eslint": "8.70.0" } }The compatibility package re-exports the classic API for tools importing
typescript. In this installation,tsc --versionreports 7.0.2 andtsc6 --versionreports 6.0.3. Existingtsc -bscripts can continue unchanged and run TS7. Regenerate and commit the pnpm lockfile to preserve this resolution; do not suppress peer checks.Keep the current React 19, TanStack Query/Router, RHF, Zod, Zustand, Vite 8.2.2, Storybook 10.6.0, Vitest/coverage 4.1.11, and Playwright 1.62.1 versions for this migration. The broader upgrades in #58 require separate validation.
Local verification
On macOS arm64, Node 24.19.0, and pnpm 11.22.0, the side-by-side configuration passes:
pnpm peers check: no peer dependency issues.pnpm verify: typecheck, lint, formatting, coverage gates, route generation, application build, Storybook build, 269 tests across 63 files, and 61 Chromium E2E tests. E2E uses a dedicated server for the temporary copy.pnpm audit --audit-level high: zero reported vulnerabilities.Three forced typecheck runs per compiler (
-b --force --pretty false) produce median elapsed times of 7.735 s for TS6 and 1.446 s for TS7, approximately 5.3× faster on this machine. This measures forced typechecking, not incremental checking, bundling, CI, or browser performance.Remaining work
This is a validated migration proposal, not a completed migration; the implementation and remote CI acceptance criteria remain open.