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

6,478 commits

Author SHA1 Message Date
Tanner Linsley
333efe0e7b
[experimental] fix: safer history patching (#2181)
* fix: safer history patching

* fix tests

---------

Co-authored-by: Manuel Schiller <manuel.schiller@caligano.de>
2024-08-23 20:44:13 +02:00
Tanner Linsley
23cbb9a402 release: v1.49.6 v1.49.6 2024-08-23 15:19:24 +00:00
Sean Cassiere
d875321d12
fix(start): deferred createServerFn calls fails on the client (#2172)
* fix(start): deferred `createServerFn` calls failing on the client

* test(start-basic): add e2e check to make sure the complex deferred object gets printed on the page

* test(start-basic): more tests to make sure nothing is breaking
2024-08-23 09:17:43 -06:00
Sean Cassiere
cabd42686e
docs(start): markdown to follow the website flow (#2173)
* docs(start): markdown to follow the website flow

* docs(start): fixup the content hierarchy for the getting started guide
2024-08-23 19:31:49 +12:00
Gerard Ketuma
b8c0420a75
docs(router): fix grammatical errors in the "Code-splitting" guide (#2171) 2024-08-23 16:55:49 +12:00
Tanner Linsley
b1da3140bb release: v1.49.5 v1.49.5 2024-08-22 23:58:50 +00:00
SeanCassiere
a44858a68a
refactor(start): mark node-server as a tested deployment preset 2024-08-23 11:55:07 +12:00
SeanCassiere
e41464cd42
refactor(start): mark cloudflare-pages as a tested deployment preset 2024-08-23 11:50:38 +12:00
Tanner Linsley
f8118822a4 release: v1.49.4 v1.49.4 2024-08-22 23:26:20 +00:00
Kenta Iwasaki
e1f1564768
fix(start): load meta only on successful hydration (#2166)
When a route is matched to be unsuccessful such that no loader data is
available, the meta function still gets called with undefined loader
data. Given that the type signature of the meta function assumes that
loader data is always to be defined, a change was made to only call the
meta function when a match is successful.
2024-08-23 11:22:32 +12:00
Sina Niyavarzi
8e0dd0d315
docs(start): fixed some grammatical errors in the Start "Overview" (#2170) 2024-08-23 11:22:10 +12:00
Tanner Linsley
bba02627c3 docs: partner images 2024-08-22 12:36:27 -06:00
Tanner Linsley
c068515595 docs: start typo 2024-08-22 12:31:28 -06:00
Tanner Linsley
4ce6c16050 docs: startners 2024-08-22 12:30:53 -06:00
Tanner Linsley
dd134b55e4 docs: add placeholders for pillar features and partners 2024-08-22 12:00:50 -06:00
Tanner Linsley
52155a28aa docs: init start docs 2024-08-22 11:15:20 -06:00
Tanner Linsley
7f257e58e7 release: v1.49.3 v1.49.3 2024-08-21 20:55:21 +00:00
Sean Cassiere
8cf525d99c
refactor(router-generator,router-plugin,start): mark experimental.enableCodeSplitting functionality as stable with the name autoCodeSplitting (#2163)
* feat(router-generator): add the `autoCodeSplitting` option to the expected config

* refactor(router-plugin): accept the new `autoCodeSplitting` flag + throw an error if the older `experimental.enableCodeSplitting` flag is still being used

* refactor(start): update the vinxi configuration to use the new `autoCodeSplitting` flag instead of the `experimental.enableCodeSplitting` flag

* docs: update the "file-based-routing" guide with the correct flag

* docs: update the content in the "code-splitting" guide for better readability and communicate the necessary steps needed for using the feature

* docs: update the title on the "file-based-routing" guide

* examples: remove the older `experimental.enableCodeSplitting` flags from the trpc examples
2024-08-22 08:50:48 +12:00
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