0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00

refactor(compiler): split AnalysisPlan into plan, kept diagnostics and freeze

`plan.ts` (2,025 lines) held the planner facade, the benign-call
judgement, the Router-worded warning for declarations only split code
needs, freeze/render/glue and the `Renderer`. Now:

- plan.ts: the planner facade, renames, `resolve()` (525 lines)
- kept-diagnostics.ts: `keptDiagnostic` and `firstImpure` (the benign
  test placement asks, and the effect the warning names); `benignUnit`,
  a one-line wrapper, is gone
- freeze.ts: freeze, env/derived rendering, glue, edges, `Renderer`

The core no longer words Router or Start concepts: the planner that
declares an output says how diagnostics name it (`OutputSpec.describe`,
default its key) and a planner names the module
(`PlanContext.describeModule({ name, tag })`). `setRouteModule` stays:
placement needs it for the route-module import rules (a value import used
only in type positions and TypeScript-only specifiers leave a route
module; plain modules keep imports as written).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sheraff 2026-10-29 19:17:41 +01:00
commit 13528935d2
No known key found for this signature in database
7 changed files with 1628 additions and 1545 deletions