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

6,622 commits

Author SHA1 Message Date
Manuel Schiller
85b34a799f
fix: don't cache server side route tree during dev (#6650)
fixes #6556
fixes #6559
fixes #6640
2026-02-13 19:34:06 +01:00
Yuki Terashima
a8c786cbe0
docs(start): Update TanStack Builder link in getting started guide (#6641)
Update TanStack Builder link in getting started guide
2026-02-13 19:22:50 +01:00
Birk Skyum
97658cde9a
test: vite ecosystem ci entry points (#6644) 2026-02-13 06:14:23 +01:00
Birk Skyum
174be108f2
chore: optimize links to github (#6633) 2026-02-10 23:42:52 +01:00
Tanner Linsley
4e1f40f2bc release: v1.159.5 v1.159.5 2026-02-09 13:09:13 +00:00
Birk Skyum
641720f969
perf: revert to Response, and add docs regarding for FastResponse (#6618) 2026-02-09 14:06:44 +01:00
Tanner Linsley
260f97baea release: v1.159.4 v1.159.4 2026-02-09 00:56:42 +00:00
Lee Jong Kyung
5c923e45c3
fix(router): ensure useParams returns parsed params when strict is false (#6387)
* fix: optimize match retrieval by using a Map for previous matches

* feat: add strict false parameter handling and related routes

* replace params only when routeParams is fully parsed

---------

Co-authored-by: Nico Lynzaad <nlynzaad@zylangroup.com>
Co-authored-by: Nico Lynzaad <44094871+nlynzaad@users.noreply.github.com>
2026-02-09 02:44:30 +02:00
Tanner Linsley
be8849eee2 release: v1.159.3 v1.159.3 2026-02-08 20:08:49 +00:00
Birk Skyum
7927dcd329
perf(start): use FastResponse from srvx (#6616) 2026-02-08 21:06:21 +01:00
Tanner Linsley
34aecb819b release: v1.159.2 v1.159.2 2026-02-08 14:20:33 +00:00
huseeiin
a90d46418b
perf(solid-start): use srvx FastResponse (#6615)
* perf(solid-start): 51% improvement

* patch response

* install srvx

* import order

---------

Co-authored-by: Birk Skyum <birk.skyum@pm.me>
2026-02-08 15:09:08 +01:00
Birk Skyum
88161bd480
chore: update srvx to 0.11.2 and h3-v2 to rc.14 (#6608) 2026-02-07 03:28:50 +01:00
Tanner Linsley
1ca7b6df1b release: v1.159.1 v1.159.1 2026-02-07 02:18:08 +00:00
Nico Lynzaad
972d347b8e
fix(solid-start): make Link active class reactive for include hash (#6607)
solid-start: make Link active class reactive for include hash
2026-02-07 04:06:41 +02:00
Tanner Linsley
7bf556a40c release: v1.159.0 v1.159.0 2026-02-07 01:03:55 +00:00
Manuel Schiller
06f3aeca0f
feat: add transformAssetUrls (#6606)
* feat: add transformAssetUrls

* fix docs

* stringify safely

* fix test

* fix
2026-02-07 02:01:46 +01:00
Tanner Linsley
ee8fde15b0 release: v1.158.4 v1.158.4 2026-02-07 00:02:41 +00:00
Nico Lynzaad
40ed6832c6
fix(start-server-core): redirect misinterpreted protocol-relative URLs (#6600)
* add test to verify redirect

* handle redirect

* update tests

* cleanup unused code in decodePath

* use 308 instead of 302

* redirect is not relevant in spa mode
2026-02-07 02:00:19 +02:00
Alexander Zuev
172fa05573
docs: add Cloudflare Workers handlers section to server entry point (#6488)
* docs: add Cloudflare Workers handlers section to server entry point

* docs: append link to official Cloudflare Workers docs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: reduce to link per reviewer feedback

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 23:15:11 +01:00
Tanner Linsley
bb0137d280 release: v1.158.3 v1.158.3 2026-02-05 21:50:29 +00:00
Manuel Schiller
b5b4079ded
fix: do not pass signal into server function (#5470)
* fix: do not pass signal into server function

* fix test

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-05 22:48:04 +01:00
Nick Nisi
6f64ae2ed0
examples: Update WorkOS example to use new AuthKit SDK (#5394)
* convert AuthKit example to use new SDK

* clean up and fixes

* remove vite dep in start-server-core

* fix(examples): remove unnecessary dotenv import from WorkOS example

Vite automatically loads .env files, so the manual dotenv.config() call is unnecessary and causes a build failure since dotenv is not installed as a dependency.

* fix lint issue

* fix(examples): fix WorkOS AuthKit sign-in and sign-out

- Add parentheses to handleCallbackRoute() in callback route
- Add reloadDocument to logout Links to prevent CORS errors
- Upgrade SDK to v0.5.0 and remove unused dependencies

The sign-out was failing with CORS errors because client-side
navigation via server functions caused fetch to follow the external
redirect to WorkOS. Using reloadDocument forces a full page navigation,
allowing the server to return a proper HTTP redirect.

* fix(examples): use re-exported User type from authkit package

Import User from @workos/authkit-tanstack-react-start instead of
@workos-inc/node to fix tsc --noEmit failure in CI. The authkit
package already re-exports this type to avoid server-only deps
in client code.

* fix(examples): restore authkit-tanstack-react-start dependency

Replace @workos-inc/node with @workos/authkit-tanstack-react-start
in the WorkOS example. The code imports from the authkit package,
not the low-level node SDK.

---------

Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
2026-02-05 22:27:37 +01:00
Tanner Linsley
54c4f68ade release: v1.158.2 v1.158.2 2026-02-05 21:06:41 +00:00
Manuel Schiller
f5bf1cdb32
fix: resolve env-only functions through module re-export chains (#6599)
fixes #6583
2026-02-05 21:59:39 +01:00
Tanner Linsley
119eb54f10 release: v1.158.1 v1.158.1 2026-02-05 01:50:59 +00:00
Lee
28b0e8b244
fix(router-core): fix handle AbortError logic when rapid navigation (#6426)
* fix(router-core): fix handle AbortError logic

Signed-off-by: leesb971204 <leesb971204@gmail.com>

* ci: apply automated fixes

* test: update expected store update count for preloaded async loaders

Signed-off-by: leesb971204 <leesb971204@gmail.com>

* refractor changes

* update tests to handle wait times more appropriately

* tighten up test - coderabbit nitpick

---------

Signed-off-by: leesb971204 <leesb971204@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Nico Lynzaad <nlynzaad@zylangroup.com>
2026-02-05 03:38:09 +02:00
Shane
f7eaede2d1
docs: Add missing createMiddleware imports in documentation examples (#6500) 2026-02-03 21:12:15 -06:00
Alex Marinov
03c1165ac3
docs: update import statements for TanStack Router Vite plugin (#6575) 2026-02-03 21:09:58 -06:00
Pavan Shinde
5e30ea1f30
docs(start): fix typos in Solid quick start (#6571)
Co-authored-by: pavan-sh <pavan-sh@users.noreply.github.com>
2026-02-03 21:07:50 -06:00
Pavan Shinde
6049fd3c9b
docs(start): fix ISR guide link to data loading (#6585) 2026-02-03 21:03:52 -06:00
Tanner Linsley
8f59003275 release: v1.158.0 v1.158.0 2026-02-03 00:17:18 +00:00
Manuel Schiller
a894baa7bd
feat: pass routeId into context/beforeLoad (#6579)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-03 00:59:12 +01:00
Manuel Schiller
ebd96af435
fix: avoid destructuring internal server property in interpolatePath (#6580) 2026-02-03 00:53:03 +01:00
Manuel Schiller
77b18bbdae
fix: strip type exports upon DCE (#6582) 2026-02-03 00:48:33 +01:00
Tanner Linsley
916be3d635 release: v1.157.19 v1.157.19 2026-02-02 23:29:58 +00:00
Manuel Schiller
041e984871
fix: correctly search for parent route in generator (#6581) 2026-02-03 00:27:52 +01:00
Xun Qilong
46fc1e9130
docs: rename route property to routeId in NotFoundErrorType.md (#6544)
docs: fix typo in NotFoundErrorType.md

rename 'route' property to 'routeId'

Co-authored-by: Nico Lynzaad <44094871+nlynzaad@users.noreply.github.com>
2026-02-01 15:45:59 +02:00
Pavan Shinde
ec4a6fa88c
docs: fix duplicated word in document head management guide (#6565) 2026-02-01 12:28:00 +02:00
Tanner Linsley
fd6eecea6b release: v1.157.18 v1.157.18 2026-01-31 15:42:17 +00:00
Flo
1ce1919c4b
refactor(router-core): matchRoutesInternal minor performance improvements (#6560) 2026-01-31 16:39:50 +01:00
Tanner Linsley
497229aa5b release: v1.157.17 v1.157.17 2026-01-30 22:27:03 +00:00
hokkyss
0f41a3c647
fix: re-export SerializableExtensions in react-router (#6536)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-30 23:13:04 +01:00
Alexander Schmid
5ae6217746
docs: Updated typo in internationalization-i18n.md (#6523)
* Updated typo in internationalization-i18n.md 

Optional path parameters typescript example had a typo (/abotu not /about).

* ci: apply automated fixes

* Fix typo in internationalization guide

reapply change that was undone by ci: apply automated fixes

---------

Co-authored-by: Nico Lynzaad <44094871+nlynzaad@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-27 00:19:24 +02:00
Tanner Linsley
b3aafa09d7 release: v1.157.16 v1.157.16 2026-01-26 22:06:20 +00:00
Jason Xie
4814d4ef90
fix(router-core): use encodeURIComponent for splat route params (#6520)
* fix(router-core): use encodeURIComponent for splat route params

Use encodeURIComponent instead of encodeURI for splat route parameters
to properly encode spaces, plus signs, and other special characters.

This fixes an SSR redirect loop that occurs when:
1. User navigates to a splat route with encoded characters (e.g., %20)
2. TanStack Router decodes params with decodeURIComponent
3. When rebuilding URL, encodeURI doesn't encode spaces/special chars
4. URL mismatch triggers redirect loop (307 redirects)

encodeURIComponent properly encodes these characters, preventing the
mismatch while still preserving forward slashes as path separators.

* update tests to use correct encoding for splat params

* use encodePathParam for splat/catch-all

* perf(router-core): add early return for URL-safe splat values

Add performance optimization that skips the split/map/join operation
when splat values only contain URL-safe characters (alphanumeric,
dash, period, underscore, tilde, exclamation, forward slash).

This avoids unnecessary processing in the hot path for common cases.

* fix(router-core): encode whitespace in encodeNonAscii

Update encodeNonAscii to also encode whitespace characters (spaces, tabs, etc.)
in addition to non-ASCII characters. This fixes SSR redirect loops where:

1. Request URL contains encoded spaces: /path/file%20name.pdf
2. parseLocation decodes pathname: /path/file name.pdf
3. buildLocation calls encodeNonAscii but spaces weren't encoded
4. URL mismatch triggers redirect loop

Now encodeNonAscii properly encodes:
- Whitespace characters (spaces become %20)
- Non-ASCII/unicode characters (including emojis)

Other ASCII special characters (parentheses, brackets, etc.) are preserved
as they are valid in URL paths.

* refactor(router-core): use regex in encodeNonAscii like original

* refactor(router-core): rename encodeNonAscii to encodePathLikeUrl

Rename the function to better reflect its expanded responsibility of
encoding paths the same way new URL() would, including:
- Whitespace characters (spaces → %20, tabs → %09)
- Non-ASCII/Unicode characters (emojis, accented characters)

The old name 'encodeNonAscii' was misleading since the function now
encodes more than just non-ASCII characters.

---------

Co-authored-by: Nico Lynzaad <nlynzaad@zylangroup.com>
Co-authored-by: Nico Lynzaad <44094871+nlynzaad@users.noreply.github.com>
2026-01-26 23:53:20 +02:00
Tanner Linsley
080f818fda release: v1.157.15 v1.157.15 2026-01-26 06:51:04 +00:00
Flo
46630344d7
refactor(router-core): parseLocation fast path w/ no rewrites (#6516) 2026-01-26 07:36:11 +01:00
Flo
846fffc2cf
refactor(react-router): Match component performance w/ single router state select (#6518) 2026-01-26 07:35:26 +01:00
Tanner Linsley
58ed15460f release: v1.157.14 v1.157.14 2026-01-25 22:05:45 +00:00