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

649 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
979695d0a2
docs({react,preact,angular,solid,svelte,vue}-query): describe when the 'Defined' and 'Undefined' 'initialData' overloads are selected (#12460)
* docs({react,preact,angular,solid,svelte,vue}-query): describe the 'initialData' overloads as 'known to be defined' and 'omitted or may be undefined'

* docs({react,preact,angular,solid,svelte,vue}-query): regenerate reference docs

* docs({react,preact,angular,solid,svelte,vue}-query): mention an 'initialData' function that may return 'undefined' in the 'Undefined' overload descriptions

* docs({react,preact,angular,solid,svelte,vue}-query): regenerate reference docs
2026-10-30 16:41:25 +09:00
Wonsuk Choi
7ccba6e959
fix({react,preact,angular,solid,vue}-query/infiniteQueryOptions): correct the overload selected for a possibly-undefined 'initialData' (#11373)
* fix({react,preact,angular}-query): remove erroneous '| undefined' from 'DefinedInitialDataInfiniteOptions'

* test({react,preact,angular}-query/infiniteQueryOptions): use a non-literal condition for the ternary 'initialData' test

* fix({solid,vue}-query): accept a possibly-undefined 'initialData' in 'UndefinedInitialDataInfiniteOptions'

* fix(vue-query/infiniteQueryOptions): declare the 'Defined' overload first so a defined 'initialData' still selects it

* docs({react,preact,angular,solid,vue}-query): drop generated reference doc changes, regenerated by autofix after merge

* chore(.changeset): align the message with the PR title

* docs({react,preact,angular,solid,vue}-query/infiniteQueryOptions): describe overload selection by whether 'initialData' is known to be defined

* docs(framework/*/reference): regenerate reference docs

* docs(framework): restore the generated reference docs from main and leave them to autofix

* docs({react,preact,angular,solid,vue}-query): regenerate reference docs

* test({react,preact,angular,solid,vue}-query/infiniteQueryOptions): start test titles with 'should'
2026-10-30 10:06:32 +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
42ae5caee8
chore(angular-query-experimental/createBaseQuery): explain why 'typescript/no-unnecessary-type-assertion' is disabled for the 'refetch' wrapper (#12329) 2026-10-25 12:49:13 +09:00
Wonsuk Choi
faa41e9c46
refactor(angular-query-experimental/injectQueries): remove the unnecessary 'QueryObserverOptions' assertion and its 'oxlint-disable' comment (#12324) 2026-10-25 12:43:36 +09:00
Wonsuk Choi
8f9dfcb30c
feat(angular-query-experimental/injectDevtoolsPanel): add the 'theme' and 'hideDisabledQueries' options (#12316) 2026-10-25 10:45:35 +09:00
Wonsuk Choi
9e4253766f
fix(angular-query-experimental/withDevtools): forward an unset 'theme' to the devtools so removing it falls back to the theme selected in the devtools Settings menu (#12315) 2026-10-24 03:05:27 +09:00
Wonsuk Choi
a5d5e00458
docs(*-devtools): describe how the 'theme' prop interacts with the theme selected in the devtools Settings menu (#12314) 2026-10-24 02:53:19 +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
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
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
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
c1dc50c36c
chore(oxlint.config): enable 'vitest/prefer-import-in-mock' and type the module mocks against the real modules (#12243) 2026-10-21 16:26:26 +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
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
688f6e0722
docs(*): describe 'shadowDOMTarget' as the shadow DOM the devtools styles are applied within (#11902) 2026-10-05 02:17:04 +09:00
Wonsuk Choi
1fd8ecea49
docs(angular-query-experimental): add JSDoc to the properties of the exported interfaces and type aliases (#11898) 2026-10-05 01:52:37 +09:00
Wonsuk Choi
51b43f8599
docs(angular-query-experimental): add JSDoc to the exported classes, methods, and arrow functions (#11884) 2026-10-04 12:36:48 +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
3ecdde1b6f
docs(angular-query-experimental): add JSDoc to the exported interfaces and type aliases (#11873) 2026-10-04 11:47:56 +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
4024a9d03f
docs(angular-query-experimental): add missing JSDoc to 'createBaseQuery' and the mutation state helper (#11845)
* docs(angular-query-experimental): add missing JSDoc to 'createBaseQuery' and the mutation state helper

* docs(angular-query-experimental): note that 'createBaseQuery' keeps functions callable
2026-10-04 04:17:13 +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
2aeb5a8a69
chore(angular-query*): manage 'angular' packages with pnpm 'catalog' (#11717) 2026-09-29 02:13:10 +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
024d89d4bb
chore(*): add 'tsconfig.legacy.json' and use it for type checks on older TypeScript versions (#11704) 2026-09-28 01:56:41 +09:00
Wonsuk Choi
f98b0d9af5
test(angular-query): keep each action, wait and assertion together (#11661)
* test(angular-query): remove blank lines between actions, waits and their assertions

* test(angular-query-experimental/injectQuery): add blank line after 'invalidateQueries'

* test(angular-query-experimental): remove blank lines between consecutive waits such as 'TestBed.tick' and 'app.whenStable'

* test(angular-query-experimental): remove blank lines within retry wait cycles and after awaited 'stablePromise'

* test(angular-query-experimental): keep 'detectChanges', component-instance actions and span retrievals together with their waits and assertions
2026-09-27 01:42:07 +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