Bump @reduxjs/toolkit from 2.2.3 to 2.2.5
Bumps @reduxjs/toolkit from 2.2.3 to 2.2.5.
Release notes
Sourced from @reduxjs/toolkit's releases.
v2.2.5
This bugfix release fixes an issue in the recent
createEntityAdaptersorting perf improvements that could (in specific cases) cause Immer to throw an error when trying to read a plain JS value instead of a proxy-wrapped value.What's Changed
- Fix missed spot where use of
currentmay fail if the value is not a draft by@markeriksonin reduxjs/redux-toolkit#4412Full Changelog: https://github.com/reduxjs/redux-toolkit/compare/v2.2.4...v2.2.5
v2.2.4
This bugfix release improves sorting performance in
createEntityAdapter, shrinks the code size in matcher utilities, fixes assorted issues with query hooks, and makes several TS tweaks.Changelog
Entity Adapter Sorting Performance
Users reported in #4252 that the sorting performance of
createEntityAdapterseemed abnormally bad - the provided comparison functions were being called far more times than expected.Upon investigation, we had a couple of problems. We were always starting from an array that was in insertion order, not the existing sorted order, and that would always require significant effort to re-sort even if there weren't any actual changes to the sorted results. Also, the sorting checks required frequent access to Immer's Proxy-wrapped values, even in cases where all we needed was the plain state values for comparison purposes.
We've reworked the internal sorting logic to always start from the existing sorted array, do reads against a plain value to avoid the Proxy getter overhead where possible, and optimized inserts into existing sorted arrays. This should significantly speed up sorted entity adapter behavior.
Matcher Code Size Optimization
We've reworked the internals of the thunk-related matchers to deduplicate some of the logic, shaving a few bytes off the final bundle size.
RTK Query Hook Updates
defaultSerializeQueryArgscan now handleBigIntvalues safely.The
isLoadingflag logic was improved to handle errors when a query hook tries to subscribe.TS Updates
create.asyncThunk's types were improved to avoid cases where it might inferany.We've made several internal types changes to work correctly with React 19's upcoming types.
The
retryConditionmethod now receivesunknownas an argument, instead of always assuming the user is usingfetchBaseQuery.Other Changes
The Reselect dep has been bumped to 5.1.0 to match the expected internal usage of
createSelector.withTypes().What's Changed
- Update remaining
Contextreferences to match the new nullableContextby@aryaemami59in reduxjs/redux-toolkit#4336- types: export
GetThunkAPItype by@shrouxmin reduxjs/redux-toolkit#4289- Inline the deprecated
React.ReactChildtype by@aryaemami59in reduxjs/redux-toolkit#4382- Replace usage of deprecated
JSXglobal namespace withReact.JSXby@aryaemami59in reduxjs/redux-toolkit#4381
... (truncated)
Commits
4578c74Release 2.2.52e400d5Merge pull request #4412 from reduxjs/bugfix/4411-immer-current4cc7b1fFix Immercurrentusage when the value may not be a draft87e2e59Switch vitest args to allow file filtering by name againf2cc82cMerge pull request #4406 from Wase-Zahin/feature/typob0a14b2fix: fix typo0246f78Release 2.2.472b3ac6Merge pull request #3957 from reduxjs/retry-error-typec892abdMerge pull request #4337 from jared-ca/undefined-type-initiate-mutation5d77624Merge pull request #4364 from smacpherson64/master- Additional commits viewable in compare view
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency -
@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
⚠️ No Changeset found
Latest commit: 0966c27260c33e6893c951965935eb65a7a336d6
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR