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

325 commits

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-23 12:57:01 +02:00
github-actions[bot]
5743468462
ci: Version Packages (#11206)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-22 20:52:42 +02:00
Dominik Dorfmeister 🔮
267154cf6b
chore: tsup -> tsdown (#11222)
* chore: tsup -> tsdown

* revert size-limit and fix the build instead

* fix angular and devtools build

* fix nextJs builds

* more solid related things

* fix: import order
2026-08-18 15:19:43 +02:00
Gihyeon Jeong / 정기현
8582702152
refactor(eslint-plugin-query): remove unused ast-utils helpers (#11115)
* refactor(eslint-plugin-query): remove unused ast-utils helpers

Remove five unused helpers from the ASTUtils object in ast-utils.ts:
getNestedIdentifiers, getNestedReturnStatements, getClosestVariableDeclarator,
mapKeyNodeToText and mapKeyNodeToBaseText.

None are referenced by any rule or other module, and ASTUtils is not part of
the package's public API (it is not exported from index.ts). knip does not flag
them because ASTUtils is exported as a single object, so member-level dead code
slips past it.

All 1709 tests pass and ast-utils.ts line coverage rises from 41% to 95%.

* chore: add changeset for unused ast-utils helper removal

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 09:37:41 +02:00
Dominik Dorfmeister 🔮
279bb5508b
chore: update to ts 7 and move cut-off to 5.6 (#11212)
* update to ts 7 and move cut-off to 5.7

* changeset

* fix: use typescript v6 with tsup

* ci: apply automated fixes

* ref: update sveltejs/package

* ref: make ts6 the default typescript

* fix: lit build

* effing tsup

* move ignoreDeprecations to solid tsup config

* move ignoreDeprecations to relevant tsup configs

* better lit fix

* restore vue queryClient

* Revert "restore vue queryClient"

This reverts commit 4f95fc918a.

* fix things

* ignore devDep ordering

* vue needs to use ts6

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-17 22:50:18 +02:00
Abdul Wasay
3bc8edfa01
fix(eslint-plugin-query): avoid prototype property false-positives in no-unstable-deps (#11188)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-17 19:49:57 +02:00
github-actions[bot]
86bb8a6fb2
ci: Version Packages (#11094)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-21 15:00:30 +02:00
Eliya Cohen
7ac45ed45c
fix(eslint-plugin-query): ignore call targets in exhaustive-deps (#11067)
* fix(query-eslint): ignore call targets in exhaustive deps

* fix(query-eslint): guard AST parent access

* fix(query-eslint): accept JSX scope references

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-07-21 14:50:23 +02:00
github-actions[bot]
181ea826cb
ci: Version Packages (#11089)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-20 14:01:04 +02:00
github-actions[bot]
610e8d1684
ci: Version Packages (#10996)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-27 22:28:10 +02:00
github-actions[bot]
b80929716f
ci: Version Packages (#10977)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-23 11:57:22 +02:00
github-actions[bot]
f3d8d2abbf
ci: Version Packages (#10774)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-02 21:21:24 +02:00
Eliya Cohen
dc54932864
fix(eslint-plugin-query): detect rest destructuring on custom query hooks (#10775)
* fix(eslint-plugin-query): detect rest destructuring on custom query hooks

Adds an opportunistic type-aware path to no-rest-destructuring. When
TypeScript parser services are available, the rule resolves the call
expression's return type and reports rest destructuring on custom hooks
that return a TanStack Query result. Untyped projects keep the existing
AST-only behavior unchanged.

Closes #8951

* perf(eslint-plugin-query): gate type lookup behind cheap binding check

Only run the type checker on non-direct hook calls when the binding can
actually report (rest destructure or identifier), avoiding type lookups on
every variable declarator. Add tests for cross-statement rest destructuring
and interface-typed (non-alias) query results.

* ci: apply automated fixes

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-02 14:29:10 +02:00
전준연
dcdd552824
fix(eslint-plugin-query): track custom query hook wrappers (#10730)
* fix(eslint-plugin-query): track custom query hook wrappers

* fix(eslint-plugin-query): handle later custom hook wrappers

* test(eslint-plugin-query): avoid TDZ in wrapper test

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-05-29 20:51:33 +02:00
Raashish Aggarwal
532bb298fb
fix(tests): disable local coverage instrumentation (#10776)
Disable local coverage instrumentation

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-05-26 17:29:33 +02:00
github-actions[bot]
ba6e7beebd
ci: Version Packages (#10767)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-23 19:13:22 +02:00
github-actions[bot]
05cf2bc0a4
ci: Version Packages (#10758)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-22 21:16:14 +02:00
github-actions[bot]
5ff4f6936b
ci: Version Packages (#10755)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-22 20:50:43 +02:00
Vinamra Bhonsle
2ccdae8c37
fix(eslint-plugin-query): handle array-destructured useQueries results in no-unstable-deps (fix #10746) (#10747)
* fix(eslint-plugin-query): handle array-destructured useQueries results in no-unstable-deps

The `collectVariableNames` function in the `no-unstable-deps` rule only
handled `Identifier` patterns. When users array-destructure `useQueries`
or `useSuspenseQueries` results (e.g. `const [q1, q2] = useQueries(...)`),
the individual variables were not tracked as unstable. This meant passing
them directly to React hook dependency arrays was never flagged.

Extend `collectVariableNames` to also handle `ArrayPattern` — including
plain identifier elements and rest elements.

Fixes #10746

* ci: apply automated fixes

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-22 20:43:55 +02:00
Rayan Salhab
bb4556a688
fix(eslint-plugin-query): allow suspense queries combine deps (#10642)
Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-05-22 18:25:28 +02:00
github-actions[bot]
3e85350749
ci: Version Packages (#10706)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-18 21:44:23 +02:00
github-actions[bot]
9d2692cec4
ci: Version Packages (#10695)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-11 16:08:01 +02:00
Wonsuk Choi
74fa05eb1b
chore(tsconfig.json): narrow 'include' pattern to prevent TS6053 race conditions from tsup bundled config files (#10522)
* chore(tsconfig.json): exclude tsup bundled config files to prevent TS6053 race conditions

* chore(tsconfig.json): narrow 'include' pattern to specific config extensions

* ci: apply automated fixes

* chore(tsconfig.json): replace brace expansion with explicit '*.config.ts' and '*.config.js' patterns

* chore(tsconfig.json): use single-line 'include' arrays for consistency

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-04 03:24:13 +09:00
github-actions[bot]
8c3d523d0a
ci: Version Packages (#10630)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-03 16:45:38 +02:00
github-actions[bot]
9800c8f1a3
ci: Version Packages (#10623)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-02 13:08:18 +09:00
github-actions[bot]
3ae42619e5
ci: Version Packages (#10620)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-01 16:42:23 +09:00
github-actions[bot]
87f7ccf580
ci: Version Packages (#10604)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-29 01:36:20 +09:00
github-actions[bot]
441204b9d2
ci: Version Packages (#10582)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-25 19:25:49 +02:00
github-actions[bot]
55afb3e6fb
ci: Version Packages (#10581)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-25 17:51:28 +02:00
github-actions[bot]
fe287cc247
ci: Version Packages (#10579)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-25 13:15:56 +02:00
github-actions[bot]
93b2845000
ci: Version Packages (#10575)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-25 11:40:41 +02:00
github-actions[bot]
2f9527ed76
ci: Version Packages (#10568)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-23 16:20:54 +02:00
github-actions[bot]
ad517e5564
ci: Version Packages (#10567)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-23 15:15:00 +02:00
Wonsuk Choi
6b6667e5fb
test(*): migrate 'test' to 'it' and enforce 'vitest/consistent-test-it' rule (#10528)
* test(*): migrate 'test' to 'it' and enforce 'vitest/consistent-test-it' rule

* ci: apply automated fixes

* chore(preact-query): revert unintended removal of 'eslint-disable' comments from 'src' files

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-20 23:09:37 +09:00
github-actions[bot]
a3ec7b30cc
ci: Version Packages (#10520)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-19 12:55:14 +02:00
github-actions[bot]
69d2757c98
ci: Version Packages (#10514)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-18 20:07:19 +02:00
jemin
709971dd2c
fix(eslint-plugin-query): fix no-void-query-fn false positive on enums for TS 6 (#10460)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-04-18 14:23:36 +02:00
github-actions[bot]
adc2543ade
ci: Version Packages (#10454)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-11 19:54:13 +02:00
github-actions[bot]
6040278e75
ci: Version Packages (#10451)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-11 18:06:24 +02:00
github-actions[bot]
125067c05a
ci: Version Packages (#10436)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-09 10:33:54 +02:00
Byungsker
23a4029c9a
feat(eslint-plugin-query): add ESLint v10 to peer dependencies (#10182)
* feat(eslint-plugin-query): add ESLint v10 to peer dependencies

* fix: bump @typescript-eslint/utils to ^8.56.0 for ESLint v10 peer support

* chore: fix lockfile

* add typescript v6 support

* Apply suggestions from code review

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>

---------

Co-authored-by: TkDodo <office@dorfmeister.cc>
2026-04-09 10:31:00 +02:00
github-actions[bot]
5ca721fb05
ci: Version Packages (#10379)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-03 12:20:46 +02:00
mixelburg
deb62e0028
fix(eslint-plugin): normalize whitespace in allowList variable matching for multiline expressions (#10337)
* fix(eslint-plugin): normalize whitespace in allowList variable matching

When a member expression spans multiple lines (e.g. `ignored\n    .run()`),
`sourceCode.getText()` preserves the newline. The root segment extracted
by splitting on `.'` then becomes `'ignored\n    '`, which never matches
the allowlisted variable name `'ignored'`.

Fix: extend `normalizeChain` to also collapse all whitespace, so
multi-line chains produce the same identifier path as single-line ones.

Fixes #10334

* changeset

---------

Co-authored-by: Maks Pikov <mixelburg@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-04-03 12:02:57 +02:00
github-actions[bot]
75052a7fd0
ci: Version Packages (#10370)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-01 09:58:40 +02:00
Marc-André Côté
4a3275c15e
fix(build): exclude config files from production DTS rollup (#10358)
* fix(build): exclude config files from production DTS rollup

The `experimentalDts` option in tsup respects the tsconfig `include`
array to determine which files are in scope for DTS generation. Each
package's `tsconfig.json` includes `*.config.*` for IDE support, and
`tsconfig.prod.json` inherited this without overriding it. This caused
`vite.config.ts` and `tsup.config.ts` to be swept into the DTS rollup,
leaking `import { UserConfig } from 'vite'` into published types. Since
vite references `@types/node`, this globally overrides the DOM
`setTimeout` return type from `number` to `NodeJS.Timeout` for all
consumers.

Add `"include": ["src"]` (and `"exclude": ["src/__tests__"]` where
applicable) to all `tsconfig.prod.json` files that were missing it,
matching the pattern already used by query-core, react-query,
preact-query, and solid-query.

* chore: add changeset for DTS type pollution fix

* test(build): add regression test for build tool type leaks in .d.ts files

Adds scripts/verify-dts-imports.ts that scans all published .d.ts files
for forbidden imports from build tools (vite, tsup, vitest) and
`/// <reference types="node" />`. Wired into test:pr and test:ci to
run after the build completes.

* fix(build): fail fast when no .d.ts files found in verify-dts-imports

* chore: add exclude for consistency in react-query-next-experimental

* chore: fix log message to mention both .d.ts and .d.cts files

* ci: apply automated fixes

* chore: remove verify-dts-imports script and related package.json changes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-04-01 09:40:46 +02:00
github-actions[bot]
73e783bd86
ci: Version Packages (#10364)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-31 12:42:54 +02:00
Eliya Cohen
ed2f2ab01f
feat(eslint-plugin-query): add prefer-query-options rule (#10359) 2026-03-31 13:12:57 +03:00
Zelys
7e5fe214bd
test(eslint-plugin-query/no-void-query-fn): add coverage for prefetchQuery, prefetchInfiniteQuery, ensureQueryData, ensureInfiniteQueryData (#10353)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-03-30 15:10:17 +02:00
Zelys
289fe2eab9
test(eslint-plugin-query/no-void-query-fn): add coverage for useInfiniteQuery, useSuspenseQuery, queryOptions, fetchQuery (#10332)
The existing tests only exercised useQuery. The rule checks any object
property named queryFn, so it applies equally to useInfiniteQuery,
useSuspenseQuery, queryOptions(), and queryClient.fetchQuery(). Add
valid + invalid cases for each to document and lock in that behavior.

Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-03-29 14:19:50 +09:00
Wonsuk Choi
0e766f25f4
test(eslint-plugin-query/stable-query-client): fix misleading test name for async component with 'solid-query' import (#10344) 2026-03-28 16:19:14 +09:00