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

Compare commits

..

65 commits

Author SHA1 Message Date
Manuel Schiller
aba4ddc4be tests 2026-07-24 00:32:34 +02:00
Manuel Schiller
185fcccbf0 failing regressiontest for #6221 2026-07-24 00:20:53 +02:00
Manuel Schiller
c1ba06ab3f failing regression test for #4614 2026-07-24 00:20:09 +02:00
Manuel Schiller
2d639e1707
Merge branch 'main' into fix-router-core-lane-match-loader 2026-07-24 00:14:25 +02:00
Sheraff
a4d5b8ffd8
Merge remote-tracking branch 'origin/main' into fix-router-core-lane-match-loader
# Conflicts:
#	e2e/react-start/selective-ssr/src/routeTree.gen.ts
#	e2e/react-start/selective-ssr/src/routes/__root.tsx
#	e2e/react-start/selective-ssr/tests/app.spec.ts
#	packages/react-router/tests/component-preload-retry-pending-min.test.tsx
#	packages/react-router/tests/not-found.test.tsx
#	packages/react-router/tests/public-presentation-lane-contract.test.tsx
#	packages/react-router/tests/redirect.test.tsx
#	packages/react-router/tests/transactional-loading.test.tsx
#	packages/react-router/tests/transitioner-remount.test.tsx
#	packages/react-start-client/src/tests/hydrateStart.test.ts
#	packages/router-core/tests/background-trim-abort.test.ts
#	packages/router-core/tests/boundary-component-chunk.test.ts
#	packages/router-core/tests/callbacks.test.ts
#	packages/router-core/tests/client-lane-adversarial.test.ts
#	packages/router-core/tests/error-boundary-cache-generation.test.ts
#	packages/router-core/tests/granular-stores.test.ts
#	packages/router-core/tests/hydrate.test.ts
#	packages/router-core/tests/issue-6221-head-waits-for-loader.test.ts
#	packages/router-core/tests/loader-architecture-regressions.test.ts
#	packages/router-core/tests/loader-self-abort.test.ts
#	packages/router-core/tests/masked-location-state-commit.test.ts
#	packages/router-core/tests/parent-match-promise.test.ts
#	packages/router-core/tests/preload-adoption.test.ts
#	packages/router-core/tests/preload-beforeload-reuse.test.ts
#	packages/router-core/tests/preload-navigation-adoption.test.ts
#	packages/router-core/tests/preload-public-cache-behavior.test.ts
#	packages/router-core/tests/public-client-loading-contract.test.ts
#	packages/router-core/tests/public-preload-lane-contract.test.ts
#	packages/router-core/tests/same-destination-navigation-join.test.ts
#	packages/router-core/tests/server-beforeload-preload-flag.test.ts
#	packages/router-core/tests/server-loader-abort-error.test.ts
#	packages/router-plugin/tests/handle-route-update.test.ts
#	packages/solid-router/tests/component-preload-retry.test.tsx
#	packages/solid-router/tests/createLazyRoute.test.tsx
#	packages/solid-router/tests/loaders.test.tsx
#	packages/solid-start-client/src/tests/hydrateStart.test.ts
#	packages/vue-router/tests/Transitioner.test.tsx
#	packages/vue-router/tests/disableGlobalCatchBoundary.test.tsx
#	packages/vue-router/tests/transitioner-remount-rendered.test.tsx
#	packages/vue-router/tests/transitioner-remount.test.tsx
#	packages/vue-router/tests/useMatch.test.tsx
2026-07-23 22:23:09 +02:00
Flo
fd8e2564e0
Merge branch 'main' into fix-router-core-lane-match-loader 2026-07-23 17:50:57 +02:00
Flo
55ceb3a3e4
chore(router-core): lane match loader final byte-shave (#7885) 2026-07-23 17:50:25 +02:00
Flo
baa18cd913
fix(router): final-review regressions, changeset, and byte recovery (#7883)
* fix(router): final-review regressions, changeset, and byte recovery

Fixes the regressions vs main found in the final review of #7805:

- restore history-subscription cleanup on router provider unmount in all
  three adapters (react returns the unsubscribe unconditionally, solid
  uses onCleanup, vue uses onUnmounted), pinned by new
  transitioner-remount tests — a discarded router could previously keep
  loading on back/forward as a zombie
- same-destination navigations now join the in-flight transaction
  instead of aborting and restarting it (double-click no longer reruns
  loaders); reloads and same-location redirects keep restart semantics
- commitMatches cache retention can no longer resurrect a
  one-generation-old loaderData when a newer committed success exists
  for the same match id
- same-location dedup keeps __tempLocation/__tempKey so masked vs real
  same-href navigations commit their state again

Adds the missing release changeset enumerating the removed/changed
public API with migration hints.

Byte recovery: merges rendered-matches.ts, route-chunks.ts and
hydrate.ts into load-client.ts so the client bundle shares gzip
dictionary context across what were separate module boundaries
(-104..-186 gzip B per start scenario; plain router scenarios remain
net-negative vs main and hydration still tree-shakes out of them).

The solid/vue store-update-count pins were re-adjusted after verifying
the published update sequences are byte-identical: the counts only
shifted because a one-microtask timing change moves the tests'
waitFor-sampled window boundary (5 of 7 counts decreased).

* test(router-devtools-core): keep panel chunk warm-up out of the test budget

The cache-replacement test warmed Vite's lazy transform of
BaseTanStackRouterDevtoolsPanel inside the test body, so on slow CI
runners the transform alone could blow the 5s test timeout (observed at
5.89s). Move the warm-up to a beforeAll with its own generous timeout
and give the test itself explicit headroom. Pre-existing flake on the
lane branch tip, surfaced by this PR's CI being the first to run on it.

* refactor(router-core): extend lane typestate to matches and commits

The lane pipeline already carried phase brands at lane granularity
(Lane<'matched'|'contextualized'|'reduced'|'projected'>); this finishes
the pattern at the two granularities it was missing, at zero runtime
cost (all emitted dist JS verified byte-identical):

- settleInto becomes the sole granter of a SettledMatch brand via an
  assertion signature, and cacheLoaderMatch requires it — the
  loader -> settle -> cache ordering is now compiler-enforced. The one
  legitimate phase jump (hydration cache-seeding of already-settled
  dehydrated data) is a single named, commented boundary cast.
- commitMatches/commitRefreshMatches only accept a projected lane's
  matches (LaneMatches<'projected'>), so committing an earlier-phase
  lane no longer compiles.
- LoadTransaction's dev-only refresh triple collapses into one optional
  slot [presentation, handoff?], making a half-armed refresh state
  unrepresentable and shrinking the clear/read sites.
2026-07-23 15:35:11 +02:00
Flo
90a7f3923c
fix(router): address lane loader regressions (#7880)
* fix(router): address lane loader regressions

* perf(router-core): shave asset-prefix bookkeeping bytes

- rename the internal `_dataOnlyAssetEnd` match field to `_assetEnd`:
  property keys survive minification, so the shorter internal name saves
  bytes at every site in every bundle
- reduce the `_getAssetMatches` guard to a presence check: the field is
  only ever set on hydration presentation clones that already satisfy
  the pending/data-only/error-free/not-not-found conditions, and commits
  clear it (invariant documented at the guard)
- clone-then-patch the hydration handoff splice instead of spreading a
  conditional object per element, and drop the unreachable zero guard in
  `_getAssetMatches`

Measured (gzip, vs PR tip): react-router.full -43 B, vue-router.full
-35 B, react-router.minimal -8 B. All unit suites green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(router-devtools): preload lazy panel

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 09:57:37 +02:00
autofix-ci[bot]
f84d087783
ci: apply automated fixes (attempt 2/3) 2026-07-22 07:31:02 +00:00
autofix-ci[bot]
da82a47081
ci: apply automated fixes 2026-07-22 07:29:01 +00:00
Flo
9043f4f22a
Merge branch 'main' into fix-router-core-lane-match-loader 2026-07-22 09:27:00 +02:00
Flo
03a1fde261
perf(router): reduce SSR lane loading overhead (#7875)
* perf(router): reduce SSR lane loading overhead

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-22 08:56:43 +02:00
Flo
1f271022b5
fix(router-core): harden lane loading lifecycle (#7869)
* fix(router-core): harden lane loading lifecycle

* ci: apply automated fixes

* fix(router-core): optimize lane loading followups

* fix(router-core): simplify redirect limit handling

* refactor(router-core): clarify loader state and caches

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-22 00:43:31 +02:00
Sheraff
7443d96223
Merge remote-tracking branch 'origin/main' into fix-router-core-lane-match-loader
# Conflicts:
#	e2e/react-start/selective-ssr/src/routeTree.gen.ts
#	e2e/solid-start/selective-ssr/src/routeTree.gen.ts
2026-07-20 19:39:51 +02:00
Flo
423f905df8
fix(router-core): complete lane match loader rewrite (#7858)
* fix(router-core): complete lane match loader rewrite

* fix(router-core): harden match loading lifecycle

* fix(router-core): preserve hydrated context handoff

* bench(memory): accept expected abort errors

* perf(ssr): reduce request cancellation overhead (#7862)
2026-07-20 18:52:47 +02:00
Sheraff
3d68db666f
INTERNALS update 2026-07-17 10:13:47 +02:00
Sheraff
6683863a75
console.error over promise.reject for lifecycle errors 2026-07-17 08:08:28 +02:00
Sheraff
47466333b3
server preload is no-op 2026-07-17 07:12:03 +02:00
Sheraff
1f4838d220
beforeLoad context cleanup on error + naming + misc bugs 2026-07-16 00:21:25 +02:00
autofix-ci[bot]
83fea0f6b8
ci: apply automated fixes 2026-07-15 18:13:55 +00:00
Sheraff
1b209334cc
more jsdoc 2026-07-15 20:11:21 +02:00
Sheraff
5a8cc8061f
simplify getSemanticMatch 2026-07-15 17:35:52 +02:00
Sheraff
f7f266b5d5
some jsdoc 2026-07-15 16:48:22 +02:00
autofix-ci[bot]
f90018f85f
ci: apply automated fixes 2026-07-15 14:04:50 +00:00
Sheraff
a8d7c8c6db
no reset key on server 2026-07-15 16:02:06 +02:00
Sheraff
45f77312d1
deprecated test 2026-07-15 16:01:54 +02:00
autofix-ci[bot]
9810491b75
ci: apply automated fixes 2026-07-15 13:45:38 +00:00
Sheraff
e7322f86da
simplify Transitioner based on having a unique transitioner per router 2026-07-15 15:43:27 +02:00
Sheraff
e177851758
test: same, but property wasn't even initialized 2026-07-15 15:27:59 +02:00
Sheraff
ef4025957a
test again, but i selected everything this time 2026-07-15 15:16:07 +02:00
Sheraff
b56cb51a15
test: does declare save any bytes? 2026-07-15 15:13:09 +02:00
autofix-ci[bot]
ec631eb350
ci: apply automated fixes 2026-07-15 13:03:33 +00:00
Sheraff
cf40d59b52
comments and cleanup 2026-07-15 14:47:39 +02:00
autofix-ci[bot]
1f50bd3524
ci: apply automated fixes 2026-07-15 12:06:50 +00:00
Sheraff
2bba8fae50
minor byte shaving 2026-07-15 14:04:49 +02:00
Sheraff
125b13f4fc
minor byte shave in Match 2026-07-15 13:43:05 +02:00
Sheraff
ba800532e6
minor byte shave in router-core 2026-07-15 13:38:51 +02:00
Sheraff
05efe8c851
Merge remote-tracking branch 'origin/main' into fix-router-core-lane-match-loader
# Conflicts:
#	packages/router-core/tests/issue-5106-hydrated-notfound-boundary.test.ts
2026-07-15 09:50:36 +02:00
autofix-ci[bot]
16dfcf9429
ci: apply automated fixes 2026-07-14 22:24:55 +00:00
Sheraff
ded47d1f43
final fixed issue tests 2026-07-15 00:23:09 +02:00
Sheraff
c801dcc254
final coverage 2026-07-14 21:31:07 +02:00
Sheraff
3ecc24bdb1
update tests 2026-07-14 20:35:11 +02:00
autofix-ci[bot]
4150cdf073
ci: apply automated fixes 2026-07-14 14:25:53 +00:00
Sheraff
3d252e60b5
more cleanup 2026-07-14 16:23:53 +02:00
autofix-ci[bot]
3ba393ec4b
ci: apply automated fixes 2026-07-14 13:41:49 +00:00
Sheraff
8fcf2ebe43
cleanup load-server 2026-07-14 15:32:09 +02:00
Sheraff
acbfba3c39
fix load-client for undefined loaderData 2026-07-14 15:30:53 +02:00
Sheraff
4fd731e787
cleanup load-client 2026-07-14 15:30:33 +02:00
Sheraff
0ed58eafe9
rename consts to uppercase 2026-07-14 13:28:39 +02:00
autofix-ci[bot]
7be1149913
ci: apply automated fixes 2026-07-14 11:12:29 +00:00
Sheraff
f54bf4bc41
fix #7673 2026-07-14 13:10:50 +02:00
Sheraff
af0f0c742f
tests 2026-07-14 12:45:51 +02:00
Sheraff
2e8bbbe469
Merge remote-tracking branch 'origin/main' into fix-router-core-lane-match-loader
# Conflicts:
#	packages/router-core/tests/issue-4684-head-on-beforeload-error.test.ts
2026-07-14 01:46:03 +02:00
Sheraff
3a5687810f
Merge branch 'main' into fix-router-core-lane-match-loader 2026-07-14 00:32:18 +02:00
Sheraff
cc21be0de7
error priority handling 2026-07-14 00:22:49 +02:00
Sheraff
da5cb82da9
fix: preload always releases its borrowed lease 2026-07-13 18:23:02 +02:00
Sheraff
f2ccae2407
docs 2026-07-13 18:14:57 +02:00
Sheraff
bf9060267c
fix: react-router not found ambiguous assertion 2026-07-13 17:33:44 +02:00
Sheraff
fb21a428b0
fix: solid Transitionner unsub cleanup before early return 2026-07-13 17:28:49 +02:00
Sheraff
7b5436bfe7
fix internal error propagation, only user code is try/catch 2026-07-13 17:09:00 +02:00
Sheraff
f4b893487c
fix adoption of server data 2026-07-13 15:13:57 +02:00
Sheraff
6f75f50023
adopt preloaded beforeLoad 2026-07-13 13:20:56 +02:00
Sheraff
adf73dd544
fix client/server build 2026-07-13 11:06:14 +02:00
Sheraff
ceaa4d26f2
fix: lane match loader rewrite 2026-07-13 09:29:38 +02:00
3447 changed files with 52296 additions and 173637 deletions

1
.gitignore vendored

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