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

261 commits

Author SHA1 Message Date
Max Katz
18154b1c45
perf: lower manifest script preload priority (#8212)
* perf: lower manifest script preload priority

* fix(start-server-core): forward fetchPriority into static Early Hints

Static script hints were built from getScriptPreloadAttrs but copied only
href, rel, as and crossOrigin, so Chromium started hinted preloads at
MEDIUM before the HTML's fetchPriority="low" arrived. Build them with the
shared addEarlyHintFetchAttrs helper, which the dynamic hint path already
uses, so fetchPriority (and crossOrigin) are carried into 103 hints and the
response Link header.

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

* test: cover low-priority manifest preloads in Solid and Vue

Add a Solid server-suite SSR test for module and IIFE preloads and assert
fetchpriority="low" on rendered preloads in the Solid and Vue HeadContent
tests.

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

* docs: note low-priority JavaScript Early Hints

Mention that JavaScript Early Hints carry fetchpriority=low and extend the
changeset to start-server-core.

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

---------

Co-authored-by: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:35:33 +02:00
Flo
fdc10fa13f
chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708)
* chore(deps): bump srvx to ^1.0.0

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

* chore(deps): bump @vitejs/plugin-rsc to ^0.5.37

0.5.37 depends on srvx ^1.0.5, which drops the last srvx 0.11 copy from
the lockfile. It is temporarily excluded from minimumReleaseAge until it
is 24h old.

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

* chore: drop minimumReleaseAge exclusion for @vitejs/plugin-rsc

0.5.37 is now older than the 24h minimum release age.

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

* test(ci): TEMP experiment - rsc e2e on srvx 0.10 (revert before merge)

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

* Revert "test(ci): TEMP experiment - rsc e2e on srvx 0.10 (revert before merge)"

