@tanstack/query-core 4.33.0 → 4.35.2
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/query.esm.js +2 -2
- package/build/lib/query.esm.js.map +1 -1
- package/build/lib/query.js +2 -2
- package/build/lib/query.js.map +1 -1
- package/build/lib/query.mjs +2 -2
- package/build/lib/query.mjs.map +1 -1
- package/build/lib/types.d.ts +3 -0
- package/build/lib/types.d.ts.map +1 -1
- package/build/umd/index.development.js +2 -2
- 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 +2 -2
- package/src/types.ts +3 -0
package/package.json
CHANGED
package/src/query.ts
CHANGED
|
@@ -354,8 +354,8 @@ export class Query<
|
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
if (
|
|
358
|
-
if (
|
|
357
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
358
|
+
if (!Array.isArray(this.options.queryKey)) {
|
|
359
359
|
this.logger.error(
|
|
360
360
|
`As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`,
|
|
361
361
|
)
|
package/src/types.ts
CHANGED
|
@@ -76,6 +76,9 @@ export interface QueryOptions<
|
|
|
76
76
|
retryDelay?: RetryDelayValue<TError>
|
|
77
77
|
networkMode?: NetworkMode
|
|
78
78
|
cacheTime?: number
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated This callback will be removed in the next major version. You can achieve the same functionality by passing a function to `structuralSharing` instead.
|
|
81
|
+
*/
|
|
79
82
|
isDataEqual?: (oldData: TData | undefined, newData: TData) => boolean
|
|
80
83
|
queryFn?: QueryFunction<TQueryFnData, TQueryKey>
|
|
81
84
|
queryHash?: string
|