@tanstack/router-core 1.129.0 → 1.129.3

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.129.0",
3
+ "version": "1.129.3",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
package/src/router.ts CHANGED
@@ -625,9 +625,12 @@ export type StartTransitionFn = (fn: () => void) => void
625
625
  export interface MatchRoutesFn {
626
626
  (
627
627
  pathname: string,
628
- locationSearch: AnySchema,
628
+ locationSearch?: AnySchema,
629
629
  opts?: MatchRoutesOpts,
630
- ): Array<AnyRouteMatch>
630
+ ): Array<MakeRouteMatchUnion>
631
+ /**
632
+ * @deprecated use the following signature instead
633
+ */
631
634
  (next: ParsedLocation, opts?: MatchRoutesOpts): Array<AnyRouteMatch>
632
635
  (
633
636
  pathnameOrNext: string | ParsedLocation,
@@ -1019,15 +1022,6 @@ export class RouterCore<
1019
1022
  return this.routesById as Record<string, AnyRoute>
1020
1023
  }
1021
1024
 
1022
- /**
1023
- @deprecated use the following signature instead
1024
- ```ts
1025
- matchRoutes (
1026
- next: ParsedLocation,
1027
- opts?: { preload?: boolean; throwOnError?: boolean },
1028
- ): Array<AnyRouteMatch>;
1029
- ```
1030
- */
1031
1025
  matchRoutes: MatchRoutesFn = (
1032
1026
  pathnameOrNext: string | ParsedLocation,
1033
1027
  locationSearchOrOpts?: AnySchema | MatchRoutesOpts,
@@ -1376,7 +1370,7 @@ export class RouterCore<
1376
1370
  }
1377
1371
 
1378
1372
  private comparePaths(path1: string, path2: string) {
1379
- return path1.replace(/(.+)\/$/, '$1') === path2.replace(/(.+)\/$/, '$1')
1373
+ return path1.replace(/\/$/, '') === path2.replace(/\/$/, '')
1380
1374
  }
1381
1375
 
1382
1376
  buildLocation: BuildLocationFn = (opts) => {