perf(deps-dev): use native TypeScript in React sandboxes

GL
8d ago
+2617-12

Upgrade the existing tsc --noEmit stage in the React web-component and React 19 sandboxes to TypeScript 7.0.2. Keep the library compiler and the Angular, Next.js and Vue compiler integrations unchanged.

CI scope: this PR introduces no workflows or jobs. The compiler-migration workflow additions have been removed, and pre-existing workflows are unchanged. This deletion changes no compiler, dependency graph, source or benchmarked command, so the recorded performance measurements remain applicable. Hosted results and bot reviews below refer to the earlier commits explicitly linked; they are not claims about the cleanup commit. The cleanup independently passed diff/reference checks and a scoped security/Forge review. Hub's existing npm run lint also passed after deletion.

The React web-component sandbox already failed under TypeScript 5.9.3 because its custom element augmented the old global JSX namespace. This PR moves that same declaration, with all property types preserved, into React’s JSX namespace. Both compilers pass on the identical repaired final source. No runtime expression or compiler configuration changes.

Both sandboxes now have npm lockfiles for reproducible npm ci installs. The React lock was generated with npm after review identified that its previous unlocked install could drift between runs. The migration-only sandbox workflow has been removed; the existing root workflow is unchanged.

Measured compiler performance

Node 22.22.0 on a 14-core macOS host; two warmup rounds followed by seven measured rounds, alternating compiler order. All 36 compiler invocations passed. Both compilers use the final locked dependency graph and identical repaired source.

Existing build stageTypeScript 5.9.3TypeScript 7.0.2Less timeSaved per run
React web component: tsc --noEmit0.446 s0.104 s76.72%0.342 s
React 19: tsc --noEmit0.516 s0.104 s79.92%0.413 s

One-minute host load ranged from 8.03 to 8.79 on 14 cores. These are local observations, with no claim of a completely idle host. Other audit jobs were paused; unrelated user processes were not stopped. These are compiler-process measurements, not an end-to-end build or CI speedup. No incremental cache is configured. OS/package caches remained warm; package-manager startup, dependency installation, library bundling and Vite are excluded.

Reproduce with the baseline 5.9.3 compiler and candidate 7.0.2 compiler installed separately: from each sandbox directory, time node /absolute/path/to/compiler/bin/tsc --noEmit against the same checkout and dependencies. Use two warmups and seven measured rounds, alternating compiler order. The benchmark driver, exact compiler paths, independent version checks, and raw samples are retained in the audit workspace.

dev/react samples in seconds:

  • TypeScript 5.9.3: 0.446343, 0.446070, 0.461486, 0.447987, 0.451562, 0.438523, 0.441833
  • TypeScript 7.0.2: 0.105811, 0.103240, 0.102489, 0.103900, 0.102637, 0.104565, 0.106603

dev/vite-react19 samples in seconds:

  • TypeScript 5.9.3: 0.516455, 0.486804, 0.516603, 0.509993, 0.509755, 0.536676, 0.522426
  • TypeScript 7.0.2: 0.107452, 0.102891, 0.107087, 0.102013, 0.103722, 0.102104, 0.104155

Measurement correction: final audit found that the earlier driver invoked the root TypeScript 5.8.3 executable while labeling it 5.9.3. Those two runs are retained and explicitly marked superseded; neither is used in the table above. The corrected driver selects the original sandbox’s exact 5.9.3 executable, asserts actual --version output for every selected compiler before sampling, and repeats both scope/build validation and timing. The final numbers above replace all earlier PR numbers.

Validation and boundaries

  • Both sandbox builds pass under both compilers on final source. All three web-component sandbox output files and all four React 19 output files are byte-identical. The existing large-chunk warnings remain unchanged.
  • Compiler scope is identical: the web-component sandbox checks three project files plus 144 dependency declarations; React 19 checks three project files, the built library declaration, and 185 dependency declarations. Compiler-provided standard libraries change with the compiler version.
  • Root Biome and compiler lint passed across 97 checked files, including after the lockfile review fix. The format-vector conformance script and all 26 root tests passed. The local npm test wrapper hit a sandbox IPC restriction in the tsx launcher; equivalent direct invocation passed, and the first hosted CI round subsequently passed the ordinary npm test command.
  • Library source and build configuration are unchanged. Local consumer validation used the exact baseline library outputs already verified for this default head. Both hosted rounds successfully performed normal root npm ci, full library build, build verification, lint and all 26 tests.
  • The React 19 npm lock preserves all 123 existing noncompiler package records and its local library link. npm 10 generated the compiler replacement and all 20 official platform packages. Exact host graphs were fetched through disposable frozen transport fixtures, restored into npm directory layouts, and checked for package versions, SRI, file hashes and dependency edges.
  • The new web-component sandbox lock was generated by npm 10 from the unchanged dependency ranges and verbatim cached publisher metadata in an empty fixture. It has 133 registry package records plus the root and intended local-library metadata/link. All optional native edges are present. Its complete 67-package host graph, 2,797 files and 101 resolution edges were verified. Frozen npm dry-run passes. The final graph includes Rollup 4.63.1; both compiler checks, output comparisons and the headline benchmark were rerun on this graph.
  • The original unlocked local fixture had pinned Rollup 4.60.4 within Vite’s range because a newer cached optional-package record was incomplete. That fixture is not the final dependency graph. No fixture override is committed. The first hosted round passed ordinary React npm install and React 19 npm ci; the final follow-up head passed normal npm ci for both sandboxes (68 and 75 installed packages on Linux), followed by their complete compiler and Vite builds.
  • The previously added sandbox workflow has been removed. The successful sandbox CI runs below are historical migration evidence.

Independent security and Forge review passed for both the initial change and the lock/workflow follow-up. All 133 new registry lock records matched official cached publisher metadata, including tarball/SRI, dependency and optional edges, platform restrictions, engines and executable declarations. No compiler or platform package introduces an install hook. The new sandbox lock fixes its previously unlocked dependency selection; it is not a broad dependency-security remediation. Previous-head root and sandbox CI, semantic title and Aikido all passed. Cubic approved a78182914ad2a59570f5762a4acaa0b4bef5366e with zero new findings (review 5477395473); its original lockfile finding was fixed, answered, and automatically resolved by Cubic. The agent did not resolve the thread.

Audit evidence: continuation/evidence/hub-sandboxes/benchmark.json, locked-react-validation.json, scope-parity.json, candidate-gates.json, and continuation/benchmark_hub_sandboxes.py. The original-source baseline failure remains explicit. Framework probes are recorded separately: the exact Vue compiler rejects native TypeScript’s missing lib/tsc API; Next.js’ actual prerequisite helper rejects its missing lib/typescript.js. Angular 18’s upstream version guard rejects 7.0.2. Their existing checks are preserved.

The repository security overview showed code scanning needing setup, secret scanning enabled, and Dependabot enabled with 84 pre-existing default-branch alerts (2 critical, 50 high, 29 moderate, 3 low). No code-scanning pass or full-graph vulnerability-free claim is made. Aikido passed on the previous PR head and reported no new issues. Automatic Copilot review was unavailable because its quota was exhausted; no manual retrigger was requested.

Hosted evidence: root build, lint and 26 tests, React locked install and build, and React 19 locked install and build.

Scope clarification for automated review summaries: this PR upgrades only the two React sandboxes. The root library’s TypeScript 5.8.3 and Angular’s TypeScript 5.5 series remain unchanged. The JSX namespace issue also failed under the original sandbox TypeScript 5.9.3; it was not introduced solely by TypeScript 7.