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

6,219 commits

Author SHA1 Message Date
Tanner Linsley
14b6042d61 examples: swap remix cookies for vinxi/http 2024-08-29 14:28:58 -06:00
Tanner Linsley
bf092b6956 docs: fix route trees 2024-08-29 14:01:01 -06:00
Tanner Linsley
1dfd7d604b release: v1.51.5 v1.51.5 2024-08-29 19:31:48 +00:00
Christopher Horobin
7219e50b2e
fix: export more types to allow declaration: true or composite (#2222) 2024-08-29 21:30:12 +02:00
Tanner Linsley
823c4091fa release: v1.51.4 v1.51.4 2024-08-29 17:59:13 +00:00
Manuel Schiller
bac62c5dd9
fix(react-router): remove groups when using createLazyFileRoute (#2220)
fixes #2219
2024-08-29 19:58:09 +02: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 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
20266513a6 docs: route tree fixes 2024-08-28 22:52:28 -06:00
Sean Cassiere
03f9fc74d0
docs(start): partner logos to be visible in dark-mode (#2212)
* docs(start): databases

* docs(start): hosting

* docs(start): observability

* docs(start): fix the link

* docs(start): authentication

* docs(start): use the tracking link

* docs(start): use the tracking link

* docs(start): more tracking link stuff

* docs(start): overview
2024-08-29 15:21:43 +12:00
Sean Cassiere
d10ac646cf
docs(start): link to the file-based routing guide from the api routes guide (#2211) 2024-08-29 14:35:17 +12:00
Timotei Albu
c881b2cc55
docs(router): spelling and other minor markdown for to the updated guides (#2210)
* Update routing-concepts.md

* spelling.
2024-08-29 12:28:36 +12:00
Tom Redman
5349357863
docs(start): dark mode for the Convex logo on the "databases" guide (#2209)
* Added dark mode Convex logo

Added a dark mode Convex logo while retaining the light version, depending on the user's theme.

* update to use `raw.githubusercontent.com`

---------

Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-08-29 12:27:59 +12:00
Tanner Linsley
fa66b7671d docs: Reorg and simplify some of the main routing docs 2024-08-28 11:47:27 -06:00
Sean Cassiere
dbb2b886cc
docs(start): API routes (#2202)
Docs for the API Routes in #2185.
2024-08-28 12:20:16 +12:00
Manuel Schiller
72100f44f2
fix: upgrade @tanstack/config to generate correct d.ts files (#2204)
fixes #2190
2024-08-27 23:35:49 +02:00
Tanner Linsley
c03819f6f0 release: v1.51.2 v1.51.2 2024-08-27 21:03:37 +00:00
Manuel Schiller
cba21e3a0f
fix: do not import from '.' (#2191)
required for #2190
2024-08-27 22:58:36 +02:00
Tanner Linsley
4fa7ad8c50 release: v1.51.1 v1.51.1 2024-08-27 20:36:33 +00:00
Manuel Schiller
71deb318eb
fix: fix tests to expect 307 redirect (#2200) 2024-08-27 22:35:27 +02:00
Tanner Linsley
610fd101c7 docs: fix server function context example 2024-08-27 14:27:42 -06:00
Tanner Linsley
ec874be1df fix: default redirect status code to 307 2024-08-27 11:09:56 -06:00
chencheng (云谦)
598121d929
docs(start): package.json block for the "getting started" guide (#2193)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-27 19:55:07 +12:00
Tanner Linsley
8e61210183 release: v1.51.0 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 v1.50.2 2024-08-26 10:57:21 +00:00
Christopher Horobin
1376843410
refactor(start): loosen the type of input for deployment preset in defineConfig (#2176)
* refactor(start): loosen the deployment preset configuration input type

* refactor(start): remove export ident

---------

Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-08-26 22:53:35 +12:00
NekoChan
edd963eff5
docs(start): incorrect import path for TanStack Query (#2187)
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-08-26 22:47:32 +12:00
Tanner Linsley
8f5c76897b docs: init ssr docs 2024-08-25 21:59:09 -06:00
Tanner Linsley
17836f2e54 docs: add static prerendering 2024-08-25 21:46:21 -06:00
Tanner Linsley
8bebd3eba1 release: v1.50.1 v1.50.1 2024-08-26 02:57:46 +00:00
Christopher Horobin
9421aef439
fix: enforce trailing slashes better and general relative pathing improvements (#2186) 2024-08-26 04:56:38 +02:00
Tanner Linsley
c2d4a9e422 docs: update server functions 2024-08-25 13:53:28 -06:00
Tanner Linsley
77f32a7e6f docs: init server function docs 2024-08-25 13:38:59 -06:00
Tanner Linsley
ff38d84777 release: v1.50.0 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 v1.49.8 2024-08-23 22:08:49 +00:00
Christopher Horobin
a8d080b553
perf(react-router): reduce type parameters of route definitions (#2161)
* perf(react-router): reduce instantiations of route definitions

* chore: change `type` import
2024-08-24 00:05:05 +02:00
Tanner Linsley
6ef147533d release: v1.49.7 v1.49.7 2024-08-23 18:50:42 +00:00
Tanner Linsley
e4b1b3ee85 fix: force release of last PR 2024-08-23 12:46:14 -06:00
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