@tanstack/router-core 1.168.11 → 1.168.12

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.
@@ -17,7 +17,7 @@ function notFound(options = {}) {
17
17
  }
18
18
  /** Determine if a value is a TanStack Router not-found error. */
19
19
  function isNotFound(obj) {
20
- return !!obj?.isNotFound;
20
+ return obj?.isNotFound === true;
21
21
  }
22
22
  //#endregion
23
23
  exports.isNotFound = isNotFound;
@@ -1 +1 @@
1
- {"version":3,"file":"not-found.cjs","names":[],"sources":["../../src/not-found.ts"],"sourcesContent":["import type { RouteIds } from './routeInfo'\nimport type { RegisteredRouter } from './router'\n\nexport type NotFoundError = {\n /**\n @deprecated\n Use `routeId: rootRouteId` instead\n */\n global?: boolean\n /**\n @private\n Do not use this. It's used internally to indicate a path matching error\n */\n _global?: boolean\n data?: any\n throw?: boolean\n routeId?: RouteIds<RegisteredRouter['routeTree']>\n headers?: HeadersInit\n}\n\n/**\n * Create a not-found error object recognized by TanStack Router.\n *\n * Throw this from loaders/actions to trigger the nearest `notFoundComponent`.\n * Use `routeId` to target a specific route's not-found boundary. If `throw`\n * is true, the error is thrown instead of returned.\n *\n * @param options Optional settings including `routeId`, `headers`, and `throw`.\n * @returns A not-found error object that can be thrown or returned.\n * @link https://tanstack.com/router/latest/docs/router/framework/react/api/router/notFoundFunction\n */\nexport function notFound(options: NotFoundError = {}) {\n ;(options as any).isNotFound = true\n if (options.throw) throw options\n return options\n}\n\n/** Determine if a value is a TanStack Router not-found error. */\nexport function isNotFound(obj: any): obj is NotFoundError {\n return !!obj?.isNotFound\n}\n"],"mappings":";;;;;;;;;;;;AA+BA,SAAgB,SAAS,UAAyB,EAAE,EAAE;AAClD,SAAgB,aAAa;AAC/B,KAAI,QAAQ,MAAO,OAAM;AACzB,QAAO;;;AAIT,SAAgB,WAAW,KAAgC;AACzD,QAAO,CAAC,CAAC,KAAK"}
1
+ {"version":3,"file":"not-found.cjs","names":[],"sources":["../../src/not-found.ts"],"sourcesContent":["import type { RouteIds } from './routeInfo'\nimport type { RegisteredRouter } from './router'\n\nexport type NotFoundError = {\n /**\n @deprecated\n Use `routeId: rootRouteId` instead\n */\n global?: boolean\n /**\n @private\n Do not use this. It's used internally to indicate a path matching error\n */\n _global?: boolean\n data?: any\n throw?: boolean\n routeId?: RouteIds<RegisteredRouter['routeTree']>\n headers?: HeadersInit\n}\n\n/**\n * Create a not-found error object recognized by TanStack Router.\n *\n * Throw this from loaders/actions to trigger the nearest `notFoundComponent`.\n * Use `routeId` to target a specific route's not-found boundary. If `throw`\n * is true, the error is thrown instead of returned.\n *\n * @param options Optional settings including `routeId`, `headers`, and `throw`.\n * @returns A not-found error object that can be thrown or returned.\n * @link https://tanstack.com/router/latest/docs/router/framework/react/api/router/notFoundFunction\n */\nexport function notFound(options: NotFoundError = {}) {\n ;(options as any).isNotFound = true\n if (options.throw) throw options\n return options\n}\n\n/** Determine if a value is a TanStack Router not-found error. */\nexport function isNotFound(obj: any): obj is NotFoundError {\n return obj?.isNotFound === true\n}\n"],"mappings":";;;;;;;;;;;;AA+BA,SAAgB,SAAS,UAAyB,EAAE,EAAE;AAClD,SAAgB,aAAa;AAC/B,KAAI,QAAQ,MAAO,OAAM;AACzB,QAAO;;;AAIT,SAAgB,WAAW,KAAgC;AACzD,QAAO,KAAK,eAAe"}
@@ -17,7 +17,7 @@ function notFound(options = {}) {
17
17
  }
18
18
  /** Determine if a value is a TanStack Router not-found error. */
