0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query. https://tanstack.com/query
  • TypeScript 98%
  • JavaScript 1.2%
  • Svelte 0.7%
Find a file
Frank Johnston 86e79571fd
fix(query-core): shallowEqualObjects ignores key-set differences when counts match (#10777)
* fix(query-core): shallowEqualObjects ignores key-set differences when counts match

`shallowEqualObjects` only iterated the keys of `a` and compared `a[key] !== b[key]`.
When both objects have the same number of keys but different key names, a key
present on `a` but absent on `b` reads as `undefined` on `b`; if the corresponding
value on `a` is also `undefined` (or otherwise equal), the function incorrectly
reported the objects as equal. This breaks the documented "shallow compare objects"
contract and can suppress an `observerOptionsUpdated` notification when an observer's
defaulted options swap one key for another between renders.

Fix: require each key of `a` to be an own-property of `b` before comparing values.

* fix(query-core): ignore inherited properties in shallow equality

* test(query-core): use toBe for shallow equality assertions

---------

Co-authored-by: safechem <sales@alphachemicals.ie>
Co-authored-by: TkDodo <office@dorfmeister.cc>
History 2026-11-01 12:31:11 +01:00
.changeset fix(query-core): shallowEqualObjects ignores key-set differences when counts match (#10777) 2026-11-01 12:31:11 +01:00
.github ci: update Changesets preview action for v3 (#12064) 2026-10-18 10:00:22 +02:00
.nx/workflows ci: switch to nxCloudId (#9697) 2025-09-27 12:50:53 +10:00
docs docs(examples): add router and framework suffix to example directories to match their 'package.json' names (#12473) 2026-11-01 19:39:04 +09:00
examples chore(examples/vue/simple-nuxt3/.gitignore): align with the Nuxt starter template to ignore '.data', '.nitro' and '.cache' (#12474) 2026-11-01 19:47:25 +09:00
integrations chore(integrations): group by adapter and rename packages to '@tanstack/query-integration-<adapter>-<name>' to match examples (#12475) 2026-11-01 20:19:41 +09:00
media docs: use the dynamic README header endpoint (#11136) 2026-08-03 13:43:19 +02:00
packages fix(query-core): shallowEqualObjects ignores key-set differences when counts match (#10777) 2026-11-01 12:31:11 +01:00
scripts chore(scripts/create-github-release): use the 'node:' protocol for 'fs' and sort the imported members (#12285) 2026-10-22 21:03:46 +09:00
.coderabbit.yaml docs: clarify contribution guidelines (#11280) 2026-08-25 07:18:51 +02:00
.editorconfig Initial commit 2019-09-10 13:22:26 -06:00
.gitattributes chore: force type import (#4202) 2022-09-23 10:55:22 +02:00
.gitignore ci: update to Nx v23 (#11567) 2026-09-23 06:31:23 +10:00
.npmrc ci: update workspace config (#9671) 2025-09-21 23:26:52 +10:00
.nvmrc bump Node.js to 24.22.1 (#12278) 2026-10-22 12:18:03 +01:00
.size-limit.json chore: size-limit 2025-12-31 10:33:53 +01:00
AGENTS.md docs: clarify contribution guidelines (#11280) 2026-08-25 07:18:51 +02:00
AI_POLICY.md chore: add human voice ai policy from ai-policy.dev (#11641) 2026-09-25 16:13:38 +02:00
CONTRIBUTING.md Update CONTRIBUTING.md with documentation warning (#12389) 2026-10-26 11:10:34 +01:00
FUNDING.json funding changes 2024-02-15 00:59:57 -07:00
knip.ts fix(react-query*): declare '@types/react' as an optional peer dependency (#11728) 2026-10-17 18:07:05 +02:00
LICENSE chore: Update outdated LICENSE year (#4266) 2022-10-08 08:01:32 +02:00
nx.json chore(nx.json): build the dependencies before 'test:types' (#12021) 2026-10-15 09:08:15 +09:00
oxfmt.config.ts chore(oxfmt.config): replace '.oxfmtrc.json' with 'oxfmt.config.ts' (#11944) 2026-10-10 10:08:39 +09:00
oxlint.config.ts chore(oxlint.config): add 'vueConfig' with native 'vue' rules for 'vue-query' and 'vue-query-devtools' (#12450) 2026-10-29 15:25:01 +09:00
package.json chore(deps): update 'vite' to '^8.3.5', deduplicate 'pnpm-lock.yaml' and remove 'vite@6.4.1' from 'trustPolicyExclude' (#12446) 2026-10-29 12:48:15 +09:00
pnpm-lock.yaml chore(integrations): group by adapter and rename packages to '@tanstack/query-integration-<adapter>-<name>' to match examples (#12475) 2026-11-01 20:19:41 +09:00
pnpm-workspace.yaml chore(integrations): group by adapter and rename packages to '@tanstack/query-integration-<adapter>-<name>' to match examples (#12475) 2026-11-01 20:19:41 +09:00
README.md docs: use the dynamic README header endpoint (#11136) 2026-08-03 13:43:19 +02:00
tsconfig.json chore: replace eslint with oxlint (#11938) 2026-10-09 16:35:33 +01:00

TanStack Query

TanStack Query

An async state management library built to simplify fetching, caching, synchronizing, and updating server state.

  • Protocol‑agnostic fetching (REST, GraphQL, promises, etc.)
  • Caching, refetching, pagination & infinite scroll
  • Mutations, dependent queries & background updates
  • Prefetching, cancellation & React Suspense support

Read the docs →

Get Involved

Partners

CodeRabbit Cloudflare
Query & you?

We're looking for TanStack Query Partners to join our mission! Partner with us to push the boundaries of TanStack Query and build amazing things together.

LET'S CHAT

Explore the TanStack Ecosystem

… and more at TanStack.com »