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

160 commits

Author SHA1 Message Date
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
Wonsuk Choi
85f3f97863
test(lit-query/createQueriesController): add test for reusing hydrated data on an already-connected host without an eager refetch (#11811) 2026-10-03 12:31:00 +09:00
Wonsuk Choi
1ed38048ce
test(lit-query/createInfiniteQueryController): add test for reusing hydrated data on an already-connected host without an eager refetch (#11810) 2026-10-03 12:30:54 +09:00
Wonsuk Choi
6fbdebb4ae
style(*): remove numeric separators from number literals (#11812)
* style(lit-query/{createQuery,createInfiniteQuery,createQueries}Controller): remove numeric separator from 'staleTime' values

* style(*): remove numeric separators from the remaining number literals
2026-10-03 12:07:32 +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
94e20031dd
test(lit-query/createQueryController): add test for removing the observer from the query when destroyed (#11804) 2026-10-02 11:09:06 +09:00
Wonsuk Choi
d49c1f5885
test(lit-query/useMutationState): add test for returning the current mutation states when connected after a mutation started (#11803) 2026-10-02 10:24:25 +09:00
Wonsuk Choi
d547e2195d
test(lit-query/createQueriesController): add test for not having stale closures with 'combine' (#11802) 2026-10-02 10:23:35 +09:00
Wonsuk Choi
113ce9d467
test(lit-query/createQueryController): add test for not cancelling an ongoing 'refetch' with 'cancelRefetch: false' (#11801) 2026-10-02 09:46:07 +09:00
Wonsuk Choi
17e498e292
test(lit-query/createInfiniteQueryController): add test for not cancelling an ongoing 'fetchNextPage' with 'cancelRefetch: false' (#11800) 2026-10-02 09:38:51 +09:00
Wonsuk Choi
782b2e6fff
test(lit-query/BaseController): add test for resolving to a missing client when the host cannot dispatch events (#11797) 2026-10-01 16:09:22 +09:00
Wonsuk Choi
ea2149416b
test(lit-query/createMutationController): add test for using mutation defaults (#11793) 2026-10-01 14:13:02 +09:00
Wonsuk Choi
d1e1bac8e1
test(lit-query/createQueriesController): assert user-visible query results through the rendered output (#11780) 2026-10-01 04:11:04 +09:00
Wonsuk Choi
ecc633a9b5
test(lit-query/createQueriesController): add type tests for initialData, type parameters, and 'select' (#11768) 2026-10-01 04:10:55 +09:00
Wonsuk Choi
69de5a68bb
test(lit-query/createInfiniteQueryController): assert user-visible pages and errors through the rendered output (#11779) 2026-10-01 04:10:38 +09:00
Wonsuk Choi
c5486aad8c
test(lit-query/createQueryController): assert user-visible query states through the rendered output (#11778) 2026-10-01 04:10:27 +09:00
Wonsuk Choi
06441d90a5
test(lit-query/{useIsFetching,useIsMutating,useMutationState}): assert user-visible counts and states through the rendered output (#11777) 2026-10-01 04:09:50 +09:00
Wonsuk Choi
6622c5e48d
test(lit-query/createMutationController): assert user-visible mutation states through the rendered output (#11776) 2026-10-01 04:09:39 +09:00
Wonsuk Choi
27f8875cef
test(lit-query/{createQueryController,createInfiniteQueryController,createQueriesController}): add tests for returning the same result between reads when nothing changed (#11775) 2026-10-01 03:55:36 +09:00
Wonsuk Choi
8cd151db5a
test(lit-query/createInfiniteQueryController): split the combined initial page, 'fetchNextPage', and 'fetchPreviousPage' test into separate tests (#11774) 2026-10-01 03:36:31 +09:00
Wonsuk Choi
f2032dd10f
test(lit-query/createMutationController): split combined 'mutate'/'mutateAsync' and state transition tests into separate tests (#11773) 2026-10-01 03:31:12 +09:00
Wonsuk Choi
5646be2815
test(lit-query/{useIsFetching,useIsMutating}): add tests for not processing cache updates while disconnected (#11772) 2026-10-01 03:31:00 +09:00
Wonsuk Choi
cfe3acac07
test(lit-query/createQueriesController): add test for not processing detached updates when disconnected while in-flight (#11771) 2026-10-01 03:30:42 +09:00
Wonsuk Choi
f1ad8d9536
test(lit-query/createMutationController): add test for not processing detached updates when disconnected while in-flight (#11770) 2026-10-01 03:30:21 +09:00
Wonsuk Choi
e09f07e780
test(lit-query/createInfiniteQueryController): add tests for cancelling the query function when disconnected and for replacing 'skipToken' (#11761) 2026-10-01 03:24:18 +09:00