This reverts commit 2c7279a0b9.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:24:04 +02:00
Flo
08181cc1f7
test(rsc): make progressive streaming e2e tests independent of fixed sleeps (#8713)
test(rsc): wait for streamed notifications instead of fixed sleeps

The progressive-streaming tests slept 500ms and expected the initial batch
of 3 notifications to be rendered. React throttles Suspense reveals by
300ms, so the batch can legitimately land after that window. Wait for the
3rd notification, assert the stream is still open with fewer than all
notifications, then wait for the next one and for completion.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:04:11 +02:00
Sarah Gerrard
4104b8ef11
fix(start-plugin-core): preload transitive static imports and fix Rsbuild shared-chunk CSS (#8695)
* fix(start-plugin-core): preload transitive static imports and fix Rsbuild shared-chunk CSS

Route preloads read a chunk's `imports` as a complete list, which only
holds when the bundler hoists transitive imports. Walk the static import
graph instead, and derive Rsbuild chunk imports from the module graph
rather than chunk-group siblings so shared chunks stop attaching
unrelated route CSS to the SSR response.

Fixes #8415
Fixes #8511

* refactor(start-plugin-core): share one static import walk for preloads and CSS

The manifest builder walked the static import graph twice, once breadth-first
for preloads and once recursively for stylesheets. A single memoized
depth-first walk now records discovered file names for preloads and chunks in
post-order for stylesheets, which also keeps every chunk in an import cycle
seeing the whole cycle instead of a partially cached result.

The Rsbuild adapter resolved static dependency chunks again for every CSS-only
chunk reached from each importer; the resolution is now memoized per chunk.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* docs(start-plugin-core): drop Rollup from the imports contract comments

Rollup is no longer a supported client bundler, so the `imports` contract is
described in terms of the direct-imports-only lists Rolldown and Rsbuild emit.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13 01:07:27 +02:00
Manuel Schiller
94d6d8e496
response reconciliation (#7588) 2026-10-13 00:01:04 +02:00
Manuel Schiller
41916400b9
fix(start): preserve dev SSR CSS order (#7830)
* fix(start): preserve dev SSR CSS order

fixes #7794

* add e2e tests for solid and vue, handle vue style urls

* test(start): cover bundled dev styles and SSR reload lifecycle

* fix(start): use completed bundled graph for dev SSR styles

* fix(start): preserve import reachability across bundled dev variants

* test(start): cover layered inline CSS without build observers

* test(start): wait for bundled HMR route registration

* test(start): await HMR readiness in both Vite modes

* test(start): trace initial bundled HMR update in CI

* test(start): trace native bundled HMR watcher in CI

* test(start): inspect initial native watch registrations

* fix(start): support the latest bundled dev toolchain
2026-10-10 09:18:39 +02:00
Flo
b839f47027
test(e2e): wait for the destination route before asserting shared widget CSS (#8603)
/lazy-css-lazy and /lazy-css-static both render `shared-widget`, and the URL
updates before the departing route unmounts, so assertions after `waitForURL`
could hit the old widget while it was being detached and read `""`. Wait for a
destination-only marker and use retrying `toHaveCSS` assertions instead.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:02:43 +02:00
Manuel Schiller
3cdd1af04b
fix(router-core): restore native scroll restoration on reload (#8519)
* test: cover scroll restoration lifecycle handoff

* test: remove temporary scroll lifecycle benchmark

* fix(router-core): hand native scroll restoration back on pagehide
2026-09-27 14:31:49 +02:00
Flo
e81845ff1e
fix(start): parse path params before server route handlers (#8434) 2026-09-25 17:02:09 +02:00
Manuel Schiller
cbbfbe37ab
optimize streaming (#8204) 2026-09-16 22:38:25 +02:00
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
Tanner Linsley
05422da535
docs(start): correct authentication server function examples (#8368)
* docs(start): correct authentication server function examples

* docs(start): prevent caching session-specific auth pages

* docs(start): guard login forms until hydration

* test(start): assert authentication behavior in SSR and SPA modes
2026-09-11 17:22:55 -06:00
Flo
130992b32f
test(start): cover transformed script URL escaping in SSR (#8336) 2026-09-10 15:46:59 +02:00
Manuel Schiller
cf166d160e
fix(react-router): avoid rewriting unchanged head assets (#8257)
Fixes #8250

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-06 00:21:02 +02:00
Flo
28a5e4504e
fix(router): handle unknown error boundary values (#8209)
* fix(router): handle unknown error boundary values

* fix(router): complete unknown boundary error migration

* docs(router): keep boundary examples within skill limits

* fix(router): restore minimal boundary error display

* fix(solid-router): unify boundary errors across SSR and client
2026-09-05 14:48:44 +02:00
Manuel Schiller
79e35335b4
optimize query integration (#8175)
* optimize query integration

* fix
2026-08-27 01:28:24 +02:00
Flo
81e4a79da2
perf(router-core): reduce client loader bundle size (#8150)
* perf(router-core): reduce client loader bundle size

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-22 17:42:10 +02:00
Jiahan Chen
aab01dec75
chore(start): remove redundant splitChunks config from React plugin (#8136) 2026-08-22 09:48:38 +02:00
Flo
63d2cc9155
fix(router-core): remove navigation rollback (#8092)
* fix(router-core): remove navigation rollback

* test(react-start): update failed HMR refresh expectation
2026-08-18 14:09:37 +02:00
Flo
f97188fdb4
chore: localize package dependencies (#8078) 2026-08-15 13:42:24 +02:00
Flo
0c25a7b43b
fix(react-router): avoid Suspense above root documents (#8055)
* fix(react-router): avoid suspense above root documents

* test(react-start): cover root document hydration

* test(react-router): remove indirect hydration assertion

* perf(react-router): reduce suspense wrapper bundle size

* test(react-start): isolate root hydration regression

* fix(react-router): preserve root suspense in CSR

* refactor(react-router): simplify root suspense checks

* fix(react-router): preserve functional ssr classification
2026-08-14 13:34:08 +02:00
Flo
31882c7fa8
fix(router): reuse resolved lazy route components (#8054)
* fix(router): reuse resolved lazy route components

* fix vue inconsistency

* fix(router): clear resolved lazy component preload
2026-08-14 13:30:20 +02:00
Flo
60163bf3e4
test(start): cover ssr false hydration redirect (#7965) 2026-08-05 19:33:35 +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
Manuel Schiller
65f7b7f791
fix(start): keep server-only routes out of RSC bundles (#7944)
Use the Start storage context for request cancellation and focused server entrypoints to keep unrelated route dependencies out of the RSC module graph. Add emitted-build regression coverage for the boundary.

fixes #7938
2026-08-04 00:02:37 +02:00
Nicolas Beaussart
03699c4c02
chore(ci): improve Nx sandbox cache declarations (#7833)
* chore(ci): establish CI timing baseline

* faster maybe ?

* chore(ci): declare sandbox task inputs and outputs

* chore(ci): declare remaining build sandbox inputs

* another batch

* try fixing e2e import protection

* more sandbox fixes

* fix(e2e): isolate import protection artifacts

* fix script

* fix import protection

* tune even more

* tune even more with some global ignore

* ok, anohter try

* fix(ci): avoid reading captured build logs

* one last improvement for tonight
2026-08-01 13:39:33 +02:00
Cong-Cong Pan
7592555b86
fix(start): align Rsbuild SSR asset URLs for css?url imports (#7590)
* fix(start): align Rsbuild SSR asset URLs for css?url imports

* rm vite-env.d.tst

* ci: apply automated fixes

* fix: ts type

* ci: apply automated fixes

* ci: apply automated fixes (attempt 2/3)

* fix: docs code

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-30 23:30:40 +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
Sreetam Das
fc83c0383f
fix(react-start-rsc): require @vitejs/plugin-rsc >=0.5.30 for route component HMR (#7900) 2026-07-26 01:12:08 +02:00
Manuel Schiller
88f366ab8e
chore: migrate to typescript 7 (#7887) 2026-07-23 23:10:51 +02:00
Flo
3a5575627d
test: add regression coverage for existing router behavior (#7886) 2026-07-23 22:13:21 +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
Manuel Schiller
ffdd64e842
fix(start): preserve resolved virtual module ids (#7844) 2026-07-18 20:08:42 +02:00
Flo
0b178a79e2
test: add more regression coverage for existing router behavior (#7822) 2026-07-15 09:48:19 +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
Manuel Schiller
e2dd2049cb
fix(router-core): handle window and element scroll restoration independently (#7807) 2026-07-13 21:45:55 +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
Flo
bb2daa6952
Reduce postinstall wrangler noise (#7696) 2026-06-25 23:29:10 +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
9bebf8dc9f
rename inputValidator to validator (#7566)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-06 23:05:56 +02:00
Manuel Schiller
837897f073
fix(router-plugin): preserve generated route state for aliased HMR imports (#7560)
* fix(router-plugin): preserve generated route state for aliased HMR imports

fixes #4303

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-06 10:34:02 +02:00
Manuel Schiller
e99e855258
add regression tests (#7557) 2026-06-06 01:53:22 +02:00
Ulrich Stark
1d113f0a30
fix(examples): make isRoot check work (#7547) 2026-06-04 22:11:30 +02:00
Cong-Cong Pan
80919186cb
fix(start-rsbuild): compile node_modules for RSC directives (#7540)
* fix(start-rsbuild): compile node_modules for RSC directives

* chore: add comments

* chore: add changeset
2026-06-04 13:34:00 +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
2f5374945e
fix: fix primitive beforeLoad errors (#7505)
* fix: fix primitive beforeLoad errors

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-30 01:29:42 +02:00
Manuel Schiller
d1997b66d7
fix: fix streaming (#7497) 2026-05-29 02:27:23 +02:00