Skip to content

Track TypeScript 7 migration readiness #155

Description

@kvithayathil

Summary

Track the conditions and verification work required before VoteCatcher can move its frontend from TypeScript 6 to TypeScript 7.

TypeScript 7.0 is a native compiler with substantial performance gains, but it has no stable programmatic API. Svelte tooling embeds that API, so a direct upgrade currently breaks the project type-check workflow. Do not force peer-dependency overrides or replace bun run check while this issue is open.

Current State

  • Frontend uses TypeScript 6.0.3, SvelteKit, svelte-check, typescript-eslint, and Storybook Svelte.
  • bun run check is the authoritative full type check because it validates .svelte files.
  • TypeScript 7.0.2 CLI can check the TS/JS subset, but native tsc omits .svelte source files; it cannot be a merge gate.
  • Svelte language-tools issue #3063 remains open. Maintainers confirm TS 7 is fundamentally incompatible with svelte-check and svelte-package today.

Subtasks

Upstream Readiness

  • Monitor sveltejs/language-tools#3063 until maintainers document end-to-end TypeScript 7 support.
  • Monitor sveltejs/language-tools#3073; do not treat alias detection or a clearer runtime error as full TS 7 support.
  • Confirm a released SvelteKit version accepts TypeScript 7 in its peer dependency range.
  • Confirm a released typescript-eslint version accepts TypeScript 7; upgrade parser, plugin, and meta package together.
  • Confirm Svelte Storybook and its svelte2tsx integration support TypeScript 7, or document evidence that Storybook is isolated from the application compiler.
  • Confirm TypeScript 7.1 or later documents the stable programmatic API required by embedded-language tooling.

Isolated Compatibility Upgrade

  • Create a dedicated migration branch/worktree after every upstream readiness condition is met.
  • Upgrade TypeScript and all dependent frontend tooling to mutually compatible released versions. Do not use peer-dependency overrides.
  • Run bun install --frozen-lockfile after lockfile regeneration to prove deterministic resolution.
  • Review tsconfig.json and generated SvelteKit config for TS 7 defaults and hard errors: rootDir, explicit types, moduleResolution, removed legacy module targets, baseUrl, and import attributes.
  • Audit JS/JSDoc files because VoteCatcher enables allowJs and checkJs; TS 7 changes several JSDoc/Closure-style interpretations.
  • Review type-level string utilities for the TS 7 Unicode code-point template-literal behavior.

Stability And Compatibility Gates

  • bun run check reports no new errors and continues to check .svelte components.
  • bun run lint passes.
  • bun run test:unit passes.
  • bun run test:e2e passes.
  • bun run build passes.
  • bun run build-storybook passes.
  • Run the repository CI-equivalent command and compare diagnostics with the TS 6 baseline.
  • Verify local editor diagnostics, completions, go-to-definition, and rename in .svelte, .ts, and .js files. Until Svelte supports the native TS language server, test with the TypeScript 7 VS Code language server disabled.
  • Measure clean-cache and warm-cache check times and memory against the TS 6 baseline; record the machine/runner configuration and command lines.

Rollout

  • Add the smallest necessary script/documentation changes for the final supported workflow.
  • Update CI only after all preceding gates pass.
  • Define rollback as reverting the dependency and lockfile commit to the prior TS 6 toolchain.

Acceptance Criteria

  • Every upstream readiness item is supported by a linked release note, peer range, or maintainer statement.
  • The upgrade branch passes all stability and compatibility gates without peer overrides.
  • The resulting TypeScript configuration has no TS 7 deprecation/hard-error regressions.
  • svelte-check remains functional and authoritative for Svelte component diagnostics.
  • The issue records benchmark and editor verification results before the migration PR is opened.

References

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:frontendFrontend (SvelteKit) changesdevexDeveloper and contributor experiencespikeResearch and investigation task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions