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

6,544 commits

Author SHA1 Message Date
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
Tanner Linsley
e767f7d3d6 release: v1.26.21 v1.26.21 2024-04-12 20:10:16 +00:00
Manuel Schiller
245796fe2f
fix: do not invoke generator again while it is still running (#1463)
fixes #1461
2024-04-12 22:08:34 +02:00
Sean Cassiere
136477c3dd
deprecate: navigate function as an argument in the beforeLoad and loader callbacks (#1459)
* feat(react-router): mark the `navigate` function in the `beforeLoad` and `loader` callbacks as deprecated

* docs: mark the navigate function passed into the `beforeLoad` and `loader` functions as deprecated
2024-04-12 18:03:15 +02:00
Tanner Linsley
e820f1a815 release: v1.26.20 v1.26.20 2024-04-11 17:36:59 +00:00
Tanner Linsley
430e8f1ff3 fix: announce aria-current page on active links 2024-04-11 11:34:44 -06:00
Tanner Linsley
10c717513d release: v1.26.19 v1.26.19 2024-04-10 15:58:29 +00:00
Tanner Linsley
0ce37dca92 fix: Don't preload (and thus mutate) current/pending matches
Fixes #1079
2024-04-10 09:55:42 -06:00
Raphael Cunha
de62f894f1
Update routing-concepts.md (#1452)
Add outlet import from @tankstack/react-router
2024-04-09 15:38:37 -06:00
Tanner Linsley
4d0bb5cf0d release: v1.26.18 v1.26.18 2024-04-09 18:08:51 +00:00
Tanner Linsley
7b0f656bae fix: Show relative child paths from TFrom in autocomplete 2024-04-09 12:06:05 -06:00
Tanner Linsley
f3f7beca6c tests: add some type sanity check experiments around resolving relative paths with TS 2024-04-09 11:42:21 -06:00
Tanner Linsley
20ccf63750 release: v1.26.17 v1.26.17 2024-04-09 17:39:17 +00:00
Tanner Linsley
b849a8ad87 fix: resolve paths as always-trailing-slash documents, just like the web 2024-04-09 11:36:11 -06:00
Sean Cassiere
7731bf1294
docs: fix broken links on top-level guides (#1448)
Investigation into the broken links found by @MarcoB-Ec lead me to discovered these were broken in the top-level docs as well.

Co-authored-by: Marco Brito <35307131+marcob-ec@users.noreply.github.com>
2024-04-09 10:50:46 +12:00
Tanner Linsley
c328ffffae release: v1.26.16 v1.26.16 2024-04-08 18:45:06 +00:00
Tanner Linsley
ef0957d0c4 tests: fix vite plugin tests 2024-04-08 12:42:28 -06:00
Tanner Linsley
4cb0bedad3 tests: fix linting 2024-04-08 12:25:40 -06:00
Tanner Linsley
f9228a25bc fix: relative resolvePath + tests 2024-04-08 11:23:50 -06:00
Tanner Linsley
1961549c39 release: v1.26.15 v1.26.15 2024-04-08 15:20:50 +00:00
Christopher Horobin
0ad8cd8332
fix: optional search params not being optional (#1440)
* fix: optional search params not being optional

* fix: remove expand

* tests: add type tests for optional search params

* fix: remove unnecessary intersections

* perf: only omit the root schema at the root
2024-04-08 17:18:25 +02:00
Tanner Linsley
c2d1c41e5b release: v1.26.14 v1.26.14 2024-04-08 09:14:08 +00:00
Sean Cassiere
e425fd7332
fix(router-vite-plugin): experimental.enableCodeSplitting eliminating FunctionExpression identifiers in hooks (#1445)
* fix(router-vite-plugin): add condition for identifying the `FunctionExpression` node type

* test(router-vite-plugin): add tests
2024-04-08 21:12:09 +12:00
Tanner Linsley
358b4ebb0b release: v1.26.13 v1.26.13 2024-04-08 07:29:17 +00:00
Dominik Dorfmeister
50c8acf3eb
fix: widen signature of event (#1443)
There are situations where persist doesn't exist, see: https://github.com/TanStack/router/pull/1365#discussion_r1552986706
2024-04-08 09:27:12 +02:00
Tanner Linsley
dac25a2fac release: v1.26.12 v1.26.12 2024-04-07 10:04:51 +00:00
Christopher Horobin
c5eaf1ce1f
fix: improve performance of search params merging to avoid instantation errors (#1436)
* perf: improve performance of search params merging

* perf: improve performance by not using omit

* fix: avoid deep insantiation errors

* fix: exclude root search schema

* fix: return TSearchSchema when at the root

* fix: include root schema
2024-04-07 12:02:50 +02:00
Christopher Horobin
04f63671f6
tests: add fileRoute and route type tests (#1428)
* tests: add fileRoute and route type tests

* chore: change tests to not have auth
2024-04-07 11:15:53 +02:00
dependabot[bot]
2bdc791b66
chore(deps-dev): bump vite from 5.0.12 to 5.0.13 (#1421)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.12 to 5.0.13.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.13/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.13/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-06 19:08:28 +02:00
Tanner Linsley
6d044793b0 release: v1.26.11 v1.26.11 2024-04-06 11:25:17 +00:00
Manuel Schiller
eb7c5874f8
fix: type optimizations (#1434)
- made `Replace` tail-recursive
- cache type in FileRoutePath
- remove unused type and outdated comments
2024-04-06 13:23:11 +02:00
Tanner Linsley
e85c9290c7 release: v1.26.10 v1.26.10 2024-04-06 04:39:17 +00:00
Sean Cassiere
e98302f970
fix(router-vite-plugin): trigger release (#1432)
RELEASE_ALL
2024-04-06 17:37:50 +13:00
Sean Cassiere
d233a7235a
chore(router-vite-plugin): move the tests outside of the source folder (#1431) 2024-04-06 17:31:47 +13:00
Dave Keen
43d08080c1
docs: fix a typo in the static-route-data guide (#1426) 2024-04-05 23:05:23 +13:00
Don Denton
4febb24b03
docs: Update bug_report template with latest Stackblitz links (#1424) 2024-04-04 18:46:09 +02:00
Tanner Linsley
ac91340ba2 release: v1.26.9 v1.26.9 2024-04-04 16:44:27 +00:00
Christopher Horobin
03a91d8988
tests: fix type tests for Link, make sure type tests fail in ci and add type tests for union to and difference in params (#1418)
* tests: fix type tests for Link, make sure type tests fail in ci and add type tests for union `to` and difference in params

* tests: refactor tests to only include scenario and group expects

There was a lot of repetition in the tests, I think its simpler to group
the tests by use cases and have multiple expects for the use case
2024-04-04 18:42:13 +02:00