@tanstack/react-query 4.27.0 → 4.29.1
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/Hydrate.esm.js +1 -0
- package/build/lib/Hydrate.esm.js.map +1 -1
- package/build/lib/Hydrate.js +1 -0
- package/build/lib/Hydrate.js.map +1 -1
- package/build/lib/Hydrate.mjs +1 -0
- package/build/lib/Hydrate.mjs.map +1 -1
- package/build/lib/QueryClientProvider.esm.js +1 -0
- package/build/lib/QueryClientProvider.esm.js.map +1 -1
- package/build/lib/QueryClientProvider.js +1 -0
- package/build/lib/QueryClientProvider.js.map +1 -1
- package/build/lib/QueryClientProvider.mjs +1 -0
- package/build/lib/QueryClientProvider.mjs.map +1 -1
- package/build/lib/QueryErrorResetBoundary.esm.js +1 -0
- package/build/lib/QueryErrorResetBoundary.esm.js.map +1 -1
- package/build/lib/QueryErrorResetBoundary.js +1 -0
- package/build/lib/QueryErrorResetBoundary.js.map +1 -1
- package/build/lib/QueryErrorResetBoundary.mjs +1 -0
- package/build/lib/QueryErrorResetBoundary.mjs.map +1 -1
- package/build/lib/errorBoundaryUtils.esm.js +1 -0
- package/build/lib/errorBoundaryUtils.esm.js.map +1 -1
- package/build/lib/errorBoundaryUtils.js +1 -0
- package/build/lib/errorBoundaryUtils.js.map +1 -1
- package/build/lib/errorBoundaryUtils.mjs +1 -0
- package/build/lib/errorBoundaryUtils.mjs.map +1 -1
- package/build/lib/isRestoring.esm.js +1 -0
- package/build/lib/isRestoring.esm.js.map +1 -1
- package/build/lib/isRestoring.js +1 -0
- package/build/lib/isRestoring.js.map +1 -1
- package/build/lib/isRestoring.mjs +1 -0
- package/build/lib/isRestoring.mjs.map +1 -1
- package/build/lib/reactBatchedUpdates.esm.js +1 -0
- package/build/lib/reactBatchedUpdates.esm.js.map +1 -1
- package/build/lib/reactBatchedUpdates.js +1 -0
- package/build/lib/reactBatchedUpdates.js.map +1 -1
- package/build/lib/reactBatchedUpdates.mjs +1 -0
- package/build/lib/reactBatchedUpdates.mjs.map +1 -1
- package/build/lib/useBaseQuery.esm.js +1 -0
- package/build/lib/useBaseQuery.esm.js.map +1 -1
- package/build/lib/useBaseQuery.js +1 -0
- package/build/lib/useBaseQuery.js.map +1 -1
- package/build/lib/useBaseQuery.mjs +1 -0
- package/build/lib/useBaseQuery.mjs.map +1 -1
- package/build/lib/useInfiniteQuery.esm.js +1 -0
- package/build/lib/useInfiniteQuery.esm.js.map +1 -1
- package/build/lib/useInfiniteQuery.js +1 -0
- package/build/lib/useInfiniteQuery.js.map +1 -1
- package/build/lib/useInfiniteQuery.mjs +1 -0
- package/build/lib/useInfiniteQuery.mjs.map +1 -1
- package/build/lib/useIsFetching.esm.js +1 -0
- package/build/lib/useIsFetching.esm.js.map +1 -1
- package/build/lib/useIsFetching.js +1 -0
- package/build/lib/useIsFetching.js.map +1 -1
- package/build/lib/useIsFetching.mjs +1 -0
- package/build/lib/useIsFetching.mjs.map +1 -1
- package/build/lib/useIsMutating.esm.js +1 -0
- package/build/lib/useIsMutating.esm.js.map +1 -1
- package/build/lib/useIsMutating.js +1 -0
- package/build/lib/useIsMutating.js.map +1 -1
- package/build/lib/useIsMutating.mjs +1 -0
- package/build/lib/useIsMutating.mjs.map +1 -1
- package/build/lib/useMutation.esm.js +1 -0
- package/build/lib/useMutation.esm.js.map +1 -1
- package/build/lib/useMutation.js +1 -0
- package/build/lib/useMutation.js.map +1 -1
- package/build/lib/useMutation.mjs +1 -0
- package/build/lib/useMutation.mjs.map +1 -1
- package/build/lib/useQueries.esm.js +1 -0
- package/build/lib/useQueries.esm.js.map +1 -1
- package/build/lib/useQueries.js +1 -0
- package/build/lib/useQueries.js.map +1 -1
- package/build/lib/useQueries.mjs +1 -0
- package/build/lib/useQueries.mjs.map +1 -1
- package/build/lib/useQuery.esm.js +1 -0
- package/build/lib/useQuery.esm.js.map +1 -1
- package/build/lib/useQuery.js +1 -0
- package/build/lib/useQuery.js.map +1 -1
- package/build/lib/useQuery.mjs +1 -0
- package/build/lib/useQuery.mjs.map +1 -1
- package/build/lib/useSyncExternalStore.esm.js +1 -1
- package/build/lib/useSyncExternalStore.esm.js.map +1 -1
- package/build/lib/useSyncExternalStore.js +1 -1
- package/build/lib/useSyncExternalStore.js.map +1 -1
- package/build/lib/useSyncExternalStore.mjs +1 -1
- package/build/lib/useSyncExternalStore.mjs.map +1 -1
- package/build/umd/index.development.js +6 -5
- 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 +2 -2
- package/src/errorBoundaryUtils.ts +1 -0
- package/src/reactBatchedUpdates.ts +1 -0
- package/src/useBaseQuery.ts +1 -0
- package/src/useInfiniteQuery.ts +1 -0
- package/src/useIsFetching.ts +1 -0
- package/src/useIsMutating.ts +1 -0
- package/src/useMutation.ts +1 -0
- package/src/useQueries.ts +1 -0
- package/src/useQuery.ts +1 -0
- package/src/useSyncExternalStore.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSyncExternalStore.mjs","sources":["../../src/useSyncExternalStore.ts"],"sourcesContent":["// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601\nimport { useSyncExternalStore as uSES } from 'use-sync-external-store/shim/index.js'\n\nexport const useSyncExternalStore = uSES\n"],"names":[
|
|
1
|
+
{"version":3,"file":"useSyncExternalStore.mjs","sources":["../../src/useSyncExternalStore.ts"],"sourcesContent":["'use client'\n// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601\nimport { useSyncExternalStore as uSES } from 'use-sync-external-store/shim/index.js'\n\nexport const useSyncExternalStore = uSES\n"],"names":[],"mappings":";;;AAIO;;"}
|
|
@@ -2841,9 +2841,10 @@
|
|
|
2841
2841
|
|
|
2842
2842
|
findMatchingObservers(queries) {
|
|
2843
2843
|
const prevObservers = this.observers;
|
|
2844
|
+
const prevObserversMap = new Map(prevObservers.map(observer => [observer.options.queryHash, observer]));
|
|
2844
2845
|
const defaultedQueryOptions = queries.map(options => this.client.defaultQueryOptions(options));
|
|
2845
2846
|
const matchingObservers = defaultedQueryOptions.flatMap(defaultedOptions => {
|
|
2846
|
-
const match =
|
|
2847
|
+
const match = prevObserversMap.get(defaultedOptions.queryHash);
|
|
2847
2848
|
|
|
2848
2849
|
if (match != null) {
|
|
2849
2850
|
return [{
|
|
@@ -2854,9 +2855,10 @@
|
|
|
2854
2855
|
|
|
2855
2856
|
return [];
|
|
2856
2857
|
});
|
|
2857
|
-
const matchedQueryHashes = matchingObservers.map(match => match.defaultedQueryOptions.queryHash);
|
|
2858
|
-
const unmatchedQueries = defaultedQueryOptions.filter(defaultedOptions => !matchedQueryHashes.
|
|
2859
|
-
const
|
|
2858
|
+
const matchedQueryHashes = new Set(matchingObservers.map(match => match.defaultedQueryOptions.queryHash));
|
|
2859
|
+
const unmatchedQueries = defaultedQueryOptions.filter(defaultedOptions => !matchedQueryHashes.has(defaultedOptions.queryHash));
|
|
2860
|
+
const matchingObserversSet = new Set(matchingObservers.map(match => match.observer));
|
|
2861
|
+
const unmatchedObservers = prevObservers.filter(prevObserver => !matchingObserversSet.has(prevObserver));
|
|
2860
2862
|
|
|
2861
2863
|
const getObserver = options => {
|
|
2862
2864
|
const defaultedOptions = this.client.defaultQueryOptions(options);
|
|
@@ -3467,7 +3469,6 @@
|
|
|
3467
3469
|
}
|
|
3468
3470
|
} (shim));
|
|
3469
3471
|
|
|
3470
|
-
// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601
|
|
3471
3472
|
const useSyncExternalStore = shim.exports.useSyncExternalStore;
|
|
3472
3473
|
|
|
3473
3474
|
const defaultContext = /*#__PURE__*/React__namespace.createContext(undefined);
|