Skip to content

build(deps): bump @reduxjs/toolkit from 2.12.0 to 2.15.0 - #8

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/reduxjs/toolkit-2.15.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/reduxjs/toolkit-2.15.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 26, 2026

Copy link
Copy Markdown

Bumps @reduxjs/toolkit from 2.12.0 to 2.15.0.

Release notes

Sourced from @​reduxjs/toolkit's releases.

v2.15.0

This feature release gives each store its own RTK Query middleware runtime, makes initiate() promises resolve with their own request's result, adds several new options to RTK Query, improves listener middleware fork child capabilities, improves readability for several RTK type definitions, and fixes a variety of RTKQ bugs.

This release continues the work from our roadmap to Redux Toolkit 3.0. Several of the RTK Query changes here are bug fixes that change behavior in edge cases, so please read the "Behavior Changes" notes below.

Changelog

Per-Store RTK Query Runtime

RTK Query's middleware keeps a lot of state outside the Redux store in order to manage requests and cache lifetimes: subscriber counts, running requests, poll and cache collection timers, and cache lifecycle promises. That state used to live in closures shared by every store that used the same api object. That was fine for a single client-side store, but caused problems for SSR and tests, where many stores share one api.

Each store now gets its own consolidated internal runtime state, created by the API middleware. resetApiState now calls runtime.reset(), which clears every subscriber, timer and cache lifecycle for that store, aborts running requests, and clears pending tag invalidations. It no longer touches other stores.

Internally, each cache key now has one record that tracks its running request, timers and lifecycle, and all removals go through a single path. That made the initiate() fixes below possible.

The missing-middleware check now runs once per store, and looks for the store's runtime instead of dispatching an internal action. This check is stricter: an api whose middleware is missing now throws even if another api with the same reducerPath has its middleware in the store.

initiate() Promises Resolve With Their Own Result

We had several long-standing reports (#5506, #4833, #5173, #5346) that the promise from initiate() could resolve with undefined, or with a different request's data. That happened when the cache entry was removed, reset, invalidated or replaced while the request was running, because the promise read the cache entry after the request finished instead of the request's own result.

We've done a thorough review of the promise resolution logic to analyze the current intended behavior, ran separate formal modeling of the derived behavior to help uncover gaps, updated the model to fill those gaps, and reworked that logic to fully comply with the improved expected behavior.

Each initiate() promise now resolves with its own request's result, captured as soon as that request's fulfilled or rejected action reaches the store.

Thanks to @​kkatalz (#5474) and @​rajanpanth (#5347): both PRs fixed part of this, and their tests are included.

Behavior Changes

These ship in 2.x as bug fixes, but code that depended on the old behavior will see a difference:

  • Removing a cache entry while its request runs now aborts that request. This covers removeQueryResult, a lazy query's reset(), cache collection, and resetApiState. The initiate() promise resolves with isError: true and an AbortError whose message is 'removed' or 'reset'. That means unwrap() now rejects in this case, where it used to resolve with stale or missing data. The plain promise still never rejects.

  • queryFulfilled in onQueryStarted rejects in the same case. If your onQueryStarted does await queryFulfilled without a try/catch, you'll now get an unhandled rejection when the entry is removed mid-request. Wrap it:

    async onQueryStarted(arg, { queryFulfilled }) {
      try {
        const { data } = await queryFulfilled
        // ...
      } catch {
        // request failed, or the cache entry was removed while it ran
      }
    }
  • Invalidating an entry that has a running request (by tags, or a focus/reconnect refetch) now waits for that request to finish. The running request's promise gets its own result, and then the entry refetches if it has subscribers, or is removed if it doesn't.

  • A refetch while a request is running joins that request instead of starting another one. initiate() also joins a running upsertQueryData.

  • A pending entry restored from persisted state, with no request actually running, now fetches again.

... (truncated)

Commits
  • 45eb037 Release 2.15.0
  • 75c2d32 Document getCacheEntryRemovedReason (#5622)
  • 57e43a1 docs: pass enhancers as a callback in the configureStore warning example (#...
  • 2a773ed fix(query): allow boolean/number in headers (#5621)
  • 1a7d3b5 docs: correct createAsyncThunk and setupListeners descriptions (#5592)
  • 7da3084 fix(query): append query parameters before URL fragments (#5598)
  • ffc0a44 fix(toolkit): retry.fail() in a backoff function nesting the error in `{ ...
  • eb93773 Fix refetch defaults and shared polling preferences (#5593)
  • 709ed26 fix(toolkit): fetchBaseQuery timeouts when a request provides a signal (#5595)
  • f1d2de3 fix(entityAdapter): keep ids order when an update changes an entity id (#5573)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 2.12.0 to 2.15.0.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](reduxjs/redux-toolkit@v2.12.0...v2.15.0)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-version: 2.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Nov 26, 2026
@EuAndersonDev
EuAndersonDev deleted the dependabot/npm_and_yarn/reduxjs/toolkit-2.15.0 branch November 26, 2026 14:18
@dependabot @github

dependabot Bot commented on behalf of github Nov 26, 2026

Copy link
Copy Markdown
Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant