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

1,150 commits

Author SHA1 Message Date
Tanner Linsley
7f51877da0 release: v1.51.9 2024-08-31 17:39:18 +00:00
Tanner Linsley
665e0bf7a6 release: v1.51.8 2024-08-31 13:37:12 +00:00
Tanner Linsley
e945089570 release: v1.51.7 2024-08-31 05:50:56 +00:00
Tom Ballinger
dc40904b44
Update convex version (#2232) 2024-08-30 14:13:34 -06:00
Lachlan Collins
46534e5b02
chore(deps): use ESLint v9 (#2228) 2024-08-30 18:36:46 +10:00
Tanner Linsley
513408927d release: v1.51.6 2024-08-29 23:01:07 +00:00
Sean Cassiere
0948389a78
chore: fix start-basic-auth example to pass playwright test (#2226) 2024-08-30 09:31:35 +12:00
Tanner Linsley
14b6042d61 examples: swap remix cookies for vinxi/http 2024-08-29 14:28:58 -06:00
Tanner Linsley
1dfd7d604b release: v1.51.5 2024-08-29 19:31:48 +00:00
Tanner Linsley
823c4091fa release: v1.51.4 2024-08-29 17:59:13 +00:00
Lachlan Collins
c6a80d637c
chore(deps): update select dependencies (#2215)
* chore(deps): update select dependencies

* More updates

* More deps

* Sync vinxi
2024-08-29 17:06:35 +10:00
Tanner Linsley
1b0678f103 release: v1.51.3 2024-08-29 06:12:36 +00:00
Lachlan Collins
abf4d00994
chore: remove unused dependencies (#2214)
* chore: remove unused dependencies

* Sync vite-tsconfig-paths version
2024-08-29 16:11:20 +10:00
Tanner Linsley
c03819f6f0 release: v1.51.2 2024-08-27 21:03:37 +00:00
Tanner Linsley
4fa7ad8c50 release: v1.51.1 2024-08-27 20:36:33 +00:00
Tanner Linsley
8e61210183 release: v1.51.0 2024-08-27 07:47:47 +00:00
Tanner Linsley
21bf687b26
feat(start): add api routes (#2185)
* feat: partial work on file based api routes

* feat(router-generator,start): tsr config to support `apiBase`

* feat(router-generator): adding the route template

* feat(router-generator): smoke test to make sure no conflicting configurations are found

* chore(start-basic): cleanup to a workable state

* feat(router-generator): generate the manifest for api-routes

* feat(start): make sure requests are getting through

* fix(react-router,start): get the exports sorted

* refactor(router-generator): to use the same output as normal route files

* feat(start): piping the manifest to the api-handler

* chore(start): remove unused config option since the apiBase is being taken from tsr-generator

* fix(start): only add the api router to vinxi if its handler exists

* style(start): eslint

* test(router-generator): checking that the custom base is respected by the generator

* chore(start): add a dot notated api route and `console.debug` instead

* refactor(router-generator,start): normalize the capitalization of "API" across the generator and start

* fix(start): `createAPIHandler` to `createApiHandler`

* feat(router-generator,start): correctly output the api build chunks

* feat(start): 🎉 API-routes are working
now it just needs Tanner's multi-sort logic stuff added-in

* fix(start,router-generator): split the API stuff from the "server" export to its own "api"export

* feat(router-generator): handle updating the path `escapedPath` on API-Routes like we do for regular file-routes

* refactor(router-generator,start): rename functions

* feat(start): add logic for route matching with TSR routes

* feat(react-router,router-generator,start): remove the stuff to do with generating the "api-manifest". only the existing "route-manifest" remains. the additional tests have also been removed

* fix(start): filter out potential api-route mismatches before trying to begin the actually "find" process

* test: start-basic example with api routes

* chore: add a DEPLOY_URL field to better show that the user needs to supply this SSR

* test: start-basic-react-query example with api routes

* chore: rename "post" to "user"

* feat(start): allow the HTTP "HEAD" method

* feat(start): solution for code-based api-routes

* revert(start): undo the code-based approach since the production builds didn't work

* feat(start): add back the code-based approach

* chore(start): rename type "APIFileRouteReturnType" to "APIRouteReturnType"

* fix(start): path logic to make sure url segments cannot be less than route segments

* refactor(start): code-based approach to accept a an object of routes keyed under "routes"

* chore(start): add comments since

* refactor(router-generator,start): less exports and reuse make the fs-router extensible

* refactor(start): a more generic name

* refactor(start): generic naming again

* refactor(start): strongly type the api handlers

* docs(router): update the file-based routing to callout that `/api` routes will be ignored by router

* docs(router): callout how the `api_base can be changed`

---------

Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-08-27 19:46:20 +12:00
Tanner Linsley
07a6b72c12 release: v1.50.2 2024-08-26 10:57:21 +00:00
Tanner Linsley
8bebd3eba1 release: v1.50.1 2024-08-26 02:57:46 +00:00
Tanner Linsley
ff38d84777 release: v1.50.0 2024-08-23 23:05:35 +00:00
Christopher Horobin
00ab94253f
feat(react-router): allow narrowing of matches with useMatches (#2058)
* feat(react-router): add isMatch type predicate

* chore: add to example

* refactor: optimised types

* chore: use `constrain`

* fix: add a few fixes and tests

* chore: add experimental tag
2024-08-24 01:04:00 +02:00
Tanner Linsley
d1d608685d release: v1.49.8 2024-08-23 22:08:49 +00:00
Tanner Linsley
6ef147533d release: v1.49.7 2024-08-23 18:50:42 +00:00
Tanner Linsley
23cbb9a402 release: 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
Tanner Linsley
b1da3140bb release: v1.49.5 2024-08-22 23:58:50 +00:00
Tanner Linsley
f8118822a4 release: v1.49.4 2024-08-22 23:26:20 +00:00
Tanner Linsley
7f257e58e7 release: 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 2024-08-21 18:41:33 +00:00
Tanner Linsley
d318a1afa8 release: v1.49.1 2024-08-20 21:30:53 +00:00
Tanner Linsley
3c20257342 release: 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 2024-08-20 12:14:27 +00:00
Tanner Linsley
366f48140e release: 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 2024-08-19 08:45:18 +00:00
Tanner Linsley
c581d0df2b release: v1.48.3 2024-08-18 23:04:29 +00:00
Tanner Linsley
a407fb51f7 release: v1.48.2 2024-08-18 22:19:49 +00:00
Tanner Linsley
265c6a5058 release: v1.48.1 2024-08-15 00:31:49 +00:00
Tanner Linsley
2c9967db5c release: 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 2024-08-13 23:24:08 +00:00
Tanner Linsley
36e4780730 release: v1.47.4 2024-08-13 20:18:19 +00: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 2024-08-12 06:16:57 +00:00
Tanner Linsley
eb4f88267d release: v1.47.2 2024-08-10 11:04:04 +00:00
Tanner Linsley
6f66923791 release: v1.47.1 2024-08-09 11:38:37 +00: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