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

5,954 commits

Author SHA1 Message Date
Sean Cassiere
afb716a44f
revert(react-router,solid-router): revert #3700 (#3702)
#3700 introduced an unintended side-effect with the scroll restoration
process in TanStack Start.

This revets the code changes in `@tanstack/react-router` and
`@tanstack/solid-router` and short-circuits the tests relevant test
scripts introduced in the offending PR.
2025-03-09 20:39:43 +13:00
Tanner Linsley
9ea1c83aad release: v1.114.2 v1.114.2 2025-03-09 03:03:46 +00:00
Sean Cassiere
ad623cc992
fix(react-router,solid-router): scroll to element does not work for hash history (#3700)
The `restoreScroll` function was directly interfacing with
`window.location.hash` to get the 'hash' value, which conflicts with how
hash routing functions. As such, when the hash value was retrieved, it
came back as `#/page#foo` instead of just `#foo` like it would with
regular browser history.

Switching it to use the `history` driver attached to the `router`
instance, correctly returns the `hash` value irrespective of the type of
routing being used.

Fixes #3479
2025-03-09 16:00:21 +13:00
Tanner Linsley
672116725b release: v1.114.1 v1.114.1 2025-03-08 20:05:26 +00:00
Birk Skyum
369618ba04 fix: RELEASE_ALL 2025-03-08 21:03:49 +01:00
Birk Skyum
a7d3efe957
fix(router-devtools-core) lazy load devtools panel to fix ssr (#3696)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-08 20:34:19 +01:00
Tanner Linsley
a3cf3961b9 release: v1.114.0 v1.114.0 2025-03-08 12:27:37 +00:00
Birk Skyum
e313a1c5a7
feat(router-devtools-core): consolidate devtools logic in core and distributed with framework-specific bindings (#3636)
The original `@tanstack/router-devtools` package still work - it's not
touch by this PR in any way, apart from a migration note saying:

>[@tanstack/router-devtools] Warning: This package has moved to
@tanstack/react-router-devtools. Please switch to the new package, as
this package will be dropped soon.

This introduce three new packages
- @tanstack/router-devtools-core : This is a SolidJS port of the UI

And two adapters on top, that mount this solid app and forward
router/routerState into it.
- @tanstack/solid-router-devtools
- @tanstack/router-router-devtools

For use of devtools in production, a `TanStackRouterDevtoolsInProd` can
be imported instead of the standard `TanStackRouterDevtools` that'll be
tree shaken away in prod.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2025-03-08 13:20:26 +01:00
Birk Skyum
d723d59607 Revert "labeler"
This reverts commit 4225d963f6.
2025-03-08 00:26:36 +01:00
Birk Skyum
4225d963f6 labeler 2025-03-08 00:24:08 +01:00
Sean Cassiere
c646ddcd08
chore(root): labeler script to only consider packages with a package.json file (#3690) 2025-03-08 10:51:24 +13:00
Tanner Linsley
13ba4929a1 release: v1.113.0 v1.113.0 2025-03-07 21:13:29 +00:00
Honza Hrubý
aa24401b04
feat(router-generator): disable formatting of routeTree (#3678)
Based on the discussion in https://github.com/TanStack/router/discussions/3664, I'm adding an
option to disable the formatting of the generated routeTree. The file is not meant for human consumption and disabling the formatter can significantly speed up the route generation process.

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-03-08 10:06:39 +13:00
Kilian Finger
cd7a43c9e2
chore(examples): add Material UI example (#3677)
Fixes #2867 

As previously discussed @schiller-manuel.
2025-03-07 13:34:19 +01:00
Tanner Linsley
42d50a58be release: v1.112.19 v1.112.19 2025-03-07 11:12:50 +00:00
Sean Cassiere
81c657623d
refactor(router-generator): add internal __enableAPIRoutesGeneration flag (#3685)
This internal flag makes it so that the `router-generator` only considers API Routes when `__enableAPIRoutesGeneration` is set to `true`.
2025-03-08 00:10:07 +13:00
Manuel Schiller
5bbf49deba
chore: replace <React.Fragment> by <> (#3672)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-07 00:30:35 +01:00
Tanner Linsley
06237feeb1 release: v1.112.18 v1.112.18 2025-03-06 23:02:15 +00:00
Manuel Schiller
c9a32784ce
fix: use fullPath as from in Route/RouteApi useNavigate (#3684)
fixes #3679
2025-03-06 23:58:51 +01:00
Miciah Henderson
623e420de0
docs: streamline language in the quick-start guide for Solid (#3681) 2025-03-07 09:16:12 +13:00
Manuel Schiller
30e869042d
chore: add script to bump typescript version and bump it to 5.8 (#3618)
Co-authored-by: chorobin <chrishorobin@hotmail.com>
2025-03-06 21:06:32 +01:00
Andrew Peacock
d20088e0fb
chore(examples): add authenticated-routes example using firebase (#3669)
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-03-06 20:38:47 +13:00
Sean Cassiere
ffbcd7278c
chore(examples): fix up the start-trellaux example (#3675) 2025-03-06 16:08:43 +13:00
Tanner Linsley
70351e525e release: v1.112.17 v1.112.17 2025-03-06 00:37:45 +00:00
Manuel Schiller
f4d09c19c4
fix: rebuild link if matches change (#3674)
fixes #2988
2025-03-06 01:36:16 +01:00
Tanner Linsley
76b0c2e9f3 release: v1.112.16 v1.112.16 2025-03-05 23:52:06 +00:00
Manuel Schiller
bf0fc0044d
fix: use leaf match as from if none supplied for <Link> (#3673) 2025-03-06 00:50:51 +01:00
Tanner Linsley
cbc27fa900 release: v1.112.15 v1.112.15 2025-03-05 21:16:53 +00:00
Manuel Schiller
a638d77ac8
fix: use default from in useNavigate (#3671)
fixes #3668
2025-03-05 22:15:21 +01:00
Ryan Callahan
7b47db77f7
docs(start): Add note for verbatimModuleSyntax setting in tsconfig docs (#3670)
verbatimModuleSyntax can cause server bundles to quietly leak into
client bundles via exported types. It is an easy mistake to make that
can be _very_ difficult to debug.

Inspired by #3401

Co-authored-by: ryan-callahan-edo <ryan.callahan@edoinc.com>
2025-03-05 22:11:05 +01:00
Tanner Linsley
b04a9fbcf2 release: v1.112.14 v1.112.14 2025-03-05 17:12:44 +00:00
Paul Grau
051e2d5efa
fix: transform should return null to preserve source maps. Fixes #3661 (#3663)
Fixes #3661

I tested this in my own codebase. With this change, the warnings are
gone.

Rollup plugin docs specifically say that you should return `null` if you
didn't transform anything. Vite follows rollup's API.
2025-03-05 18:07:40 +01:00
Birk Skyum
c699da2bc3
Fix CI - Revert "refactor(react-router,solid-router): move redirect to router-core" (#3667)
Reverts TanStack/router#3662
2025-03-05 16:33:26 +01:00
Birk Skyum
3a2d51e11d
refactor(router-core): move redirect to core (#3662) 2025-03-05 11:37:52 +01:00
Tanner Linsley
9b460c4ed0 release: v1.112.13 v1.112.13 2025-03-04 23:00:57 +00:00
Manuel Schiller
c18ae80136
fix(react-router): ensure resetScroll works with strict mode on (#3659)
fixes #3408
2025-03-04 23:57:38 +01:00
Tanner Linsley
e6607f367e release: v1.112.12 v1.112.12 2025-03-04 20:50:19 +00:00
Christopher Horobin
7ef5d87096
refactor(router-core): move AnyRoute and AnyRouter to router-core (#3640) 2025-03-04 21:48:58 +01:00
Manuel Schiller
bb1acf00ab
chore: rename method (#3658) 2025-03-04 20:13:39 +01:00
Tanner Linsley
05c312d6c6 release: v1.112.11 v1.112.11 2025-03-04 09:57:45 +00:00
Manuel Schiller
dff7e7a8e6 fix: explicitly capture previous loadPromise 2025-03-04 10:50:21 +01:00
Tanner Linsley
eff01eb950 release: v1.112.10 v1.112.10 2025-03-04 09:46:17 +00:00
Brenley Dueck
8abb6242a2
fix(solid-router): check if promise is resolved before resolving in useRouterState (#3651)
Fixes #3639
2025-03-04 10:39:27 +01:00
Tanner Linsley
d8211c9eb2 release: v1.112.9 v1.112.9 2025-03-04 09:13:01 +00:00
Manuel Schiller
7eaa4a2888
fix: allow relative navigate without from (#3654)
if `from` is not specified, it defaults to the leaf match
2025-03-04 10:11:48 +01:00
Alex D'Elia
6e364a5654
docs(router): add viewTransition docs in NavigateOptionsType (#3652)
This PR adds viewTransition documentation to the NavigateOptionsType,
giving users more info on how they can use the viewTransition API in
Links and Navigates.

Will follow up in the next day or so with an example as well.
2025-03-04 08:50:50 +01:00
Tanner Linsley
2cdf128779 release: v1.112.8 v1.112.8 2025-03-04 05:49:13 +00:00
Hoseong Lee
418fd95827
fix(history): parseLocation in createHashHistory to handle search params correctly (#3644)
`parseLocation` in `createHashHistory` failed to parse search params when they appeared before the hash. This PR updates the parsing logic so that search params are correctly extracted and processed, regardless of their position.
fixes #3595
2025-03-04 18:42:14 +13:00
Tanner Linsley
35c7c495f3 release: v1.112.7 v1.112.7 2025-03-04 00:26:17 +00:00
Vladislav Pilgasov
1849f04e0b
fix(react-router,solid-router): scrollRestoration crashes if sessionStorage is not available (#3638)
Fixes #3634 

Simply checking the type of `window.sessionStorage` is apparently enough to trigger `SecurityError`. To address it we use try/catch and set the variable to true only if it's indeed available.
2025-03-04 13:19:25 +13:00