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

171 commits

Author SHA1 Message Date
Flo
5facdbfe3d
test: fix Nx sandbox violations in CI tasks (#8400)
* test: declare remaining Nx sandbox inputs and outputs

* test: declare the ESLint Start build configuration input

* test: match generated route fixtures in Nx outputs

* ci: apply automated fixes

* test: keep mutable fixtures out of Nx cache replay

* test: declare inputs found in the latest Nx sandbox audit

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-14 10:54:23 +02:00
Flo
fda8a77405
test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
Flo
e8b0701420
test(e2e): replace dummy APIs with MSW fixtures (#8402)
* test(e2e): replace dummy APIs with MSW fixtures

* test(e2e): require Node with native type stripping

* Merge branch 'codex/e2e-playwright-cache' into codex/e2e-runtime-fixtures [Self-Healing CI Rerun]

---------

Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
2026-09-14 10:54:22 +02:00
Flo
9c1871ccc8
fix: harden URL handling across Router and Start (#8308)
* fix: harden URL handling across Router and Start

* fix: preserve unload blockers after document navigation

* perf: reduce document navigation guard size
2026-09-09 23:03:49 +02:00
Flo
0654c0a1a4
fix(router-core): reload documents for cross-origin rewrites (#8287)
* fix(router-core): reload documents for cross-origin rewrites

* test(router): expand document navigation coverage

* fix(router): respect registered document navigation blockers
2026-09-08 01:23:05 +02:00
Flo
0f40695fbe
test: cover existing navigation and redirect behavior (#8286) 2026-09-07 21:35:15 +02:00
Flo
9035abc411
fix(history): handle blockers consistently across history traversal (#8264)
* fix(history): preserve unload blockers during back and forward navigation

* fix(history): respect ignoreBlocker in go navigation

* fix(history): reverse blocked traversal by its delta
2026-09-06 16:19:47 +02:00
Manuel Schiller
65d565c946
fix route trees (#8197) 2026-08-31 01:34:33 +02:00
Flo
cb281d70c1
fix(router-core): preserve context during reloads (#8130)
* fix(router-core): preserve context during reloads

* ci: apply automated fixes

* test(router): consolidate issue 8115 coverage

* fix(vue-router): react to provider context changes

* fix(router-core): refine context reconstruction

* bytes

* type fixes

* context + immediate UI on load

* coderabbit is happy

* no context in pending/error/notFound components

* changesets

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-20 23:34:06 +02:00
Flo
f97188fdb4
chore: localize package dependencies (#8078) 2026-08-15 13:42:24 +02:00
Flo
31355ae92c
fix(react-router): useMatchRoute w/ React Compiler (#8015)
* fix(react-router): useMatchRoute w/ React Compiler

* test(react-router): add React Compiler E2E

Co-authored-by: Kamal Bennani <kamal.bennani@aircall.io>

* disable eslint react-hooks/exhaustive-deps for known static condition w/ DCE

* test(react-router): cover useMatchRoute callback identity

Co-authored-by: Sarah Gerrard <98355961+LadyBluenotes@users.noreply.github.com>

* test(react-router): rely on useMatchRoute subscription

* test(react-router): exercise compiler-generated memoization

* no useCallback during SSR

* update docs

---------

Co-authored-by: Kamal Bennani <kamal.bennani@aircall.io>
Co-authored-by: Sarah Gerrard <98355961+LadyBluenotes@users.noreply.github.com>
2026-08-12 10:35:50 +02:00
Flo
697ebb6ddb
fix(react-router): prevent blank frame before initial pending UI (#7961)
* fix(react-router): prevent blank initial pending frame

* test(react-router): remove obsolete issue 4759 unit test

* alternative fix

* ci: apply automated fixes

* simplify code comment

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-06 00:09:29 +02:00
Flo
45c4ad8d62
fix(router-core): lane match loader rewrite (#7805)
* fix: lane match loader rewrite

---------

Co-authored-by: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com>
2026-08-04 20:28:11 +02:00
Cong-Cong Pan
f04ddc61e7
fix(start): skip errored Rspack modules during import protection (#7685)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-29 21:11:16 +02:00
Manuel Schiller
88f366ab8e
chore: migrate to typescript 7 (#7887) 2026-07-23 23:10:51 +02:00
Manuel Schiller
218eab2c3b
chore: regenerate route trees (#7853) 2026-07-19 09:20:56 +02:00
Pierre-Luc Auclair
a41f26547c
chore(deps): bump @playwright/test to ^1.61.0 across the workspace (#7772) 2026-07-14 00:06:59 +02:00
Collin Dillinger
9809a0619d
fix(router-core): preserve percent-encoded URL-unsafe chars in decodeSegment (#7695)
* fix(router-core): preserve percent-encoded URL-unsafe chars in decodeSegment

Replace sanitizePathSegment (which stripped control characters) with a
re-encode step that keeps WHATWG path percent-encode set characters and
control characters in their encoded form after decodeURI.

This preserves the existing decodeURI-based approach which correctly
handles multi-byte UTF-8 sequences, while fixing the mismatch between
the original request URL and the router's internal representation that
caused infinite 307 redirect loops on paths containing these characters.

Fixes #7587.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ci: apply automated fixes

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Flo <me@florianpellet.com>
2026-06-30 23:27:21 +02:00
Elecmonkey
e499164c72
feat(start-plugin-core): support Rsbuild preview SSR middleware (#7372)
* fix(start-plugin-core): support rsbuild preview SSR

* fix(start-plugin-core): always install rsbuild SSR middleware in preview

Preview is the only SSR handler in `rsbuild preview`, so gate the opt-out
to dev only and keep the option named `installDevServerMiddleware`.
2026-06-16 10:30:39 +02:00
Manuel Schiller
9cb7a003e6
feat(rsbuild): add RSC support (#7509)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-30 15:16:10 +02:00
Manuel Schiller
90adda91aa
fix: bundled dev support for vite (#7482) 2026-05-24 22:08:23 +02:00
Manuel Schiller
51a97a167f
feat(start): support rsbuild iife client output (#7477) 2026-05-24 02:02:05 +02:00
Flo
9f6258f23e
chore: update zod to v4.4.3 (#7441)
* chore: update zod to v4.4.3

* fix(start): preserve route path defaults

* fix(examples): resolve zod 4 build failures
2026-05-20 08:41:45 +02:00
Manuel Schiller
c992495bf4
feat: match params (#7263) 2026-04-30 19:47:07 +02:00
neverland
a5385dbd90
chore(deps): update Rsbuild related deps to v2.0.1 (#7245) 2026-04-24 22:41:31 +02:00
Manuel Schiller
105d05691a
fix(router-generator): harden route file transform rewrites (#7167) 2026-04-13 02:20:50 +02:00
Manuel Schiller
42c3f3b3a3
fix: scroll restoration upon browser forward navigation (#7055) 2026-03-27 01:24:06 +01:00
Manuel Schiller
cf5f554247
fix: scroll restorating without throttling (#7042) 2026-03-26 18:00:55 +01:00
Birk Skyum
b1c0f4602d
chore: upgrade tooling to typescript 6 (#7024) 2026-03-23 22:59:52 +01:00
Flo
054523900b
refactor: signal based reactivity (#6704) 2026-03-20 10:33:28 +01:00
Birk Skyum
5ff4f0b8dc
chore: bump esbuild to 0.27.4 (#6975) 2026-03-18 18:09:49 +01:00
Birk Skyum
aaf764bcee
docs: @tailwindcss/vite to 4.2.2 in examples (#6974) 2026-03-18 17:40:04 +01:00
Birk Skyum
3b8ab0fa6b
docs: add devcontainer.json to all e2e/examples (#6972) 2026-03-18 15:43:14 +01:00
Birk Skyum
7d936c6c36
docs: update examples/e2e to vite 8 (#6958) 2026-03-17 20:37:11 +01:00
SeanCassiere
773c7c9cb9
chore: generate route-tree for all sandboxes
a recent change to generator, meant that all the sandboxes had their route-trees files being out-of-date
2026-03-14 23:28:51 +13:00
Manuel Schiller
b7def82c7d
fix: ensure lazy error component is preloaded (#6875) 2026-03-09 23:04:09 +01:00
Manuel Schiller
227dfaf21b
fix: prevent var name clash in generated route for escaped strings (#6680) 2026-02-16 19:10:54 +01:00
Manuel Schiller
523972e0df
fix: shared virtual module for code-split routes (#6659)
* fix: shared virtual module for code-split routes

When a route file has module-level bindings (variables, functions, classes) referenced by **both** split and non-split route properties, the bindings are duplicated — initialized independently in the reference file and in each virtual split file. This breaks singletons, causes double side effects, and wastes bundle size.

```tsx
const collection = { name: 'todos', preload: async () => {} }
export const Route = createFileRoute('/todos')({
  loader: async () => {
    await collection.preload()
  }, // stays in reference
  component: () => <div>{collection.name}</div>, // split to virtual
})
```
In this example, `collection` is initialized in **both** the reference file (because `loader` references it) and the `?tsr-split=component` virtual file (because the component references it). Two separate instances exist at runtime.

To solve this issue, this PR introduces a third virtual module `route.tsx?tsr-shared=1` that contains shared bindings. Both the reference and virtual files import from it.

When `sharedBindings` is empty (the common case — component-only helpers, loader-only code), no shared module exists and the system works exactly as today.

The reference transform runs first and will emit a static import of `?tsr-shared=1` **only when needed**. Since split chunks are only discovered via the reference file's emitted `import('...?tsr-split=...')`, the bundler will always process/evaluate the reference module first. Result: the shared module is evaluated once and then reused by any later-loaded split chunk.
2026-02-14 13:10:54 +01: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
Philippe Serhal
6ff1190bdc
chore: add source() to Tailwind v4 imports to ensure consistent hashing (#6459)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 01:49:12 +01:00
Flo
f054c0c921
fix: revert "refactor: don't reparse upon navigation (#6398)" (#6468)
Revert "refactor: don't reparse upon navigation (#6398)"

This reverts commit 6cbd96e357.
2026-01-23 16:50:10 +01:00
Manuel Schiller
6cbd96e357
refactor: don't reparse upon navigation (#6398) 2026-01-19 23:00:21 +01:00
Manuel Schiller
2d9193c25c
chore: bump deps (#6408)
Co-authored-by: Brenley Dueck <brenleydueck@gmail.com>
2026-01-18 02:14:48 +01:00
Manuel Schiller
b42f84a4f6
fix: fullpath handling (#6404)
* fix: fullpath handling

fixes #6403
fixes #2675
fixes #4892

* add type test

* preserve / for index routes

* fix  #3005

* fix tests
2026-01-17 17:21:10 +01:00
Manuel Schiller
5299f0be9f
feat: add Route.redirect and getRouteApi.redirect (#6373) 2026-01-14 21:50:58 +01:00
Jakob Norlin
a1324bb155
fix: navigate() with href containing basepath (#6335)
Co-authored-by: Manuel Schiller <manuel.schiller@caligano.de>
2026-01-08 23:33:41 +01:00
Manuel Schiller
04e6d7b064
fix: open redirect (#6309) 2026-01-05 20:07:19 +01:00
Lee Jong Kyung
7ee7069844
Fix(scroll-restoration): handle sessionStorage quota exceeded error in scroll restoration (#6287)
* fix: handle sessionStorage quota exceeded error in scroll restoration

* feat: add scroll error route and tests for sessionStorage handling

---------

Co-authored-by: Nico Lynzaad <44094871+nlynzaad@users.noreply.github.com>
2026-01-05 18:35:06 +02:00
Nico Lynzaad
6ea81b47f7
fix(router-core): make navigate publicHref Aware (#6205)
* update navigate to use publicHref when reload document

* resolve codeRabbit nitpick

* mark publicHref prop as internal
2025-12-24 01:41:22 +02:00
Manuel Schiller
17c07d9369
fix: rewrite causes infinite redirects (#6201) 2025-12-23 12:37:09 +01:00