0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-18 19:34:24 +00:00
Commit graph

6,479 commits

Author SHA1 Message Date
github-actions[bot]
69b2205999
ci: Version Packages (pre) (#7894) release-2026-07-24-1714 @tanstack/arktype-adapter@1.167.1-pre.0 @tanstack/react-router-devtools@1.167.1-pre.0 @tanstack/react-router-ssr-query@1.167.2-pre.0 @tanstack/react-router@1.170.19-pre.0 @tanstack/react-start-client@1.168.17-pre.0 @tanstack/react-start-rsc@0.1.32-pre.0 @tanstack/react-start-server@1.167.23-pre.0 @tanstack/react-start@1.168.33-pre.0 @tanstack/router-cli@1.167.22-pre.0 @tanstack/router-core@1.171.16-pre.0 @tanstack/router-devtools-core@1.168.1-pre.0 @tanstack/router-devtools@1.167.1-pre.0 @tanstack/router-generator@1.167.22-pre.0 @tanstack/router-plugin@1.168.24-pre.0 @tanstack/router-ssr-query-core@1.169.2-pre.0 @tanstack/router-vite-plugin@1.167.24-pre.0 @tanstack/solid-router-devtools@1.167.1-pre.0 @tanstack/solid-router-ssr-query@1.167.2-pre.0 @tanstack/solid-router@1.170.19-pre.0 @tanstack/solid-start-client@1.168.17-pre.0 @tanstack/solid-start-server@1.167.23-pre.0 @tanstack/solid-start@1.168.33-pre.0 @tanstack/start-client-core@1.170.15-pre.0 @tanstack/start-plugin-core@1.171.25-pre.0 @tanstack/start-server-core@1.169.18-pre.0 @tanstack/start-static-server-functions@1.167.20-pre.0 @tanstack/start-storage-context@1.167.18-pre.0 @tanstack/valibot-adapter@1.167.1-pre.0 @tanstack/vue-router-devtools@1.167.1-pre.0 @tanstack/vue-router-ssr-query@1.167.2-pre.0 @tanstack/vue-router@1.170.18-pre.0 @tanstack/vue-start-client@1.167.20-pre.0 @tanstack/vue-start-server@1.167.23-pre.0 @tanstack/vue-start@1.168.32-pre.0 @tanstack/zod-adapter@1.167.1-pre.0
ci: changeset release (pre)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-24 19:08:48 +02:00
Manuel Schiller
2d639e1707
Merge branch 'main' into fix-router-core-lane-match-loader 2026-07-24 00:14:25 +02:00
Manuel Schiller
88f366ab8e
chore: migrate to typescript 7 (#7887) 2026-07-23 23:10:51 +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
3a5575627d
test: add regression coverage for existing router behavior (#7886) 2026-07-23 22:13:21 +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
Sarah Gerrard
a76c192f1c
docs: Update Guides section and add back in missing pages (#7864) 2026-07-22 22:13:55 +02:00
Sajad Torkamani
2b08d9ba4b
docs: minor docs improvements (#7842) 2026-07-22 22:12:34 +02:00
Cong-Cong Pan
21a8597952
chore: add React Start basic Rsbuild example (#7729)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-22 22:09:03 +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
Zakher Masri
07ce90304d
docs: remove stray semicolon in i18n page (#7870)
fix: remove stray semicolon
2026-07-21 11:45:50 -07: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
Manuel Schiller
edf55759d8
ci: omit unchanged bundle size scenarios (#7856) 2026-07-19 22:34:06 +02:00
github-actions[bot]
49bd9fa447
ci: Version Packages (#7857) release-2026-07-19-1434 @tanstack/react-start-rsc@0.1.31 @tanstack/react-start@1.168.32 @tanstack/router-plugin@1.168.23 @tanstack/router-vite-plugin@1.167.23 @tanstack/solid-start@1.168.32 @tanstack/start-plugin-core@1.171.24 @tanstack/vue-start@1.168.31 2026-07-19 16:29:16 +02:00
Manuel Schiller
49f6863245
fix(router-plugin): preserve HMR state for lowercase split components (#7855) 2026-07-19 12:09:25 +02:00
Manuel Schiller
218eab2c3b
chore: regenerate route trees (#7853) 2026-07-19 09:20:56 +02:00
github-actions[bot]
ecb1ef4817
ci: Version Packages (#7854) release-2026-07-19-0715 @tanstack/react-start-rsc@0.1.30 @tanstack/react-start@1.168.31 @tanstack/solid-start@1.168.31 @tanstack/start-plugin-core@1.171.23 @tanstack/vue-start@1.168.30 2026-07-19 09:11:05 +02:00
Manuel Schiller
ffdd64e842
fix(start): preserve resolved virtual module ids (#7844) 2026-07-18 20:08:42 +02:00
Alex Kostyniuk
31a634d84e
docs: update Next.js middleware description (#6155)
* docs: update Next.js middleware description

* Fix grammar in Next.js Edge Runtime description

Correct grammatical error in comparison of Next.js limitations.

* Revise Next.js proxy.ts runtime details

Updated Next.js proxy.ts description to reflect runtime changes.

* removed the not needed '+'

---------

Co-authored-by: Sarah Gerrard <hello@sarahgerrard.me>
2026-07-17 18:19:11 -07:00
github-actions[bot]
62a191baa0
ci: Version Packages (#7846) release-2026-07-18-0030 @tanstack/react-start-rsc@0.1.29 @tanstack/react-start@1.168.30 @tanstack/router-cli@1.167.21 @tanstack/router-generator@1.167.21 @tanstack/router-plugin@1.168.22 @tanstack/router-vite-plugin@1.167.22 @tanstack/solid-start@1.168.30 @tanstack/start-plugin-core@1.171.22 @tanstack/vue-start@1.168.29 2026-07-18 02:25:47 +02:00
Manuel Schiller
78dd1a645d
fix(router-generator): preserve dots in virtual routes (#7845) 2026-07-18 01:17:42 +02:00
Sarah Gerrard
85ef32ad7b
docs: refresh contribution guidelines (#7839) 2026-07-18 00:48:35 +02:00
github-actions[bot]
604996d14c
ci: Version Packages (#7841) release-2026-07-17-2231 @tanstack/react-start-rsc@0.1.28 @tanstack/react-start@1.168.29 @tanstack/router-cli@1.167.20 @tanstack/router-generator@1.167.20 @tanstack/router-plugin@1.168.21 @tanstack/router-vite-plugin@1.167.21 @tanstack/solid-start@1.168.29 @tanstack/start-plugin-core@1.171.21 @tanstack/vue-start@1.168.28 2026-07-18 00:25:19 +02:00
Thijs Koerselman
e56a67742d
fix(router-generator): make buildRouteTree route ordering deterministic (#7751)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com>
2026-07-17 23:01:54 +02:00
Sajad Torkamani
6184661e56
docs: small improvements to wording (#7840) 2026-07-17 21:40:35 +02:00
Mohamed Yahye El Joud
00d00b3155
docs: Update environment variable validation to use z.url() (#5570) 2026-07-17 20:47:19 +02:00
maurer2
d3e1cf4e2f
Add direction-aware view transitions to view transitions example repo (#5791)
* Add direction aware view transitions

* Restore comment

* Linter fix

---------

Co-authored-by: Birk Skyum <74932975+birkskyum@users.noreply.github.com>
2026-07-17 16:19:58 +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