@tanstack/query-core 5.0.0-alpha.34 → 5.0.0-alpha.38
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/lib/focusManager.d.ts +1 -1
- package/build/lib/focusManager.d.ts.map +1 -0
- package/build/lib/hydration.d.ts.map +1 -0
- package/build/lib/index.d.ts.map +1 -0
- package/build/lib/infiniteQueryBehavior.d.ts.map +1 -0
- package/build/lib/infiniteQueryObserver.d.ts +1 -1
- package/build/lib/infiniteQueryObserver.d.ts.map +1 -0
- package/build/lib/mutation.d.ts +1 -1
- package/build/lib/mutation.d.ts.map +1 -0
- package/build/lib/mutationCache.d.ts +2 -2
- package/build/lib/mutationCache.d.ts.map +1 -0
- package/build/lib/mutationObserver.d.ts +1 -1
- package/build/lib/mutationObserver.d.ts.map +1 -0
- package/build/lib/notifyManager.d.ts +3 -3
- package/build/lib/notifyManager.d.ts.map +1 -0
- package/build/lib/onlineManager.d.ts +1 -1
- package/build/lib/onlineManager.d.ts.map +1 -0
- package/build/lib/queriesObserver.d.ts +1 -1
- package/build/lib/queriesObserver.d.ts.map +1 -0
- package/build/lib/query.d.ts +2 -2
- package/build/lib/query.d.ts.map +1 -0
- package/build/lib/queryCache.d.ts +2 -2
- package/build/lib/queryCache.d.ts.map +1 -0
- package/build/lib/queryClient.d.ts +1 -2
- package/build/lib/queryClient.d.ts.map +1 -0
- package/build/lib/queryClient.esm.js +1 -0
- package/build/lib/queryClient.esm.js.map +1 -1
- package/build/lib/queryClient.js +1 -0
- package/build/lib/queryClient.js.map +1 -1
- package/build/lib/queryClient.mjs +2 -0
- package/build/lib/queryClient.mjs.map +1 -1
- package/build/lib/queryObserver.d.ts +2 -3
- package/build/lib/queryObserver.d.ts.map +1 -0
- package/build/lib/queryObserver.esm.js.map +1 -1
- package/build/lib/queryObserver.js.map +1 -1
- package/build/lib/queryObserver.mjs.map +1 -1
- package/build/lib/removable.d.ts.map +1 -0
- package/build/lib/retryer.d.ts +4 -4
- package/build/lib/retryer.d.ts.map +1 -0
- package/build/lib/subscribable.d.ts +1 -1
- package/build/lib/subscribable.d.ts.map +1 -0
- package/build/lib/tests/focusManager.test.d.ts.map +1 -0
- package/build/lib/tests/hydration.test.d.ts.map +1 -0
- package/build/lib/tests/infiniteQueryBehavior.test.d.ts.map +1 -0
- package/build/lib/tests/infiniteQueryObserver.test.d.ts.map +1 -0
- package/build/lib/tests/mutationCache.test.d.ts.map +1 -0
- package/build/lib/tests/mutationObserver.test.d.ts.map +1 -0
- package/build/lib/tests/mutations.test.d.ts.map +1 -0
- package/build/lib/tests/notifyManager.test.d.ts.map +1 -0
- package/build/lib/tests/onlineManager.test.d.ts.map +1 -0
- package/build/lib/tests/queriesObserver.test.d.ts.map +1 -0
- package/build/lib/tests/query.test.d.ts.map +1 -0
- package/build/lib/tests/queryCache.test.d.ts.map +1 -0
- package/build/lib/tests/queryClient.test.d.ts.map +1 -0
- package/build/lib/tests/queryObserver.test.d.ts.map +1 -0
- package/build/lib/tests/utils.d.ts +2 -2
- package/build/lib/tests/utils.d.ts.map +1 -0
- package/build/lib/tests/utils.test.d.ts.map +1 -0
- package/build/lib/types.d.ts +30 -31
- package/build/lib/types.d.ts.map +1 -0
- package/build/lib/utils.d.ts +3 -3
- package/build/lib/utils.d.ts.map +1 -0
- package/build/umd/index.development.js +2 -0
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/queryClient.ts +2 -1
- package/src/queryObserver.ts +11 -10
- package/src/tests/queryCache.test.tsx +1 -2
- package/src/tests/queryClient.test.tsx +6 -2
- package/src/types.ts +1 -2
package/package.json
CHANGED
package/src/queryClient.ts
CHANGED
|
@@ -25,6 +25,8 @@ import type {
|
|
|
25
25
|
ResetOptions,
|
|
26
26
|
SetDataOptions,
|
|
27
27
|
DefaultError,
|
|
28
|
+
CancelOptions,
|
|
29
|
+
DefaultedQueryObserverOptions,
|
|
28
30
|
} from './types'
|
|
29
31
|
import type { QueryState } from './query'
|
|
30
32
|
import { QueryCache } from './queryCache'
|
|
@@ -33,7 +35,6 @@ import { focusManager } from './focusManager'
|
|
|
33
35
|
import { onlineManager } from './onlineManager'
|
|
34
36
|
import { notifyManager } from './notifyManager'
|
|
35
37
|
import { infiniteQueryBehavior } from './infiniteQueryBehavior'
|
|
36
|
-
import type { CancelOptions, DefaultedQueryObserverOptions } from './types'
|
|
37
38
|
|
|
38
39
|
// TYPES
|
|
39
40
|
|
package/src/queryObserver.ts
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import type { DefaultedQueryObserverOptions, DefaultError } from './types'
|
|
2
|
-
import {
|
|
3
|
-
isServer,
|
|
4
|
-
isValidTimeout,
|
|
5
|
-
noop,
|
|
6
|
-
replaceData,
|
|
7
|
-
shallowEqualObjects,
|
|
8
|
-
timeUntilStale,
|
|
9
|
-
} from './utils'
|
|
10
|
-
import { notifyManager } from './notifyManager'
|
|
11
1
|
import type {
|
|
2
|
+
DefaultedQueryObserverOptions,
|
|
3
|
+
DefaultError,
|
|
12
4
|
PlaceholderDataFunction,
|
|
13
5
|
QueryKey,
|
|
14
6
|
QueryObserverBaseResult,
|
|
@@ -17,6 +9,15 @@ import type {
|
|
|
17
9
|
QueryOptions,
|
|
18
10
|
RefetchOptions,
|
|
19
11
|
} from './types'
|
|
12
|
+
import {
|
|
13
|
+
isServer,
|
|
14
|
+
isValidTimeout,
|
|
15
|
+
noop,
|
|
16
|
+
replaceData,
|
|
17
|
+
shallowEqualObjects,
|
|
18
|
+
timeUntilStale,
|
|
19
|
+
} from './utils'
|
|
20
|
+
import { notifyManager } from './notifyManager'
|
|
20
21
|
import type { Query, QueryState, FetchOptions } from './query'
|
|
21
22
|
import type { QueryClient } from './queryClient'
|
|
22
23
|
import { focusManager } from './focusManager'
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { sleep, queryKey, createQueryClient } from './utils'
|
|
2
|
-
import { QueryClient } from '..'
|
|
3
|
-
import { QueryCache, QueryObserver } from '..'
|
|
2
|
+
import { QueryClient, QueryCache, QueryObserver } from '..'
|
|
4
3
|
import { waitFor } from '@testing-library/react'
|
|
5
4
|
import { vi } from 'vitest'
|
|
6
5
|
|
|
@@ -13,8 +13,12 @@ import type {
|
|
|
13
13
|
QueryFunction,
|
|
14
14
|
QueryObserverOptions,
|
|
15
15
|
} from '..'
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import {
|
|
17
|
+
MutationObserver,
|
|
18
|
+
QueryObserver,
|
|
19
|
+
focusManager,
|
|
20
|
+
onlineManager,
|
|
21
|
+
} from '..'
|
|
18
22
|
import { noop } from '../utils'
|
|
19
23
|
import { vi } from 'vitest'
|
|
20
24
|
|
package/src/types.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/* istanbul ignore file */
|
|
2
2
|
|
|
3
3
|
import type { MutationState } from './mutation'
|
|
4
|
-
import type { QueryBehavior, Query } from './query'
|
|
4
|
+
import type { FetchDirection, QueryBehavior, Query } from './query'
|
|
5
5
|
import type { RetryValue, RetryDelayValue } from './retryer'
|
|
6
6
|
import type { QueryFilters, QueryTypeFilter } from './utils'
|
|
7
7
|
import type { QueryCache } from './queryCache'
|
|
8
8
|
import type { MutationCache } from './mutationCache'
|
|
9
|
-
import type { FetchDirection } from './query'
|
|
10
9
|
|
|
11
10
|
export interface Register {
|
|
12
11
|
// defaultError: Error
|