Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TanStack/query
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @tanstack/vue-query@5.92.4
Choose a base ref
...
head repository: TanStack/query
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @tanstack/vue-query@5.92.5
Choose a head ref
  • 3 commits
  • 91 files changed
  • 6 contributors

Commits on Dec 30, 2025

  1. fix(query-core): fix queriesObserver result and observer length misma…

    …tch (#9973)
    
    In 1b54538, `setOptions` was changed to call `notifyListeners` which
    eventually leads to `QueriesObserver.setQueries`
    
    1. Updating `#observerMatches`
    2. Calling `setOptions` which leads to `#notify` being called
    3. Updating `#result`
    
    This is an issue when `#notify` is called before the `#result` is
    updated, as `#trackResult` assumes these two are the same length, which
    may not be the case if the number of queries changed. When the length
    increases, `observerResult` becomes `undefined` and the function throws
    an exception.
    
    Fix by moving the `#observerMatches` assignment later in the function,
    next to the `#observers` and `#result` assignment.
    
    Co-authored-by: nrahnema <nrahnema@hudson-trading.com>
    Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
    3 people authored Dec 30, 2025
    Configuration menu
    Copy the full SHA
    7f47906 View commit details
    Browse the repository at this point in the history
  2. fix(react-query): allow retryOnMount when throwOnError is function (#…

    …9336) (#9338)
    
    * test(react-query): add tests should retry on mount when throwOnError returns false
    
    * fix(react-query): refine throwOnError retry logic for error boundary cases
    When throwOnError is a function, allow retryOnMount to proceed even when error boundary hasn't reset,
    while maintaining the prevention behavior for boolean throwOnError values.
    
    * fix(react-query): enhance throwOnError logic in error boundaries
    
    Refine behavior to handle function-type throwOnError, allowing retries when appropriate. Ensure boolean throwOnError values still prevent retries when the error boundary isn't reset.
    
    * test: Add tests for `throwOnError` behavior in `useQuery`
    
    This commit introduces tests to verify the behavior of the `throwOnError` callback in scenarios where `retryOnMount` is enabled. It ensures proper handling of retries based on the error state and the `throwOnError` function's return value. These tests improve the reliability and coverage of error handling logic in `useQuery`.
    
    * fix(react-query): improve throwOnError logic with query state validation
    
    - Pass query object to ensurePreventErrorBoundaryRetry for accurate state checking
    - Preserve query deduplication behavior while fixing throwOnError function handling
    - Fixes issue where throwOnError function couldn't access query error state
    
    * fix(react-query): fix test flakiness and query cache timing (#9338)
    
    - Replace vi.waitFor with vi.advanceTimersByTimeAsync in tests
    - Use separate render results to avoid stale DOM references
    - Inline fresh query lookup in ensurePreventErrorBoundaryRetry after _experimental_beforeQuery
    
    * ci: apply automated fixes
    
    * fix(react-query): refine retryOnMount logic and error boundary handling
    
    - move query retrieval after `_experimental_beforeQuery` in `useBaseQuery`
    - refactor `ensurePreventErrorBoundaryRetry` for better clarity
    - make `query` parameter required in `ensurePreventErrorBoundaryRetry`
    
    * ci: apply automated fixes
    
    * feat(react-query): make query param required but nullable in ensurePreventErrorBoundaryRetry
    
    * Apply suggestions from code review
    
    * chore: size-limit
    
    * chore: changeset
    
    ---------
    
    Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
    3 people authored Dec 30, 2025
    Configuration menu
    Copy the full SHA
    4be3ad7 View commit details
    Browse the repository at this point in the history
  3. ci: Version Packages (#10005)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Dec 30, 2025
    Configuration menu
    Copy the full SHA
    167db32 View commit details
    Browse the repository at this point in the history
Loading