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

149 commits

Author SHA1 Message Date
Manuel Schiller
9c81d5ac57
fix: handle beforeLoad throwing notFound correctly (#6811) 2026-03-04 21:34:28 +01:00
Manuel Schiller
816d0d1a08
feat: allow to configure dev ssr style injection (#6797) 2026-03-02 00:45:49 +01:00
Manuel Schiller
d445986542
feat: support split base and basepath in TanStack Start dev server (#6792) 2026-03-01 18:35:46 +01:00
Julius Marminge
e979285ebb
fix: throw 405 response instead of 500 internal error on method mismatch (#6091)
Co-authored-by: Manuel Schiller <manuel.schiller@caligano.de>
2026-03-01 14:44:40 +01:00
Manuel Schiller
b2a71ee211
fix: alias and namespace import support for import protection (#6784) 2026-03-01 01:32:50 +01:00
Manuel Schiller
c099ebf204
fix: don't rely on syntheticNamedExports in import protection (#6758) 2026-02-25 02:08:23 +01:00
Manuel Schiller
95761bc4e3
feat: add excludeFiles to import-protection (#6757)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-25 00:50:40 +01:00
Manuel Schiller
851967c8b0
fix: import protection robustness (#6746)
* fix: import protection robustness

* handle onViolation in prod, make it potentially async

* review
2026-02-23 21:43:49 +01:00
Manuel Schiller
53eb52abda
fix: avoid false positives in import protection (#6732) 2026-02-22 22:21:17 +01:00
Manuel Schiller
996e182844
fix(start): prevent false positives for transitively resolved imports… (#6722)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-21 22:11:03 +01:00
Manuel Schiller
4ec6f50d3b
chore: stabilize tests (#6492) 2026-02-20 01:11:21 +01:00
Manuel Schiller
f453943df5
fix: avoid false positives in import-protection plugin (#6708) 2026-02-20 00:50:05 +01:00
Birk Skyum
965d95f3b8
chore: bump srvx 0.11.2 -> 0.11.7 (#6705)
srvx 0.11.7
2026-02-19 21:41:56 +01:00
Manuel Schiller
711f3b858e
feat: import protection (#6688) 2026-02-18 01:16:30 +01:00
Manuel Schiller
5d667aa436 fix test 2026-02-16 20:17:27 +01:00
Manuel Schiller
27a563ea1d
fix: script hydration (#6681) 2026-02-16 19:22:09 +01:00
홍규진
067951fcf0
fix(react-router): remove async/defer attributes during hydration to prevent warnings (#6479)
* fix(react-router): prevent hydration warning for async/defer scripts

Strip async, defer, and src attributes from script tags during client-side hydration to match the server-rendered output and prevent React hydration mismatch warnings.

* test(react-router): add unit and e2e tests for async script hydration

Adds unit tests to verify server output includes async/defer attributes, and e2e tests to verify no hydration warnings occur on the client.

---------

Co-authored-by: Manuel Schiller <manuel.schiller@caligano.de>
2026-02-15 02:31:46 +01:00
Yuki Kakazu kekezun kkzn
426c2b54fe
fix: pass pathname to global request middleware in createStartHandler (#6648)
* fix: pass pathname to global request middleware in createStartHandler

The two `executeMiddleware` calls for global request middleware in
`createStartHandler` were missing the `pathname` property, causing it
to be `undefined` at runtime despite `RequestServerOptions` declaring
it as `pathname: string`.

- Add `pathname: url.pathname` to server function middleware execution
- Add `pathname: url.pathname` to page request middleware execution

The route-level middleware in `handleServerRoutes` already passes
`pathname` correctly.

Closes TanStack/router#6647

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

* test: add regression test for pathname in global request middleware (#6647)

Add e2e tests to server-functions-global-middleware verifying that
pathname is correctly passed to global request middleware in
createStartHandler.

- Add pathnameMiddleware that captures pathname from server callback
- Add dedicated pathname-middleware route and test page
- Verify pathname value on both SSR and client-side navigation

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

* refactor: remove unnecessary `as any` cast from pathname middleware test

The middleware type system correctly infers `requestMiddlewarePathname`
on the context, so the explicit cast is not needed.

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

* ci: apply automated fixes

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-14 16:45:18 +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
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
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
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
Flo
3b61ca2090
test(react-start): new profiling scenario for search/loader/redirect (#6511) 2026-01-25 19:17:13 +01:00
Flo
db94c3147e
test(react-start): add new flame+autocannon benchmark for nested routes + useParams (#6501) 2026-01-25 09:54:09 +01:00
Manuel Schiller
ba47d4db6e
refactor: streaming perf (#6496) 2026-01-24 23:33:20 +01:00
Manuel Schiller
3e48ef7fc9
chore: stabilize tests (#6486) 2026-01-24 13:08:29 +01: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
e190d8dbb9
test(react-start): more reliable autocannon config (#6476) 2026-01-24 00:36:42 +01:00
Flo
a3c4854c4c
test(react-start): flame perf setup uses pure nitro, no express layer (#6463) 2026-01-23 12:08:49 +01:00
Flo
d0b472e469
test(react-start): benchmarking setup w/ platformatic/flame and autocannon (#6457) 2026-01-22 21:55:39 +01:00
Birk Skyum
19a92c5d87
update h3 nitro srvx seroval (#6449) 2026-01-22 02:14:13 +01:00
Nico Lynzaad
60a30fc59a
fix(react-start): Apply Link active properties correctly on SSR when including hash (#6421)
* react: fix link active hash reactivity on SSR

* update and align tests

* remove unnecessary change

* better address react re-renders and update tests

* add tests for vue

* react: add comment on reason for useSyncExternalStore usage

* solid: revert prior fix and update tests

* react: revert unnecessary change

* react: use useHydrated

* react: cleanup
2026-01-22 00:55:28 +02:00
Nico Lynzaad
3da0227067
fix: encoded url hash fragment matching (#6416)
* decode hash

* ci: apply automated fixes

* cleanup

* revert change to basic-rsc

* add note in docs about hash fragment

* ci: apply automated fixes

* code rabbit suggestion

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-01-19 16:39:48 +02:00
Manuel Schiller
1d99170163
feat: custom fetch impl via createStart (#6417) 2026-01-19 01:35:38 +01:00
Manuel Schiller
5f6ae58d8b
feat: allow custom fetch impl for server functions (#6327)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-18 20:29:01 +01:00
Nico Lynzaad
9196ae45b7
fix(start): normalize path encoding (#6389)
* fix encoding and update tests

rework fix and tests

* refine solution

* revert unnecessary change

* fix tests

* resolve pre-render test issues

* refine comment on normalization requirement

* cleanup: remove unnecessary imports

* code rabbit suggestions

* revert merge issues in createStartHandler.ts

* Avoid decoding query/hash

* apply solution to router-ssr also

* add test for getNormalizedURL to handle URLs correctly

* enhance getNormalizedURL tests

* handle malformed paths

* build pathname using url parts

* handle backslash encoding in URL normalization

* additional tests

* refine match error handling
2026-01-18 20:10:11 +02:00
Jose Cantu
02839b3132
fix(start-client-core): allow middleware to catch server function handler errors (#6392)
fix(start-client-core): allow middleware to catch server function handler errors (#6381)
2026-01-18 09:08:10 +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
114f53b7ef
fix: make nonce accessible in headers (#6359) 2026-01-18 00:55:41 +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
hokkyss
0a5aeb628e
feat(start-core): add method and serverFnMeta property to ServerFnCtx (#6394)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-17 16:17:20 +01:00
Manuel Schiller
88aca7f3c8
fix: css dev extraction correctness and performance (#6383) 2026-01-13 20:21:14 +01:00
Manuel Schiller
bbfa5d330a
fix: properly handle sass in dev styles (#6372)
* fix: properly handle sass in dev styles

* fix: move CSS middleware to pre-phase for plugin order independence

* deps

* fix race condition

* format
2026-01-12 21:24:12 +01:00
Manuel Schiller
d67a51b836
fix: add serverFnMeta as optional to request middleware (#6366) 2026-01-12 00:35:03 +01:00
Manuel Schiller
4fcfdaac1b
feat: add server fn meta (#6213)
* feat: add server fn meta

* fix: resolve merge conflicts and fix eslint errors in start-*-core

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-11 09:54:32 +01:00
Manuel Schiller
538285cb79
fix: dev style with non runnable dev environments and basepath support (#6348) 2026-01-10 14:51:33 +01:00
Manuel Schiller
4eada7ac93 chore: force vite dependency optimization by using a warmup request in CSS dev tests 2026-01-10 04:11:57 +01:00
Manuel Schiller
5e0ab7a050
feat: collect styles in dev (#6343) 2026-01-10 04:07:23 +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