19
19
  function isNotFound(obj) {
20
- return !!obj?.isNotFound;
20
+ return obj?.isNotFound === true;
21
21
  }
22
22
  //#endregion
23
23
  export { isNotFound, notFound };
@@ -1 +1 @@
1
- {"version":3,"file":"not-found.js","names":[],"sources":["../../src/not-found.ts"],"sourcesContent":["import type { RouteIds } from './routeInfo'\nimport type { RegisteredRouter } from './router'\n\nexport type NotFoundError = {\n /**\n @deprecated\n Use `routeId: rootRouteId` instead\n */\n global?: boolean\n /**\n @private\n Do not use this. It's used internally to indicate a path matching error\n */\n _global?: boolean\n data?: any\n throw?: boolean\n routeId?: RouteIds<RegisteredRouter['routeTree']>\n headers?: HeadersInit\n}\n\n/**\n * Create a not-found error object recognized by TanStack Router.\n *\n * Throw this from loaders/actions to trigger the nearest `notFoundComponent`.\n * Use `routeId` to target a specific route's not-found boundary. If `throw`\n * is true, the error is thrown instead of returned.\n *\n * @param options Optional settings including `routeId`, `headers`, and `throw`.\n * @returns A not-found error object that can be thrown or returned.\n * @link https://tanstack.com/router/latest/docs/router/framework/react/api/router/notFoundFunction\n */\nexport function notFound(options: NotFoundError = {}) {\n ;(options as any).isNotFound = true\n if (options.throw) throw options\n return options\n}\n\n/** Determine if a value is a TanStack Router not-found error. */\nexport function isNotFound(obj: any): obj is NotFoundError {\n return !!obj?.isNotFound\n}\n"],"mappings":";;;;;;;;;;;;AA+BA,SAAgB,SAAS,UAAyB,EAAE,EAAE;AAClD,SAAgB,aAAa;AAC/B,KAAI,QAAQ,MAAO,OAAM;AACzB,QAAO;;;AAIT,SAAgB,WAAW,KAAgC;AACzD,QAAO,CAAC,CAAC,KAAK"}
1
+ {"version":3,"file":"not-found.js","names":[],"sources":["../../src/not-found.ts"],"sourcesContent":["import type { RouteIds } from './routeInfo'\nimport type { RegisteredRouter } from './router'\n\nexport type NotFoundError = {\n /**\n @deprecated\n Use `routeId: rootRouteId` instead\n */\n global?: boolean\n /**\n @private\n Do not use this. It's used internally to indicate a path matching error\n */\n _global?: boolean\n data?: any\n throw?: boolean\n routeId?: RouteIds<RegisteredRouter['routeTree']>\n headers?: HeadersInit\n}\n\n/**\n * Create a not-found error object recognized by TanStack Router.\n *\n * Throw this from loaders/actions to trigger the nearest `notFoundComponent`.\n * Use `routeId` to target a specific route's not-found boundary. If `throw`\n * is true, the error is thrown instead of returned.\n *\n * @param options Optional settings including `routeId`, `headers`, and `throw`.\n * @returns A not-found error object that can be thrown or returned.\n * @link https://tanstack.com/router/latest/docs/router/framework/react/api/router/notFoundFunction\n */\nexport function notFound(options: NotFoundError = {}) {\n ;(options as any).isNotFound = true\n if (options.throw) throw options\n return options\n}\n\n/** Determine if a value is a TanStack Router not-found error. */\nexport function isNotFound(obj: any): obj is NotFoundError {\n return obj?.isNotFound === true\n}\n"],"mappings":";;;;;;;;;;;;AA+BA,SAAgB,SAAS,UAAyB,EAAE,EAAE;AAClD,SAAgB,aAAa;AAC/B,KAAI,QAAQ,MAAO,OAAM;AACzB,QAAO;;;AAIT,SAAgB,WAAW,KAAgC;AACzD,QAAO,KAAK,eAAe"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/router-core",
3
- "version": "1.168.11",
3
+ "version": "1.168.12",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
package/src/not-found.ts CHANGED
@@ -37,5 +37,5 @@ export function notFound(options: NotFoundError = {}) {
37
37
 
38
38
  /** Determine if a value is a TanStack Router not-found error. */
39
39
  export function isNotFound(obj: any): obj is NotFoundError {
40
- return !!obj?.isNotFound
40
+ return obj?.isNotFound === true
41
41
  }