0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
Commit graph

992 commits

Author SHA1 Message Date
github-actions[bot]
12199722dc
ci: Version Packages (#12062)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-17 19:51:17 +02:00
chungyoung kim
1fee0443db
fix(query-core): clear mutations before notifying subscribers (#11470)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-10-17 19:46:13 +02:00
JeongHoon
c20886163a
fix(react-query): retry queries with falsy errors on mount (#11328)
* fix(react-query): retry queries with falsy errors on mount

* refactor(react-query): keep throwOnError constant

---------

Co-authored-by: TkDodo <office@dorfmeister.cc>
2026-10-17 19:26:30 +02:00
Wonsuk Choi
a10839824c
fix(react-query*): declare '@types/react' as an optional peer dependency (#11728)
* fix(react-query*): declare '@types/react' as a peer dependency like 'react-query-devtools'

* fix(react-query*): mark '@types/react' as an optional peer dependency
2026-10-17 18:07:05 +02:00
github-actions[bot]
ee47993724
ci: Version Packages (#11998)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-15 09:50:17 +02:00
Sviat Barbutsa
0f15bc925d
fix(query-core): preserve union narrowing in setQueryData updaters (#11935)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-10-15 09:36:14 +02:00
github-actions[bot]
b699b52d60
ci: Version Packages (#11849)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-11 21:32:27 +02:00
Dominik Dorfmeister 🔮
e22e7c4a27
chore: test TypeScript 7.1 preview and drop 5.6 (#11947)
* chore: test TypeScript 7.1 preview and drop 5.6

* chore: use a mature TypeScript 7.1 preview
2026-10-10 16:26:58 +02:00
Wonsuk Choi
df78a9d137
chore(*): pass the root 'settings' to the package oxlint configs, which 'extends' does not inherit (#11941) 2026-10-10 01:39:06 +09:00
Ciarán Curley
833062c2fc
chore: replace prettier with oxfmt (#11939)
Replace prettier with oxfmt

The options and ignores have been ported to the `.oxfmtrc.json` file (oxfmt `printWidth` default is 100 characters, so preserving 80 for now). While the configuration with Prettier is the same, oxfmt seems to modify some things slightly differently, apparently due to the use of a pre-3.9 Prettier layout for union types that break onto their own line so we still end up with about 30 files changed. 

Files with actual changes are:

- `.prettierignore`.`prettier.config.js`: Deleted. Replaced with `.oxfmtrc.json`
- `package.json`: `format` script changed to `oxfmt`. Added `oxfmt` and `svelte` as `devDependencies`; removed `prettier` and `prettier-plugin-svelte`.
- `pnpm-lock.yaml`: Lockfile update for the dependency changes above.
- `scripts/generate-labeler-config.ts`: Formats with oxfmt's `format()` API instead of Prettier's. It reads `.oxfmtrc.json` itself, because the API doesn't find config files on its own, and throws if formatting reports errors. Its output is identical to what Prettier produced.


Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:47:26 +01:00
Ciarán Curley
d0cfa6a4a8
chore: replace eslint with oxlint (#11938)
* chore: replace eslint with oxlint

Migrates to oxlint as the replacement linter for eslint.

Keeps the existing ruleset, runs js plugins for non-native oxlint rules and the local no-restricted-syntax plugin

Svelte packages keep a slim ESLint config for the svelte/* rules, which need the component template.
React examples that use the query eslint plugin also still use eslint for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: use oxlint disable directives

ESLint no longer lints these files, so switch eslint-disable comments to
oxlint-disable and the @typescript-eslint/ prefix to typescript/. Remove
directives that oxlint reports as unused, and name the rule in the
cspell oxlint-enable comments, which oxlint does not match to a
rule-specific disable otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: lint expectTypeOf with vitest valid-expect

Oxlint's native vitest/valid-expect only checks `expect` calls, so load
@vitest/eslint-plugin as a JS plugin for this rule to keep flagging
`expectTypeOf` calls without a matcher, and restore the directives for
the intentional ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:35:33 +01:00
Wonsuk Choi
0012ec14c3
docs(react-query): add JSDoc to the properties of the exported interfaces and type aliases (#11894) 2026-10-05 01:49:55 +09:00
Wonsuk Choi
b5e8e7b697
docs(react-query): add JSDoc to the exported classes, methods, and arrow functions (#11880)
* docs(react-query): add JSDoc to the exported classes, methods, and arrow functions

* docs(react-query-persist-client/PersistQueryClientProvider): describe what is deferred while restoring and when the callbacks run
2026-10-04 12:32:24 +09:00
Wonsuk Choi
01abab33f8
docs(*): note that 'throwOnError' makes the hook rethrow the errors of 'mutate' (#11877)
* docs(*): note that 'throwOnError' makes the hook rethrow the errors of 'mutate'

* docs(angular-query-experimental/types): mention that 'injectMutation' emits the error on 'ngZone.onError' before rethrowing it
2026-10-04 12:29:23 +09:00
Wonsuk Choi
b42166e557
docs(react-query): add JSDoc to the exported interfaces and type aliases (#11868) 2026-10-04 11:41:22 +09:00
Wonsuk Choi
205d422412
docs(*): add missing JSDoc descriptions and enforce 'jsdoc/require-description' (#11860)
* docs(*): add missing JSDoc descriptions

* chore(eslint.config): enforce 'jsdoc/require-description'
2026-10-04 05:16:10 +09:00
Wonsuk Choi
cbdb21468a
docs(*): replace JSDoc descriptions that only repeat the names and enforce 'jsdoc/informative-docs' (#11859)
* docs(*): replace JSDoc descriptions that only repeat the names

* chore(eslint.config): enforce 'jsdoc/informative-docs'
2026-10-04 05:08:09 +09:00
Wonsuk Choi
0b9949acb9
docs(*): sort JSDoc tags and enforce 'jsdoc/sort-tags' (#11858)
* docs(*): sort JSDoc tags

* chore(eslint.config): enforce 'jsdoc/sort-tags'
2026-10-04 05:03:01 +09:00
Wonsuk Choi
cada88ab41
docs(*): add missing JSDoc '@throws' tags and enforce 'jsdoc/require-throws' (#11856)
* docs(*): add missing JSDoc '@throws' tags

* chore(eslint.config): enforce 'jsdoc/require-throws'
2026-10-04 04:52:09 +09:00
Wonsuk Choi
ba341f5a07
docs(react-query): add missing JSDoc to react-query, react-query-next-experimental, and react-query-devtools (#11843)
* docs(react-query): add missing JSDoc to react-query, react-query-next-experimental, and react-query-devtools

* docs(react-query-next-experimental): correct where streamed hydration and HTML insertion happen
2026-10-04 04:15:50 +09:00
Wonsuk Choi
57db962344
docs(*): fix JSDoc '@param' names that don't match the parameters and enforce 'jsdoc/check-param-names' (#11828)
* docs(*): fix JSDoc '@param' names that don't match the parameters

* chore(eslint.config): raise 'jsdoc/check-param-names' to error without requiring destructured properties
2026-10-04 01:57:41 +09:00
Wonsuk Choi
9dd8afef53
docs(*): remove blank lines between JSDoc descriptions and tags and enforce 'jsdoc/tag-lines' (#11827)
* docs(*): remove blank lines between JSDoc descriptions and tags

* chore(eslint.config): raise 'jsdoc/tag-lines' from warning to error
2026-10-04 01:34:16 +09:00
Wonsuk Choi
5ab1aaeddf
chore(eslint.config): use 'defineConfig' from 'eslint/config' (#11819) 2026-10-03 23:17:10 +09:00
Wonsuk Choi
f4c174b24b
test(*): start test titles with 'should' (#11816)
* test(*): start test titles with 'should'

* test(*): start the remaining test titles with 'should'

* test(eslint-plugin-query): start 'it.each' titles with 'should'

* test({react,preact}-query/useSuspenseQueries): fix title to match the assertion that 'TData' excludes 'undefined'
2026-10-03 20:58:09 +09:00
github-actions[bot]
29859ae60c
ci: Version Packages (#11806)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-02 12:02:10 +02:00
Wonsuk Choi
339e09f4e5
chore(*): manage 'react' eslint plugins with pnpm 'catalog' (#11781) 2026-10-01 04:15:27 +09:00
Wonsuk Choi
0a5727935a
test({react,preact,solid,angular}-query/mutationOptions): fix 'mutationOpt1' typo to 'mutationOpts1' in test names (#11742) 2026-09-29 21:46:55 +09:00
Wonsuk Choi
c51bb623bb
chore(*): declare '@eslint-react/eslint-plugin' in the react packages and examples that use it instead of the root (#11726) 2026-09-29 11:56:40 +09:00
Wonsuk Choi
a91461326b
chore(*): declare 'eslint-plugin-react-hooks' in the react packages that use it instead of the root (#11725) 2026-09-29 11:37:46 +09:00
Wonsuk Choi
d99c84b6b5
chore(*): update '@eslint-react/eslint-plugin' to v5 and apply its 'recommended' config that was overridden (#11721)
* refactor(react-query*): rename local 'useRef' and 'createContext' variables to follow '@eslint-react' naming conventions

* test(react-query): follow '@eslint-react' recommended rules with 'useState' value and setter pairs, stable keys, and disables for nested component false positives

* chore(*): update '@eslint-react/eslint-plugin' to v5 and apply its 'recommended' config that was overridden

* chore(*): list 'react-hooks' rules before '@eslint-react' rules to match the config order
2026-09-29 10:43:27 +09:00
Wonsuk Choi
fd96529f3e
chore(*): update 'eslint-plugin-react-hooks' to v7 and use its stable 'recommended' config (#11720)
* chore(*): update 'eslint-plugin-react-hooks' to v7 and remove the '@ts-expect-error' for its config

* chore(*): use stable 'recommended' config of 'eslint-plugin-react-hooks' instead of 'recommended-latest'

* chore(*): remove 'react-hooks/rules-of-hooks' override that duplicates the 'recommended' config
2026-09-29 03:19:45 +09:00
Wonsuk Choi
e878990b86
chore(*): manage 'react' packages with pnpm 'catalog' (#11712) 2026-09-28 18:49:08 +09:00
Wonsuk Choi
2e1ad64b52
chore(*): declare 'npm-run-all2' once in the root 'package.json' like other shared tools (#11710) 2026-09-28 13:13:48 +09:00
Wonsuk Choi
c1de23a80e
chore(*): manage 'typescript' with pnpm 'catalog' and declare it in each package so 'tsc' runs the default version (#11705) 2026-09-28 10:04:50 +09:00
Wonsuk Choi
8b1eafb918
chore(*/package.json): use 'tsconfig.legacy.json' for 'test:types:ts70' like other versioned type checks (#11703) 2026-09-28 01:17:11 +09:00
Wonsuk Choi
b5d4242976
test({react,preact}-query): keep each action, wait and assertion together and separate each new user action (#11658)
* test({react-query,preact-query}): keep each action, wait and assertion together and separate each new user action

* test({react-query,preact-query}): remove remaining blank lines around a commented assertion and 'act' wait blocks

* test(react-query/useSuspenseQueries): remove blank line between the 'fireEvent' wrapped in 'expect' and its wait

* test({react-query,preact-query}): add blank lines after setup such as 'renderWithClient', 'rerender' and 'queryClient' calls

* test({react-query,preact-query}-persist-client): remove blank lines between assertions, waits and their assertions

* test(react-query/transition): remove blank lines between 'act' wrapped 'fireEvent' and its assertions

* test({react-query,preact-query}): add blank lines before 'fireEvent' after multi-line assertions and keep prefetch with its wait
2026-09-27 01:39:14 +09:00
github-actions[bot]
d4033eb1e5
ci: Version Packages (#11651)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-26 13:53:37 +10:00
Lachlan Collins
5279b05211
chore(deps): update Vite from v6 to v8 (#11650)
* chore(deps): update Vite from v6 to v8

* Fix angular, vue-devtools

* Fix vue-devtools

* Fix knip, remove @tanstack/vite-config

* Update eslint config

* Disable false eslint errors

* Fix remaining errors

* Fix knip, dedupe esbuild

* Add changeset
2026-09-26 12:23:02 +10:00
github-actions[bot]
fe053bf8e9
ci: Version Packages (#11612)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-26 10:13:58 +10:00
Lachlan Collins
1c9693eac7
fix(codemods): update codemods build script (#11647)
* fix(codemods): update codemods build script

* Add changeset
2026-09-26 07:47:49 +10:00
Lachlan Collins
f00aad602e
chore(deps): update dev dependencies (#11640)
chore(deps): update many dev dependencies
2026-09-26 07:30:31 +10:00
Wonsuk Choi
2443290fb5
test(*): rename 'console.error' spies to 'consoleErrorMock' (#11646) 2026-09-26 00:45:05 +09:00
Wonsuk Choi
fcab29fa8c
test({query-core,react-query,preact-query}): restore the previous 'isServer' value in 'setIsServer' instead of the deprecated 'isServer' constant (#11632)
* test(query-core/utils): restore the previous 'isServer' value in 'setIsServer' instead of the deprecated 'isServer' constant

* test(react-query/utils): restore the previous 'isServer' value in 'setIsServer' instead of the deprecated 'isServer' constant

* test(preact-query/utils): restore the previous 'isServer' value in 'setIsServer' instead of the deprecated 'isServer' constant

* test({query-core,react-query,preact-query}/utils): rename 'original' to 'originalIsServer' in 'setIsServer'
2026-09-25 17:16:27 +09:00
Wonsuk Choi
e8dacbee8b
docs({react-query,preact-query,solid-query,svelte-query}/README): point the CI badge at the 'release.yml' workflow on 'main' (#11633)
* docs({react-query,preact-query,solid-query,svelte-query}/README): point the CI badge at the 'release.yml' workflow on 'main'

* docs({react-query,preact-query,solid-query,svelte-query}/README): add alt text to the release badge
2026-09-25 17:14:12 +09:00
Lachlan Collins
57f40eb05b
chore(deps): update non-major dependencies (#11625)
* chore(deps): update non-major dependencies

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-25 15:15:46 +10:00
Wonsuk Choi
397ad07f60
test({query-core,react-query,preact-query,solid-query}): pass 'unhandledRejectionFn' directly so 'process.off' removes the 'unhandledRejection' listener (#11610)
* test(query-core/{mutation,mutationObserver}): pass 'unhandledRejectionFn' directly so 'process.off' removes the 'unhandledRejection' listener

* test(react-query/useMutation): pass 'unhandledRejectionFn' directly so 'process.off' removes the 'unhandledRejection' listener

* test(preact-query/useMutation): pass 'unhandledRejectionFn' directly so 'process.off' removes the 'unhandledRejection' listener

* test(solid-query/useMutation): pass 'unhandledRejectionFn' directly so 'process.off' removes the 'unhandledRejection' listener
2026-09-25 11:26:16 +09:00
Wonsuk Choi
5c018edc2d
test({react,preact}-query/queryOptions): use a non-literal condition instead of a wrapper function in the optional 'initialData' object test (#11594) 2026-09-23 19:10:49 +09:00
Wonsuk Choi
848b42129e
docs({react,preact,solid,vue}-query/useQuery): add 'initialDataUpdatedAt' to the seeding example (#11579) 2026-09-23 13:36:10 +09:00
Wonsuk Choi
d33b407d2a
docs({react,preact}-query): correct 'initialData'/'select' and 'QueriesOptions' fallback JSDoc inaccuracies (#11574)
* docs(react-query): correct inaccurate JSDoc statements

* docs(react-query): split QueriesOptions/SuspenseQueriesOptions JSDoc into paragraphs

* docs(preact-query): correct 'initialData'/'select' and 'QueriesOptions' fallback JSDoc inaccuracies

* docs({react,preact}-query): fix missed 'select' qualifier on 'DefinedInitialDataOptions' JSDoc
2026-09-23 12:19:55 +09:00
Wonsuk Choi
9b14786c6a
test({react,preact,svelte}-query/queryOptions): remove dead 'QueriesObserver' type tests duplicated by 'query-core' (#11572) 2026-09-22 14:06:16 +09:00