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

Compare commits

..

18 commits

Author SHA1 Message Date
Sheraff
ad808b62a9
test(router-plugin): headers and titles say what the tests check, without design-doc references
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:39:27 +01:00
Sheraff
15a5c9bc7a
docs(compiler-test-utils): the oracle README says which checks share Yuku with a compiler
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:39:27 +01:00
Sheraff
34f9d75283
test(router-plugin): braces in the page-side code of route-app
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:39:27 +01:00
Sheraff
b326834dc0
test(router-plugin): drop the negative controls of route-unrecognized-fixes
Review S9. Its two 'is reported nothing' tests pass on main only because main has no such report; their positive cases fail on main. The file comes with the PR that brings the reports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:34:11 +01:00
Sheraff
32cc29c26b
test(router-plugin): extracted-export chunking asserts outcomes only, for the function case it tests
Review S8. The header and fixture lose the class case the slice does not test. The user-side chunk group now leaves out every module id with a query, instead of matching the compiler's split query (`tsr-split=export---` is #8817's id format), and 'unreported' means no warning names the route file, instead of a match on the warning's text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:34:11 +01:00
Sheraff
52f98bdf02
fix(compiler-test-utils): a page that fails to open frees its slot, and a client run is bounded
Review S7. openPage closes its context (and frees its slot) when a step after opening it fails, e.g. a refused navigation: callers without registerCleanup (runInBrowser) had nothing to close, and after openPageLimit such failures every later openPage waited forever. runInBrowser races the page's load and script against a timeout (default 25 s, below the tiers' 30 s test timeout; run(script, { timeout })), as runInPage does. Two controls fail before the fix (both time out) and pass after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:33:16 +01:00
Sheraff
c051f66f56
test(compiler-test-utils): drop what nothing in the slice uses
Review S6. Removed: the TSR_COMPILER_VERIFY variable (nothing on main reads it) and its self-test; the @tanstack/history build dependency of test:integration; the budgets of packages that do not use the reporter here; settlePage and the hmr-sync scripts with their self-test (the slice uses trackRequests only); reorderings, reorderedRecords and expectDeterministic with their self-tests (the slice uses expectRelocatable only). describeHmr stays: the dev-server harness's own controls use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:30:03 +01:00
Sheraff
c035cbc3f2
docs(compiler-test-utils): the harness docs say what holds on main
Review S5. KNOWN-BUGS.md drops the rows that call Babel and unplugin bugs fixed (they are live on main) and the rows whose pins or workarounds sit in test files main does not have. The harness AGENTS.md drops the Start hosts, the integration-alone process and the react-start build, which only the later suites need. The known-bugs test files no longer say each test is a bug today's compiler fixes, nor point at KNOWN-BUGS sections that are not here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:28:02 +01:00
Sheraff
7083a064ff
test(router-plugin): keep main's Solid/Vue route HMR check and the malformed split id error
Review S3 and S4. The ported page test only checks that a Solid or Vue route compiled with HMR stays valid and renders; main's test that the route HMR plugin adds its Vite HMR handling (without code splitting) stays next to the webpack one. Main's test of the error for a split module id without a split value (router-code-splitter-plugin.ts) stays too, with its helper (createCodeSplitterTransforms) back in regression-helpers.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:27:05 +01:00
Sheraff
76f0a4d38e
test(router-plugin): esbuild's autoCodeSplitting refusal is asserted with its message again
Review S2. Main's test that tanstackRouter({ autoCodeSplitting: true }) throws comes back in esbuild.test.ts, with main's message. The either-or build test's comment no longer calls the refusal a bug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:26:36 +01:00
Sheraff
301cbd8896
docs(router-plugin): AGENTS.md describes the test tiers, not the snapshot suite this PR deletes
Review S1. The snapshot guidance and the invariant-suite pointer go with the suite; the two tiers, behaviour tests through loadRoute, no output snapshots and the unit-main project come in. The route HMR bullets stay: main's HMR tests stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:26:17 +01:00
Sheraff
bccb26e619
test(router-plugin): re-sync the slice with #8817 ac17b427d3
Takes #8817's test changes since 5bd66855c3 that apply on main's
compilers:

- harness: the pin check (a pin passes only on an assertion error), edits
  without their outcome fail as assertions, child Node runs report the
  step they were in and time out below the test timeout, watch rebuilds
  wait for the build that saw the edit, binary app files, map helpers for
  the new map-source test, and its new controls (`pins`, `run-directory`);
- new passing code-splitting tests: `build-map-sources` (it replaces the
  copy of main's webpack/Rspack map-name check), `build-js-extension-assets`,
  `code-splitter-other-names`, `-pure-framework-calls` (Vue, Solid),
  `-unreadable-loader`, `-value-own-writes`, `-const-chains`,
  `-effect-timing` (decorators), `route-unrecognized-fixes`,
  `vite-unanalysed-modules`, 14 new shapes of `code-splitter-state-read-at-load`
  and one effectful-declaration row;
- `code-splitter-reexported-factory` goes as in #8817: main passes it only
  because its compile crashes on a duplicate `createFileRoute`;
- the `integrationProject` refactor of router-plugin's Vitest config.

Left out because they fail on main: #8817's new rows of
`build-source-maps`, `plugin-options` (esbuild), `code-splitter-route-options`
(object loaders with a spread) and the failing rows of the new files. Left
out because they need #8817's core: the compiler stats check of
`test-scope-setup` and its `TSR_COMPILER_STATS` knob.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 13:03:50 +01:00
Sheraff
4a1c8b2d53
Merge branch 'main' into test/compiler-harness-splitting
Takes main's pnpm 12 upgrade (#8912), the RSC dependency bump (#8919) and
the react-start HMR e2e fix (#8913).

The lockfile is main's, regenerated with pnpm 12 for the slice's packages.
pnpm 12 merges a version a package names directly into the other
packages' ranges, so two ranges of the slice are set to the versions main
already resolves, to leave every other package's resolution as on main:
the harness's `esbuild` (^0.28.1; ^0.28.2 added a second esbuild and moved
webpack's peer variant) and router-plugin's `@babel/preset-typescript`
(7.27.1; ^7.28.5 moved esbuild-plugin-solid's preset and the preset's own
helpers). The only change left outside the slice's packages is the css-modules
e2e apps' sass bump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 12:22:02 +01:00
Sheraff
88a0b64d09
test(router-plugin): run the integration tier in 4 CI shards; per-file run pages (#8817 5bd66855c3)
Takes #8817's test infrastructure changes since 294b3f36e1 that apply here:

- router-plugin's `test:integration` runs as four Nx shard targets
  (Vitest `--shard`), and `test:integration:whole` runs the tier in one
  Vitest run, for file filters and budget measurements;
- each test file gets its own run pages and browser context, closed when
  the file ends (`onFileFinished` in `test-scope`), so a later file
  inherits none of their memory or cache;
- SPEC and the harness notes, as in #8817.

#8817's new splitting tests (`code-splitter-effect-timing`) and the changed
`code-splitter-kept-reports` fail on main, so they stay out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 00:00:23 +01:00
Sheraff
5905b947e3
Merge branch 'main' into test/compiler-harness-splitting
Takes #8907, which restores main's start-plugin-core build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 18:35:35 +01:00
Sheraff
3b69f7b1ac
test(router-plugin): keep main's no-mode warning and webpack/Rspack map-name checks
The slice has no test for two behaviours main guards: a webpack or Rspack
production build whose configuration has no `mode` ships no splitter
warning (#8269), and on webpack and Rspack the maps of a split component
and of shared code name the route file, not the `?tsr-split` id (#8860).
Keep those cases of main's tests, cut to what the slice does not cover:
the `mode: 'production'` rows, the line mapping and Vite's dev server are
asserted in the integration tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:21:20 +01:00
autofix-ci[bot]
33bf9b56b4
ci: apply automated fixes 2026-11-08 16:16:30 +00:00
Sheraff
e298c9b744
test(router-plugin): implementation-agnostic code-splitting tests and the compiler test harness
Adds `@tanstack/compiler-test-utils`, the harness of #8817's compiler test
suite: real Vite, Rsbuild, Rspack and webpack builds and dev servers, route
apps in pages of a real Chromium, and one merged diagnostic channel. Only the
parts the route code splitting tests use come along.

Adds #8817's route code splitting tests that pass on main's compilers: whole
files where every test passes, and the passing describe groups and table
rows of mixed files. Its one pin that main passes (Rolldown, a `var`
declared again in a head or a pattern) lands as an ordinary test. The slow
tier runs as router-plugin `test:integration`.

Deletes main's Babel-specific splitting tests the new ones replace: the
code-splitter snapshot matrix (except the four fixtures that cover shapes
the new tests do not reach yet), shared-bindings-helpers, utils,
delete-nodes, the old regression suites, production-warnings and
source-maps. Main's route HMR tests stay, in their own `unit-babel`
project, until the route HMR slice replaces them.

Takes #8817's sass bump of the css-modules e2e apps, so that the harness and
the plugins load one copy of vite and vitest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:12:33 +01:00
870 changed files with 35836 additions and 12707 deletions

Some files were not shown because too many files have changed in this diff Show more