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

618 commits

Author SHA1 Message Date
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
1e6b56187f
docs(svelte-query): add JSDoc to the properties of the exported interfaces and type aliases (#11897) 2026-10-05 01:52:02 +09:00
Wonsuk Choi
71c663576d
docs(svelte-query): add JSDoc to the exported classes, methods, and arrow functions (#11883)
* docs(svelte-query): add JSDoc to the exported classes, methods, and arrow functions

* docs(svelte-query/utils): describe that 'watchChanges' runs on every change of the state its sources read
2026-10-04 12:36:12 +09:00
Wonsuk Choi
baf66c5da9
docs(svelte-query): add JSDoc to the exported interfaces and type aliases (#11872) 2026-10-04 11:47:21 +09:00
Wonsuk Choi
4736791624
docs(*): end JSDoc descriptions with a period and start them with an uppercase letter and enforce 'jsdoc/match-description' (#11862)
* docs(*): end JSDoc descriptions with a period and start them with an uppercase letter

* chore(eslint.config): enforce 'jsdoc/match-description'
2026-10-04 05:23:56 +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
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
16ae1d0cbd
docs(svelte-query): add missing JSDoc to svelte-query and svelte-query-persist-client (#11840) 2026-10-04 04:12:01 +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
b90d8cee92
chore(*): manage 'eslint' and '@typescript-eslint/parser' with pnpm 'catalog' (#11785) 2026-10-01 08:18:54 +09:00
Wonsuk Choi
de6b50c43a
chore(*): manage 'svelte' eslint plugin with pnpm 'catalog' (#11783) 2026-10-01 04:42:20 +09:00
Wonsuk Choi
cddf804a58
chore(svelte-query*): manage 'svelte' packages with pnpm 'catalog' (#11715) 2026-09-29 01:33:26 +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
6b95f2fdf9
chore(svelte-query*): type check on TS 5.6-5.9 by running 'svelte-check' with each TypeScript version (#11708)
* chore(svelte-query*): type check on TS 5.6-5.9 and 7.0 with 'tsconfig.legacy.json' like other packages

* chore(svelte-query*): run 'svelte-check' with each TypeScript version for TS 5.6-5.9 instead of 'tsc'

* chore(svelte-query*): use descriptive names in the 'svelte-check' TypeScript swap scripts

* chore(svelte-query*): fail the versioned type checks when 'svelte-check' does not load the swapped TypeScript
2026-09-28 11:53:45 +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
12dc7ddf02
test(svelte-query): keep each action, wait and assertion together and separate setup calls and new user actions (#11660)
* test(svelte-query): remove blank lines between actions, waits and their assertions

* test(svelte-query/createQuery): add blank lines around 'queryClient' calls

* test(svelte-query-devtools): remove blank lines between 'vi.dynamicImportSettled' and its assertions

* test({svelte-query,svelte-query-devtools}): separate actions after assertions and add blank lines after 'render'
2026-09-27 01:41:59 +09:00
Wonsuk Choi
2dbddfbb61
test(svelte-query): advance timers by the time the awaited work takes (#11657)
* test(svelte-query): advance timers by the time the awaited work takes

* test(svelte-query/createQuery): keep the intentional 100ms wait in the disabled query invalidation test
2026-09-26 18:15:19 +09:00
Wonsuk Choi
5bdb8d1476
test(svelte-query/createInfiniteQuery): add tests for 'initialData' with a failed refetch and an infinite query waiting on 'skipToken' (#11655)
* test(svelte-query/createInfiniteQuery): add tests for 'initialData' with a failed refetch and an infinite query waiting on 'skipToken'

* test(svelte-query/createInfiniteQuery): advance timers by the minimum 10ms in the 'initialData' and 'skipToken' tests
2026-09-26 17:46:34 +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
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
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
Wonsuk Choi
dfc3d9abed
docs(svelte-query/useMutationState): align the JSDoc description with the other adapters (#11624)
* docs(svelte-query/useMutationState): replace 'hook instance' with 'createMutation' call in JSDoc

* docs(svelte-query/useMutationState): align the JSDoc description with the other adapters
2026-09-25 14:27:22 +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
changbaebang
1e90d389e5
docs(svelte-query): add package 'README.md' (#11604)
* docs(svelte-query): add package README

Every other adapter (react, preact, solid, vue, lit, angular) ships a
README; svelte-query did not, so its npm page is empty. Copied from
solid-query, which uses the ci badge that still resolves.

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

* docs(svelte-query): fix the CI link encoding and point the downloads badge at this package

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

* docs(svelte-query/README): replace 'Primitives' with 'Functions' in the description

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-09-25 14:12:34 +09:00
Wonsuk Choi
d03806572a
fix(svelte-query/{createQuery,queryOptions}): correct the overload selected for 'initialData' (#11592)
* fix(svelte-query/{createQuery,queryOptions}): correct the overload selected for 'initialData'

* test(svelte-query/queryOptions): use a non-literal condition instead of a wrapper function in the optional 'initialData' object test
2026-09-24 20:01:04 +10:00
Wonsuk Choi
f6036d75f2
test(svelte-query/createMutation): rename per-call 'onSuccess' mocks to 'onSuccessMutate' to align with react-query (#11601) 2026-09-24 14:11:29 +09:00
Wonsuk Choi
7176a1cfa9
docs(svelte-query/{createInfiniteQuery,infiniteQueryOptions}): describe overload selection by whether 'initialData' is known to be defined (#11589)
* docs(svelte-query/{createInfiniteQuery,infiniteQueryOptions}): describe overload selection by whether 'initialData' is known to be defined

* docs(svelte-query): regenerate reference docs
2026-09-23 17:07:05 +09:00
Wonsuk Choi
04c0fa109f
docs(svelte-query): correct 'initialData'/'select' JSDoc inaccuracy (#11577) 2026-09-23 12:21:07 +09:00
github-actions[bot]
8884f1a4d9
ci: Version Packages (#11582)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-22 15:35:37 +02: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
github-actions[bot]
413ba6e30b
ci: Version Packages (#11566)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-21 20:28:35 +10:00
Simon H
1490a4b2ae
fix: support async Svelte (#9810)
* fix: support async Svelte

Svelte 5 now supports async await in components. One behavior there is that when a component is created as part of a boundary that has pending async work, its `$effect`s will not run until that async work is done.

The way the code is written right now means you can end up in an infinite pending state: If you do `await someQuery.promise`, the `$effect` for the subscription will never run, and therefore the `await` will never resolve. This PR fixes it.

* lint

* fix

---------

Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2026-09-21 20:10:05 +10:00
github-actions[bot]
e0f6c5542f
ci: Version Packages (#11525)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-21 11:29:33 +02:00
Wonsuk Choi
94de9b4e31
docs(svelte-query): call 'useIsMutating' a function instead of a hook (#11559) 2026-09-21 10:16:49 +09:00
Wonsuk Choi
47f27a4824
docs(svelte-query): add summaries to reference pages that render without a description (#11553) 2026-09-21 02:05:42 +09:00
github-actions[bot]
c08f5766dd
ci: Version Packages (#11511)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-16 16:56:55 +02:00
github-actions[bot]
19ccf2794b
ci: Version Packages (#11339)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-16 09:03:53 +02:00
Wonsuk Choi
2da46cd137
chore(*): use eslint description syntax for grandfathered 'no-restricted-syntax' disables (#11508) 2026-09-16 10:43:43 +09:00
Dominik Dorfmeister 🔮
58ad3e2f08
fix: isolate TypeScript test output (#11503) 2026-09-15 20:56:41 +02:00