fix(deps): update dependency @reduxjs/toolkit to v2.5.0 #540
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.3.0->2.5.0Release Notes
reduxjs/redux-toolkit (@reduxjs/toolkit)
v2.5.0Compare Source
This feature release updates the React peer dependency to work with React 19, and fixes an additional skip token issue.
Changelog
React 19 Compat
React 19 was just released! We've updated our peer dep to accept React 19, and updated our runtime and type tests to check against both React 18 and 19.
Also see React-Redux v9.2.0 for the same peer dep update.
Other Fixes
We previously fixed an issue with the RTKQ core where
serializeQueryArgscallbacks could be called withskipToken, potentially leading to errors. We've fixed an additional location in theuseQueryhooks where that could happen as well.What's Changed
serializeQueryArgs+skipTokencase by @markerikson in https://github.com/reduxjs/redux-toolkit/pull/4762Full Changelog: reduxjs/redux-toolkit@v2.4.0...v2.5.0
v2.4.0Compare Source
This feature release includes multiple tweaks and fixes to RTK Query functionality, additional exported TS types, and drops support for TS versions earlier than 5.0.
Changelog
RTK Query Improvements
Lazy query hooks can now be reset.
retry.failnow acceptsmetaas a second argument.Tag invalidation arrays now ignore nullish values.
We did some small internal refactoring around Maps and default values that shrank bundle size slightly.
Bugfixes
Passing
skipTokento a query hook now bails out before running any other logic, which fixes cases whereserializeQueryArgspreviously threw an error because there were no args to process.The
autoBatchEnhancernow readswindow.requestAnimationFramelater, which it to work properly with Jest fake timers.We fixed cases where the hook result
isSuccessflag would briefly flicker tofalsewhen switched to a different cache entry that was uninitialized, and would briefly flicker totruewhen refetching a query that previously errored.The listener middleware previously had inconsistent logic checks for comparing against existing listener entries (effect + type, vs effect only). It now always checks both effect + type.
Additional TS Types
We now export
Typed[Query|Mutation]OnQueryStartedhelpers to let you defineonQueryStartedcallbacks outside ofcreateApiif desired.We also now export a
CreateAsyncThunkFunctiontype that can be used to type userland wrappers aroundcreateAsyncThunk.TS Support Matrix Updates
We've historically tried to maintain TS backwards compatibility as long as possible, and made occasional updates to our TS support matrix in minor versions over time. As of RTK 2.3.0, we officially supported back through TS 4.7.
As of this release, we're tweaking that support policy to match the policy used by DefinitelyTyped:
Given that, we've dropped official support for TS versions earlier than 5.0. (RTK may work with those versions, but we no longer test against them and won't try to fix issues with those versions.)
We'll continue to update our TS support matrix over time based on that 2-year rolling window.
What's Changed
window.rAFlater to allow fake timers to work correctly by @ensconced in https://github.com/reduxjs/redux-toolkit/pull/4701OnQueryStartedcallbacks by @aryaemami59 in https://github.com/reduxjs/redux-toolkit/pull/4713createAsyncThunkwithout thewithTypesmethod by @EskiMojo14 in https://github.com/reduxjs/redux-toolkit/pull/4667isSuccess: truewhen switching to an uninitialized cache entry by @markerikson in https://github.com/reduxjs/redux-toolkit/pull/4731isSuccessconsistent when refetching after an error by @markerikson in https://github.com/reduxjs/redux-toolkit/pull/4732Full Changelog: reduxjs/redux-toolkit@v2.3.0...v2.4.0
Configuration
📅 Schedule: Branch creation - "* 0-3 * * 1" in timezone America/New_York, Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.