@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/query-core",
3
- "version": "4.33.0",
3
+ "version": "4.35.2",
4
4
  "description": "The framework agnostic core that powers TanStack Query",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
package/src/query.ts CHANGED
@@ -354,8 +354,8 @@ export class Query<
354
354
  }
355
355
  }
356
356
 
357
- if (!Array.isArray(this.options.queryKey)) {
358
- if (process.env.NODE_ENV !== 'production') {
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