@tanstack/query-core 5.0.0-alpha.21 → 5.0.0-alpha.24
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 -0
- package/build/lib/hydration.d.ts +1 -0
- package/build/lib/index.d.ts +1 -0
- package/build/lib/infiniteQueryBehavior.d.ts +1 -0
- package/build/lib/infiniteQueryObserver.d.ts +1 -0
- package/build/lib/mutation.d.ts +1 -0
- package/build/lib/mutationCache.d.ts +1 -0
- package/build/lib/mutationObserver.d.ts +1 -0
- package/build/lib/notifyManager.d.ts +1 -0
- package/build/lib/onlineManager.d.ts +1 -0
- package/build/lib/queriesObserver.d.ts +1 -0
- package/build/lib/query.d.ts +1 -0
- package/build/lib/query.esm.js +1 -1
- package/build/lib/query.esm.js.map +1 -1
- package/build/lib/query.js +1 -1
- package/build/lib/query.js.map +1 -1
- package/build/lib/query.mjs +1 -1
- package/build/lib/query.mjs.map +1 -1
- package/build/lib/queryCache.d.ts +1 -0
- package/build/lib/queryClient.d.ts +1 -0
- package/build/lib/queryClient.esm.js +2 -2
- package/build/lib/queryClient.esm.js.map +1 -1
- package/build/lib/queryClient.js +2 -2
- package/build/lib/queryClient.js.map +1 -1
- package/build/lib/queryClient.mjs +2 -2
- package/build/lib/queryClient.mjs.map +1 -1
- package/build/lib/queryObserver.d.ts +1 -0
- package/build/lib/queryObserver.esm.js +3 -3
- package/build/lib/queryObserver.esm.js.map +1 -1
- package/build/lib/queryObserver.js +3 -3
- package/build/lib/queryObserver.js.map +1 -1
- package/build/lib/queryObserver.mjs +2 -2
- package/build/lib/queryObserver.mjs.map +1 -1
- package/build/lib/removable.d.ts +1 -0
- package/build/lib/retryer.d.ts +1 -0
- package/build/lib/subscribable.d.ts +1 -0
- package/build/lib/tests/focusManager.test.d.ts +1 -0
- package/build/lib/tests/hydration.test.d.ts +1 -0
- package/build/lib/tests/infiniteQueryBehavior.test.d.ts +1 -0
- package/build/lib/tests/infiniteQueryObserver.test.d.ts +1 -0
- package/build/lib/tests/mutationCache.test.d.ts +1 -0
- package/build/lib/tests/mutationObserver.test.d.ts +1 -0
- package/build/lib/tests/mutations.test.d.ts +1 -0
- package/build/lib/tests/notifyManager.test.d.ts +1 -0
- package/build/lib/tests/onlineManager.test.d.ts +1 -0
- package/build/lib/tests/queriesObserver.test.d.ts +1 -0
- package/build/lib/tests/query.test.d.ts +1 -0
- package/build/lib/tests/queryCache.test.d.ts +1 -0
- package/build/lib/tests/queryClient.test.d.ts +1 -0
- package/build/lib/tests/queryObserver.test.d.ts +1 -0
- package/build/lib/tests/utils.d.ts +1 -0
- package/build/lib/tests/utils.test.d.ts +1 -0
- package/build/lib/types.d.ts +7 -6
- package/build/lib/utils.d.ts +1 -0
- package/build/umd/index.development.js +5 -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 +1 -1
- package/src/query.ts +1 -1
- package/src/queryClient.ts +2 -2
- package/src/queryObserver.ts +9 -7
- package/src/tests/query.test.tsx +1 -1
- package/src/types.ts +6 -6
|
@@ -907,7 +907,7 @@
|
|
|
907
907
|
{
|
|
908
908
|
console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`);
|
|
909
909
|
}
|
|
910
|
-
onError(new Error(
|
|
910
|
+
onError(new Error(`${this.queryHash} data is undefined`));
|
|
911
911
|
return;
|
|
912
912
|
}
|
|
913
913
|
this.setData(data);
|
|
@@ -1821,8 +1821,8 @@
|
|
|
1821
1821
|
if (typeof defaultedOptions.refetchOnReconnect === 'undefined') {
|
|
1822
1822
|
defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== 'always';
|
|
1823
1823
|
}
|
|
1824
|
-
if (typeof defaultedOptions.
|
|
1825
|
-
defaultedOptions.
|
|
1824
|
+
if (typeof defaultedOptions.throwOnError === 'undefined') {
|
|
1825
|
+
defaultedOptions.throwOnError = !!defaultedOptions.suspense;
|
|
1826
1826
|
}
|
|
1827
1827
|
return defaultedOptions;
|
|
1828
1828
|
}
|
|
@@ -2012,7 +2012,7 @@
|
|
|
2012
2012
|
}, timeout);
|
|
2013
2013
|
}
|
|
2014
2014
|
#computeRefetchInterval() {
|
|
2015
|
-
return typeof this.options.refetchInterval === 'function' ? this.options.refetchInterval(this.#currentResult.data, this.#currentQuery) : this.options.refetchInterval ?? false;
|
|
2015
|
+
return (typeof this.options.refetchInterval === 'function' ? this.options.refetchInterval(this.#currentResult.data, this.#currentQuery) : this.options.refetchInterval) ?? false;
|
|
2016
2016
|
}
|
|
2017
2017
|
#updateRefetchInterval(nextInterval) {
|
|
2018
2018
|
this.#clearRefetchInterval();
|
|
@@ -2190,7 +2190,7 @@
|
|
|
2190
2190
|
return true;
|
|
2191
2191
|
}
|
|
2192
2192
|
const includedProps = new Set(notifyOnChangeProps ?? this.#trackedProps);
|
|
2193
|
-
if (this.options.
|
|
2193
|
+
if (this.options.throwOnError) {
|
|
2194
2194
|
includedProps.add('error');
|
|
2195
2195
|
}
|
|
2196
2196
|
return Object.keys(this.#currentResult).some(key => {
|