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

413 commits

Author SHA1 Message Date
Ciarán Curley
4a7386a470
chore(deps): upgrade vitest to v5 (#12317)
Bump vitest and @vitest/coverage-istanbul to 5.0.5 (root and
query-test-utils) and @vitest/eslint-plugin to 1.6.28.

Vitest 5's typecheck collector treats any name ending in Test as a test function, so notifyManagerTest in query-core/src/__tests__/notifyManager.test-d.tsx was renamed to localNotifyManager.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:26:03 +01:00
Wonsuk Choi
bb41f83caa
chore(oxlint.config): add 'eslint-plugin-testing-library' with its DOM rules and query present elements with 'getBy' (#12269)
* chore(oxlint.config): add 'eslint-plugin-testing-library' with its DOM rules and query present elements with 'getBy'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-22 11:37:21 +09:00
Wonsuk Choi
670fc2817f
chore(oxlint.config): add 'eslint-plugin-jest-dom' with its recommended rules and assert DOM presence with 'toBeInTheDocument' (#12268) 2026-10-22 10:56:42 +09:00
Wonsuk Choi
f38e6271b4
chore(*): update '@tanstack/typedoc-config' to v0.3.5 (#12035)
* chore(scripts/generate-docs): read type alias bodies whose type parameters have defaults

* chore(*): update '@tanstack/typedoc-config' to v0.3.5
2026-10-17 11:14:03 +09:00
Wonsuk Choi
d2f0536386
chore(deps): update '@types/node' to '^24.19.2' to match Node 24 in '.nvmrc' (#11978) 2026-10-12 21:13:34 +09: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
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
1d2cf91305
chore(*): update '@tanstack/typedoc-config' to v0.3.4 (#11817)
* chore(*): update '@tanstack/typedoc-config' to v0.3.4 and load its custom settings plugin by package export

* docs(framework/*/reference): regenerate reference docs with '@tanstack/typedoc-config' v0.3.4

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

* docs(framework/*/reference): regenerate reference docs
2026-10-05 12:41:28 +09:00
Wonsuk Choi
da60e24c85
chore(eslint.config): apply 'eslint-plugin-jsdoc' recommended rules to non-test source files (#11825)
* chore(eslint.config): apply 'eslint-plugin-jsdoc' recommended rules to non-test source files

* chore(eslint.config): name the 'jsdoc' config object 'tanstack/jsdoc'
2026-10-04 01:14:38 +09:00
Wonsuk Choi
6b42538b18
chore(package.json): update '@cspell/eslint-plugin' to v10.3.6 (#11824) 2026-10-04 00:54:31 +09:00
Wonsuk Choi
808501b150
chore(package.json): update '@tanstack/eslint-config' to v0.4.0 (#11820) 2026-10-03 23:54:39 +09: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
1e4be4ee5c
chore(*): remove unused 'react' packages from the root and scope the knip '@types/react' ignore to the packages that need it (#11727) 2026-09-29 13:55:41 +09:00
Wonsuk Choi
c51bb623bb
chore(*): declare '@eslint-react/eslint-plugin' in the react packages and examples that use it instead of the root (#11726) 2026-09-29 11:56:40 +09:00
Wonsuk Choi
a91461326b
chore(*): declare 'eslint-plugin-react-hooks' in the react packages that use it instead of the root (#11725) 2026-09-29 11:37:46 +09:00
Wonsuk Choi
d99c84b6b5
chore(*): update '@eslint-react/eslint-plugin' to v5 and apply its 'recommended' config that was overridden (#11721)
* refactor(react-query*): rename local 'useRef' and 'createContext' variables to follow '@eslint-react' naming conventions

* test(react-query): follow '@eslint-react' recommended rules with 'useState' value and setter pairs, stable keys, and disables for nested component false positives

* chore(*): update '@eslint-react/eslint-plugin' to v5 and apply its 'recommended' config that was overridden

* chore(*): list 'react-hooks' rules before '@eslint-react' rules to match the config order
2026-09-29 10:43:27 +09:00
Wonsuk Choi
fd96529f3e
chore(*): update 'eslint-plugin-react-hooks' to v7 and use its stable 'recommended' config (#11720)
* chore(*): update 'eslint-plugin-react-hooks' to v7 and remove the '@ts-expect-error' for its config

* chore(*): use stable 'recommended' config of 'eslint-plugin-react-hooks' instead of 'recommended-latest'

* chore(*): remove 'react-hooks/rules-of-hooks' override that duplicates the 'recommended' config
2026-09-29 03:19:45 +09:00
Wonsuk Choi
e878990b86
chore(*): manage 'react' packages with pnpm 'catalog' (#11712) 2026-09-28 18:49:08 +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
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
Lachlan Collins
1c9693eac7
fix(codemods): update codemods build script (#11647)
* fix(codemods): update codemods build script

* Add changeset
2026-09-26 07:47:49 +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
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
Lachlan Collins
8a5e385f67
ci: update to pnpm v12 (#11584) 2026-09-23 07:35:46 +10:00
Lachlan Collins
6a762c790f
ci: update to changesets v3 (#11583) 2026-09-23 07:12:56 +10:00
Lachlan Collins
248343dee9
ci: update to Nx v23 (#11567) 2026-09-23 06:31:23 +10:00
Wonsuk Choi
66d4fe3b3f
ci(*): generate reference docs in autofix and fail on TypeDoc conversion errors (#11522)
* ci(.github/workflows/autofix): run 'generate-docs' to keep reference docs current

* ci: apply automated fixes

* fix(scripts/generate-docs): build referenced packages and fail on TypeDoc conversion errors

* ci: apply automated fixes

* fix(package.json): build referenced packages as part of 'generate-docs'

* ci(.github/workflows/autofix): only generate reference docs on push

* ci(.github/workflows/autofix): skip runs started from its own commit

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-18 01:47:49 +09:00
Dominik Dorfmeister 🔮
9567367dd9
fix: declare devtools dependencies and enforce strict workspace checks (#11501) 2026-09-15 20:03:10 +02:00
Dominik Dorfmeister 🔮
f2a5da27fb
chore: update knip (#11262)
* chore: update knip

* ref: move cli options to config options

* fix package lock somehow

* pnpm dedupe
2026-08-23 19:24:11 +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
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
Flo
4eb0ed9322
chore: update pnpm to 11.9.0 (#10978)
* chore: update pnpm to 11.9.0

* chore: document trust policy exclusions

* chore: raise minimum release age

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-06-24 13:46:09 +02:00
Flo
3daac67da5
chore: migrate changesets changelog generator (#10809)
* chore: migrate changesets changelog generator

* chore: sort changelog dependency
2026-05-27 07:34:01 +02:00
Flo
c066ab8ab5
chore: enforce pnpm 11 (#10749)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-05-22 18:31:11 +02:00
Harry Whorlow
87013d5188
chore(pnpm): update pnpm to v11 (#10699)
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2026-05-22 17:56:10 +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
TkDodo
b1188fee93 ref: knip v6 2026-03-23 08:54:47 +01:00
Dominik Dorfmeister 🔮
67cf8b60d9
ref: ts cutoff (#10253)
* ref: update typescript versions

* check for tsgo

* drop 5.2 and 5.3

* docs

* ref: fix tsup config

* ref: use built-in NoInfer

* ci: apply automated fixes

* fix tsup config

* Revert "ref: use built-in NoInfer"

This reverts commit 45d428ce71.

# Conflicts:
#	packages/preact-query/src/useQuery.ts

* ref: remove tsgo for now

* fix builds

* fix: update svelte-check

* fix: svelte-check still needs ts 5.9

* fix: knip + ts rewrite

* ci: apply automated fixes

* fix: make ts 5.9 the tscurrent version

* fix custom conditions

* fix: coderabbit comments

* fix: lockfile

* revert docs

* fix: override eslint to 8.56.1

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-09 08:12:35 +01:00
vedanta
8f0d834382
feat: Preact Adapter (#9935)
* initial setup -- duplicated + package.json edited

* simple preact updations

* missed a React.ReactNode

* testing grunt work (preact library + other small issues + ErrorBoundary custom implementation)

* missed a few

* Adds ErrorBoundary (from react-error-boundary, but scaled down for preact) -- fixes a lot of tests, which expect react-related functionality

* useSuspenseQueries left -- removed the useQuery.promise tests

* forgot the console logs

* useSuspenseQueries 2 resolved; tests done

* ci: apply automated fixes

* fix: example

* fix: configs should be symlinks

* fix: sync versions for npm-run-all2

* ref: re-sync runall2

* ref: go back to 5.0.0

* ref: remove changelog

* react-query -> preact-query

* remove use client directive + added the useSyncExternalStore (decoupled from compat)

* remove the react remnants

* generate docs

* typescript eslint

* docs

* vite config fix

* docs now reference react docs (most of them atleast)

* code-rabbit issues addressed

* <div/> lol

* fix: docs

* ci: apply automated fixes

* fix: lockfile

* fix: duplicated versions

* lockfile (I cooked or am I cooked)

* ci: apply automated fixes

* Making small edits to fix versioning, warnings, and lock

* unhandled error compat

* Fixing CI

* Fixed the CI errors

* ci: apply automated fixes

* Prettier format

* Update changeset for Preact Adapter feature

---------

Co-authored-by: TkDodo <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-10 12:02:20 +01:00
Alexander Karan
9ff3de7981
Upgrade to Vitest v4 (#9862)
* Init upgrade

* Fixed query core

* Fixed persist tests

* Fixed coverage

* Fixed React

* Fixed Solid Query Devtools and Sold Query

* Svelte query fix

* Fixed Vue

* Angular done

* Fixed React

* Merge files

* Knip fix

* Fixed order

* Angular Eslint

* Query Core Eslint

* Fixed Vue Eslint issue

* Removed fallback

* chore: update lockfile

* ci: apply automated fixes

* fix: esbuild resolving

* fix: no idea

* chore: bump vitest

* Pipeline Fix

- Fallback UI is not reset between tests -> moved to create a function for each
- ruleTests needs to be top level

* ci: apply automated fixes

* ref: bump vitejs/plugin-react

* chore: stop testing against ancient ts 5.0

* Revert "chore: stop testing against ancient ts 5.0"

This reverts commit c72b7e7e7b.

* Revert "ref: bump vitejs/plugin-react"

This reverts commit b9622bc117.

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-18 17:01:56 +01:00
Dominik Dorfmeister
e722679e16
ref: move size-limit config to its own file (#9998)
* ref: move size-limit config to its own file

to avoid cache busting everything when the limits change

* ref: update size-limit
2025-12-28 10:25:52 +01:00
razhayat
4a0a78afbc
fix: streamed query consume aware signal (#9963)
* chore: move consume aware signal logic to utils

* fix: add consume aware signal to streamedQuery

* test: add a test for not a signal that is not consumed by streamFn

* chore: add changeset

* fix: made queryFn of streamedQuery not consume signal directly (so that only streamFn can consume it)

* fix: made onCancelled get called only once

* fix: memoized getSignal and made sure it is called only once

* fix: no-unnecessary-condition

* chore: size-limit

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-12-28 10:06:55 +01:00
Dominik Dorfmeister
afc64091cd
feat: size-limit (#9993)
* feat: size-limit

* fix: script

* fix: add test:size to nx

* fix: skip install and build

* really

* fix: size-limit options

* ok we need build step

* fix: test-size runs as part of its own action
2025-12-27 17:33:07 +01:00
Lachlan Collins
f15b7fcc01
ci: prepare for trusted publishing (#9952)
* ci: prepare for trusted publishing

* Format

* Remove NPM_TOKEN
2025-12-07 01:47:55 +11:00
Dominik Dorfmeister
72d8ac5c59
fix: update react and nextJs (#9944)
* fix: update react and nextJs

and add a nextJs16 integration test

* ci: apply automated fixes

* oops

* Update patch versions for React and TanStack packages

Updated the patch versions for various React and TanStack packages.

* fix: streamline dependencies

* bundle size

* fix lock file

* fix: update react in example

* skip test for now

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-12-04 10:10:29 +01:00
Lachlan Collins
7f4939c624
ci: sync config between projects (#9931)
* ci: update typedoc

* Remove old check
2025-11-29 19:55:40 +11:00
Lachlan Collins
b7b452e407
ci: remove @tanstack/publish-config (#9930)
* ci: remove @tanstack/publish-config

* Update imports
2025-11-29 16:22:35 +11:00
Lachlan Collins
73eb629169
ci(changesets): enable experimental peerDependents option (#9928)
* ci(changesets): enable experimental peerDependents option

* Fix typescript-eslint versions
2025-11-28 09:03:49 +11:00