feat(build): typecheck on TypeScript 7 (Go compiler), tooling stays on TS6 API#103
Merged
Conversation
…ays on TS6 API
Adopts TS7's native Go compiler for the ~10x-faster typecheck without breaking
tooling that needs the TS6 programmatic API (TS7 has no stable API until 7.1;
typescript-eslint + the proptest oracle crash on it).
- `typescript` stays real 6.0.3 → require("typescript") gives the full 6.x API to
typescript-eslint + proptest at runtime.
- `@typescript/native` (= TS7) added as a packages/core DEPENDENCY, so consumers
get the fast compiler too — the gate typechecks on TS7 everywhere, not just
in-repo. Both packages expose a `tsc` bin, so .bin/tsc is ambiguous; TS7 is
referenced by explicit package path:
* typecheck script → node_modules/@typescript/native/bin/tsc
* gate TSC_BIN → resolveTs7Tsc() walks up to @typescript/native (defensive
fallback to plain tsc keeps the gate functional if ever absent).
- Tests: gate-tool-paths.test.ts (TSC_BIN resolves TS7); gate-incremental.test.ts
now runs the gate's ACTUAL resolved binary, not a hardcoded .bin/tsc.
TS7 verified to honor the gate's flags (--strict --noUncheckedIndexedAccess
--incremental --tsBuildInfoFile) with identical diagnostics. Typecheck: multi-sec
→ ~0.34s. Full `bun run validate` green.
agjs
force-pushed
the
feat/typescript-7-migration
branch
from
July 16, 2026 12:27
49333c5 to
a95470d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adopts TypeScript 7's native Go compiler for the typecheck (multi-second → ~0.34s) — used by both
bun run typecheck(CI/dev) and the build gate (the hot per-cycle typecheck during autonomous builds) — without breaking tooling that needs the TS 6 programmatic API.Why the split
TS 7 has no stable programmatic API until 7.1, and
typescript-eslint+ the proptest oracle crash on it (they needts.createProgram/TypeChecker/ModuleKind). So:typescriptstays real 6.0.3 →require("typescript")gives the full 6.x API to tooling at runtime.@typescript/native(= TS 7) is added as apackages/coredependency (consumers get it too), providing the fast compiler.Deterministic wiring
Both packages expose a
tscbin, so.bin/tscis ambiguous. TS 7 is referenced by explicit package path:node_modules/@typescript/native/bin/tscTSC_BIN→resolveTs7Tsc()— walks up for both the hoisted (monorepo) and direct-child (published install) layouts; a loud (non-silent) fallback to ambienttsckeeps the gate functional rather than crashing if TS 7 is ever absent.Verification
--strict --noUncheckedIndexedAccess --incremental --tsBuildInfoFile) with identical diagnostics.gate-incremental.test.tsnow runs the gate's actual resolved binary (not a hardcoded.bin/tsc); newgate-tool-paths.test.tscovers the resolver across layouts + fallback.bun run validategreen (gate typechecks generated code on TS 7).Addresses the TypeScript bump from the dev-toolchain group (#102); the group's TS7-built sonarjs/unicorn remain separate (they need TS 7's runtime API, which our tooling deliberately does not use).