0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-18 19:34:24 +00:00
Commit graph

6,597 commits

Author SHA1 Message Date
Christopher Horobin
7ce39ef6eb
doc: fix headings for type utilities (#3495) 2025-02-20 23:07:11 +01:00
Manuel Schiller
09b7d7d4d5 fix(start-client): do not import from node:fs/promises directly
this breaks when client polyfills node env
instead, destructure the import from `node:fs`
2025-02-20 23:05:47 +01:00
Tanner Linsley
4d5c84548f release: v1.109.0 v1.109.0 2025-02-20 21:54:36 +00:00
Christopher Horobin
16a9c9e2bb
feat(react-router): final type utilities (#3485)
* feat(react-router): final type utilities

* docs(react-router): add type utilities docs
2025-02-20 22:52:57 +01:00
Tanner Linsley
b720151c28 release: v1.108.1 v1.108.1 2025-02-20 19:05:56 +00:00
Manuel Schiller
fb07a927d7
fix(start-client): preload route chunks prior to hydration (#3493) 2025-02-20 19:58:25 +01:00
Tanner Linsley
1340ccead8 release: v1.108.0 v1.108.0 2025-02-20 16:18:10 +00:00
Birk Skyum
ad20a68491
feat(solid-router): Add a SolidJS driver for TanStack Router (#3276)
* copy react-router

* update

* Move forward branch

* cleanup

* cleanup

* add publish

* bump deps

* ci: apply automated fixes

* remove unused imports

* ci: apply automated fixes

* bump  vite plugin solid

* fix imports

* ci: apply automated fixes

* remove react lint from solid-router

* fix types

* ci: apply automated fixes

* add structuralSharing

* downgrade vite plugin solid

* fix scroll-restoration in solid-router

* fix Transitioner

* fix imports from ScrollRestoration

* Fix tests

* Fix more tests

* Remove the react $$typeof

* add accessors to useLocation

* add remountDeps

* cleanup

* remove tanstack/store

* format

* add missing call to setupScrollRestoration

* format

* add optional

* align match component

* make matches a signal

* Bump vite-plugin-solid to stable

* add missing await

* Fix unknown error

* Tweak the tests to call functions

* remove unused vars

* fix lockfile

* Down to 25 failures

* Remove .only

* call search()

* remove the structuralSharing

* fix type test

* fix structuralSharing

* comment out structured sharing validation check

* fix typings

* comment out serialization check

* comment out serialization check

* cleanup

* improve types of useSearch

* fix "when setting search params with 2 parallel navigate calls"

* fix useParams

* fix types

* fix useParams types

* cleanup debug

* fix link data loader

* fix data loader signal

* fix type test

* fix Link "when navigating away from a route with a loader that errors"

* setup on() simpler

* make initial load a createRenderEffect

* Fix some link preload tests

* add accessor to UseMatchRoute

* fix: when navigating to /posts with a beforeLoad that returns context

* call parentRouteId

* re-enable invariant

* fix when navigating from /invoices to ./invoiceId and the current route is /posts/$postId/details

* use memo for prev

* remove browserhistory  workaround

* fix  "after a navigation, should have emitted the "onResolved" event twice"

* skip remount

* add types to useSearch

* fix search middleware

* don't need a getter

* sync react-router

* solid kitchen sink

* add the example to workspace

* lockfile

* fix solid kitchensink name

* add solid template

* fix example

* rename react to solid

* work on example

* add accessor

* fix type tests

* Fix login in example

* Don't destructure

* Fix stuck on pending component

* Fix where loaderData can be undefined

* Use For component

* More refactor

* Hacky way to fix loading spinner

* Fix one test

* Better MatchRoute fix

* Down to 1 failing test

* Fix last test

* cleanup subscription

* lockfile

* eslint

* ci: apply automated fixes

* fix router-core lint

* ci: apply automated fixes

* add e2e test for solid-router

* ci: apply automated fixes

* work on solid-router e2e suites

* fix comment

* use solid-virtualizer

* work on scroll-restauration

* work on scroll-restauration

* skip react-specific useRenderEffect test

* fix errorcomponent being used before it's defined

* set solid target for esbuild

* ci: apply automated fixes

* fix rspack tests

* fix query tets

* add solid-query example

* use memo for post

* add memo for posts

* fix example

* add jsx compiler flags to esbuild commands

* add esbuild-plugin-solid

* Fix some e2e

* ci: apply automated fixes

* port #3423 from react-router

* fix useLoaderData test-d

* add codeSplitGroupings

* Scroll restoration fixes

* add asset headcontent script

* remove solid-router-copy

* fix react use

* fix scroll restoration test

* skip esbuild because it's broken in react-router

* wait for timeout

* update scroll-restoration to match react

* useLocation

* use on() in match

* align useNavigate with react-router

* lockfile

* fix Scripts test

* align __TSR_SSR__ in ScriptOnce

* remove solid-router from publish

* lint

* ci: apply automated fixes

* align to react-router

* port over "exclude props from state equality check to prevent history push for equal url and state"

* align with react-router

* add shouldThrow

* fix typePrimitives

* use searchStr to fix the search middleware

* ci: add solid-router to the labeler

* use patched vite-plugin-solid

* eslint

* ci: apply automated fixes

* use vite-plugin-solid 2.11.2

* remove only modifier

* move vite-plugin-solid peerDep to router-plugin

* use latest vite-plugin-solid

* move vitest to root

* bump vitest

* revert onRendered

* lint

* add to publish

* fix scroll restoration

* ci: apply automated fixes

* align version with react-router

* sync to react-router

* sync with react-router

* sync navigate tests to react-router

* ci: apply automated fixes

* use Solid.JSX.Element consistently instead of Solid.JSXElement

* remove irrelevant test

* ci: apply automated fixes

* remove unused suite

* lint

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Brenley Dueck <brenleydueck@gmail.com>
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-02-20 17:11:39 +01:00
David Burles
b299ee8dae
docs(router): update notFound whole page example (#3466) 2025-02-20 00:57:38 +13:00
Tanner Linsley
fb071895dd release: v1.107.0 v1.107.0 2025-02-19 01:03:37 +00:00
Manuel Schiller
391fbadac3
feat(start): add AbortSignal for server functions (#3477) 2025-02-19 01:49:53 +01:00
Tanner Linsley
db9047c99c release: v1.106.0 v1.106.0 2025-02-18 18:28:29 +00:00
Ben Durrant
3abf4c19f7
fix(start,router): Change DCE so it only affects *newly* dead code (#3422)
Co-authored-by: Manuel Schiller <manuel.schiller@caligano.de>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-18 19:20:52 +01:00
Ben Durrant
47614bb252
fix(start): ensure generic h3 functions remain generic, including new overloads (#3285) 2025-02-18 19:20:38 +01:00
Ryan Gillie
8ba5e77b8f
feat(react-router-with-query): Handle redirects thrown inside mutations/queries. (#3460)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-18 19:20:25 +01:00
Manuel Schiller
4e8cc040c9 tests(react-router): import locally in test 2025-02-18 19:19:27 +01:00
Manuel Schiller
c0f2b82f7b fix(react-router): avoid empty script tag if scroll restoration is disabled 2025-02-18 19:19:27 +01:00
Tanner Linsley
83b8ea9e37 release: v1.105.5 v1.105.5 2025-02-18 16:44:03 +00:00
Christopher Horobin
2dd5b95a6a
refactor: remove clientAfter (#3426)
* refactor: remove clientAfter

* perf(start): add middleware types interface to avoid structural comparison

* docs(start): update to include inferring context from server to client
2025-02-18 17:37:56 +01:00
Manuel Schiller
0277309b1b
fix(react-router): only navigate once in StrictMode (#3465) 2025-02-18 02:10:05 +01:00
Julius Marminge
ea2c4add34
trpc queryoptions (#3464) 2025-02-17 18:04:15 -07:00
Tanner Linsley
bcfcc99aea release: v1.105.4 v1.105.4 2025-02-17 23:58:13 +00:00
Manuel Schiller
63ea664091
fix: propagate cookies from server functions during SSR (#3463)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-18 00:56:43 +01:00
Manuel Schiller
4252fdc51f
tests: move e2e server functions tests into dedicated project (#3454)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-16 22:20:15 +01:00
Tanner Linsley
7be247504a release: v1.105.3 v1.105.3 2025-02-16 14:15:47 +00:00
Christopher Horobin
805d8f221a
fix(start): use FetcherData by default for return type (#3451)
* fix(start): use FetcherData by default for return type

* chore: add type tests
2025-02-16 15:13:28 +01:00
Tanner Linsley
adcdde4d57 release: v1.105.2 v1.105.2 2025-02-16 04:27:56 +00:00
Manuel Schiller
c6a240969c
fix(directive-functions-plugin): handle anonymous default exports (#3447) 2025-02-15 21:26:10 -07:00
Manuel Schiller
dfd583176a
tests: bump react in e2e tests (#3445) 2025-02-15 14:41:29 +01:00
Manuel Schiller
4ba035488e docs: react 18 or 19 in router installation 2025-02-15 14:28:27 +01:00
Tanner Linsley
22da8822f3 docs: more 2025-02-14 22:37:33 -07:00
Tanner Linsley
ffc194bf3d Merge branch 'main' of https://github.com/TanStack/router 2025-02-14 21:02:51 -07:00
Tanner Linsley
b6fed0a512 docs: add head management initial docs 2025-02-14 21:02:49 -07:00
Tanner Linsley
0943f29f1f release: v1.105.1 v1.105.1 2025-02-15 00:05:24 +00:00
Manuel Schiller
2e5c597d41
fix(start): fix HMR preamble issue (#3441) 2025-02-15 00:58:07 +01:00
Tanner Linsley
c1c9e36475 release: v1.105.0 v1.105.0 2025-02-14 22:20:39 +00:00
Manuel Schiller
4c7caeba94
feat: replace <Meta /> by <HeadContent /> and add dedicated headScripts (#3439) 2025-02-14 23:19:01 +01:00
Tanner Linsley
7d76812729 release: v1.104.3 v1.104.3 2025-02-13 22:56:09 +00:00
Carson Full
b2e65c0b8b
fix(router-devtools): peer dep for csstype for goober (#3427) 2025-02-13 23:47:25 +01:00
Tanner Linsley
b5d14325b3 release: v1.104.2 v1.104.2 2025-02-13 22:02:54 +00:00
Manuel Schiller
0314018121
fix(start-client): properly merge context upon hydration (#3425) 2025-02-13 22:56:12 +01:00
Tanner Linsley
cea9019343 release: v1.104.1 v1.104.1 2025-02-13 20:13:11 +00:00
Manuel Schiller
8dbbe938ca
fix: only call head() when loaderData is available (#3410)
if no loader exists, `head()` will be called with `loaderData: undefined`

Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
2025-02-13 13:06:13 -07:00
Tanner Linsley
b406134b42 release: v1.104.0 v1.104.0 2025-02-13 18:42:47 +00:00
McKittrick Kaminski
7a39c7e64c
feat: add WrapProvider to routerWithQueryClient (#3415) 2025-02-13 19:39:26 +01:00
Manuel Schiller
b8165abf91
fix(react-router): fix path param handling with relative navigation (#3423)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-13 19:39:15 +01:00
Tanner Linsley
2a83af7b75 release: v1.103.1 v1.103.1 2025-02-13 17:55:14 +00:00
Tanner Linsley
ef19ea4b63
fix: file-wide use server now handles export const var (#3414)
* fix: file-wide `use server` now handles export const var

* no only
2025-02-13 10:52:09 -07:00
Tanner Linsley
11d340abef release: v1.103.0 v1.103.0 2025-02-12 23:28:38 +00:00
Tanner Linsley
2e74974c66
feat: static server functions (#3352)
* We're back baby!

fix: type: 'static', .type(type | () => type)

fix: allow customizing the serverFnStaticCache impl

fix: also allow for customizing the client side fetch, duh

* docs: static server function docs

* fix: remove unnecessary tuple option

* fix: createServerFnStaticCache import location

* fix: lockfile

* fix: types
2025-02-12 16:23:30 -07:00