@tanstack/query-core 4.20.9 → 4.22.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/query-core",
3
- "version": "4.20.9",
3
+ "version": "4.22.0",
4
4
  "description": "The framework agnostic core that powers TanStack Query",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
package/src/hydration.ts CHANGED
@@ -65,11 +65,11 @@ function dehydrateQuery(query: Query): DehydratedQuery {
65
65
  }
66
66
  }
67
67
 
68
- function defaultShouldDehydrateMutation(mutation: Mutation) {
68
+ export function defaultShouldDehydrateMutation(mutation: Mutation) {
69
69
  return mutation.state.isPaused
70
70
  }
71
71
 
72
- function defaultShouldDehydrateQuery(query: Query) {
72
+ export function defaultShouldDehydrateQuery(query: Query) {
73
73
  return query.state.status === 'success'
74
74
  }
75
75
 
package/src/index.ts CHANGED
@@ -23,7 +23,12 @@ export {
23
23
  } from './utils'
24
24
  export type { MutationFilters, QueryFilters, Updater } from './utils'
25
25
  export { isCancelledError } from './retryer'
26
- export { dehydrate, hydrate } from './hydration'
26
+ export {
27
+ dehydrate,
28
+ hydrate,
29
+ defaultShouldDehydrateMutation,
30
+ defaultShouldDehydrateQuery,
31
+ } from './hydration'
27
32
 
28
33
  // Types
29
34
  export * from './types'