@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/dist/cjs/router.cjs +1 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +4 -10
- package/dist/esm/router.d.ts +4 -10
- package/dist/esm/router.js +1 -1
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +6 -12
package/package.json
CHANGED
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
|
|
628
|
+
locationSearch?: AnySchema,
|
|
629
629
|
opts?: MatchRoutesOpts,
|
|
630
|
-
): Array<
|
|
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(
|
|
1373
|
+
return path1.replace(/\/$/, '') === path2.replace(/\/$/, '')
|
|
1380
1374
|
}
|
|
1381
1375
|
|
|
1382
1376
|
buildLocation: BuildLocationFn = (opts) => {
|