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

6,510 commits

Author SHA1 Message Date
Tanner Linsley
d1cb740737 release: v1.49.2 v1.49.2 2024-08-21 18:41:33 +00:00
Manuel Schiller
85a4fe934b
fix(react-router): restore previous matchRoutes signature (#2165)
* fix(react-router): restore previous `matchRoutes` signature

fixes #2164
2024-08-21 20:37:18 +02:00
Manuel Schiller
cf70c677f4
tests: reproducer for #2010 (#2045)
this was fixed in 1.49.1, keep this test to avoid future regressions
2024-08-21 19:55:03 +02:00
Pankaj chauhan
22f0985080
doc: update the accumulated router context guide to for checking breadcrumbs (#2160)
* doc(accumulated-route-context): useRouterState to listen reactive state change

* Apply suggestions from code review

Don't use `routeContext`, use `context` instead.

* ci: apply automated fixes

* docs: cleanup the breadcrumbs filer

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-21 13:05:31 +12:00
Tanner Linsley
d318a1afa8 release: v1.49.1 v1.49.1 2024-08-20 21:30:53 +00:00
Tanner Linsley
f636b1d7cd
fix: splat matching (#2159)
* fix: splat matching

* fix: make _splat optional in params

---------

Co-authored-by: chorobin <chrishorobin@hotmail.com>
2024-08-20 15:28:37 -06:00
Tanner Linsley
3c20257342 release: v1.49.0 v1.49.0 2024-08-20 19:40:31 +00:00
Christopher Horobin
42f703d05b
feat(react-router): add context option to route (#2104)
* feat(react-router): add types for routeContext

* perf(react-router): optimise new types for `routeContext`

* chore(react-router): add type tests for routeContext and beforeLoad

* checkpoint

* ci: apply automated fixes

* updates docs

* fix: tests

* fix: context

* chore: fix the lockfile

* ci: apply automated fixes

* style(react-router): fixup the eslint errors

* fix: hydration mismatch during SSR, refactor matchRoutes to take location

* fix: serialize beforeLoadContext during SSR

* examples: add start-basic-auth

* fix: history export parseHref

* feat: routeOptions.preload to allow disabling route-level preloading

* fix: full support for href redirects

* feat: useServerFn hook to allow handling server side effects like redirects outside of router lifecycles

* fix: server redirect and notFound now default to 200 status code for runtime to handle

* fix: update pnpm

* ci: apply automated fixes

* examples: fix start-basic-auth

* tests: fix playwright

* tests: fix playwright

* tests: fix playwright

* sean's changes to the route context branch (#2141)

* chore: type the objects used for `routeContext` and `beforeLoad`

* refactor: move the defaultTransformer from start to react-router

* test: add tests to the defaultTransformer

* test(react-router): add runtime unit tests for the `context` function

* examples: init start-clerk-basic

* fix: lockfile

* ci: apply automated fixes

* test: remove failing test for WIP clerk example

* tests: fix more clerk wip tests

* fix: lockfile

* tests: more clerk fixes

* tests: skip WIP clerk example

---------

Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-08-20 13:39:17 -06:00
Tanner Linsley
726897e223 release: v1.48.6 v1.48.6 2024-08-20 12:14:27 +00:00
Sean Cassiere
68b5b528c7
refactor(router plugin): restructure the plugin's internals (#2155)
* chore(router-plugin): rename "code-splitter" to "router-code-splitter"

* refactor(router-plugin): follow unplugin standards and move lib code into "core"

* test(router-plugin): update imports
2024-08-21 00:13:07 +12:00
Tanner Linsley
366f48140e release: v1.48.5 v1.48.5 2024-08-20 09:15:00 +00:00
Sean Cassiere
de2325b3a4
fix(router-plugin): plugin functionality for rspack 1.x.x (#2153)
* fix(router-plugin): bump dependencies to latest

* chore(router-plugin): remove vite from the dev dependencies

* chore: bump rspack deps for "quickstart-rspack-file-based" to 1.0-level deps

* chore(router-plugin): bump rspack peerDep level to 1.0.0

* types(router-plugin): explicit casting of ResolveData

* refactor(router-plugin): `transform` in the code-splitter no longer needs to be async
2024-08-20 21:13:51 +12:00
Tanner Linsley
4d787a8dfc release: v1.48.4 v1.48.4 2024-08-19 08:45:18 +00:00
Mathias Schreck
0fb27859ce
fix(react-router,start): ensure document is only used when available (#2120)
* fix(react-router,start): ensure document and window is only used when available

* Update packages/react-router/src/Transitioner.tsx

* fix: document not undefined in the transitioner

* fix(start): incorrect exit condition for document on Meta

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-08-19 20:41:34 +12:00
Tanner Linsley
c581d0df2b release: v1.48.3 v1.48.3 2024-08-18 23:04:29 +00:00
Sean Cassiere
ebb7f06337
fix(router-generator): scaffolding the initial content for the root route (#2148)
* fix(router-generator): scaffolding the initial content for the root route

* refactor(router-generator): move the code higher up and set it to always handle the root node, regardless of the whether it exists or not

* chore(router-generator): add a comment as to why the `handleRootNode` function is not folded into `handleNode`

* refactor: format the template on save
2024-08-19 11:03:29 +12:00
Tanner Linsley
a407fb51f7 release: v1.48.2 v1.48.2 2024-08-18 22:19:49 +00:00
Sean Cassiere
fbb6b718a5
fix(router-generator): resolving the routesDirectory and generatedRouteTree when the configDirectory is set (#2147)
* get the pre-package built

* log out the userConfig

* try the fix

* remove the console log
2024-08-19 10:18:20 +12:00
The Blue Dragon
e5fd079b3a
docs: Removed the redundant "default" (#2146) 2024-08-18 18:44:07 +02:00
Tanner Linsley
68bf2f85f3
Update README.md 2024-08-16 12:13:02 -06:00
jun won
1f5168dc3f
docs: fix a typo in useBlocker example code block (#2136) 2024-08-15 14:43:35 +12:00
Sean Cassiere
e1d51f8b98
docs: hide the start-basic-rsc and show the start-basic-react-query example on the website (#2135)
* docs: hide the `start-basic-rsc` example from the website

* docs: show the `start-basic-react-query` example on the website
2024-08-15 13:08:53 +12:00
Sean Cassiere
75bae7ab8c
docs: correct the documentation on the expected behaviour of Router.onError (#2134) 2024-08-15 12:52:33 +12:00
Tanner Linsley
265c6a5058 release: v1.48.1 v1.48.1 2024-08-15 00:31:49 +00:00
Sean Cassiere
c66e1b55eb
fix(react-router): explicitly set the default notFoundMode and update the RouterOptions JSDoc comments (#2133)
* fix(react-router): set the default `notFoundMode` during instantiation

* docs: update `RouterOptions` with `notFoundMode` and `defaultViewTransition`
2024-08-15 12:30:06 +12:00
Tanner Linsley
2c9967db5c release: v1.48.0 v1.48.0 2024-08-14 19:23:40 +00:00
Christopher Horobin
3a8dcf7c46
feat(react-router): support input types for search validation schemas (#2000)
* feat: add support for search schema adapters
2024-08-14 21:20:23 +02:00
Tanner Linsley
3f30909e94 release: v1.47.5 v1.47.5 2024-08-13 23:24:08 +00:00
Manuel Schiller
e8866c516b
fix(react-router): fix minPendingMs (#2124)
fixes #2106

this reverts https://github.com/TanStack/router/pull/2075 since the effect was not executed properly.
To avoid the infinite loop of #2053, the `minPendingPromise` is read via `router.getState` since `match` property was not up-to-date
2024-08-14 01:22:40 +02:00
Tanner Linsley
36e4780730 release: v1.47.4 v1.47.4 2024-08-13 20:18:19 +00:00
Manuel Schiller
bb416645ba
fix(react-router): do not remove route groups from lazy file route ids (#2123)
this removal was introduced by #1253, however in the meantime the generator was modified
2024-08-13 22:16:42 +02:00
Sean Cassiere
a1ad375bd6
docs: move the trpc examples to file-based routing (#2121)
* switch the "with-trpc" example over to vinxi

* move the "with-trpc" example over to file-based routing

* switch the "with-trpc-react-query" over to file-based routing

* cleanup on the "with-trpc" example

* cleanup on the "with-trpc-react-query" example

* remove the manifest generation block flag on the "with-trpc-react-query" example

* remove the manifest generation block flag on the "with-trpc-react" example
2024-08-13 18:58:00 +12:00
Tanner Linsley
a6819bf934 release: v1.47.3 v1.47.3 2024-08-12 06:16:57 +00:00
Sean Cassiere
9dbbbfe3f1
fix(start): using TextEncoder to encode the chunks when using renderToReadableStream (#2117)
* using the a TextEncoder

* trying without the changes from #1822

* revert that last commit

* use TextDecoder on the client-side of the stream

* undo

* temporary disable

* re-enable

* style: eslint warnings

* log error events

* gitignore wrangler outputs
2024-08-12 18:13:50 +12:00
Tanner Linsley
eb4f88267d release: v1.47.2 v1.47.2 2024-08-10 11:04:04 +00:00
Kenta Iwasaki
fbf0b8fd1e
fix(start): include all available nitro presets (#2115) 2024-08-10 22:59:18 +12:00
Kenta Iwasaki
f4f42500f1
fix(start): use appropriate stream transform for renderToReadableStream (#2116)
transformStreamWithRouter was previously being used when the runtime is
detected to support web streams (i.e. ReadableStream).

transformReadableStreamWithRouter should be used instead inside of
defaultStreamHandler.
2024-08-10 22:59:06 +12:00
Tanner Linsley
6f66923791 release: v1.47.1 v1.47.1 2024-08-09 11:38:37 +00:00
Mikkel Thorbjørn Andersen
ca401e600f
fix(react-router): ResolvedSuspense to always use React.Suspense never the SafeFragment (#1822)
* Added test to prove rerender test for hooks is not possible with tanstack router wtih the current state.

* prettier

* Changed implementation to prove it will work

* Navigating from kitchensink app dashboard/invoices to dashboard/users would end up redirecting back to  dashboard/invoices if using this.state.resolvedLocation

* revert and fix navigate by adding a "to" directly in the useEffect since without it tanstack router will navigate back

* cleanup

* ensure lock file was not changed

* now using lock from main

* revert change

* revert fix for search

* fixed formatting

* ci: apply automated fixes

* chore: do not use memoryHistory

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-09 13:35:11 +02:00
SeanCassiere
fa8f93a960
examples: fix the devtools alignment in the "with-trpc-react-query" example 2024-08-08 15:56:51 +12:00
Sean Cassiere
16761e250b
examples: fix up the "with-trpc-react-query" example (#2105)
* rename folder

* fixup the with-trpc-react-query example

* cleanups in the "with-trpc" example

* sync with "with-trpc"

* upgrade the "with-trpc" example, trpc package

* sync the spinner

* chore: display the examples on the website
2024-08-08 15:49:30 +12:00
Tanner Linsley
fada5170c6 release: v1.47.0 v1.47.0 2024-08-08 00:01:37 +00:00
Honza Hrubý
d5d151c847
feat(router-generate): add option to skip generating route manifest (#2100)
* feat(router-generate): add option to skip generating route manifest

* rename option

* document

* refactor: one last rename

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-08-08 11:58:29 +12:00
Tanner Linsley
08b85242f8 release: v1.46.9 v1.46.9 2024-08-07 17:18:04 +00:00
Tanner Linsley
b3b57203cf
fix: better non-start ssr handlers (#2093)
* fix: better non-Start SSR handlers

* update lockfile

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-07 11:14:20 -06:00
autofix-ci[bot]
a330681a20
ci: apply automated fixes 2024-08-07 17:04:40 +00:00
Tanner Linsley
46981ae7ce docs: update overview 2024-08-07 11:03:41 -06:00
autofix-ci[bot]
668b04d9e0
ci: apply automated fixes 2024-08-07 16:33:49 +00:00
Tanner Linsley
26f23496d4 docs: update overview 2024-08-07 10:28:53 -06:00
Sagar Dwivedi
fa1bd0d3bc
docs: add installation commands for all package managers (#2099)
* docs: add command to install using bun

* added support for all package manager

* added support for all package manager in quick-start.md
2024-08-07 20:30:11 +12:00