@tanstack/react-query 5.0.0-alpha.71 → 5.0.0-alpha.84
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/build/codemods/remove-overloads/remove-overloads.js +1 -1
- package/build/codemods/src/v4/key-transformation.js +1 -1
- package/build/codemods/src/v4/replace-import-specifier.js +1 -1
- package/build/lib/HydrationBoundary.cjs.map +1 -1
- package/build/lib/HydrationBoundary.d.ts.map +1 -1
- package/build/lib/HydrationBoundary.js.map +1 -1
- package/build/lib/HydrationBoundary.legacy.cjs.map +1 -1
- package/build/lib/HydrationBoundary.legacy.js.map +1 -1
- package/build/lib/__tests__/utils.d.ts +1 -1
- package/build/lib/__tests__/utils.d.ts.map +1 -1
- package/build/lib/errorBoundaryUtils.cjs.map +1 -1
- package/build/lib/errorBoundaryUtils.d.ts.map +1 -1
- package/build/lib/errorBoundaryUtils.js.map +1 -1
- package/build/lib/errorBoundaryUtils.legacy.cjs.map +1 -1
- package/build/lib/errorBoundaryUtils.legacy.js.map +1 -1
- package/build/lib/suspense.cjs.map +1 -1
- package/build/lib/suspense.d.ts +1 -1
- package/build/lib/suspense.d.ts.map +1 -1
- package/build/lib/suspense.js.map +1 -1
- package/build/lib/suspense.legacy.cjs.map +1 -1
- package/build/lib/suspense.legacy.js.map +1 -1
- package/build/lib/types.d.ts +1 -1
- package/build/lib/types.d.ts.map +1 -1
- package/build/lib/useBaseQuery.cjs.map +1 -1
- package/build/lib/useBaseQuery.d.ts +1 -1
- package/build/lib/useBaseQuery.d.ts.map +1 -1
- package/build/lib/useBaseQuery.js.map +1 -1
- package/build/lib/useBaseQuery.legacy.cjs.map +1 -1
- package/build/lib/useBaseQuery.legacy.js.map +1 -1
- package/build/lib/useInfiniteQuery.cjs.map +1 -1
- package/build/lib/useInfiniteQuery.d.ts +1 -1
- package/build/lib/useInfiniteQuery.d.ts.map +1 -1
- package/build/lib/useInfiniteQuery.js.map +1 -1
- package/build/lib/useInfiniteQuery.legacy.cjs.map +1 -1
- package/build/lib/useInfiniteQuery.legacy.js.map +1 -1
- package/build/lib/useIsFetching.cjs.map +1 -1
- package/build/lib/useIsFetching.d.ts.map +1 -1
- package/build/lib/useIsFetching.js.map +1 -1
- package/build/lib/useIsFetching.legacy.cjs.map +1 -1
- package/build/lib/useIsFetching.legacy.js.map +1 -1
- package/build/lib/useMutation.cjs.map +1 -1
- package/build/lib/useMutation.d.ts +1 -1
- package/build/lib/useMutation.d.ts.map +1 -1
- package/build/lib/useMutation.js.map +1 -1
- package/build/lib/useMutation.legacy.cjs.map +1 -1
- package/build/lib/useMutation.legacy.js.map +1 -1
- package/build/lib/useMutationState.cjs.map +1 -1
- package/build/lib/useMutationState.d.ts +1 -1
- package/build/lib/useMutationState.d.ts.map +1 -1
- package/build/lib/useMutationState.js.map +1 -1
- package/build/lib/useMutationState.legacy.cjs.map +1 -1
- package/build/lib/useMutationState.legacy.js.map +1 -1
- package/build/lib/useQueries.cjs.map +1 -1
- package/build/lib/useQueries.d.ts +1 -1
- package/build/lib/useQueries.d.ts.map +1 -1
- package/build/lib/useQueries.js.map +1 -1
- package/build/lib/useQueries.legacy.cjs.map +1 -1
- package/build/lib/useQueries.legacy.js.map +1 -1
- package/build/lib/useQuery.cjs.map +1 -1
- package/build/lib/useQuery.d.ts +1 -1
- package/build/lib/useQuery.d.ts.map +1 -1
- package/build/lib/useQuery.js.map +1 -1
- package/build/lib/useQuery.legacy.cjs.map +1 -1
- package/build/lib/useQuery.legacy.js.map +1 -1
- package/package.json +2 -2
- package/src/HydrationBoundary.tsx +1 -1
- package/src/__tests__/HydrationBoundary.test.tsx +5 -5
- package/src/__tests__/QueryClientProvider.test.tsx +2 -2
- package/src/__tests__/QueryResetErrorBoundary.test.tsx +2 -2
- package/src/__tests__/ssr-hydration.test.tsx +2 -2
- package/src/__tests__/ssr.test.tsx +2 -2
- package/src/__tests__/suspense.test.tsx +2 -2
- package/src/__tests__/useInfiniteQuery.test.tsx +36 -74
- package/src/__tests__/useInfiniteQuery.type.test.tsx +2 -2
- package/src/__tests__/useIsFetching.test.tsx +1 -1
- package/src/__tests__/useMutation.test.tsx +2 -2
- package/src/__tests__/useQueries.test.tsx +8 -8
- package/src/__tests__/useQuery.test.tsx +138 -37
- package/src/__tests__/useQuery.types.test.tsx +1 -1
- package/src/__tests__/utils.tsx +2 -2
- package/src/errorBoundaryUtils.ts +2 -2
- package/src/suspense.ts +1 -1
- package/src/types.ts +5 -5
- package/src/useBaseQuery.ts +3 -3
- package/src/useInfiniteQuery.ts +5 -5
- package/src/useIsFetching.ts +1 -1
- package/src/useMutation.ts +3 -3
- package/src/useMutationState.ts +5 -5
- package/src/useQueries.ts +11 -11
- package/src/useQuery.ts +2 -2
package/src/useQueries.ts
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
QueryKey,
|
|
6
|
-
QueryFunction,
|
|
7
|
-
QueriesPlaceholderDataFunction,
|
|
8
|
-
QueryClient,
|
|
9
|
-
DefaultError,
|
|
10
|
-
QueriesObserverOptions,
|
|
11
|
-
} from '@tanstack/query-core'
|
|
12
|
-
import { notifyManager, QueriesObserver } from '@tanstack/query-core'
|
|
4
|
+
import { QueriesObserver, notifyManager } from '@tanstack/query-core'
|
|
13
5
|
import { useQueryClient } from './QueryClientProvider'
|
|
14
|
-
import type { UseQueryOptions, UseQueryResult } from './types'
|
|
15
6
|
import { useIsRestoring } from './isRestoring'
|
|
16
7
|
import { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'
|
|
17
8
|
import {
|
|
@@ -21,10 +12,19 @@ import {
|
|
|
21
12
|
} from './errorBoundaryUtils'
|
|
22
13
|
import {
|
|
23
14
|
ensureStaleTime,
|
|
24
|
-
shouldSuspend,
|
|
25
15
|
fetchOptimistic,
|
|
16
|
+
shouldSuspend,
|
|
26
17
|
willFetch,
|
|
27
18
|
} from './suspense'
|
|
19
|
+
import type { UseQueryOptions, UseQueryResult } from './types'
|
|
20
|
+
import type {
|
|
21
|
+
DefaultError,
|
|
22
|
+
QueriesObserverOptions,
|
|
23
|
+
QueriesPlaceholderDataFunction,
|
|
24
|
+
QueryClient,
|
|
25
|
+
QueryFunction,
|
|
26
|
+
QueryKey,
|
|
27
|
+
} from '@tanstack/query-core'
|
|
28
28
|
|
|
29
29
|
// This defines the `UseQueryOptions` that are accepted in `QueriesOptions` & `GetOptions`.
|
|
30
30
|
// `placeholderData` function does not have a parameter
|
package/src/useQuery.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import type { QueryClient, QueryKey, DefaultError } from '@tanstack/query-core'
|
|
3
2
|
import { QueryObserver } from '@tanstack/query-core'
|
|
3
|
+
import { useBaseQuery } from './useBaseQuery'
|
|
4
|
+
import type { DefaultError, QueryClient, QueryKey } from '@tanstack/query-core'
|
|
4
5
|
import type {
|
|
5
6
|
DefinedUseQueryResult,
|
|
6
7
|
UseQueryOptions,
|
|
7
8
|
UseQueryResult,
|
|
8
9
|
} from './types'
|
|
9
|
-
import { useBaseQuery } from './useBaseQuery'
|
|
10
10
|
import type {
|
|
11
11
|
DefinedInitialDataOptions,
|
|
12
12
|
UndefinedInitialDataOptions,
|