@tanstack/query-core 5.0.0-alpha.34 → 5.0.0-alpha.42
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/focusManager.esm.js.map +1 -1
- package/build/lib/focusManager.js.map +1 -1
- package/build/lib/focusManager.mjs.map +1 -1
- package/build/lib/hydration.d.ts.map +1 -0
- package/build/lib/hydration.esm.js.map +1 -1
- package/build/lib/hydration.js.map +1 -1
- package/build/lib/hydration.mjs.map +1 -1
- package/build/lib/index.d.ts.map +1 -0
- package/build/lib/infiniteQueryBehavior.d.ts.map +1 -0
- package/build/lib/infiniteQueryBehavior.esm.js.map +1 -1
- package/build/lib/infiniteQueryBehavior.js.map +1 -1
- package/build/lib/infiniteQueryBehavior.mjs.map +1 -1
- package/build/lib/infiniteQueryObserver.d.ts +1 -1
- package/build/lib/infiniteQueryObserver.d.ts.map +1 -0
- package/build/lib/infiniteQueryObserver.esm.js.map +1 -1
- package/build/lib/infiniteQueryObserver.js.map +1 -1
- package/build/lib/infiniteQueryObserver.mjs.map +1 -1
- package/build/lib/mutation.d.ts +1 -1
- package/build/lib/mutation.d.ts.map +1 -0
- package/build/lib/mutation.esm.js.map +1 -1
- package/build/lib/mutation.js.map +1 -1
- package/build/lib/mutation.mjs.map +1 -1
- package/build/lib/mutationCache.d.ts +2 -2
- package/build/lib/mutationCache.d.ts.map +1 -0
- package/build/lib/mutationCache.esm.js.map +1 -1
- package/build/lib/mutationCache.js.map +1 -1
- package/build/lib/mutationCache.mjs.map +1 -1
- package/build/lib/mutationObserver.d.ts +1 -1
- package/build/lib/mutationObserver.d.ts.map +1 -0
- package/build/lib/mutationObserver.esm.js.map +1 -1
- package/build/lib/mutationObserver.js.map +1 -1
- package/build/lib/mutationObserver.mjs.map +1 -1
- package/build/lib/notifyManager.d.ts +3 -3
- package/build/lib/notifyManager.d.ts.map +1 -0
- package/build/lib/notifyManager.esm.js.map +1 -1
- package/build/lib/notifyManager.js.map +1 -1
- package/build/lib/notifyManager.mjs.map +1 -1
- package/build/lib/onlineManager.d.ts +1 -1
- package/build/lib/onlineManager.d.ts.map +1 -0
- package/build/lib/onlineManager.esm.js.map +1 -1
- package/build/lib/onlineManager.js.map +1 -1
- package/build/lib/onlineManager.mjs.map +1 -1
- package/build/lib/queriesObserver.d.ts +1 -1
- package/build/lib/queriesObserver.d.ts.map +1 -0
- package/build/lib/queriesObserver.esm.js.map +1 -1
- package/build/lib/queriesObserver.js.map +1 -1
- package/build/lib/queriesObserver.mjs.map +1 -1
- package/build/lib/query.d.ts +2 -2
- package/build/lib/query.d.ts.map +1 -0
- package/build/lib/query.esm.js.map +1 -1
- package/build/lib/query.js.map +1 -1
- package/build/lib/query.mjs.map +1 -1
- package/build/lib/queryCache.d.ts +2 -2
- package/build/lib/queryCache.d.ts.map +1 -0
- package/build/lib/queryCache.esm.js +1 -0
- package/build/lib/queryCache.esm.js.map +1 -1
- package/build/lib/queryCache.js +1 -0
- package/build/lib/queryCache.js.map +1 -1
- package/build/lib/queryCache.mjs +2 -0
- package/build/lib/queryCache.mjs.map +1 -1
- 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 +2 -3
- package/build/lib/queryObserver.esm.js.map +1 -1
- package/build/lib/queryObserver.js +2 -3
- 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/removable.esm.js.map +1 -1
- package/build/lib/removable.js.map +1 -1
- package/build/lib/removable.mjs.map +1 -1
- package/build/lib/retryer.d.ts +4 -4
- package/build/lib/retryer.d.ts.map +1 -0
- package/build/lib/retryer.esm.js +2 -0
- package/build/lib/retryer.esm.js.map +1 -1
- package/build/lib/retryer.js +2 -0
- package/build/lib/retryer.js.map +1 -1
- package/build/lib/retryer.mjs +2 -0
- package/build/lib/retryer.mjs.map +1 -1
- package/build/lib/subscribable.d.ts +1 -1
- package/build/lib/subscribable.d.ts.map +1 -0
- package/build/lib/subscribable.esm.js.map +1 -1
- package/build/lib/subscribable.js.map +1 -1
- package/build/lib/subscribable.mjs.map +1 -1
- 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/lib/utils.esm.js.map +1 -1
- package/build/lib/utils.js.map +1 -1
- package/build/lib/utils.mjs.map +1 -1
- package/build/umd/index.development.js +6 -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 +3 -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/query-core",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.42",
|
|
4
4
|
"description": "The framework agnostic core that powers TanStack Query",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"test:types": "tsc",
|
|
34
34
|
"test:lib": "vitest run --coverage",
|
|
35
35
|
"test:lib:dev": "pnpm run test:lib --watch",
|
|
36
|
+
"build": "pnpm build:rollup && pnpm build:types",
|
|
37
|
+
"build:rollup": "rollup --config rollup.config.mjs",
|
|
36
38
|
"build:types": "tsc --build"
|
|
37
39
|
}
|
|
38
40
|
}
|
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
|