@tanstack/react-query
Advanced tools
Comparing version 5.51.11 to 5.51.14
"use client"; | ||
// src/useSuspenseInfiniteQuery.ts | ||
import { InfiniteQueryObserver } from "@tanstack/query-core"; | ||
import { InfiniteQueryObserver, skipToken } from "@tanstack/query-core"; | ||
import { useBaseQuery } from "./useBaseQuery.js"; | ||
import { defaultThrowOnError } from "./suspense.js"; | ||
function useSuspenseInfiniteQuery(options, queryClient) { | ||
if (process.env.NODE_ENV !== "production") { | ||
if (options.queryFn === skipToken) { | ||
console.error("skipToken is not allowed for useSuspenseInfiniteQuery"); | ||
} | ||
} | ||
return useBaseQuery( | ||
@@ -9,0 +14,0 @@ { |
@@ -0,3 +1,3 @@ | ||
import { DefaultError, QueryClient, QueryFunction, ThrowOnError } from '@tanstack/query-core'; | ||
import { UseSuspenseQueryOptions, UseSuspenseQueryResult } from './types.js'; | ||
import { DefaultError, QueryClient, QueryFunction, ThrowOnError } from '@tanstack/query-core'; | ||
@@ -4,0 +4,0 @@ type MAXIMUM_DEPTH = 20; |
"use client"; | ||
// src/useSuspenseQueries.ts | ||
import { | ||
skipToken | ||
} from "@tanstack/query-core"; | ||
import { useQueries } from "./useQueries.js"; | ||
@@ -10,9 +13,16 @@ import { defaultThrowOnError } from "./suspense.js"; | ||
...options, | ||
queries: options.queries.map((query) => ({ | ||
...query, | ||
suspense: true, | ||
throwOnError: defaultThrowOnError, | ||
enabled: true, | ||
placeholderData: void 0 | ||
})) | ||
queries: options.queries.map((query) => { | ||
if (process.env.NODE_ENV !== "production") { | ||
if (query.queryFn === skipToken) { | ||
console.error("skipToken is not allowed for useSuspenseQueries"); | ||
} | ||
} | ||
return { | ||
...query, | ||
suspense: true, | ||
throwOnError: defaultThrowOnError, | ||
enabled: true, | ||
placeholderData: void 0 | ||
}; | ||
}) | ||
}, | ||
@@ -19,0 +29,0 @@ queryClient |
"use client"; | ||
// src/useSuspenseInfiniteQuery.ts | ||
import { InfiniteQueryObserver } from "@tanstack/query-core"; | ||
import { InfiniteQueryObserver, skipToken } from "@tanstack/query-core"; | ||
import { useBaseQuery } from "./useBaseQuery.js"; | ||
import { defaultThrowOnError } from "./suspense.js"; | ||
function useSuspenseInfiniteQuery(options, queryClient) { | ||
if (process.env.NODE_ENV !== "production") { | ||
if (options.queryFn === skipToken) { | ||
console.error("skipToken is not allowed for useSuspenseInfiniteQuery"); | ||
} | ||
} | ||
return useBaseQuery( | ||
@@ -9,0 +14,0 @@ { |
@@ -0,3 +1,3 @@ | ||
import { DefaultError, QueryClient, QueryFunction, ThrowOnError } from '@tanstack/query-core'; | ||
import { UseSuspenseQueryOptions, UseSuspenseQueryResult } from './types.js'; | ||
import { DefaultError, QueryClient, QueryFunction, ThrowOnError } from '@tanstack/query-core'; | ||
@@ -4,0 +4,0 @@ type MAXIMUM_DEPTH = 20; |
"use client"; | ||
// src/useSuspenseQueries.ts | ||
import { | ||
skipToken | ||
} from "@tanstack/query-core"; | ||
import { useQueries } from "./useQueries.js"; | ||
@@ -10,9 +13,16 @@ import { defaultThrowOnError } from "./suspense.js"; | ||
...options, | ||
queries: options.queries.map((query) => ({ | ||
...query, | ||
suspense: true, | ||
throwOnError: defaultThrowOnError, | ||
enabled: true, | ||
placeholderData: void 0 | ||
})) | ||
queries: options.queries.map((query) => { | ||
if (process.env.NODE_ENV !== "production") { | ||
if (query.queryFn === skipToken) { | ||
console.error("skipToken is not allowed for useSuspenseQueries"); | ||
} | ||
} | ||
return { | ||
...query, | ||
suspense: true, | ||
throwOnError: defaultThrowOnError, | ||
enabled: true, | ||
placeholderData: void 0 | ||
}; | ||
}) | ||
}, | ||
@@ -19,0 +29,0 @@ queryClient |
@@ -10,3 +10,3 @@ // @ts-check | ||
'cspell/spellchecker': 'off', | ||
'ts/no-unnecessary-condition': 'off', | ||
'@typescript-eslint/no-unnecessary-condition': 'off', | ||
'import/no-duplicates': 'off', | ||
@@ -13,0 +13,0 @@ 'import/no-unresolved': 'off', |
{ | ||
"name": "@tanstack/react-query", | ||
"version": "5.51.11", | ||
"version": "5.51.14", | ||
"description": "Hooks for managing, caching and syncing asynchronous and remote data in React", | ||
@@ -44,3 +44,3 @@ "author": "tannerlinsley", | ||
"dependencies": { | ||
"@tanstack/query-core": "5.51.9" | ||
"@tanstack/query-core": "5.51.14" | ||
}, | ||
@@ -47,0 +47,0 @@ "devDependencies": { |
'use client' | ||
import { InfiniteQueryObserver } from '@tanstack/query-core' | ||
import { InfiniteQueryObserver, skipToken } from '@tanstack/query-core' | ||
import { useBaseQuery } from './useBaseQuery' | ||
@@ -35,2 +35,8 @@ import { defaultThrowOnError } from './suspense' | ||
): UseSuspenseInfiniteQueryResult<TData, TError> { | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (options.queryFn === skipToken) { | ||
console.error('skipToken is not allowed for useSuspenseInfiniteQuery') | ||
} | ||
} | ||
return useBaseQuery( | ||
@@ -37,0 +43,0 @@ { |
'use client' | ||
import { | ||
type DefaultError, | ||
type QueryClient, | ||
type QueryFunction, | ||
type ThrowOnError, | ||
skipToken, | ||
} from '@tanstack/query-core' | ||
import { useQueries } from './useQueries' | ||
import { defaultThrowOnError } from './suspense' | ||
import type { UseSuspenseQueryOptions, UseSuspenseQueryResult } from './types' | ||
import type { | ||
DefaultError, | ||
QueryClient, | ||
QueryFunction, | ||
ThrowOnError, | ||
} from '@tanstack/query-core' | ||
@@ -193,9 +194,17 @@ // Avoid TS depth-limit error in case of large array literal | ||
...options, | ||
queries: options.queries.map((query) => ({ | ||
...query, | ||
suspense: true, | ||
throwOnError: defaultThrowOnError, | ||
enabled: true, | ||
placeholderData: undefined, | ||
})), | ||
queries: options.queries.map((query) => { | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (query.queryFn === skipToken) { | ||
console.error('skipToken is not allowed for useSuspenseQueries') | ||
} | ||
} | ||
return { | ||
...query, | ||
suspense: true, | ||
throwOnError: defaultThrowOnError, | ||
enabled: true, | ||
placeholderData: undefined, | ||
} | ||
}), | ||
} as any, | ||
@@ -202,0 +211,0 @@ queryClient, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1102049
21969
16
+ Added@tanstack/query-core@5.51.14(transitive)
- Removed@tanstack/query-core@5.51.9(transitive)
Updated@tanstack/query-core@5.51.14