[Snyk] Upgrade @reduxjs/toolkit from 2.2.3 to 2.2.7 #4
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.
Snyk has created this PR to upgrade @reduxjs/toolkit from 2.2.3 to 2.2.7.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 4 versions ahead of your current version.
The recommended version was released on 21 days ago.
Release notes
Package name: @reduxjs/toolkit
-
2.2.7 - 2024-07-27
- #1806
- #3962
- #3983
- Fix: TypeScript Type Portability Issues by @ aryaemami59 in #4467
- Export UpdateDefinitions from toolkit/query by @ joekrill in #4519
- feat: Adds ExtraArgument to withTypes for listenerMiddleware. by @ antondalgren in #4517
- Improve treeshakeability of build artifacts by @ aryaemami59 in #4435
- Export RetryOptions by @ markerikson in #4529
-
2.2.6 - 2024-06-29
- Brings internal
- Exports
- Fixes an issue in recent
- Fix
- Add export for FetchBaseQueryArgs by @ WilsonCWong in #4465
- Fix Immer current usage when calling addManyMutably more than once by @ JacobShafer in #4420
- Golf a few pieces of entity adapter code by @ EskiMojo14 in #4485
-
2.2.5 - 2024-05-16
- Fix missed spot where use of
-
2.2.4 - 2024-05-09
- Update remaining
- types: export
- Inline the deprecated
- Replace usage of deprecated
- Fix
- Bump
- Improve sorted entity adapter sorting performance by @ markerikson in #4361
- Prevent inference of any in create.asyncThunk by @ EskiMojo14 in #4389
- try out simplifying matcher code by @ EskiMojo14 in #4386
- Handle bigint in useQuerySubscription by @ rkofman in #4315
- fix: ensure hook subscription failures do not reset isLoading state by @ smacpherson64 in #4364
- Improve usability of the
- Make retryCondition receive unknown error, as the user may not be using fetchBaseQuery by @ EskiMojo14 in #3957
-
2.2.3 - 2024-03-31
- Update React Redux dependency to v9, and update docs to use
from @reduxjs/toolkit GitHub release notesThis bugfix release fixes issues with "TS type portability" errors, improves build artifact tree shaking behavior, and exports some additional TS types.
Changelog
TS Type Portability
We've had a slew of issues reported around "TS type portability" errors, such as:
The error messages are typically along the lines of:
@ aryaemami59 did some deep investigation and concluded these were due to a mixture of using
interfaceinstead oftypein most places, not pre-bundling our TS typedefs, and not exporting some of the unique symbols we use internally.Arya put together a highly detailed writeup and set of fixes in #4467: Fix: TypeScript Type Portability Issues, and that appears to resolve all of those issues we've seen. Thank you!
Other Changes
Arya also did significant work to improve RTK's treeshaking, tweaking internal definitions to let bundlers better separate out unused code.
We've exported additional types like
UpdateDefinitionsandRetryOptions, per request.listenerMiddleware.withTypes()methods now allow passing in anExtraArgumentgeneric.What's Changed
Full Changelog: v2.2.6...v2.2.7
This bugfix release:
useIsomorphicLayoutEffectusage in line with React Redux in React Native environmentsFetchBaseQueryArgstypecreateEntityAdaptersorting perf improvements that could (in specific cases) cause Immer to throw an errorWhat's Changed
useIsomorphicLayoutEffectusage in React Native environments by @ aryaemami59 in #4436Full Changelog: v2.2.5...v2.2.6
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
currentmay fail if the value is not a draft by @ markerikson in #4412Full Changelog: v2.2.4...v2.2.5
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
Contextreferences to match the new nullableContextby @ aryaemami59 in #4336GetThunkAPItype by @ shrouxm in #4289React.ReactChildtype by @ aryaemami59 in #4382JSXglobal namespace withReact.JSXby @ aryaemami59 in #4381useRefusages to be called with an explicit argument ofundefined. by @ aryaemami59 in #4380reselectdependency to 5.1.0 to resolve #4200 by @ aryaemami59 in #4400initiate()action for mutations. by @ jared-ca in #4337Full Changelog: v2.2.3...v2.2.4
This bugfix release fixes the types for functions that accept a React Context instance to match the changes in React Redux v9.
What's Changed
.withTypesby @ aryaemami59 in #4308Full Changelog: v2.2.2...v2.2.3
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: