@tanstack/query-core 5.0.0-alpha.81 → 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/lib/infiniteQueryBehavior.cjs.map +1 -1
- package/build/lib/infiniteQueryBehavior.d.ts.map +1 -1
- package/build/lib/infiniteQueryBehavior.js.map +1 -1
- package/build/lib/infiniteQueryBehavior.legacy.cjs.map +1 -1
- package/build/lib/infiniteQueryBehavior.legacy.js.map +1 -1
- package/build/lib/infiniteQueryObserver.cjs.map +1 -1
- package/build/lib/infiniteQueryObserver.d.ts +2 -2
- package/build/lib/infiniteQueryObserver.d.ts.map +1 -1
- package/build/lib/infiniteQueryObserver.js.map +1 -1
- package/build/lib/infiniteQueryObserver.legacy.cjs.map +1 -1
- package/build/lib/infiniteQueryObserver.legacy.js.map +1 -1
- package/build/lib/mutation.cjs.map +1 -1
- package/build/lib/mutation.d.ts +2 -2
- package/build/lib/mutation.d.ts.map +1 -1
- package/build/lib/mutation.js.map +1 -1
- package/build/lib/mutation.legacy.cjs.map +1 -1
- package/build/lib/mutation.legacy.js.map +1 -1
- package/build/lib/mutationCache.cjs.map +1 -1
- package/build/lib/mutationCache.d.ts +3 -3
- package/build/lib/mutationCache.d.ts.map +1 -1
- package/build/lib/mutationCache.js.map +1 -1
- package/build/lib/mutationCache.legacy.cjs.map +1 -1
- package/build/lib/mutationCache.legacy.js.map +1 -1
- package/build/lib/mutationObserver.cjs.map +1 -1
- package/build/lib/mutationObserver.d.ts +3 -3
- package/build/lib/mutationObserver.d.ts.map +1 -1
- package/build/lib/mutationObserver.js.map +1 -1
- package/build/lib/mutationObserver.legacy.cjs.map +1 -1
- package/build/lib/mutationObserver.legacy.js.map +1 -1
- package/build/lib/queriesObserver.cjs.map +1 -1
- package/build/lib/queriesObserver.d.ts +2 -2
- package/build/lib/queriesObserver.d.ts.map +1 -1
- package/build/lib/queriesObserver.js.map +1 -1
- package/build/lib/queriesObserver.legacy.cjs.map +1 -1
- package/build/lib/queriesObserver.legacy.js.map +1 -1
- package/build/lib/query.cjs.map +1 -1
- package/build/lib/query.d.ts +2 -2
- package/build/lib/query.d.ts.map +1 -1
- package/build/lib/query.js.map +1 -1
- package/build/lib/query.legacy.cjs.map +1 -1
- package/build/lib/query.legacy.js.map +1 -1
- package/build/lib/queryCache.cjs.map +1 -1
- package/build/lib/queryCache.d.ts +3 -3
- package/build/lib/queryCache.d.ts.map +1 -1
- package/build/lib/queryCache.js.map +1 -1
- package/build/lib/queryCache.legacy.cjs.map +1 -1
- package/build/lib/queryCache.legacy.js.map +1 -1
- package/build/lib/queryClient.cjs.map +1 -1
- package/build/lib/queryClient.d.ts +3 -3
- package/build/lib/queryClient.d.ts.map +1 -1
- package/build/lib/queryClient.js.map +1 -1
- package/build/lib/queryClient.legacy.cjs.map +1 -1
- package/build/lib/queryClient.legacy.js.map +1 -1
- package/build/lib/queryObserver.cjs.map +1 -1
- package/build/lib/queryObserver.d.ts +3 -3
- package/build/lib/queryObserver.d.ts.map +1 -1
- package/build/lib/queryObserver.js.map +1 -1
- package/build/lib/queryObserver.legacy.cjs.map +1 -1
- package/build/lib/queryObserver.legacy.js.map +1 -1
- package/build/lib/retryer.cjs.map +1 -1
- package/build/lib/retryer.d.ts +1 -1
- package/build/lib/retryer.d.ts.map +1 -1
- package/build/lib/retryer.js.map +1 -1
- package/build/lib/retryer.legacy.cjs.map +1 -1
- package/build/lib/retryer.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/types.d.ts +2 -2
- package/build/lib/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/infiniteQueryBehavior.ts +1 -1
- package/src/infiniteQueryObserver.ts +7 -7
- package/src/mutation.ts +5 -5
- package/src/mutationCache.ts +5 -5
- package/src/mutationObserver.ts +5 -5
- package/src/queriesObserver.ts +4 -4
- package/src/query.ts +8 -8
- package/src/queryCache.ts +5 -5
- package/src/queryClient.ts +14 -14
- package/src/queryObserver.ts +13 -13
- package/src/retryer.ts +1 -1
- package/src/tests/focusManager.test.tsx +1 -1
- package/src/tests/hydration.test.tsx +3 -3
- package/src/tests/infiniteQueryBehavior.test.tsx +3 -3
- package/src/tests/infiniteQueryObserver.test.tsx +2 -2
- package/src/tests/mutationCache.test.tsx +2 -2
- package/src/tests/mutationObserver.test.tsx +2 -2
- package/src/tests/mutations.test.tsx +4 -4
- package/src/tests/notifyManager.test.tsx +1 -1
- package/src/tests/onlineManager.test.tsx +1 -1
- package/src/tests/queriesObserver.test.tsx +3 -3
- package/src/tests/query.test.tsx +6 -6
- package/src/tests/queryCache.test.tsx +2 -2
- package/src/tests/queryClient.test.tsx +10 -10
- package/src/tests/queryObserver.test.tsx +3 -3
- package/src/tests/utils.test.tsx +6 -6
- package/src/tests/utils.ts +1 -1
- package/src/types.ts +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { waitFor } from '@testing-library/react'
|
|
2
|
-
import { queryKey, sleep, executeMutation, createQueryClient } from './utils'
|
|
3
|
-
import { MutationCache, MutationObserver } from '..'
|
|
4
2
|
import { vi } from 'vitest'
|
|
3
|
+
import { MutationCache, MutationObserver } from '..'
|
|
4
|
+
import { createQueryClient, executeMutation, queryKey, sleep } from './utils'
|
|
5
5
|
|
|
6
6
|
describe('mutationCache', () => {
|
|
7
7
|
describe('MutationCacheConfig error callbacks', () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { waitFor } from '@testing-library/react'
|
|
2
|
+
import { vi } from 'vitest'
|
|
3
|
+
import { MutationObserver } from '..'
|
|
2
4
|
import { createQueryClient, sleep } from './utils'
|
|
3
5
|
import type { QueryClient } from '..'
|
|
4
|
-
import { MutationObserver } from '..'
|
|
5
|
-
import { vi } from 'vitest'
|
|
6
6
|
|
|
7
7
|
describe('mutationObserver', () => {
|
|
8
8
|
let queryClient: QueryClient
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { QueryClient } from '..'
|
|
2
|
-
import { createQueryClient, executeMutation, queryKey, sleep } from './utils'
|
|
3
|
-
import type { MutationState } from '../mutation'
|
|
4
|
-
import { MutationObserver } from '../mutationObserver'
|
|
5
1
|
import { vi } from 'vitest'
|
|
6
2
|
import { waitFor } from '@testing-library/react'
|
|
3
|
+
import { MutationObserver } from '../mutationObserver'
|
|
4
|
+
import { createQueryClient, executeMutation, queryKey, sleep } from './utils'
|
|
5
|
+
import type { QueryClient } from '..'
|
|
6
|
+
import type { MutationState } from '../mutation'
|
|
7
7
|
|
|
8
8
|
describe('mutations', () => {
|
|
9
9
|
let queryClient: QueryClient
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { waitFor } from '@testing-library/react'
|
|
2
|
-
import { sleep, queryKey, createQueryClient } from './utils'
|
|
3
|
-
import type { QueryClient, QueryObserverResult } from '..'
|
|
4
|
-
import { QueriesObserver } from '..'
|
|
5
2
|
import { vi } from 'vitest'
|
|
3
|
+
import { QueriesObserver } from '..'
|
|
4
|
+
import { createQueryClient, queryKey, sleep } from './utils'
|
|
5
|
+
import type { QueryClient, QueryObserverResult } from '..'
|
|
6
6
|
|
|
7
7
|
describe('queriesObserver', () => {
|
|
8
8
|
let queryClient: QueryClient
|
package/src/tests/query.test.tsx
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { waitFor } from '@testing-library/react'
|
|
2
|
+
import { vi } from 'vitest'
|
|
3
|
+
import { QueryObserver, isCancelledError, onlineManager } from '..'
|
|
1
4
|
import {
|
|
2
|
-
sleep,
|
|
3
|
-
queryKey,
|
|
4
|
-
mockVisibilityState,
|
|
5
5
|
createQueryClient,
|
|
6
|
+
mockVisibilityState,
|
|
7
|
+
queryKey,
|
|
8
|
+
sleep,
|
|
6
9
|
} from './utils'
|
|
7
10
|
import type {
|
|
8
11
|
QueryCache,
|
|
@@ -10,9 +13,6 @@ import type {
|
|
|
10
13
|
QueryFunctionContext,
|
|
11
14
|
QueryObserverResult,
|
|
12
15
|
} from '..'
|
|
13
|
-
import { QueryObserver, isCancelledError, onlineManager } from '..'
|
|
14
|
-
import { waitFor } from '@testing-library/react'
|
|
15
|
-
import { vi } from 'vitest'
|
|
16
16
|
|
|
17
17
|
describe('query', () => {
|
|
18
18
|
let queryClient: QueryClient
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { sleep, queryKey, createQueryClient } from './utils'
|
|
2
|
-
import { QueryClient, QueryCache, QueryObserver } from '..'
|
|
3
1
|
import { waitFor } from '@testing-library/react'
|
|
4
2
|
import { vi } from 'vitest'
|
|
3
|
+
import { QueryCache, QueryClient, QueryObserver } from '..'
|
|
4
|
+
import { createQueryClient, queryKey, sleep } from './utils'
|
|
5
5
|
|
|
6
6
|
describe('queryCache', () => {
|
|
7
7
|
let queryClient: QueryClient
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { waitFor } from '@testing-library/react'
|
|
2
2
|
import '@testing-library/jest-dom'
|
|
3
3
|
|
|
4
|
+
import { vi } from 'vitest'
|
|
5
|
+
import {
|
|
6
|
+
MutationObserver,
|
|
7
|
+
QueryObserver,
|
|
8
|
+
focusManager,
|
|
9
|
+
onlineManager,
|
|
10
|
+
} from '..'
|
|
11
|
+
import { noop } from '../utils'
|
|
4
12
|
import {
|
|
5
|
-
sleep,
|
|
6
|
-
queryKey,
|
|
7
13
|
createQueryClient,
|
|
8
14
|
mockNavigatorOnLine,
|
|
15
|
+
queryKey,
|
|
16
|
+
sleep,
|
|
9
17
|
} from './utils'
|
|
10
18
|
import type {
|
|
11
19
|
QueryCache,
|
|
@@ -13,14 +21,6 @@ import type {
|
|
|
13
21
|
QueryFunction,
|
|
14
22
|
QueryObserverOptions,
|
|
15
23
|
} from '..'
|
|
16
|
-
import {
|
|
17
|
-
MutationObserver,
|
|
18
|
-
QueryObserver,
|
|
19
|
-
focusManager,
|
|
20
|
-
onlineManager,
|
|
21
|
-
} from '..'
|
|
22
|
-
import { noop } from '../utils'
|
|
23
|
-
import { vi } from 'vitest'
|
|
24
24
|
|
|
25
25
|
describe('queryClient', () => {
|
|
26
26
|
let queryClient: QueryClient
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { sleep, queryKey, expectType, createQueryClient } from './utils'
|
|
2
|
-
import type { QueryClient, QueryObserverResult } from '..'
|
|
3
|
-
import { QueryObserver, focusManager } from '..'
|
|
4
1
|
import { vi } from 'vitest'
|
|
2
|
+
import { QueryObserver, focusManager } from '..'
|
|
3
|
+
import { createQueryClient, expectType, queryKey, sleep } from './utils'
|
|
4
|
+
import type { QueryClient, QueryObserverResult } from '..'
|
|
5
5
|
|
|
6
6
|
describe('queryObserver', () => {
|
|
7
7
|
let queryClient: QueryClient
|
package/src/tests/utils.test.tsx
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import { vi } from 'vitest'
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
addToEnd,
|
|
4
|
+
addToStart,
|
|
5
|
+
isPlainArray,
|
|
4
6
|
isPlainObject,
|
|
5
7
|
matchMutation,
|
|
8
|
+
partialMatchKey,
|
|
9
|
+
replaceEqualDeep,
|
|
6
10
|
scheduleMicrotask,
|
|
7
11
|
sleep,
|
|
8
|
-
isPlainArray,
|
|
9
|
-
addToEnd,
|
|
10
|
-
addToStart,
|
|
11
12
|
} from '../utils'
|
|
12
13
|
import { Mutation } from '../mutation'
|
|
13
14
|
import { createQueryClient } from './utils'
|
|
14
|
-
import { vi } from 'vitest'
|
|
15
15
|
|
|
16
16
|
describe('core/utils', () => {
|
|
17
17
|
describe('isPlainObject', () => {
|
package/src/tests/utils.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { act } from '@testing-library/react'
|
|
2
2
|
import { vi } from 'vitest'
|
|
3
3
|
|
|
4
|
-
import type { MutationOptions, QueryClientConfig } from '..'
|
|
5
4
|
import { QueryClient } from '..'
|
|
6
5
|
import * as utils from '../utils'
|
|
6
|
+
import type { MutationOptions, QueryClientConfig } from '..'
|
|
7
7
|
|
|
8
8
|
export function createQueryClient(config?: QueryClientConfig): QueryClient {
|
|
9
9
|
return new QueryClient(config)
|
package/src/types.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* istanbul ignore file */
|
|
2
2
|
|
|
3
3
|
import type { MutationState } from './mutation'
|
|
4
|
-
import type { FetchDirection,
|
|
5
|
-
import type {
|
|
4
|
+
import type { FetchDirection, Query, QueryBehavior } from './query'
|
|
5
|
+
import type { RetryDelayValue, RetryValue } from './retryer'
|
|
6
6
|
import type { QueryFilters, QueryTypeFilter } from './utils'
|
|
7
7
|
import type { QueryCache } from './queryCache'
|
|
8
8
|
import type { MutationCache } from './mutationCache'
|