0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
Commit graph

5,975 commits

Author SHA1 Message Date
Wonsuk Choi
6bdeb13081
test(*/useQuery): rename the 'throwOnError' callback parameter to 'err' to avoid shadowing the returned 'error' (#12295) 2026-10-23 17:09:01 +09:00
Wonsuk Choi
86b9f20912
test(*/useMutationState): rename the built 'mutation' to 'existingMutation' to avoid shadowing the 'select' parameter (#12294) 2026-10-23 15:51:56 +09:00
Wonsuk Choi
d09972b850
test(*): rename the 'queryKey' test helper to 'createKey' since it creates keys for both queries and mutations (#12293)
* test(*): rename the 'queryKey' test helper to 'createKey' since it creates keys for both queries and mutations

* test(query-test-utils/createKey): change the key prefix from 'query_' to 'key-' since it is also used for mutation keys
2026-10-23 15:32:13 +09:00
Wonsuk Choi
1117bdd2dd
refactor(lit-query/createQueriesController): rename the per-result 'observer' in 'trackResult' to 'resultObserver' to avoid shadowing (#12291) 2026-10-23 12:22:07 +09:00
Wonsuk Choi
51e627fb77
refactor(query-persist-client-core/createPersister): rename the 'filters' option to 'persistFilters' internally to avoid shadowing (#12290) 2026-10-23 12:21:45 +09:00
Wonsuk Choi
16f7d4c91e
test(lit-query/createQueryController): read 'queryKey' and 'signal' from the 'queryFn' context to avoid shadowing the 'queryKey' helper (#12292) 2026-10-23 12:21:06 +09:00
Wonsuk Choi
2de1d1e15c
chore(preact-query/utils): disable 'react/exhaustive-deps' for the stable '_instance' to keep the upstream 'useSyncExternalStore' (#12289) 2026-10-23 10:02:50 +09:00
Wonsuk Choi
67a8784445
docs(preact-query/utils): pin the preact and React 'useSyncExternalStore' source links to the copied commits (#12288) 2026-10-23 10:00:30 +09:00
Wonsuk Choi
0064fe8849
test(query-codemods): replace 'async' arrow functions without 'await' with 'Promise.resolve' in the fixtures (#12286) 2026-10-23 00:12:02 +09:00
Wonsuk Choi
4071cd526b
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
Wonsuk Choi
75e64b5a1a
chore(oxlint.config): remove the 'vitest/no-standalone-expect' override left over from the removed 'itIf' helper (#12284) 2026-10-22 20:19:23 +09:00
Jon Ramos
f450917c38
bump Node.js to 24.22.1 (#12278)
chore(.nvmrc): bump Node.js to 24.22.1 for the October 2026 security release

24.21.0 is affected by high-severity TLS hostname-verification bypasses
and a Brotli decoder out-of-bounds write that permits remote code
execution (CVE-2026-111497).

https://nodejs.org/es/blog/vulnerability/october-2026-security-releases
2026-10-22 12:18:03 +01:00
Wonsuk Choi
84332ded75
chore({react-query,preact-query,query-broadcast-client-experimental}/vite.config): remove the CI-only 'retry' (#12279) 2026-10-22 17:21:04 +09:00
Wonsuk Choi
4b17d51f5c
test(*): remove manual 'mockRestore' calls already handled by 'restoreMocks' (#12277)
* test(*): remove manual 'mockRestore' calls already handled by 'restoreMocks'

* test(vue-query): unwrap the 'try' / 'finally' blocks that only call 'mockRestore'
2026-10-22 16:53:42 +09:00
Wonsuk Choi
4b2c6115b7
test({query-devtools,react-query-devtools,preact-query-devtools,vue-query}): enable 'unstubGlobals' and 'unstubEnvs' instead of calling 'vi.unstubAllGlobals' and 'vi.unstubAllEnvs' manually (#12276) 2026-10-22 16:36:35 +09:00
Wonsuk Choi
b2246c2bba
chore(svelte-query-persist-client/vite.config): enable 'coverage' in CI like the other packages (#12275) 2026-10-22 16:21:31 +09:00
Wonsuk Choi
75f2c0dfb6
test({svelte-query,svelte-query-devtools,vue-query}): enable 'restoreMocks' and recreate the vue-query spies in 'beforeEach' (#12274) 2026-10-22 16:09:38 +09:00
Wonsuk Choi
b923947be4
chore(oxlint.config): enable 'no-debugging-utils', 'no-dom-import', 'no-manual-cleanup' and 'no-render-in-lifecycle' from 'eslint-plugin-testing-library' (#12273) 2026-10-22 15:01:40 +09:00
Wonsuk Choi
c8359dde02
test(preact-query-persist-client): test the real 'PersistQueryClientProvider' instead of a copy and import dependencies by package name (#12272) 2026-10-22 12:19:11 +09:00
Wonsuk Choi
8ab3ac9879
test(preact-query-persist-client): remove the manual 'cleanup' already done in 'test-setup' (#12271) 2026-10-22 11:39:48 +09:00
Wonsuk Choi
bb41f83caa
chore(oxlint.config): add 'eslint-plugin-testing-library' with its DOM rules and query present elements with 'getBy' (#12269)
* chore(oxlint.config): add 'eslint-plugin-testing-library' with its DOM rules and query present elements with 'getBy'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-22 11:37:21 +09:00
Wonsuk Choi
6aaecfd450
test(react-query/transition): remove the redundant 'act' around 'fireEvent.click' (#12270) 2026-10-22 11:37:03 +09:00
Wonsuk Choi
670fc2817f
chore(oxlint.config): add 'eslint-plugin-jest-dom' with its recommended rules and assert DOM presence with 'toBeInTheDocument' (#12268) 2026-10-22 10:56:42 +09:00
Wonsuk Choi
496c4ac54b
chore(oxlint.config): enable 'vitest/consistent-each-for' to keep parameterized tests on '.each' (#12267) 2026-10-22 10:12:43 +09:00
Wonsuk Choi
883d35eb2f
chore(oxlint.config): enable 'vitest/prefer-lowercase-title' for test titles (#12266) 2026-10-22 10:11:15 +09:00
Wonsuk Choi
f5fc7ac966
chore(oxlint.config): enable 'vitest/require-top-level-describe' and move top-level tests and hooks into a 'describe' (#12265) 2026-10-22 10:11:04 +09:00
Wonsuk Choi
53060948a9
test({preact,react,solid}-query/useMutationState): use a template literal for the 'mutationFn' result (#12264) 2026-10-22 10:08:38 +09:00
Wonsuk Choi
90b5acbe0d
chore(oxlint.config): enable 'vitest-js/padding-around-after-all-blocks' (#12263) 2026-10-22 09:57:09 +09:00
Wonsuk Choi
6aaa0cb120
chore(oxlint.config): enable 'vitest-js/padding-around-describe-blocks' and separate describe blocks with a blank line (#12262) 2026-10-22 09:56:46 +09:00
Wonsuk Choi
62592ae994
chore(oxlint.config): enable 'vitest-js/padding-around-after-each-blocks' and separate 'afterEach' with a blank line (#12261) 2026-10-22 09:54:55 +09:00
Wonsuk Choi
28a8540176
chore(oxlint.config): enable 'vitest-js/padding-around-before-each-blocks' and separate 'beforeEach' with a blank line (#12260) 2026-10-22 09:54:20 +09:00
Wonsuk Choi
4a6264e8a5
chore(oxlint.config): enable 'vitest-js/padding-around-before-all-blocks' and separate 'beforeAll' with a blank line (#12259) 2026-10-22 09:48:33 +09:00
Wonsuk Choi
7cafffdbbe
chore(oxlint.config): enable 'vitest-js/padding-around-test-blocks' and separate test blocks with a blank line (#12258) 2026-10-22 09:39:09 +09:00
Wonsuk Choi
914eef777b
chore(oxlint.config): enable 'vitest-js/no-conditional-in-test' outside type tests (#12256) 2026-10-22 00:16:57 +09:00
Wonsuk Choi
d8fbf7ee4d
chore(oxlint.config): enable 'vitest-js/prefer-vi-mocked' (#12255) 2026-10-21 21:50:41 +09:00
Wonsuk Choi
ce77be5e15
test(query-test-utils): rename '__test__' to '__tests__' to match the other packages (#12254) 2026-10-21 21:19:40 +09:00
Wonsuk Choi
06d2607881
chore(oxlint.config): enable 'vitest/consistent-test-filename' (#12253) 2026-10-21 21:19:28 +09:00
Wonsuk Choi
fc845b4010
test(lit-query): assert the exact observer count and pending state instead of falling back with '?? 0' and '||' (#12252)
* test(lit-query): assert the exact observer count and pending state instead of falling back with '?? 0' and '||'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-21 21:08:08 +09:00
Wonsuk Choi
07bdb6bbec
chore(oxlint.config): enable 'vitest/require-mock-type-parameters' and type the mock functions (#12251) 2026-10-21 21:00:25 +09:00
Wonsuk Choi
5c7b9dbbce
chore(oxlint.config): enable 'vitest/prefer-strict-equal' and assert with 'toStrictEqual' (#12250)
* chore(oxlint.config): enable 'vitest/prefer-strict-equal' and assert with 'toStrictEqual'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-21 20:06:34 +09:00
Wonsuk Choi
1616702eb0
chore(oxlint.config): enable 'vitest/require-hook' and move setup code into hooks or tests (#12249) 2026-10-21 19:47:42 +09:00
Wonsuk Choi
ada9a5eff5
chore(oxlint.config): enable 'vitest/prefer-mock-return-shorthand' and use 'mockReturnValue' or 'vi.fn(implementation)' (#12248) 2026-10-21 19:27:17 +09:00
Wonsuk Choi
5ba86a672f
chore(oxlint.config): enable 'vitest/prefer-to-be' and assert primitive values with 'toBe', 'toBeNull', 'toBeUndefined' and 'toBeDefined' (#12247) 2026-10-21 19:27:02 +09:00
Wonsuk Choi
4dc1af9828
chore(oxlint.config): enable 'vitest/prefer-to-have-length' and assert lengths with 'toHaveLength' (#12246) 2026-10-21 17:38:08 +09:00
Wonsuk Choi
cdb344b074
chore(oxlint.config): enable the vitest style rules that already pass without violations (#12245) 2026-10-21 17:02:20 +09:00
Wonsuk Choi
c1dc50c36c
chore(oxlint.config): enable 'vitest/prefer-import-in-mock' and type the module mocks against the real modules (#12243) 2026-10-21 16:26:26 +09:00
Wonsuk Choi
03b3f9029f
chore(oxlint.config): enable 'vitest/prefer-expect-resolves' and assert resolved values with 'resolves' (#12244) 2026-10-21 16:25:46 +09:00
Wonsuk Choi
5393cdc265
chore(oxlint.config): enable 'vitest/prefer-mock-promise-shorthand' and use 'mockResolvedValue' and 'mockRejectedValue' (#12242) 2026-10-21 15:20:32 +09:00
Wonsuk Choi
3afe752939
chore(oxlint.config): enable 'vitest/prefer-spy-on' and spy on 'query.fetch' instead of overwriting it (#12241) 2026-10-21 15:15:50 +09:00
Wonsuk Choi
9648f0e3d6
chore(oxlint.config): enable 'vitest/prefer-called-times' and replace 'toHaveBeenCalledOnce' with 'toHaveBeenCalledTimes(1)' (#12240) 2026-10-21 15:15:28 +09:00