@tanstack/react-router 1.77.3 → 1.77.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-router",
3
- "version": "1.77.3",
3
+ "version": "1.77.5",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -84,7 +84,7 @@ export function Transitioner() {
84
84
  if (previousIsLoading && !routerState.isLoading) {
85
85
  const toLocation = router.state.location
86
86
  const fromLocation = router.state.resolvedLocation
87
- const pathChanged = fromLocation.href !== toLocation.href
87
+ const pathChanged = fromLocation.pathname !== toLocation.pathname
88
88
 
89
89
  router.emit({
90
90
  type: 'onLoad', // When the new URL has committed, when the new matches have been loaded into state.matches
@@ -100,7 +100,7 @@ export function Transitioner() {
100
100
  if (previousIsPagePending && !isPagePending) {
101
101
  const toLocation = router.state.location
102
102
  const fromLocation = router.state.resolvedLocation
103
- const pathChanged = fromLocation.href !== toLocation.href
103
+ const pathChanged = fromLocation.pathname !== toLocation.pathname
104
104
 
105
105
  router.emit({
106
106
  type: 'onBeforeRouteMount',
@@ -116,7 +116,7 @@ export function Transitioner() {
116
116
  if (previousIsAnyPending && !isAnyPending) {
117
117
  const toLocation = router.state.location
118
118
  const fromLocation = router.state.resolvedLocation
119
- const pathChanged = fromLocation.href !== toLocation.href
119
+ const pathChanged = fromLocation.pathname !== toLocation.pathname
120
120
 
121
121
  router.emit({
122
122
  type: 'onResolved',
package/src/router.ts CHANGED
@@ -2560,7 +2560,7 @@ export class Router<
2560
2560
  return matches
2561
2561
  }
2562
2562
 
2563
- invalidate = <TRouter extends AnyRouter = RegisteredRouter>(opts?: {
2563
+ invalidate = <TRouter extends AnyRouter = typeof this>(opts?: {
2564
2564
  filter?: (d: MakeRouteMatchUnion<TRouter>) => boolean
2565
2565
  }) => {
2566
2566
  const invalidate = (d: MakeRouteMatch<TRouteTree>) => {
@@ -2596,7 +2596,7 @@ export class Router<
2596
2596
  return redirect
2597
2597
  }
2598
2598
 
2599
- clearCache = <TRouter extends AnyRouter = RegisteredRouter>(opts?: {
2599
+ clearCache = <TRouter extends AnyRouter = typeof this>(opts?: {
2600
2600
  filter?: (d: MakeRouteMatchUnion<TRouter>) => boolean
2601
2601
  }) => {
2602
2602
  const filter = opts?.filter