build(typescript): move root project references into tsconfig.typecheck.json
Summary
fallow ≥3.20 walks the root tsconfig's references on every import. Since #3289 gave the root tsconfig 28 references, every fallow gate has slowed down: on CI, "Run Fallow audit" went from 6–9s to 440–850s.
This PR moves the references into tsconfig.typecheck.json, which extends tsconfig.json and is now what pnpm typecheck builds with tsc -b. extends does not inherit references, so fallow, freerange, editors and tsdown now read a reference-free root config. The scripts/freerange/tsconfig.json wrapper existed only to hide the references from freerange, so it is deleted. A test pins that tsconfig.json has no references. 6 files changed.
Going back to fallow 3.19 was rejected. Its --fail-on-issues exits 0 on warn findings (checked with a planted unused export), and on main it reports 79 unused production exports where 3.32 reports 0.
Validation
Tested at 590448070a.
- Typecheck:
tsc -b --verbosebuilds the same 30 projects, and--listFilesgives the same 16,156 files. Errors planted in a package, insrc/and intest/are all caught. - fallow output: identical JSON before and after for dead-code, production-exports, health (with and without
--coverage/--diff-stdin) andaudit --base. Only the entry-point bookkeeping differs, by +1 for the new tsconfig. - Cold local timings (12-core Mac):
| command | base | head |
|---|---|---|
| dead-code | 10.0–11.9s | 2.0–2.3s |
| production-exports | 3.4–4.5s | 0.9–1.1s |
| health with coverage | 10.0–12.8s | 2.3–2.4s |
| audit --base | 15.6–30.6s | 5.9–7.9s |
- freerange: run from the root, 0 findings in 111s.
pnpm check:affected --run: passed exceptdaemon-client-transport.test.ts > auto health probing…, a timing test that failed while a Rust build loaded the machine. It passed 3 of 3 runs alone.- Risk: on this PR,
audit --basestill analyses the base with references, so the full CI gain shows on PRs opened after this merges.