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

6,681 commits

Author SHA1 Message Date
Christopher Horobin
167ac74445
feat: trailingSlashes option on the type level (#1509)
* feat: infer trailing slash option from router to use at the type level

- always will always add trailing slashes to the leaves of `to` prop
- never will always remove trailing slashes from the leaves of `to` prop
- preserve will allow both paths with or without slashes

* fix: allow branches but not when there is an index route
2024-04-25 20:05:34 +02:00
Tanner Linsley
230d9e829b release: v1.30.1 v1.30.1 2024-04-25 10:06:34 +00:00
Sean Cassiere
4327ed75d9
fix(react-router): encoding of / in path parameters (#1520)
* fix(react-router): using encodeURIComponent on all params except the splat params

* test(react-router): checking the functionality of the new path param encoding changes

* test(react-router): description naming

* test(react-router): make the expected test results static

* chore: make the comment more relevant
2024-04-25 22:04:47 +12:00
Sean Cassiere
5035865f87
docs: add a callout in the file-based routing options about not conflicting with the naming conventions (#1519)
* docs: callouts in the file-based routing conventions

* docs: make the callouts related their properties/options

* docs: emojis!

* docs: add a callout in the "file-naming conventions" section

* docs: use a single callout in the "options" sections

* docs: better callout in the 'file-naming conventioned' section

* docs: missing words

* docs: that should be it

* docs: be a bit more obvious about the `-`
2024-04-25 22:04:27 +12:00
Sean Cassiere
d7223f95db
docs(examples): update the authenticated-routes example to no longer use flushSync (#1507) 2024-04-22 19:31:15 +12:00
Sean Cassiere
00fb7a5a71
docs(examples): update the authenticated-routes example to use layout routes (#1505)
* docs: rename the authenticated-routes example

* docs: update the authenticated-routes example to use layouts

* docs: trim up the authenticated routes example

* docs: default navigation to `/dashboard`

* docs: add auth persistence
2024-04-22 14:35:22 +12:00
Tanner Linsley
90dc6046b9 release: v1.30.0 v1.30.0 2024-04-21 02:04:35 +00:00
Sean Cassiere
94ffb85bc4
feat(router-generator): prepend and append header and footer content to the generated route-tree file as defined by the user (#1502)
* feat(router-generator): append and prepend lines to the generated route-tree

* test(router-generator): making sure it works!

* refactor(router-generator): rename the prepend and append properties

* docs: docs on the new prepend and append functionality

* refactor(router-generator): update configuration property names

* test(router-generator): update the tests with the new configuration property names

* docs: update file-based routing guide with the new property names

* refactor(router-generator): move to the defaults

* test(router-generator): updated test output

* docs: show what the defaults are on the docs
2024-04-21 14:02:14 +12:00
Sean Cassiere
052e940d47
docs: adding file-routes to the react-location migration guide (#1501) 2024-04-21 00:00:19 +12:00
Sean Cassiere
5d3c1f8b2c
docs: add an outlet on the posts.tsx page (#1498) 2024-04-20 17:53:51 +12:00
Sean Cassiere
bc616f1e62
docs: add migration guide for react-location (#1497)
* docs: add migration guide for react-location

* chore: show the react-location migration guide

* docs: remove the word "over"

* docs: make ssr a guide to feature
2024-04-20 17:10:23 +12:00
Tanner Linsley
c2f0f19724 release: v1.29.2 v1.29.2 2024-04-19 21:58:58 +00:00
Sean Cassiere
00fb855c4e
fix(react-router): stabilizing the encoding of path parameters (#1490)
* fix(react-router): encodeURI the parameters when building the pathname before commit

* chore(react-router): add a good comment so we dont nuke this in the future

* test(react-router): add tests to confirm functionality of the path params changes

* chore: ignore the `*.vitest-temp.json` files

* chore: delete `tsconfig.vitest-temp.json`
2024-04-20 09:56:09 +12:00
Tanner Linsley
b05c392ce5 release: v1.29.1 v1.29.1 2024-04-19 21:49:05 +00:00
Christopher Horobin
09a09f1986
fix: only allow leaf nodes as to suggestions (#1495) 2024-04-19 23:46:25 +02:00
Tanner Linsley
b51cab202e release: v1.29.0 v1.29.0 2024-04-19 20:30:34 +00:00
Manuel Schiller
e08b881358
feat: strong typing for onEnter, onStay and onLeave (#1479) 2024-04-19 22:28:28 +02:00
Tanner Linsley
ecdcc1d40a release: v1.28.9 v1.28.9 2024-04-19 09:06:05 +00:00
Sean Cassiere
6a494485de
fix(history): update the state.key when using memory history on navigation change via .back(), .forward(), and .go() (#1491)
* fix(history): update the `state.key` when using memory history on navigation change via `.back(), .forward(), and .go()`

* fix(history): use the exisitng `assignKey` function for seeding the key

* chore: remove test env
2024-04-19 21:03:35 +12:00
Tanner Linsley
b43f5464eb release: v1.28.8 v1.28.8 2024-04-18 22:36:03 +00:00
Tanner Linsley
7b173f5088 fix: always use React transitions around navigations, experimental view transitions API 2024-04-18 16:33:04 -06:00
Tanner Linsley
a975044891 fix(history): Sync with native window.history actions and remove tracking context 2024-04-18 16:32:57 -06:00
Hugo Costa
23fbecb62a
fix: broken example link (#1485) 2024-04-18 13:56:16 -06:00
Sean Cassiere
5dd90e01e6
docs(examples): update vinxi-basic-ssr-streaming with the changes from the TanStack.com repo (#1482) 2024-04-19 00:42:17 +12:00
Tanner Linsley
eb8aee2f8d release: v1.28.7 v1.28.7 2024-04-18 11:58:32 +00:00
Rui Saraiva
080a21fb6e
fix(react-router): move dev dependency (#1476)
* fix(react-router): move dev dependency

* chore: prettier

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-04-18 23:56:55 +12:00
Tanner Linsley
44c5fed510 release: v1.28.6 v1.28.6 2024-04-17 22:05:01 +00:00
Tanner Linsley
ca252e8e58 fix: beforeLoad error handling 2024-04-17 16:02:31 -06:00
Rui Saraiva
cf73b0a3ca
docs: remove Actions from README (#1477) 2024-04-17 19:23:10 +02:00
Tanner Linsley
f9a195383a release: v1.28.5 v1.28.5 2024-04-17 16:05:50 +00:00
Tanner Linsley
b891253606 fix: update matches during beforeLoad
Fixes #1478
2024-04-17 10:03:12 -06:00
Tanner Linsley
61c9dc7e06 release: v1.28.4 v1.28.4 2024-04-16 21:30:36 +00:00
Tanner Linsley
d59a6e8514 fix: beforeLoad redirects 2024-04-16 15:28:04 -06:00
Tanner Linsley
5be6dabf63 release: v1.28.3 v1.28.3 2024-04-16 19:51:46 +00:00
Tanner Linsley
713f92de7f fix: pending state bug 2024-04-16 13:49:04 -06:00
Tanner Linsley
540af75af8 release: v1.28.2 v1.28.2 2024-04-16 15:50:25 +00:00
Tanner Linsley
c9af1261c7 fix: lockfile 2024-04-16 09:47:28 -06:00
Tanner Linsley
01dcba61ab tests: fix 2024-04-16 09:46:11 -06:00
Tanner Linsley
1b56710fcd tests: fix 2024-04-15 23:45:09 -06:00
Tanner Linsley
b2753cdc1c fix: pnpm lock 2024-04-15 16:12:09 -06:00
Tanner Linsley
d09db60415 fix: Refactored many things!
- Fixed an issue where preloads would redirect and not resolve to the correct location
- Removed the need for `getRenderedMatches`. The matches intended to be rendered are now always stored at `store.matches`
- Removed the experimental ability for async meta and headers. Loaders should be used to get async data into these functions
- Pending matches now take `beforeLoad` into account and properly start pendingMs timers.
- `pendingMinMs` is also more accurate now by only triggering its timers when the pending state is encountered during rendering
- Removed a logical path where the `pending` component could be directly rendered within a route instead of handled by suspense
- Matches that don't require loaders or beforeLoaders will start as "success".
- Meta and headers are now called and saved for matches that are cached or already in the "success" state
- Fixed an issue where redirects and not-found errors would get improperly swallowed
- Fixed an edge-case where outdated navigations were not ignored and created race-conditions
- Refactored isServer into the router so we can do some better mocking in tests
- Added tests around scripts, meta, and redirects
- Fixed issues with non-vinxi server envs
- Injected html now waits for <body>

Closes #1104 #1146 #1168
2024-04-15 16:11:22 -06:00
Alessandro Cuppari
862fd78aa3
docs(examples): update the vinxi-basic-ssr-streaming example to reflect the TanStack website (#1264)
* fix: updated vinxi ssr example with streaming

* chore: updated vinxi packages

* chore: unused imports

* fix: use type instead of mode

* fix: updated vinxi example to latest tsr

* chore: cleanup

* chore: use createTanStackRouter

* style: run prettier

* chore: package json to reflect the other examples

* chore: rebased with latest main

* style: prettier

---------

Co-authored-by: @alessandrojcm <alessandro.cuppari@broadridge.com>
Co-authored-by: @SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-04-16 08:50:16 +12:00
Tanner Linsley
605d9f2213 release: v1.28.1 v1.28.1 2024-04-15 15:48:16 +00:00
Christopher Horobin
3ece907684
fix: improve performance of TS for routes and Link (#1453) 2024-04-15 17:46:03 +02:00
Sean Cassiere
f856306b33
build: upgrade core dependencies for the build pipeline (#1467)
* vite

* vitest

* build(router-devtools): remove vite from deps list
2024-04-14 23:10:19 +12:00
Tanner Linsley
8304d6fb8b release: v1.28.0 v1.28.0 2024-04-13 14:41:35 +00:00
Kenta Iwasaki
f7cbde4763
feat: implement transformReadableStreamWithRouter (#1466)
Add support for transforming ReadableStream instances to better support
runtimes such as Bun/Deno.
2024-04-13 08:39:39 -06:00
Albert Chang
3aa01dc32e
docs: fix incorrect naming of index.route.tsx to route.tsx on the code-splitting guide (#1465) 2024-04-13 22:45:18 +12:00
Tanner Linsley
3bf0b31481 release: v1.27.0 v1.27.0 2024-04-12 21:09:51 +00:00
Manuel Schiller
3d3f91859e
feat: allow to configure trailing slash behavior (#1464) 2024-04-12 23:07:39 +02:00