mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
test(start-plugin-core): planner tests check names by shape, not by spelling
Which name the core's allocator generates for glue is free, so the planner
tests read it from the output (`tests/generated-names.ts`: `shape`,
`namesIn`, `importedAs`) instead of spelling `TsrHydrate0`, `tsrLazy`,
`tsrArguments`, `tsrCap$…`, `tsrRef$…`, `props$1`, `tsrClientRpc`,
`tsrSsrRpc`, `tsrServerRpc`, `tsrLoadHandlers`, `tsrHandler$…`,
`tsrServerFn$…` or `*_createServerFn_handler`; whole-chunk `toBe`s are
checks of what the test is about. Kept as they were: diagnostics (code and
position), hydration and derived ids, source-map positions, edges, facts.
Deleted from planners/hydrate.test.ts, behaviour covered by the Hydrate
oracle (pages/ on a Vite dev server, hydrate-build*, hydrate-pages*):
- import forms are boundaries: hydrate-boundary-forms "a renamed import of
Hydrate is a boundary", hydrate-pages "a namespace-imported Start.Hydrate
loads its children when it hydrates", hydrate-split-modules "client:
modules and bindings only the split children use are not needed before
the chunk loads"
- split shorthand and dynamic split: hydrate-split-modules "client: the
split shorthand splits the children", hydrate-boundary-forms "a dynamic
split={flag} (%s) still splits the children"
- Solid loads through the Solid router: hydrate-boundary-forms "Solid: a
Hydrate of @tanstack/solid-start splits with the Solid packages"
- a single expression child: hydrate-split-modules "client: a single
expression child ($name) renders through the chunk"
- a self-closing boundary's children prop and boundaries nested in it:
hydrate-split-modules "client: the children prop ($name) of a
self-closing boundary is deferred", known-bugs-hydrate "client: a boundary
nested in a children prop hydrates with the id the server renders"
- generated names away from the file universe: hydrate-captures "client:
$scope bindings named like the generated bindings keep their values",
known-bugs-hydrate-module-level "client: module-level $name, named like
the generated bindings, do not collide"
- a chunk-first request: hydrate-build-dev "client: a chunk requested
before its parent module renders the children, and an edit reaches it"
- captured locals, JSX tags of locals, names bound inside, local enums,
own this/arguments of inner functions, nested placeholders: hydrate-
captures "client: the children read the locals of the component $name",
"client: a nested boundary reads the locals of the component around its
enclosing boundary"; known-bugs-hydrate "client: the split children render
a local component named %s", "… render a component bound inside them",
"… read a local enum", "client: split children may use the own `this` of
$name"
- Solid use: directives: hydrate-pages-solid "split children run a
directive declared in the $where"
- module-level code the children use, a let they only assign:
known-bugs-hydrate-module-level "client: an exported declaration the
children use has one instance, initialized once", "client: split
children reading Route $name use the one route", "client: $name that the
children rely on reaches the chunk", "client: $name used by the children
reaches the chunk"
- a hook in the boundary's own props: hydrate-boundary-forms "a hook call
in the props of the boundary runs in the parent render, and the children
still split"
- split={false}: hydrate-boundary-forms "$name with split={false} stays in
place in both environments"
- the server strips fallbacks: hydrate-boundary-forms "server: $name is
removed", hydrate-pages "$how shows, then the children"
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e2e9da916b
commit
c03e696f3e
4 changed files with 284 additions and 521 deletions
Loading…
Add table
Add a link
Reference in a new issue