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

6,696 commits

Author SHA1 Message Date
Tanner Linsley
cd1de7edb7 release: v1.130.12 v1.130.12 2025-08-01 20:38:24 +00:00
Manuel Schiller
db2b2c4bfc
fix: do not add ESM deps to optimizeDeps without a '.' export (#4855) 2025-08-01 22:30:15 +02:00
Manuel Schiller
4e2605a26d
chore: bump typescript version (#4853) 2025-08-01 22:30:02 +02:00
Tanner Linsley
eb4d982605 release: v1.130.11 v1.130.11 2025-08-01 17:37:00 +00:00
Flo
c1f6dfe0ac
fix(router-core): processRouteTree orders routes w/ prefix / suffix based on their lengths (#4850)
When ordering routes to determine "which one will match in priority", we
try to follow the "more specific 1st" principle.

Currently, 2 routes with the same pattern, but with prefixes of
different lengths, are counted as having the same specificity, and thus
are not re-ordered. For example:
- `/f{$param}`
- `/foo{$param}`

In this case, assuming `f{$param}.tsx` is returned 1st by the OS when
listing route files (which it is by alphabetical order), a path
`/foobar` will match `/f{$param}`.

This PR proposes we take the `length` of the `prefix` and `suffix` into
account when sorting routes. In this example this would mean
`/foo{$param}` takes priority because it is considered more specific.
2025-08-01 19:30:52 +02:00
Tanner Linsley
9061654052 release: v1.130.10 v1.130.10 2025-08-01 08:18:41 +00:00
Chris
7c6b5752ea
refactor(router-core,start-server-core): improve JSDocs for redirect (#4848)
Co-authored-by: Christopher Menendez <chris@Christophers-MacBook-Pro.local>
2025-08-01 20:13:06 +12:00
Chris
d5fd30f98a
docs(router): update URL for Query (#4849)
Co-authored-by: Christopher Menendez <chris@Christophers-MacBook-Pro.local>
2025-08-01 20:12:50 +12:00
Nico Lynzaad
cb0478a2a8
docs(router): usage of "." and ".." for relative navigation (#4846) 2025-08-01 20:12:42 +12:00
Lee
3ca2a293b2
docs(router): usage of routeFilePrefix for file-based routing (#4845) 2025-08-01 20:12:30 +12:00
Dimitris Karagiannis
f3a594794a
docs(router): list preload as navigation cause value (#4825) 2025-08-01 20:12:21 +12:00
Matthew Hart
87d4ccb67c
docs(start): incorrect usage of scripts in the "document head management" guide (#4801) 2025-08-01 19:58:10 +12:00
Tanner Linsley
91e404b1e2 release: v1.130.9 v1.130.9 2025-07-30 22:02:09 +00:00
Manuel Schiller
ce9e37366a
fix: correctly match routes with optional path params followed by req… (#4838)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-31 00:00:49 +02:00
autofix-ci[bot]
14ad18f3db
ci: apply automated fixes 2025-07-30 17:10:04 +00:00
Tanner Linsley
bf12ba8e3e
docs: search param sharing/inheritance how-to
Add 'Share Search Parameters Across Routes' how-to guide to complete the
next step in the Progressive Search Params Series.

---
<a
href="https://cursor.com/background-agent?bcId=bc-b62364d8-aa89-47bd-a3f5-d8724879c0ca">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-cursor-dark.svg">
<source media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-cursor-light.svg">
<img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg">
  </picture>
</a>
<a
href="https://cursor.com/agents?id=bc-b62364d8-aa89-47bd-a3f5-d8724879c0ca">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-web-dark.svg">
<source media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-web-light.svg">
    <img alt="Open in Web" src="https://cursor.com/open-in-web.svg">
  </picture>
</a>

<sub>[Learn
more](https://docs.cursor.com/background-agent/web-and-mobile) about
Cursor Agents</sub>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-07-30 11:09:18 -06:00
Sean Cassiere
7f290adb41
docs: add frontmatter to the "how-to" guides (#4835) 2025-07-30 20:04:05 +12:00
Lee
127944f042
docs: update links authentication setup guides (#4834) 2025-07-30 19:52:53 +12:00
Tanner Linsley
d6a3881ef4 release: v1.130.8 v1.130.8 2025-07-29 20:56:53 +00:00
Flo
2e40d0142f
refactor(router-core): router clearExpiredCache variable naming mistake (#4831)
Just correcting a variable naming mistake I made in
https://github.com/TanStack/router/pull/4826 because I confused
`staleTime` and `gcTime`.
2025-07-29 22:51:11 +02:00
Tanner Linsley
4bb5674f51 release: v1.130.7 v1.130.7 2025-07-29 20:47:26 +00:00
Flo
dafad2a330
refactor(router-core): router uses .some() over .find() for boolean results (#4829)
This change is a no-op, even in terms of performance. But it's more of
an "anti-slippery-slope" measure, so we don't end up with array copying
methods like `.map` or `.filter` being used instead of simpler methods
like `.find` or `.some`
2025-07-29 22:41:48 +02:00
Tanner Linsley
106e03022b release: v1.130.6 v1.130.6 2025-07-29 20:37:49 +00:00
Flo
030a55fdcc
refactor(router-core): router updateMatch can skip matches if it found a match (#4828)
`updateMatch` can trigger some heavy synchronous work (it updates the
store, which in turn, will re-run a bunch of things), so it's nice if
itself can avoid doing unnecessary work.

- it doesn't need to return anything, the return value is not used
- it doesn't need to search through the 3 arrays of matches if it found
a result in the 1st or 2nd.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-29 22:31:43 +02:00
Tanner Linsley
40e4657efa release: v1.130.5 v1.130.5 2025-07-29 20:25:53 +00:00
Flo
2df9dd0f4a
refactor(router-core): router clearExpiredCache DeMorgan's simplification (#4826)
Use De Morgan's contrapositive to cleanup the return condition of the
`clearExpiredCache` filter function. This should be a no-op and is
mathematically equivalent to what was written before, just more readable
for future refactoring.
2025-07-29 22:18:04 +02:00
Flo
3ba972e059
refactor(router-core): router getMatch doesnt create an array (#4824)
`router` > `getMatch` doesn't need to create an array to find the match
by id. This function gets called a lot, so it's better if we can avoid
accumulating short lived objects that need garbage collection when using
it.
2025-07-29 22:17:43 +02:00
Tanner Linsley
c3edec6434 release: v1.130.4 v1.130.4 2025-07-29 18:03:17 +00:00
autofix-ci[bot]
87a730ba5a
ci: apply automated fixes 2025-07-29 17:57:14 +00:00
Manuel Schiller
f0def505f3
fix: dev server (#4820) 2025-07-29 19:56:21 +02:00
Manuel Schiller
81da91c9ab
fix: crawl deps to find packages which have start as peer dep (#4821) 2025-07-29 19:56:10 +02:00
Tanner Linsley
b402bbc8ca
docs: isomorphic and environment aware code
Add foundational how-to guide on writing isomorphic, client-only, and
server-only code to clarify execution boundaries in TanStack Start.

---
<a
href="https://cursor.com/background-agent?bcId=bc-164a09a2-5b83-4a4a-b6ed-22e447950438">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-cursor-dark.svg">
<source media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-cursor-light.svg">
<img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg">
  </picture>
</a>
<a
href="https://cursor.com/agents?id=bc-164a09a2-5b83-4a4a-b6ed-22e447950438">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-web-dark.svg">
<source media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-web-light.svg">
    <img alt="Open in Web" src="https://cursor.com/open-in-web.svg">
  </picture>
</a>

<sub>[Learn
more](https://docs.cursor.com/background-agent/web-and-mobile) about
Cursor Agents</sub>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-07-29 11:55:46 -06:00
autofix-ci[bot]
bff3ad651d
ci: apply automated fixes 2025-07-29 00:50:17 +00:00
Tanner Linsley
c88c2aebae
docs: Outline top how-to guides for TanStack Start (#4816)
Create a detailed plan for TanStack Start how-to guides, prioritizing
based on user issues and dependencies.

This plan outlines over 20 new how-to guides, organized by logical
dependencies and explicitly addressing common pain points found in
GitHub issues, particularly around server functions and deployment.

---

[Open in
Web](https://cursor.com/agents?id=bc-58c1c95a-be49-4ad5-8bd7-80ad78fbc4e7)
• [Open in
Cursor](https://cursor.com/background-agent?bcId=bc-58c1c95a-be49-4ad5-8bd7-80ad78fbc4e7)
• [Open Docs](https://docs.cursor.com/background-agent/web-and-mobile)

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-07-28 18:49:29 -06:00
Tanner Linsley
9c5f6b2e52
docs: Continue search parameter how-tos (#4815)
Add 'Handle Complex Search Parameter Types' guide to continue the search
parameter how-to series.

---

[Open in
Web](https://cursor.com/agents?id=bc-3a8921a5-5923-498f-8d11-5573ae15a43f)
• [Open in
Cursor](https://cursor.com/background-agent?bcId=bc-3a8921a5-5923-498f-8d11-5573ae15a43f)
• [Open Docs](https://docs.cursor.com/background-agent/web-and-mobile)

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-28 18:45:00 -06:00
autofix-ci[bot]
b5a7bffea4
ci: apply automated fixes 2025-07-28 22:17:46 +00:00
Tanner Linsley
da2bd32eee
docs: Continue search param how-tos (#4814)
Add 'Validate Search Parameters with Schemas' how-to guide and update
related documentation.

---

[Open in
Web](https://cursor.com/agents?id=bc-d5e46bba-1af4-4db9-8631-541879529bf0)
• [Open in
Cursor](https://cursor.com/background-agent?bcId=bc-d5e46bba-1af4-4db9-8631-541879529bf0)
• [Open Docs](https://docs.cursor.com/background-agent/web-and-mobile)

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-07-28 16:16:59 -06:00
autofix-ci[bot]
ed49c81ac9
ci: apply automated fixes 2025-07-28 21:18:42 +00:00
Tanner Linsley
8b53a9a177
docs: basic search params how-to
Add 'Navigate with Search Parameters' how-to guide covering various
navigation methods for search parameters.

This guide details how to update and manage search parameters using both
Link components and programmatic navigation (`useNavigate`, router
instance). It covers basic and functional updates, navigation with route
changes, advanced patterns like conditional navigation and validation,
common UI patterns (search results, filters, breadcrumbs), and addresses
common problems like losing parameters or serialization issues.

---

[Open in
Web](https://cursor.com/agents?id=bc-38c6eb35-f409-43fc-ac4c-323097fb478b)
• [Open in
Cursor](https://cursor.com/background-agent?bcId=bc-38c6eb35-f409-43fc-ac4c-323097fb478b)
• [Open Docs](https://docs.cursor.com/background-agent/web-and-mobile)

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-07-28 15:17:57 -06:00
autofix-ci[bot]
4a1edf695a
ci: apply automated fixes 2025-07-28 20:20:39 +00:00
Tanner Linsley
21300374f6
docs: basic search params how-to
Adds the initial 'Set Up Basic Search Parameters' how-to guide,
recommending any standard schema-compliant validation library, and
updates documentation plans.

---

[Open in
Web](https://cursor.com/agents?id=bc-795e5be2-bf8c-4433-8e6d-72a98fb30a1d)
• [Open in
Cursor](https://cursor.com/background-agent?bcId=bc-795e5be2-bf8c-4433-8e6d-72a98fb30a1d)
• [Open Docs](https://docs.cursor.com/background-agent/web-and-mobile)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-07-28 14:19:43 -06:00
autofix-ci[bot]
fd62699815
ci: apply automated fixes 2025-07-28 19:18:28 +00:00
Tanner Linsley
71c95e6c8f docs: updates 2025-07-28 13:17:35 -06:00
Tanner Linsley
a790f61647 release: v1.130.3 v1.130.3 2025-07-28 16:58:19 +00:00
Manuel Schiller
d09f5daa74
fix: spa mode with prerendering (#4811)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-28 18:56:47 +02:00
David Williams
73ab338fe2
chore(root): update broken README links (#4789) 2025-07-28 20:47:06 +12:00
Tanner Linsley
0513f5ea4e release: v1.130.2 v1.130.2 2025-07-27 22:19:46 +00:00
Manuel Schiller
c8be12cd14
fix: prerending with SPA mode enabled renders all routes (#4800) 2025-07-28 00:18:26 +02:00
autofix-ci[bot]
de11338d8c
ci: apply automated fixes 2025-07-27 17:15:24 +00:00
notKamui
a08b600b66
docs: Runtime env docs (#4797)
With discussions with @schiller-manuel and the amount of time this issue
has been brought up on Discord, I feel adding precisions and more
explicit examples on how to deal with runtime env variables on the
client could help.

---------

Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
2025-07-27 11:14:40 -06:00