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

184 commits

Author SHA1 Message Date
github-actions[bot]
a6be1cede9
ci: Version Packages (#12391)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-01 11:04:19 +01:00
Wonsuk Choi
d88ba6ec46
docs(lit): remove '@tanstack/query-core' and 'lit' from the install commands to install only '@tanstack/lit-query' (#12209)
* docs(lit): remove '@tanstack/query-core' from the install commands since 'lit-query' already depends on it

* docs(lit): remove 'lit' from the install commands since apps using Lit Query already have it
2026-11-01 00:39:26 +09:00
Wonsuk Choi
5c5c11c6e7
fix(lit-query/package.json): remove '@tanstack/query-core' from 'peerDependencies' and move 'lit' to 'devDependencies' (#12189)
* fix(lit-query/package.json): remove '@tanstack/query-core' from 'peerDependencies' since it is already a dependency

* docs(lit): restore the install commands to move them to a separate change

* fix(lit-query/package.json): move 'lit' from 'dependencies' to 'devDependencies' so it is declared only as a peer dependency
2026-11-01 00:38:03 +09:00
Dominik Dorfmeister 🔮
18e54bfac3
fix(query-core): exclude fetchStatus from fetching filters (#12390) 2026-10-26 11:17:57 +01:00
github-actions[bot]
5cc606e2e8
ci: Version Packages (#12301)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-26 10:28:34 +01: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
016b83ecc0
chore(lit-query/{QueryClientProvider,BaseController}): explain why 'typescript/no-unnecessary-condition' is disabled for the 'client' checks (#12328) 2026-10-25 12:49:24 +09:00
Wonsuk Choi
91b7e3b029
test(lit-query): replace 'reparent' with 'reconnect' in the provider switch test titles (#12298) 2026-10-23 17:44:45 +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
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
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
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
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
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
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
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
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
c51b851953
chore(oxlint.config): enable 'vitest/prefer-to-contain' and assert array membership with 'toContain' (#12235) 2026-10-21 14:48:52 +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
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
271a4ed77e
refactor(lit-query): add the 'override' modifier to the implementations of the abstract controller hooks and document the hooks (#11913)
* refactor(lit-query): add the 'override' modifier to the implementations of the abstract controller hooks

* docs(lit-query/BaseController): note that 'onQueryClientChanged' also runs when no client is found

* docs(lit-query/BaseController): note that 'onConnected' may run without a client
2026-10-05 12:30:08 +09:00
Wonsuk Choi
ec66fc317b
test(lit-query): add the 'override' modifier to test classes that override a base class member (#11909) 2026-10-05 03:42:37 +09:00
Wonsuk Choi
ec8c6de884
refactor(lit-query): add the 'override' modifier to members that override a base class member (#11906) 2026-10-05 03:21:20 +09:00
Wonsuk Choi
fa539fee3b
docs(lit-query): add JSDoc to the exported classes, methods, and arrow functions (#11885) 2026-10-04 13:04:30 +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
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
29a29bbe12
docs(lit-query): add missing JSDoc to accessors, context errors, and result placeholders (#11844) 2026-10-04 04:16:31 +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
Wonsuk Choi
d7640e36b3
test(lit-query): group declarations, setup, and each action flow with blank lines in tests (#11815)
* test(lit-query): separate setup from the flow that starts with its baseline assertions in tests

* test(lit-query/ssr): keep the server rendering setup together and group reads with their assertions

* test(lit-query): separate element class declarations from the setup in tests

* test(lit-query): separate initial assertions, rerenders, and prefetches from the flows that follow them in tests
2026-10-03 19:57:50 +09:00
Wonsuk Choi
1182a06da7
test(lit-query/createMutationController): add test for not applying updates from the previous client mutation after switching clients (#11805)
* test(lit-query/createMutationController): add test for not applying updates from the previous client mutation after switching clients

* style(lit-query/createMutationController): attach the wait to the preceding assertion
2026-10-03 16:23:41 +09:00
Wonsuk Choi
f14d9b2098
test(lit-query): group each trigger with the waits and assertions that follow it in tests (#11814) 2026-10-03 16:20:46 +09:00
Wonsuk Choi
680773d55b
test(lit-query/createMutationController): add type tests (#11767)
* test(lit-query/createMutationController): add type tests

* test(lit-query/createMutationController): add type test for 'reset'
2026-10-03 15:53:53 +09:00
Wonsuk Choi
28afaa0d19
test(lit-query/createInfiniteQueryController): add type tests (#11766)
* test(lit-query/createInfiniteQueryController): add type tests

* test(lit-query/createInfiniteQueryController): add type tests for 'refetch', 'fetchNextPage', and 'fetchPreviousPage' return types

* test(lit-query/createInfiniteQueryController): move return type tests to the end
2026-10-03 15:52:36 +09:00
Wonsuk Choi
26106f8104
test(lit-query/createQueryController): add type tests (#11765)
* test(lit-query/createQueryController): add type tests

* test(lit-query/createQueryController): add type tests for 'refetch' and 'suspense' return types

* test(lit-query/createQueryController): nest type tests under 'initialData' and 'Config object overload'
2026-10-03 15:52:13 +09:00
Wonsuk Choi
c9f91d1dbe
test(lit-query): add server-side rendering tests with '@lit-labs/ssr' (#11813) 2026-10-03 13:09:37 +09:00