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

5,036 commits

Author SHA1 Message Date
MINSEONG KIM
fdf5a549c1
test(svelte-query-persist-client): remove unnecessary async (#9027) 2025-04-17 11:10:19 +02:00
MINSEONG KIM
522b081bf0
test(*): remove unnecessary async (#9026) 2025-04-17 11:10:00 +02:00
MINSEONG KIM
f812bf4791
test(*): remove unnecessary async (#9025) 2025-04-17 11:09:39 +02:00
shiwoo.park
8f8e6d00b3
fix(query-core, vue-query): fix type inference in setQueryData when used in functions with explicit return types (#9030)
* fix(query-core): fix setQueryData type inference in typed contexts

* test(query-core): add test case for setQueryData type inference in functions

* fix(vue-query): fix setQueryData type inference in typed contexts

* test(vue-query): add test case for setQueryData type inference in functions
2025-04-17 11:05:27 +02:00
Arnoud
4a5990e849
chore(angular-query): move angular-query-persist-client (#9021) 2025-04-15 11:55:35 +02:00
Tanner Linsley
59dc99c4b2 release: v5.74.3 v5.74.3 2025-04-14 12:55:58 +00:00
Nick Lucas
f580d4d395
fix(types): Remove predicate typing for query filters (#8958)
* Remove prdicate typing

* Removing generics everywhere

* Fix type errors

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-04-14 14:45:45 +02:00
Tanner Linsley
231d9b17ee release: v5.74.2 v5.74.2 2025-04-14 10:54:39 +00:00
Raphael Gimenez
02c3d5130e
fix(query-core): unpause restored mutations (#9015)
* fix(query-core): unpause restored mutations

ensure that restored mutations have their isPaused state set to false when continued.

* Update packages/query-core/src/__tests__/mutations.test.tsx

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-04-14 12:48:59 +02:00
MINSEONG KIM
727230f3c2
test(query-core): add test case for hydration (#8949)
* test(query-core): add test case

* Reflect feedback

* Remove unnecessary code

* reflect not share a client between tests

* reflect feedback

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-04-14 09:47:33 +02:00
Tanner Linsley
ea9d3730ad release: v5.74.1 v5.74.1 2025-04-14 00:16:32 +00:00
Arnoud
5d12a32cbc
refactor(angular-query): remove private assertInjector util (#9012) 2025-04-14 02:12:24 +02:00
Arnoud
572e2a5b44
docs(angular-query): fix links (#9010) 2025-04-13 20:21:31 +02:00
Tanner Linsley
b76b0ef8b6 release: v5.74.0 v5.74.0 2025-04-13 17:48:44 +00:00
Omer Gronich
967c231d2a
feat(angular-query): add angular-persist-query-client
* feat(angular-query):
- Created isRestoring injection token and provider
- handled restoration phase in create-base-query.ts
- handled restoration phase in

* feat(angular-query): created package for experimental persistence support, and the withPersistQueryClient feature

* test(persistQuery): add tests for withPersistQueryClient

* docs(angular-query): add basic persister example

* fix(angular-query): synced angular versions in new package

* fix(angular-query): commit before ng update

* feat(angular-query): updated example to v18

* fix(angular-query): fixed project name to basic-persister

* feat(angular-query): updated example basic-persister to v19

* feat(angular-query): included back the persister package after angular migration

* feat(angular-query): migrate to provideEnvironmentInitializer

* fix(angular-query): fix eslint issues in inject-queries.ts

* Revert "feat(angular-query): migrate to provideEnvironmentInitializer"

This reverts commit af5b47b31511dd2db180abfd92f08541f29532d4.

* fix(angular-query): only track the isRestoring in the effect

* fix(angular-query): removed conditional _isRestoring

* ci: apply automated fixes

* fix(angular-query): used effect onCleanup instead of destroy ref

* Update examples/angular/basic-persister/.devcontainer/devcontainer.json

Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>

* Update examples/angular/basic-persister/package.json

Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>

* Update examples/angular/basic-persister/src/index.html

Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>

* Update examples/angular/basic-persister/tsconfig.json

Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>

* Update examples/angular/basic-persister/tsconfig.json

Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>

* Update examples/angular/basic-persister/tsconfig.json

Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>

* Update packages/angular-query-experimental/src/inject-is-restoring.ts

Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>

* fix(angular-query): fixed lock file

* fix(angular-query): aligned package.json versions

* added missing dep from basic-persister example

* Added a more complex example for persistence. This examples demonstrates how to selectively persist queries to different persisters.

* fix(angular-query) bumped versions to 5.62.4

* refactor(angular-query) refactored to implicit return

* fix(angular-query) bump angular persister package and examples version

* fix(angular-query) fixed eslint errors

* refactor(angular-query) set initial `isRestoring` to true to match the React adapter logic

* Revert "refactor(angular-query) set initial `isRestoring` to true to match the React adapter logic"

This reverts commit 235bbabebf.

* fix(angular-query) fixed formatting of JSDOC comment ruined by eslint

* update build configs

* zoneless unit tests

* replace deprecated injectQueryClient

* createBaseQuery is always run in injection context, remove inject(Injector)

* remove api extractor config

* update example dependencies

* comment out from publish script for now

* refactor(persist-query-client): simplify configuration by removing array structure for persistOptions

* refactor(angular-query-persist-client): removed experimental from package name and updated configurations

* fix example

* fix outdated comment

* exclude from preview for now

* mark package as private instead

* configure injectIsRestoring injector through options object

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
2025-04-13 19:42:49 +02:00
MINSEONG KIM
3471d0f30f
test(query-core): add test case for mutationObserver (#8975)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-04-12 22:27:56 +02:00
MINSEONG KIM
ec1237768a
test(query-core): use fakeTimers for onlineManager.test.tsx (#8980)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-04-12 22:27:39 +02:00
Jonghyeon Ko
068b7645a4
test(query-core): use fakeTimers for infiniteQueryBehavior.test.tsx (#8961)
* test(query-core): use fakeTimers for infiniteQueryBehavior.test.tsx

* chore: update

* chore: reflect review
2025-04-12 22:14:46 +02:00
MINSEONG KIM
3bf217d39c
test(query-core): add test case for notifyManager (#8976) 2025-04-12 22:11:36 +02:00
MINSEONG KIM
efe6ddb076
test(react-query): use fakeTimers for ssr.test.tsx (#8981)
* test(react-query): use fakeTimers in ssr.test.tsx

* fix
2025-04-12 22:10:35 +02:00
MINSEONG KIM
c000d13b94
test(react-query): use fakeTimers in useIsFetching.test.tsx (#8982) 2025-04-12 22:10:12 +02:00
MINSEONG KIM
e5f57f6cec
test(react-query): use fakeTimers for usePrefetchQuery.test.tsx (#8983) 2025-04-12 22:09:55 +02:00
Jonghyeon Ko
403ebd474f
test(query-core): use fake timers for hydration.test.tsx (#9006) 2025-04-12 22:08:52 +02:00
Jonghyeon Ko
c710ab3f41
test(query-core): use fake timers for queriesObserver.test.tsx (#9005)
* test(query-core): use fake timers for queriesObserver.test.tsx

* chore: update
2025-04-12 22:08:23 +02:00
Giorgio Polvara
376bbd25a3
docs: fix documentation on status for suspense hooks (#9008)
* fix documentation on status for suspense hooks

* Fix formatting in useSuspenseInfiniteQuery.md
2025-04-12 22:05:20 +02:00
Tanner Linsley
f16d7afe1e release: v5.73.3 v5.73.3 2025-04-12 14:23:06 +00:00
Dominik Dorfmeister
38178bade2
fix(query-core): make sure we don't invoke select too often when using placeholderData (#9007)
* fix(query-core): make sure we don't invoke select too often when using placeholderData

* ref: run through placeholderData first, then through

this helps us memoizing select calls, and we can get rid of some duplication around how select is called again after placeholderData

* chore: skip-nx-cache attempt

* test: increase timeout

* chore: re-enable caching
2025-04-12 16:20:58 +02:00
Dominik Dorfmeister
d5ba5d1880
chore: bundle-size reporting 2025-04-12 12:09:15 +02:00
Lachlan Collins
713ba3a35d
chore(deps): update packages (#9003)
* chore(deps): update packages

* ci: apply automated fixes

* Remove @types/eslint

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-12 11:58:55 +10:00
renovate[bot]
a48ec06f29
chore(deps): update dependency vite to v6.2.6 [security] (#9000)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-12 11:18:36 +10:00
Tanner Linsley
cc2a72e33d release: v5.73.2 v5.73.2 2025-04-12 01:06:49 +00:00
Lachlan Collins
c4afce47ed
chore: use "moduleResolution": "Bundler" at root level (#9002)
* Change to bunlder at root

* Update Next defaults

* Remove moduleResolution from packages

* Remove from scripts

* Unify moduleResolution

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-12 11:03:59 +10:00
Eliya Cohen
f536199dca
fix(eslint-plugin-query): add footer workaround for CJS default export in modernConfig (#8991) 2025-04-11 07:40:39 +02:00
Arnoud
ba18d2a5db
chore(angular-query): remove unused microsoft api extractor configs (#8993) 2025-04-10 23:40:30 +02:00
Tanner Linsley
5f65345a4d release: v5.73.1 v5.73.1 2025-04-10 16:18:49 +00:00
David Madner
2e1282ca03
fix(persistQueryClientRestore): better error handling for persistQueryClientRestore (#8969)
* fix(persistQueryClientRestore): Do not swallow exceptions during in persistQueryClientRestore within `restoreClient` and `removeClient`

* fix: rethrow errors in removeClient within all branches

* fix: test for PersistQueryClientProvider in all consumers

* chore: implement PR feedback

* chore: mock console calls, so they do not end up in the console. This way we can also assert on the invocations

* chore: consoleWarn mocks to be restored after each test

* chore: remove tmp file commited accidentally

* chore: adjust docs and include new optional callback `onError`

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-04-10 18:13:17 +02:00
Tanner Linsley
a2c07a4d42 release: v5.73.0 v5.73.0 2025-04-10 15:00:28 +00:00
zhong666
f56a9f224a
feat(vue-query): useInfiniteQuery options support maybe ref type (#8956)
* feat: useInfiniteQuery options support  maybe ref type

* ci: apply automated fixes

* fix: types

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-10 16:57:17 +02:00
Juan Gonzalez
47e6662dd3
docs: fix a few typos (#8962) 2025-04-10 14:15:03 +02:00
Alex Liu
97f9625f36
types(vue-query): add shallow support to QueryClientConfig (#8692)
Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2025-04-10 14:08:53 +02:00
Young
d4f49561f0
docs(vue-query): update example in disabling-queries.md (#8433) 2025-04-10 14:03:08 +02:00
spookyuser
b18972fab5
docs: update createPersister.md with info about cache mutations (#8893)
* Update createPersister.md with info about https://github.com/TanStack/query/issues/6310

* Fix typo

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-10 14:02:45 +02:00
Tanner Linsley
812fadf094 release: v5.72.3 v5.72.3 2025-04-09 20:00:20 +00:00
Dominic Bachmann
ed3565250e
fix(angular-query): align function signatures to have an options parameter accepting an object with injector property (#8776)
* refactor(angular-query): change query functions to accept an options object instead of an injector

change query functions to accept an options object instead of an injector so that it matches angular APIs such as effect and allows adding more options in the future.

Closes #8711

* ci: apply automated fixes

* fix build error

* revert changes to deprecated injectQueryClient

* Rename optionsFn as we now also have an options parameter

* Revert changes to injectQueries as there's a PR in progress for that

* Add types for options

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Arnoud de Vries <6420061+arnoud-dv@users.noreply.github.com>
2025-04-09 21:56:32 +02:00
Eliya Cohen
72362377b0
chore: add eslint test script to package.json (#8979)
* chore: add eslint test script to package.json

Add a new script "test:eslint" to run eslint on the src directory, improving code quality checks during development.

* fix(nx): ensure test eslint depends on build for plugin workspace

Added nx configuration to make test:eslint target depend on the build target of its dependencies, ensuring the eslint plugin workspace is built before running tests.
2025-04-09 18:08:32 +02:00
Tanner Linsley
acd519c707 release: v5.72.2 v5.72.2 2025-04-09 14:17:58 +00:00
TkDodo
bf7b66cb18 chore: remove eslint task from basic example 2025-04-09 16:15:01 +02:00
Tyler
0c229f4cf0
Revert "chore(paths): use customConditions to define internal imports… (#8973)
* Revert "chore(paths): use customConditions to define internal imports (#8935)"

This reverts commit 8e0c6b7639.

* fix export

* refactor: make test:lib depend on compile again

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-04-09 15:58:33 +02:00
Eliya Cohen
7d3a1a37d1
fix(eslint-plugin): separate legacy and modern dts files (#8972)
* chore(build): restructure eslint-plugin-query build configuration

Aligned the build system with other packages by replacing the custom tsup config with standard modern/legacy build outputs. Moved output files from 'dist' to 'build' directory structure. Removed the patch-missing-export-equals.js script in favor of directly exporting the plugin. Added tsconfig.prod.json for production builds.

* chore(example): eslint classic

* ci: apply automated fixes

* fix: unique name for examples

* remove unused import

* chore: add eslint test script to react examples and update eslint test command

Add `test:eslint` script to react example package.json files to enable linting checks. Update the main `test:eslint` command to remove the exclusion of examples, ensuring linting is applied across the entire project.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: TkDodo <office@dorfmeister.cc>
2025-04-08 17:14:36 +02:00
Tanner Linsley
0964fba8e3 release: v5.72.1 v5.72.1 2025-04-08 12:58:00 +00:00