* feat: typed query filters
* refactor: use util types to extract from dataTag
* chore: try to fix vue types with overloads
* chore: vue types
* test: from #8691
* fix: make options a MaybeRefDeep
* feat: types for filters on other queryClient methods
* fix: add a test for 8684
* test(query-core): add test case for queryClient.isFetching
* chore: update
* Update packages/query-core/src/__tests__/queryClient.test.tsx
* Update packages/query-core/src/__tests__/queryClient.test.tsx
* chore: use fake timers
* test(query-core): use fakeTimer for queryClient.test.tsx's all test
* chore(react-query): add warning when useBaseQuery is called without a queryFn
Added a console error in development mode when useBaseQuery is called without a queryFn or default queryFn.
This helps developers avoid potential issues by ensuring at least one of them is provided.
* fix(react-query): check queryFn after applying defaultQueryOptions
Move queryFn check after defaultOptions.
* chore(react-query): add env check before console error
* chore(react-query): add env check before console error
* ci: apply automated fixes
* fix(react-query): check queryFn after defaultOptions
* Update packages/react-query/src/useBaseQuery.ts
* Update packages/react-query/src/useBaseQuery.ts
* Update packages/react-query/src/useBaseQuery.ts
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* fix(react-query): prevent type errors and improve inference for dynamic queries on useQueries and useSuspenseQueries
Previously, using useQueries and useSuspenseQueries with a dynamic array of mixed queries caused type errors. This commit ensures that type errors no longer occur and that the returned data is correctly inferred (e.g., as (number | boolean | undefined)[]) instead of unknown[].
* fix(react-query): improve type inference for useQueries and useSuspenseQueries results
* fix(react-query): fix type of queries in useQueries and useSuspenseQueries
* refactor: remove meaningless depths
* test(react-query): move type only tests
* test(react-query): fix type test error
* fix(vue-query): prevent type errors and improve inference for dynamicqueries on useQueries
* fix: prevent type errors and improve inference for dynamicqueries
* fix: solid type tests
not sure why, but compilation must run first with the current tsc version in case solid-query isn't built yet
* fix: prevent type errors and improve inference for dynamic queries
* chore: remove test
* test(react-query): fix failing type tests
* fix: fix test syntax error
* test(react-query): remove tests for result[0].data
* fix: change the result fallback to fix test fail
* rollback(angular-query-experimental): restore injectQueries
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* fix(react-query): make error to be shown when using queryOptions with initialData and skipToken in queryFn inside useSuspenseQueries
* test(react-query): update the test to have a conditional skipToken
* add failing repro test
* update assertinos
* add logg
* ehm - maybe fix?
* rm -only
* make example
* upd
* ad debug logs
* more debugging
* push
* maybe???
* rm log
* revert
* fix: ?
* fix: check for pending status again
otherwise, we risk including promises that happen because of background updates (think persistQueryClient)
* fix: clear serverQueryClient between "requests"
otherwise, we are re-using the cache and the query won't be in "pending" state the second time around
* chore: remove logs
* rethrow next build error
* kick off ci again
* add `shouldRedactError` option
* pluralize
* docs
* chore: more memory
* chore: revert more memory
* don't compare statuses if they don't exist
* ci: apply automated fixes
* lint
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: add queryClient to queryFunctionContext
* fix: remove queryClient exception
closing over a queryClient should now error, as we pass the queryClient directly to the queryFunctionContext
* fix: persister
* refactor: keep private reference to cache
* chore: fix tests
* docs: QueryFunctionContext
* refactor: derive from private member
* refactor: name it `client`
* refactor: let's go with client
* chore: try skipping the cache
* chore: re-enable caching
and try to bust it by changing sharedGlobals lol
* chore: query-query, react-query and persist-core to composite setup
* fix: self contain packages by having shared configs as symlinks
* fix: add tsConfigPaths to vite config
so that tests can pick up the path aliases
* chore: set outDir, rootDir and baseUrl for all packages
* chore: make legacy tsconfig extend regular tsconfig
* fix: tsc --build
* feat: setup project references
* fix: legacy configs also need references
* fix: oops
* fix: tsup related builds
we need to turn off composite builds for tsup
* fix: set rootDir for tsup builds
so that it can include all files it needs
* fix: remove dependencies on ^build
we no longer need builds to run tests / type checks
* fix: add separate out dir for tsc
* fix: include root eslint config in globals
* refactor: create compile task to depend on
* fix: typo
* fix: dynamic alisases for vitest
* chore: try to fix knip
* fix: make compile a cacheable task
* chore: temporary disable tests against older TS versions
* fix: ts doesn't like string return types
* fix(vue-query-devtools): fix build
* fix: test types
* Revert "chore: temporary disable tests against older TS versions"
This reverts commit 10ef560eb5.
* fix: make legacy ts builds output to their own directory
* chore: remove test:types from examples as they need a build step
* chore: fix knip
* chore: remove test:types from all examples
* Revert "Revert "chore: temporary disable tests against older TS versions""
This reverts commit d6daded7da.
* fix: outputs for compile task
* chore: remove test:types from integrations
* Revert "Revert "Revert "chore: temporary disable tests against older TS versions"""
This reverts commit 79b4844785.
---------
Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
* ci: bundle size preview
* chore: syntax
* fix: markdown syntax for images
* fix: use github event number over sha
* fix: fix main link
* chore: format message
* fix: make preview bundle size part of the preview step
* fix: proper links
* fix: back to github.sha
* fix: determine correct commit SHA
* ok