* fix(lit-query/package.json): remove '@tanstack/query-core' from 'peerDependencies' since it is already a dependency
* docs(lit): restore the install commands to move them to a separate change
* fix(lit-query/package.json): move 'lit' from 'dependencies' to 'devDependencies' so it is declared only as a peer dependency
* fix({react,preact,angular}-query): remove erroneous '| undefined' from 'DefinedInitialDataInfiniteOptions'
* test({react,preact,angular}-query/infiniteQueryOptions): use a non-literal condition for the ternary 'initialData' test
* fix({solid,vue}-query): accept a possibly-undefined 'initialData' in 'UndefinedInitialDataInfiniteOptions'
* fix(vue-query/infiniteQueryOptions): declare the 'Defined' overload first so a defined 'initialData' still selects it
* docs({react,preact,angular,solid,vue}-query): drop generated reference doc changes, regenerated by autofix after merge
* chore(.changeset): align the message with the PR title
* docs({react,preact,angular,solid,vue}-query/infiniteQueryOptions): describe overload selection by whether 'initialData' is known to be defined
* docs(framework/*/reference): regenerate reference docs
* docs(framework): restore the generated reference docs from main and leave them to autofix
* docs({react,preact,angular,solid,vue}-query): regenerate reference docs
* test({react,preact,angular,solid,vue}-query/infiniteQueryOptions): start test titles with 'should'
* fix(query-persist-client-core): catch errors when persisting in 'persistQueryClientSubscribe' to prevent unhandled promise rejections, and log them in development
* test(query-persist-client-core): fix mock lint violations
---------
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
* fix(vue-query/queryClient): infer the data and error types of 'getQueryState' from a tagged query key
* docs(vue-query): regenerate reference docs for 'getQueryState' overloads
* fix(preact-query): retry on mount for falsy errors when throwOnError returns false
`ensurePreventErrorBoundaryRetry` only evaluated a function-valued
`throwOnError` when `query.state.error` was truthy. For a query that
rejected with a falsy value (e.g. `undefined`), the callback was skipped
and the function itself was treated as truthy, so `retryOnMount` was
disabled even though `throwOnError` would have returned `false`.
Check `query.state.status === 'error'` instead so the callback runs for
every failed query. Ports #11328 to preact-query.
* refactor(preact-query): keep throwOnError constant
---------
Co-authored-by: TkDodo <office@dorfmeister.cc>
* fix({preact,solid,svelte,angular-query-experimental}): switch to 'export type *' for type-only re-exports
* chore(.changeset/export-type-star-adapters): trim redundant PR cross-reference from changeset body
* fix(react-query*): declare '@types/react' as a peer dependency like 'react-query-devtools'
* fix(react-query*): mark '@types/react' as an optional peer dependency
* feat(preact-query*): support Preact v11
* fix(preact-query*): pass an initial value to 'useRef' and flush deferred unmount effect cleanups in tests for Preact v11
* chore(preact-query*): develop and test against Preact 11
Bump the preact catalog and the preact example to ^11.0.1, and
preact-render-to-string to ^6.8.0 (Preact 11 peers on >=6.7.0).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Kevin Van Cott <kevinvandy656@gmail.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`UseMutationReturnType` uses `MutationResult` as the default for its
`TResult` parameter, but the alias was not exported. Projects that emit
declarations could not name the inferred return type of a `useMutation`
wrapper and failed with TS2883. Export it from the package root.
Fixes#11769
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Ciarán Curley <ciaran.curley.11.11@gmail.com>
fix(query-core): start queued scoped mutations while the window is not focused
A mutation queued behind another one in the same scope is started later
through retryer.continue(), which only resumes when canContinue() is true.
canContinue() requires the window to be focused, so with an unfocused tab
the next mutation stayed paused until the window got focus again.
Resume the initial start pause with canStart() instead, which is the same
check used to start the retryer right away. Retry pauses still use
canContinue().
Fixes#11642
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>