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

547 commits

Author SHA1 Message Date
Tanner Linsley
861f319bbe release: v1.166.2 2026-03-04 20:37:33 +00:00
Manuel Schiller
9c81d5ac57
fix: handle beforeLoad throwing notFound correctly (#6811) 2026-03-04 21:34:28 +01:00
Flo
5f7e9e872b
test: add onRendered event coverage for param and search updates (#6794) 2026-03-01 18:43:11 +01:00
Tanner Linsley
de66f0e0a0 release: v1.163.3 2026-02-27 22:13:46 +00:00
Tanner Linsley
c4027b6a79 release: v1.163.2 2026-02-25 08:26:16 +00:00
Tanner Linsley
30fdeab01b release: v1.162.9 2026-02-24 12:50:58 +00:00
Flo
f58d457542
fix(react-router,solid-router,vue-router): correct preload triggers for "intent" option (#6747) 2026-02-24 13:48:43 +01:00
Tanner Linsley
ea31c50be9 release: v1.162.8 2026-02-23 22:16:33 +00:00
Flo
09405b22cc
fix: delay focus intent preload and clear on blur across adapters (#6744) 2026-02-23 23:03:46 +01:00
Tanner Linsley
c137bbc249 release: v1.162.6 2026-02-23 16:37:33 +00:00
Flo
343f8a8ff9
refactor(router-core,react-router,solid-router,vue-router): Remove long strings from production bundle (#6740) 2026-02-23 17:23:46 +01:00
Tanner Linsley
54e69075c3 release: v1.162.5 2026-02-23 16:14:51 +00:00
Manuel Schiller
d6af3a28c3
chore: cleanup unused exports (#6735) 2026-02-23 00:19:06 +01:00
Tanner Linsley
eefcb5f9a6 release: v1.162.4 2026-02-22 22:51:07 +00:00
Manuel Schiller
eeb8c5594b
fix: remove router context caching (#6734) 2026-02-22 23:48:33 +01:00
Tanner Linsley
a562eb496b release: v1.162.2 2026-02-22 08:42:04 +00:00
Tanner Linsley
3710720cd9 release: v1.162.1 2026-02-21 21:59:16 +00:00
Tanner Linsley
5fcf33e871 release: v1.161.4 2026-02-21 11:18:59 +00:00
Ulrich Stark
ad0beaf95b
chore: remove unnecessary type assertions (#6365)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-21 11:29:18 +01:00
Birk Skyum
4def459cb6
testing(vite-ecosystem-ci): add vite as direct dev depencency (#6709) 2026-02-20 01:58:27 +01:00
Tanner Linsley
5a8fc3e682 release: v1.161.3 2026-02-20 00:01:06 +00:00
Flo
c3ad063785
chore: migrate to @tanstack/store 0.9.1 (#6691) 2026-02-19 22:26:59 +01:00
Tanner Linsley
6dfef62add release: v1.161.1 2026-02-18 08:58:14 +00:00
Flo
99e3025650
fix(react-router): keep relative link active when changing inherited param (#6689) 2026-02-18 09:56:01 +01:00
Tanner Linsley
02d88bf876 release: v1.160.0 2026-02-15 07:06:53 +00:00
Flo
6ddb5867cc
feat(router-core, react-router, solid-router, vue-router): isDangerousProtocol uses customizable allowlist (#6542) 2026-02-15 08:04:28 +01:00
Tanner Linsley
f3e3bd44e9 release: v1.159.10 2026-02-14 01:20:49 +00:00
nikuscs
fb139e8c70
fix: preserve data script content during client hydration (#6653)
* fix: preserve data script content during client hydration

The Script component renders all <script> tags with empty content on
the client side, then uses useEffect to recreate them via DOM
manipulation. While necessary for executable scripts (they need
document.createElement to trigger execution), this causes data-only
scripts like application/ld+json to briefly flash empty during
hydration.

Per the HTML spec, any script with a type that isn't a JavaScript MIME
type or "module" is a "data block" that the browser never executes.
These can safely render their content directly via innerHTML on both
server and client, just like <style> tags already do in the same file.

Changes across react-router, solid-router, and vue-router:
- Detect non-executable script types via the type attribute
- Early-return in the client-side effect for data scripts
- Render data script content directly instead of emptying it

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-14 02:08:07 +01:00
Tanner Linsley
1dde02476a release: v1.159.9 2026-02-14 00:47:20 +00:00
Tanner Linsley
70effc8db4 release: v1.159.6 2026-02-13 18:36:21 +00: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 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 2026-02-09 00:56:42 +00:00
Tanner Linsley
be8849eee2 release: 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 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
Tanner Linsley
1ca7b6df1b release: 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
ee8fde15b0 release: v1.158.4 2026-02-07 00:02:41 +00:00
Tanner Linsley
119eb54f10 release: 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
Tanner Linsley
8f59003275 release: 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
Tanner Linsley
fd6eecea6b release: v1.157.18 2026-01-31 15:42:17 +00:00
Tanner Linsley
497229aa5b release: 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
Tanner Linsley
b3aafa09d7 release: 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