diff --git a/packages/router-plugin/tests/code-splitter-const-chains.test.ts b/packages/router-plugin/tests/code-splitter-const-chains.test.ts index 2698b0638e..e00c84a272 100644 --- a/packages/router-plugin/tests/code-splitter-const-chains.test.ts +++ b/packages/router-plugin/tests/code-splitter-const-chains.test.ts @@ -1,10 +1,7 @@ /** - * Route option values named through module-level `const`s (design 5 I4): - * naming a value through one or several unwritten `const`s, or wrapping it - * in `as`, changes neither the split nor what is reported. The options - * object, a spread in it and an object-form loader read the same through a - * chain of consts as written inline; a chain whose object is written to, or - * shared with other code, keeps the warning the inline form gets. + * Route option values named through module-level `const`s: a spread in the + * options object reads the same through a chain of unwritten consts as + * written inline. */ import { describe, expect, it } from 'vitest' import { expectNoProblems } from '@tanstack/compiler-test-utils/diagnostic-channel' diff --git a/packages/router-plugin/tests/code-splitter-effect-timing.test.ts b/packages/router-plugin/tests/code-splitter-effect-timing.test.ts index 0dc77baf26..e4d32b5dbc 100644 --- a/packages/router-plugin/tests/code-splitter-effect-timing.test.ts +++ b/packages/router-plugin/tests/code-splitter-effect-timing.test.ts @@ -1,12 +1,7 @@ /** - * When an effect that sets state only the split component reads runs, on - * the Vite dev server (`route-app.ts`): the same whether the module writes - * the state in its declaration (`let calls = seed()`) or in a statement - * after it (`calls = seed()`, `calls += seed()`). Moving an initialiser to - * a lazy chunk is allowed (G3; DECISIONS R29/R31), so either may run at load - * or at the first render, but both run at the same time, once, with the - * value the code gives. A write of a pure value is the control. Builds are - * in integration/code-splitter-effect-timing.test.ts. + * On the Vite dev server (`route-app.ts`): a class only the split component + * uses, with a decorator, keeps the order of the decorator's effect and the + * effects written after it. */ import { describe, expect, it } from 'vitest' import { head, loadRoute } from './route-app' diff --git a/packages/router-plugin/tests/integration/build-map-sources.test.ts b/packages/router-plugin/tests/integration/build-map-sources.test.ts index 47b00af7c0..3d4b221cc5 100644 --- a/packages/router-plugin/tests/integration/build-map-sources.test.ts +++ b/packages/router-plugin/tests/integration/build-map-sources.test.ts @@ -1,7 +1,7 @@ /** * The emitted source maps of a split route name the route file once, as the - * file it is (DECISIONS D3: a map's `sources` is the file's path without the - * compiler's query): the chunk of the split component, the route module and + * file it is (a map's `sources` is the file's path without the compiler's + * query): the chunk of the split component, the route module and * the module they share each name `routes/index.tsx`, never * `routes/index.tsx?tsr-split=…`, hold its text as written, and map a * position of the split component's code to its line in the route file. A diff --git a/packages/router-plugin/tests/integration/code-splitter-copied-exports-state.test.ts b/packages/router-plugin/tests/integration/code-splitter-copied-exports-state.test.ts index 1beafec6a4..9d9b27c93e 100644 --- a/packages/router-plugin/tests/integration/code-splitter-copied-exports-state.test.ts +++ b/packages/router-plugin/tests/integration/code-splitter-copied-exports-state.test.ts @@ -505,7 +505,7 @@ suite( // ---- where a non-copied export lands ------------------------------------------ // An exported function over module state is not copied: the chunk imports -// its extracted module (R77 amendment). That module is reachable from the +// its extracted module. That module is reachable from the // entry (the route module re-exports it) and from the chunk; the copy rule // exists because Rolldown < 1.1.5 and a user `manualChunks` group merging // into the entry placed such a module with the entry (tanstack.com). Where diff --git a/packages/router-plugin/tests/integration/code-splitter-other-names.test.ts b/packages/router-plugin/tests/integration/code-splitter-other-names.test.ts index 82a96dec8c..532fe525e8 100644 --- a/packages/router-plugin/tests/integration/code-splitter-other-names.test.ts +++ b/packages/router-plugin/tests/integration/code-splitter-other-names.test.ts @@ -2,13 +2,12 @@ * State read or written through another name, real builds (Vite and Rspack * client builds, mounted in a DOM). A read through an alias, a holder or a * spread reads the object the other name names: it keeps the value the - * source reads although the write is to the original binding (REVIEW - * design 2 step 4, finding 1). A call of a method named like an array's + * source reads although the write is to the original binding. A call of a method named like an array's * mutator (`push`, `set`, `add`) on an object the module defines runs that - * object's code: it keeps its order with the effects after it (finding 2). + * object's code: it keeps its order with the effects after it. * A write through another name (an alias, a holder) writes the object that * name holds: a read of it through its first name keeps the value the - * source reads (REVIEW design 2 final, finding 1). + * source reads. */ import { describe, expect, test } from 'vitest' import { build, clientMountEntry, head, routeApp } from '../build-harness' diff --git a/packages/router-plugin/tests/integration/code-splitter-unparsed-route.test.ts b/packages/router-plugin/tests/integration/code-splitter-unparsed-route.test.ts index 047e73cdce..32408eb7d1 100644 --- a/packages/router-plugin/tests/integration/code-splitter-unparsed-route.test.ts +++ b/packages/router-plugin/tests/integration/code-splitter-unparsed-route.test.ts @@ -1,6 +1,6 @@ /** * A route module that does not parse never silently drops out of a build - * (R86, SPEC J2.8): the route generator cannot read it, so a build that + * (SPEC J2.8): the route generator cannot read it, so a build that * does not watch fails, naming the file, also where the bundler's own * transpiler lets it through. The grammar error here * (`let label!: string = '…'`: a definite assignment assertion with an diff --git a/packages/router-plugin/tests/integration/code-splitter-unreadable-loader.test.ts b/packages/router-plugin/tests/integration/code-splitter-unreadable-loader.test.ts index 0c3bd9919d..6adcd307e4 100644 --- a/packages/router-plugin/tests/integration/code-splitter-unreadable-loader.test.ts +++ b/packages/router-plugin/tests/integration/code-splitter-unreadable-loader.test.ts @@ -1,6 +1,5 @@ /** - * A split loader whose value the compiler cannot read (SPEC J2.3, J2.8; - * source: REVIEW-design5-final finding 6): an import, a call or any other + * A split loader whose value the compiler cannot read (SPEC J2.3, J2.8): an import, a call or any other * value that is no function or object literal through the route file's * consts may be a function or an object-form loader (`{ handler, * staleReloadMode }`), whose options the router reads from the route module diff --git a/packages/router-plugin/tests/integration/code-splitter-value-own-writes.test.ts b/packages/router-plugin/tests/integration/code-splitter-value-own-writes.test.ts index 2621489cf1..41bdb10660 100644 --- a/packages/router-plugin/tests/integration/code-splitter-value-own-writes.test.ts +++ b/packages/router-plugin/tests/integration/code-splitter-value-own-writes.test.ts @@ -3,11 +3,10 @@ * (`memo(function Page() { didInit = true })`): the write may run at any * time, but when nothing else of the module touches that state, it and the * state load with the component's chunk, so the option is split, with no - * warning (REVIEW design 2 step 4, finding 3; the same write at load is - * split already). Another reader keeps the option in place, wherever it + * warning (the same write at load is split already). Another reader keeps the option in place, wherever it * evaluates: one in a module two chunks share too, which would otherwise * import the state from the component's chunk while that chunk imports it - * (REVIEW design 2 final, finding 2). Real builds, mounted in a DOM. + * Real builds, mounted in a DOM. */ import { describe, expect, test } from 'vitest' import { findDiagnostics } from '@tanstack/compiler-test-utils/diagnostics' diff --git a/packages/router-plugin/tests/integration/pages/code-splitter-module-state.test.ts b/packages/router-plugin/tests/integration/pages/code-splitter-module-state.test.ts index 5e8d5fdba5..667984faec 100644 --- a/packages/router-plugin/tests/integration/pages/code-splitter-module-state.test.ts +++ b/packages/router-plugin/tests/integration/pages/code-splitter-module-state.test.ts @@ -1078,8 +1078,7 @@ function Page() { }, ) - // (R138, design 2 step 5: both evaluate in the component's chunk, in - // source order; the row asserted that both stayed in the route module) + // (both evaluate in the component's chunk, in source order) it('moves one another one reads with it, in source order', async () => { expect( await observe( diff --git a/packages/router-plugin/tests/integration/route-merged-declarations.test.ts b/packages/router-plugin/tests/integration/route-merged-declarations.test.ts index b53d4e31c6..ef18929872 100644 --- a/packages/router-plugin/tests/integration/route-merged-declarations.test.ts +++ b/packages/router-plugin/tests/integration/route-merged-declarations.test.ts @@ -2,7 +2,7 @@ * A `Route` export sharing its name with a declaration. A type has no runtime * value: the route splits and nothing is said. A second value isn't a route * the compiler can read: the page lands in the route module and the build warns - * once, naming the file (R78). + * once, naming the file. */ import { describe, expect, test } from 'vitest' import { findDiagnostics } from '@tanstack/compiler-test-utils/diagnostics' diff --git a/packages/router-plugin/tests/integration/split-module-ids.test.ts b/packages/router-plugin/tests/integration/split-module-ids.test.ts index a88b91069a..ef9d16ea1c 100644 --- a/packages/router-plugin/tests/integration/split-module-ids.test.ts +++ b/packages/router-plugin/tests/integration/split-module-ids.test.ts @@ -1,16 +1,7 @@ /** - * The ids of split modules and the specifiers that import them keep the - * format of the Babel splitter (main), as an app's build configuration - * reads them: a compatibility surface, not the freedom of SPEC §5.3. Apps - * name their webpack and Rspack chunks from `chunkGroup.origins[].request` - * (`/routes/.tsx?tsr-split=---`) and their Vite chunks from - * module ids (`manualChunks`), with the default groupings and with - * `codeSplitGroupings`. A split group's `import()` specifier is the route - * file's absolute path (forward slashes) with `?tsr-split=` and the group's - * options sorted and joined by `---`; the modules main had no counterpart - * for (code several groups share, an extracted export) are named in the - * same style. Each route file is one module, however its outputs import it. - * Runs in the integration smoke set (Windows: `C:\` paths). + * Split modules are imported through specifiers holding the route file's + * absolute path (`…/routes/.tsx?tsr-split=…`), with the default + * groupings and with `codeSplitGroupings`. */ import { expect, test } from 'vitest' import { build, rootRoute } from '../build-harness' diff --git a/packages/router-plugin/tests/integration/typescript-namespace-shapes.test.ts b/packages/router-plugin/tests/integration/typescript-namespace-shapes.test.ts index 50736c8859..078e08a46a 100644 --- a/packages/router-plugin/tests/integration/typescript-namespace-shapes.test.ts +++ b/packages/router-plugin/tests/integration/typescript-namespace-shapes.test.ts @@ -1,7 +1,7 @@ /** - * The TypeScript declarations whose name isn't a plain identifier statement: - * `namespace A.B` declares `A`, and `export import R = N.v` declares and exports - * `R`. A split component reading them gets the binding on every bundler. + * A TypeScript declaration whose name isn't a plain identifier: + * `namespace A.B` declares `A`. A split component reading a value typed + * with it renders. */ import { expect, test } from 'vitest' import { build, head, rootRoute } from '../build-harness' @@ -21,7 +21,7 @@ const component = (read: string) => `export const Route = createFileRoute('/')({ component: () =>

{${read}}

})\n` test( - 'a namespace of types only stays out of every chunk', + 'a split component reading a value typed with a namespace of types only renders', async () => { const app = await build({ bundler: 'vite',