* fix(query-core): respect initialData for queryClient.ensureQueryData
we used to call `getQueryData` before queryCache.build(), but building is what creates the query and potentially adds initialData. I tried to make that more obvious by reading directly from `query.state.data`
* refactor: simplify condition
* chore: examples to react19
* test: seems like pre-warming adds another render, which is fine
* test: more pre-warming renders (this is fine)
* test: use react-render-stream
* chore: move tests to renderStream
* chore: fix act
* test: fix remaining tests
* test: move away from fireEvent.click
because it uses `act` under the hood, which isn't supported / wanted with renderStreams
* test: useInfiniteQuery to renderStream
* chore: stabilize test
* Add test with failing types
* Tidy up
* Move tests to correct file
* Add initial fixes (some review and testing needed)
* Formatting
* Ensure T params are mandatory for new overloads
* Fix type issues
* Unnecessary DataTag
* Add typeless tests
* Fix some cases
* Fixing more cases
* Fix some typings
* Fix remaining issues
* Fix linting errors
* Fix one warning
* Revert unnecessary change to getQueryDefaults
* Remove mutation defaults todo
* Rename var
* Remove all additional overloads in favour of a single definition which supports all cases
* Change type tests to more idomatic api
* Include TError on DataTag so that getQueryState can infer the error type correctly
* ci: apply automated fixes
* Add type case to QueryFilters tests
* Remove redudant comment
* TInferredError
* Fix Default TError in query filters
* Move to UnsetMarker and add type changes to a few missed datatag usages
* Fixed wasting Dominik's time
* Force build
* Undo
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* fix: handle optional and non-null chaining in exhaustive-deps
Fixed a false positive in the exhaustive-deps rule when using optional chaining and non-null assertions in query keys and functions.
* ci: apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Add types for QueryFilters which flow down to Query<> and QueryKey/DataTag types
* ci: apply automated fixes
* Add a type test
* ci: apply automated fixes
* Fix linting
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* fix(QueriesObserver): fix improper sorting in QueriesObserver's #findMatchingObservers method
This commit fixes a bug in the QueriesObserver's #findMatchingObservers. The bug is present when there are duplicate unsorted queries, for example, ['A', 'B', 'A']. The bug results in #findMatchingObservers to return the queries in sorted order, or ['A', 'A', 'B'], which results in a mismatch between Array<QueryObserverOptions> and Array<QueryObserverMatch>. This bug was introduced in 54995777af
* 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>
* chore: typescript 5.7
and run tests against ts 5.0 - 5.7
* chore: make eslint happy
* chore: type import issue
* chore: the type assertion is necessary for ts 5.4 and lower
* fix: write code so that it narrows in all ts versions
* fix: import assertion
* fix: angular examples stay at typescript 5.4
* Add JSON import attribute, update vue-tsc
* angular fixes
* Fix vue-tsc compatibility
---------
Co-authored-by: Arnoud de Vries <6420061+arnoud-dv@users.noreply.github.com>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>