@tanstack/router-core 1.122.0 → 1.123.0

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/router-core",
3
- "version": "1.122.0",
3
+ "version": "1.123.0",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
package/src/router.ts CHANGED
@@ -588,6 +588,7 @@ export type UpdateFn<
588
588
  export type InvalidateFn<TRouter extends AnyRouter> = (opts?: {
589
589
  filter?: (d: MakeRouteMatchUnion<TRouter>) => boolean
590
590
  sync?: boolean
591
+ forcePending?: boolean
591
592
  }) => Promise<void>
592
593
 
593
594
  export type ParseLocationFn<TRouteTree extends AnyRoute> = (
@@ -2631,7 +2632,7 @@ export class RouterCore<
2631
2632
  return {
2632
2633
  ...d,
2633
2634
  invalid: true,
2634
- ...(d.status === 'error'
2635
+ ...(opts?.forcePending || d.status === 'error'
2635
2636
  ? ({ status: 'pending', error: undefined } as const)
2636
2637
  : {}),
2637
2638
  }