@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/router-core",
3
- "version": "1.162.5",
3
+ "version": "1.162.9",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -14,7 +14,6 @@ export type {
14
14
  ResolveCurrentPath,
15
15
  ResolveParentPath,
16
16
  ResolveRelativePath,
17
- LinkCurrentTargetElement,
18
17
  FindDescendantToPaths,
19
18
  InferDescendantToPaths,
20
19
  RelativeToPath,
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 (newOptions.notFoundRoute) {
1041
- console.warn(
1042
- '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.',
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
- `Redirect blocked: unsafe protocol in href "${redirect.options.href}". Allowed protocols: ${Array.from(this.protocolAllowlist).join(', ')}.`,
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