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>
* docs(query-core/{infiniteQueryObserver,mutationObserver,queriesObserver}): add missing JSDoc to observer methods
* docs(query-core/infiniteQueryObserver): note that 'cancelRefetch: false' can reuse a running fetch in the page fetch return values
* docs(framework/*/reference): regenerate reference docs
* docs(query-core/query): add missing JSDoc to 'Query' members and state helpers
* docs(query-core/query): qualify the 'isStaleByTime' and 'fetch' parameter and return descriptions
* docs(query-core/utils): add missing JSDoc to utility functions
* docs(query-core/utils): clarify that 'addToEnd' and 'addToStart' drop at most one item
* docs(framework/*/reference): regenerate reference docs
* docs(query-core/queryClient): add missing JSDoc '@param' and '@returns' to 'QueryClient' methods
* docs(query-core/queryClient): describe 'select' in the return values of 'query' and 'infiniteQuery'
* docs(*): fix JSDoc '@param' names that don't match the parameters
* chore(eslint.config): raise 'jsdoc/check-param-names' to error without requiring destructured properties
* test(*): start test titles with 'should'
* test(*): start the remaining test titles with 'should'
* test(eslint-plugin-query): start 'it.each' titles with 'should'
* test({react,preact}-query/useSuspenseQueries): fix title to match the assertion that 'TData' excludes 'undefined'
* test(lit-query): separate setup from the flow that starts with its baseline assertions in tests
* test(lit-query/ssr): keep the server rendering setup together and group reads with their assertions
* test(lit-query): separate element class declarations from the setup in tests
* test(lit-query): separate initial assertions, rerenders, and prefetches from the flows that follow them in tests
* test(lit-query/createMutationController): add test for not applying updates from the previous client mutation after switching clients
* style(lit-query/createMutationController): attach the wait to the preceding assertion
* test(lit-query/createInfiniteQueryController): add type tests
* test(lit-query/createInfiniteQueryController): add type tests for 'refetch', 'fetchNextPage', and 'fetchPreviousPage' return types
* test(lit-query/createInfiniteQueryController): move return type tests to the end
* test(lit-query/createQueryController): add type tests
* test(lit-query/createQueryController): add type tests for 'refetch' and 'suspense' return types
* test(lit-query/createQueryController): nest type tests under 'initialData' and 'Config object overload'
* style(lit-query/{createQuery,createInfiniteQuery,createQueries}Controller): remove numeric separator from 'staleTime' values
* style(*): remove numeric separators from the remaining number literals
* refactor(preact-query*): rename local 'useRef' variables with the 'Ref' suffix
* test(preact-query): name 'useState' value and setter pairs and use stable keys
* chore(*): replace 'typescript-eslint' with '@typescript-eslint/parser' in preact packages and remove redundant eslint options
* style(*): add a blank line after '@ts-check' and remove the blank line between imports in preact eslint configs