Skip to content

chore: migrate the toolchain to TypeScript 7 #44

Open

Description

@ydj515

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.0 declares a TypeScript peer range of >=4.8.4 <6.1.0.
  • TypeScript 7 validation fails with TS5102 because baseUrl has been removed.
  • TypeScript 7 validation fails with TS5090 because the existing path targets are not explicitly relative.
  • The errors occur in both tsconfig.app.json and tsconfig.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-eslint release that explicitly supports TypeScript 7, or document and approve another compatible lint strategy without suppressing peer checks.
  • Remove baseUrl from tsconfig.app.json and tsconfig.vitest.json.
  • Update the @/* path target to an explicitly relative TypeScript 7-compatible value.
  • Upgrade TypeScript and regenerate pnpm-lock.yaml with 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 with pnpm generate-routes.

Acceptance Criteria

  • pnpm peers check reports no peer dependency issues.
  • pnpm typecheck passes without TS5102 or TS5090.
  • pnpm verify passes.
  • pnpm audit --audit-level high passes.
  • GitHub CI succeeds for Validate, Storybook, Playwright E2E, and Security audit.
  • Documentation reflects the supported TypeScript version if it is version-specific.

References

Activity

  1. added
    enhancementNew feature or request
    dependenciesPull requests that update a dependency file
    javascriptPull requests that update javascript code
    on Aug 23, 2026
  2. ydj515 commented on Sep 10, 2026

    @ydj515
    OwnerAuthor

    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.json and pnpm-lock.yaml; it does not include the configuration or compiler API compatibility changes tracked here.

    At PR head c1307acc342708d05de4a9ace05ff4bebac128dc, Validate fails during typecheck with TS5102 (baseUrl removed) and TS5090 (non-relative path targets) in both tsconfig.app.json and tsconfig.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.

    • Direct TS7 replacement reproduces the configuration failures.
    • Remove baseUrl and ignoreDeprecations from both affected configs and change "@/*": ["src/*"] to "@/*": ["./src/*"]: TS7 typecheck passes without application source changes.
    • Even the newer typescript-eslint@8.70.0 declares typescript >=4.8.4 <6.1.0 and explicitly refuses TS7 at runtime. Updating tsconfig alone is insufficient.
    • The current default Storybook 10.6.0 build also succeeds with direct TS7 replacement; a blanket claim that Storybook itself blocks this migration would be inaccurate.

    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 --version reports 7.0.2 and tsc6 --version reports 6.0.3. Existing tsc -b scripts 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

    1. Implement and document the side-by-side configuration and alias changes in a dedicated migration change under this issue.
    2. Keep chore(deps-dev): bump the dev-dependencies group across 1 directory with 8 updates #58's unrelated dependency updates separate, or rerun all gates if combining them; the experiment above does not validate the full chore(deps-dev): bump the dev-dependencies group across 1 directory with 8 updates #58 diff.
    3. Verify GitHub's Ubuntu CI and the chosen editor's TS7 language server. Neither is covered by the local experiment.
    4. Retain the TS6 API until dependent tools explicitly support the new API and peer checks plus all gates pass without the compatibility package. Track upstream support in Enhancement: Use TS 7 (tsgo / typescript-go) for type information typescript-eslint/typescript-eslint#10940 rather than assuming a TS7.1 version number alone guarantees compatibility.

    This is a validated migration proposal, not a completed migration; the implementation and remote CI acceptance criteria remain open.

  3. self-assigned this
    on Sep 10, 2026
  4. pinned this issue on Sep 10, 2026
  5. unpinned this issue on Sep 10, 2026
  6. pinned this issue on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

dependenciesPull requests that update a dependency fileenhancementNew feature or requestjavascriptPull requests that update javascript code

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions