@tanstack/router-core 1.162.5 → 1.162.9
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/index.d.cts +1 -1
- package/dist/cjs/link.cjs.map +1 -1
- package/dist/cjs/link.d.cts +0 -3
- package/dist/cjs/router.cjs +7 -5
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/link.d.ts +0 -3
- package/dist/esm/link.js.map +1 -1
- package/dist/esm/router.js +7 -5
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +0 -1
- package/src/link.ts +0 -4
- package/src/router.ts +9 -5
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/link.ts
CHANGED
|
@@ -701,8 +701,4 @@ export type LinkOptions<
|
|
|
701
701
|
TMaskTo extends string = '.',
|
|
702
702
|
> = NavigateOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo> & LinkOptionsProps
|
|
703
703
|
|
|
704
|
-
export type LinkCurrentTargetElement = {
|
|
705
|
-
preloadTimeout?: null | ReturnType<typeof setTimeout>
|
|
706
|
-
}
|
|
707
|
-
|
|
708
704
|
export const preloadWarning = 'Error preloading route! ☝️'
|
package/src/router.ts
CHANGED
|
@@ -1037,10 +1037,12 @@ export class RouterCore<
|
|
|
1037
1037
|
TRouterHistory,
|
|
1038
1038
|
TDehydrated
|
|
1039
1039
|
> = (newOptions) => {
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1040
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1041
|
+
if (newOptions.notFoundRoute) {
|
|
1042
|
+
console.warn(
|
|
1043
|
+
'The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.',
|
|
1044
|
+
)
|
|
1045
|
+
}
|
|
1044
1046
|
}
|
|
1045
1047
|
|
|
1046
1048
|
const prevOptions = this.options
|
|
@@ -2702,7 +2704,9 @@ export class RouterCore<
|
|
|
2702
2704
|
isDangerousProtocol(redirect.options.href, this.protocolAllowlist)
|
|
2703
2705
|
) {
|
|
2704
2706
|
throw new Error(
|
|
2705
|
-
|
|
2707
|
+
process.env.NODE_ENV !== 'production'
|
|
2708
|
+
? `Redirect blocked: unsafe protocol in href "${redirect.options.href}". Allowed protocols: ${Array.from(this.protocolAllowlist).join(', ')}.`
|
|
2709
|
+
: 'Redirect blocked: unsafe protocol',
|
|
2706
2710
|
)
|
|
2707
2711
|
}
|
|
2708
2712
|
|