Skip to content

build: promote tsgo to primary typechecker when TS 7.0 is GA #180

Description

@goanpeca

Phases 2-3 of #178 (TypeScript 7.x native compiler). This is the full migration: make the native compiler (tsgo / typescript@7) the authoritative typechecker and, once possible, collapse to a single compiler. It is deliberately gated and should not start until the entry conditions below are met and the parallel-job parity data from #178 Phase 1 is clean.

Entry conditions (do not start until all hold)

  • TypeScript 7.0 is generally available (a stable typescript@7 / native compiler release), not a preview build.
  • The Phase 1 non-blocking job has shown clean diagnostic parity with tsc@6 across recent PRs (no unexplained extra/missing errors).
  • TypeDoc can build on the native compiler API, OR a decision is made to keep the JavaScript typescript solely as TypeDoc's peer dependency indefinitely.

Scope

  • Promote the native compiler to the primary typecheck (replace tsc --noEmit with the native no-emit invocation).
  • Update the husky pre-commit and pre-push hooks to run the native typecheck.
  • Update CI so the native typecheck is the authoritative, blocking gate; remove or repurpose the Phase 1 non-blocking job.
  • TypeDoc: keep pnpm docs working. Either move it onto the native compiler API (if supported) or retain the JavaScript typescript package as TypeDoc's peer dependency and document the split.
  • If and only if the JS compiler is no longer needed anywhere (TypeDoc migrated), remove the transitional typescript (JS) dependency to collapse to a single compiler.
  • Docs: update DEVELOPMENT.md and CONTRIBUTING.md (requirements / toolchain sections) to describe the native compiler, and add a CHANGELOG entry under [Unreleased].

Acceptance criteria

  • pnpm typecheck runs the native compiler and is the authoritative gate in CI and husky hooks.
  • tsc@6 (JS) is no longer the source of truth for type-checking.
  • pnpm docs (TypeDoc) still builds successfully.
  • The JavaScript typescript dependency is either removed (if TypeDoc no longer needs it) or explicitly retained and documented as TypeDoc's peer only.
  • All existing gates stay green: pnpm all, coverage, docs:lint, docs:links, audit, and the committed-dist freshness check (ncc is unaffected, but verify).
  • DEVELOPMENT.md, CONTRIBUTING.md, and CHANGELOG.md updated to reflect the new toolchain.
  • The native compiler version is pinned and Dependabot-tracked.

Risks

  • Diagnostic divergence on promotion could surface new type errors; the 58-file codebase keeps triage cheap.
  • CI-matrix and contributor-local native-binary availability across Linux/macOS/Windows must be confirmed before this becomes a blocking gate.
  • If TypeDoc parity never lands, the "single compiler" end state is deferred and this issue closes at the "native primary, JS retained for docs" milestone rather than full collapse.

Depends on

Metadata

Metadata

Assignees

Labels

ciCI/CD pipeline and automationenhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions