@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.
Files changed (72) hide show
  1. package/build/lib/focusManager.d.ts +1 -1
  2. package/build/lib/focusManager.d.ts.map +1 -0
  3. package/build/lib/hydration.d.ts.map +1 -0
  4. package/build/lib/index.d.ts.map +1 -0
  5. package/build/lib/infiniteQueryBehavior.d.ts.map +1 -0
  6. package/build/lib/infiniteQueryObserver.d.ts +1 -1
  7. package/build/lib/infiniteQueryObserver.d.ts.map +1 -0
  8. package/build/lib/mutation.d.ts +1 -1
  9. package/build/lib/mutation.d.ts.map +1 -0
  10. package/build/lib/mutationCache.d.ts +2 -2
  11. package/build/lib/mutationCache.d.ts.map +1 -0
  12. package/build/lib/mutationObserver.d.ts +1 -1
  13. package/build/lib/mutationObserver.d.ts.map +1 -0
  14. package/build/lib/notifyManager.d.ts +3 -3
  15. package/build/lib/notifyManager.d.ts.map +1 -0
  16. package/build/lib/onlineManager.d.ts +1 -1
  17. package/build/lib/onlineManager.d.ts.map +1 -0
  18. package/build/lib/queriesObserver.d.ts +1 -1
  19. package/build/lib/queriesObserver.d.ts.map +1 -0
  20. package/build/lib/query.d.ts +2 -2
  21. package/build/lib/query.d.ts.map +1 -0
  22. package/build/lib/queryCache.d.ts +2 -2
  23. package/build/lib/queryCache.d.ts.map +1 -0
  24. package/build/lib/queryClient.d.ts +1 -2
  25. package/build/lib/queryClient.d.ts.map +1 -0
  26. package/build/lib/queryClient.esm.js +1 -0
  27. package/build/lib/queryClient.esm.js.map +1 -1
  28. package/build/lib/queryClient.js +1 -0
  29. package/build/lib/queryClient.js.map +1 -1
  30. package/build/lib/queryClient.mjs +2 -0
  31. package/build/lib/queryClient.mjs.map +1 -1
  32. package/build/lib/queryObserver.d.ts +2 -3
  33. package/build/lib/queryObserver.d.ts.map +1 -0
  34. package/build/lib/queryObserver.esm.js.map +1 -1
  35. package/build/lib/queryObserver.js.map +1 -1
  36. package/build/lib/queryObserver.mjs.map +1 -1
  37. package/build/lib/removable.d.ts.map +1 -0
  38. package/build/lib/retryer.d.ts +4 -4
  39. package/build/lib/retryer.d.ts.map +1 -0
  40. package/build/lib/subscribable.d.ts +1 -1
  41. package/build/lib/subscribable.d.ts.map +1 -0
  42. package/build/lib/tests/focusManager.test.d.ts.map +1 -0
  43. package/build/lib/tests/hydration.test.d.ts.map +1 -0
  44. package/build/lib/tests/infiniteQueryBehavior.test.d.ts.map +1 -0
  45. package/build/lib/tests/infiniteQueryObserver.test.d.ts.map +1 -0
  46. package/build/lib/tests/mutationCache.test.d.ts.map +1 -0
  47. package/build/lib/tests/mutationObserver.test.d.ts.map +1 -0
  48. package/build/lib/tests/mutations.test.d.ts.map +1 -0
  49. package/build/lib/tests/notifyManager.test.d.ts.map +1 -0
  50. package/build/lib/tests/onlineManager.test.d.ts.map +1 -0
  51. package/build/lib/tests/queriesObserver.test.d.ts.map +1 -0
  52. package/build/lib/tests/query.test.d.ts.map +1 -0
  53. package/build/lib/tests/queryCache.test.d.ts.map +1 -0
  54. package/build/lib/tests/queryClient.test.d.ts.map +1 -0
  55. package/build/lib/tests/queryObserver.test.d.ts.map +1 -0
  56. package/build/lib/tests/utils.d.ts +2 -2
  57. package/build/lib/tests/utils.d.ts.map +1 -0
  58. package/build/lib/tests/utils.test.d.ts.map +1 -0
  59. package/build/lib/types.d.ts +30 -31
  60. package/build/lib/types.d.ts.map +1 -0
  61. package/build/lib/utils.d.ts +3 -3
  62. package/build/lib/utils.d.ts.map +1 -0
  63. package/build/umd/index.development.js +2 -0
  64. package/build/umd/index.development.js.map +1 -1
  65. package/build/umd/index.production.js +1 -1
  66. package/build/umd/index.production.js.map +1 -1
  67. package/package.json +1 -1
  68. package/src/queryClient.ts +2 -1
  69. package/src/queryObserver.ts +11 -10
  70. package/src/tests/queryCache.test.tsx +1 -2
  71. package/src/tests/queryClient.test.tsx +6 -2
  72. 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.34",
3
+ "version": "5.0.0-alpha.38",
4
4
  "description": "The framework agnostic core that powers TanStack Query",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -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
 
@@ -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 { MutationObserver, QueryObserver } from '..'
17
- import { focusManager, onlineManager } from '..'
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