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

728 commits

Author SHA1 Message Date
Wonsuk Choi
4c1384f122
test(solid-query/{useMutation,useIsMutating,useQueries}): assert that the work settles in the cache after unmount while the component state stays unchanged (#12341) 2026-10-25 20:18:56 +09:00
Wonsuk Choi
8429d10720
test(solid-query/{useMutation,useIsMutating,useQueries}): wait for the work to settle after unmount and assert that no error is logged (#12336) 2026-10-25 13:41:40 +09:00
Wonsuk Choi
1eed9d9ef5
chore(*): explain why 'vitest-js/valid-expect' is disabled for the 'expectTypeOf<TQueryKey>(ctx.queryKey)' checks in the 'useQueries' type tests (#12332) 2026-10-25 13:28:51 +09:00
Wonsuk Choi
e1547fd10a
test(solid-query/useInfiniteQuery): match the 'skipToken' test timer advances to the 'queryFn' sleep of 10ms (#12305) 2026-10-24 01:49:12 +09:00
Wonsuk Choi
0ab7c5ffb9
test(solid-query/suspense): replace the 'TODO(lukemurray)' comments with notes explaining why the state counts differ from react (#12300) 2026-10-23 17:58:21 +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
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
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
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
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
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
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
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
22d9966fba
chore(oxlint.config): enable 'vitest/prefer-called-with' and assert the call arguments with 'toHaveBeenCalledWith' (#12237) 2026-10-21 14:52:07 +09:00
Wonsuk Choi
d28d4d29bd
test({react,preact,solid,svelte,lit}-query,angular-query-experimental): assert the data tag directly in the 'skipToken'-only 'queryOptions' type test (#12218)
* test({react,preact,solid,lit}-query,angular-query-experimental): assert the data tag directly in the 'skipToken'-only 'queryOptions' type test

* test(svelte-query/queryOptions): assert the data tag directly in the 'skipToken'-only type test
2026-10-21 10:45:16 +09:00
github-actions[bot]
a8ecc8d42f
ci: Version Packages (#12128)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-19 18:54:46 +02:00
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
Seungtaek Oh
7ea0278558
fix(solid-query): subscribe to the new observer when the queryClient changes (#11920)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-10-17 19:10:13 +02:00
Wonsuk Choi
fc3a3848f2
fix({preact,solid,svelte,angular-query-experimental}): switch to 'export type *' for type-only re-exports (#11251)
* fix({preact,solid,svelte,angular-query-experimental}): switch to 'export type *' for type-only re-exports

* chore(.changeset/export-type-star-adapters): trim redundant PR cross-reference from changeset body
2026-10-17 18:51:10 +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
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
aab352876a
chore(solid-query*): add 'eslint-plugin-solid' (#11929)
* chore(solid-query*): add 'eslint-plugin-solid'

* chore(solid-query*): explain why 'solid/reactivity' is off and keep it on in 'solid-query-persist-client'
2026-10-08 18:59:06 +09:00
Wonsuk Choi
4e1476cb69
test(solid-query): add the 'override' modifier to test classes that override a base class member (#11911) 2026-10-05 03:42:52 +09:00
Wonsuk Choi
b18e7ab6f4
docs(solid-query): add JSDoc to the properties of the exported interfaces and type aliases (#11895) 2026-10-05 01:50:30 +09:00
Wonsuk Choi
2c39f03b44
docs(solid-query): add JSDoc to the exported classes, methods, and arrow functions (#11882)
* docs(solid-query): add JSDoc to the exported classes, methods, and arrow functions

* docs(solid-query-persist-client/PersistQueryClientProvider): describe what is deferred while restoring and when the callbacks run
2026-10-04 12:34:40 +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
0defd3b2e7
docs(solid-query): add JSDoc to the exported interfaces and type aliases (#11870) 2026-10-04 11:44:24 +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
03786fbb93
docs(solid-query): add missing JSDoc to solid-query and solid-query-devtools (#11841) 2026-10-04 04:12:48 +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
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
7da749dfb6
chore(*): manage 'solid' packages with pnpm 'catalog' (#11714) 2026-09-29 01:19:27 +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
c4975411ea
test(solid-query): keep each action, wait and assertion together and separate each new user action (#11662)
* test(solid-query): remove blank lines between actions, waits and their assertions

* test(solid-query/QueryClientProvider): add blank line after 'render'

* test(solid-query/{useIsFetching,useIsMutating}): remove blank lines between the awaited 'Promise.all' and its assertion

* test(solid-query/useQuery): add blank lines around 'window.dispatchEvent'
2026-09-27 01:42:45 +09:00
Wonsuk Choi
c1e7dfbe94
test(solid-query/useInfiniteQuery): add test for not fetching while 'queryFn' is 'skipToken' and fetching once it is replaced (#11654) 2026-09-26 16:11:46 +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
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