This repository was archived by the owner on May 30, 2023. It is now read-only.
[Snyk] Upgrade @reduxjs/toolkit from 1.8.3 to 1.9.3 #42
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 was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade @reduxjs/toolkit from 1.8.3 to 1.9.3.
ℹ️ 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.
Release notes
Package name: @reduxjs/toolkit
-
1.9.3 - 2023-02-21
- Revert "clear data on skip" back to its original behavior by @ markerikson in #3188
- Use a WeakMap cache for query arg serialization for perf by @ markerikson in #3193
-
1.9.2 - 2023-01-28
- fix CaseReducer to infer from argument, not return value by @ phryneas in #3054
- fetchBaseQuery | Add jsonReplacer param by @ tophep in #2904
- Support RegExp in ignoredPaths/ignoredActionPaths by @ markerikson in #3129
- fix(types): export
- remove unnecessary fetchBaseQuery defaults by @ phryneas in #3062
- make isAnyOf friendly for mapped matchers, but making argument optional by @ megagon in #3123
- Fix lint problems and enable linting on CI by @ thorn0 in #2992
- Add caching to serializableStateInvariantMiddleware by @ GeorchW in #3115
- Allow TS isolatedModules flag to be set for safer transpilation by @ matmannion in #2911
-
1.9.1 - 2022-11-30
- fix createAsyncThunk.withTypes by @ phryneas in #2885
- Update timer polyfills to work in more environments by @ markerikson in #2887
- Retry now checks whether potential retry counts are undefined, rather than boolean, in order to avoid filtering out 0's by @ OliverRadini in #2958
- Fix multiple small issues with 1.9 by @ markerikson in #2964
- fulfillWithValue should infer return value by @ phryneas in #2888
- Fix Identifier/MemberExpression values in createSliceBuilder codemod by @ kyletsang in #2881
- Additional 1.9.1 fixes by @ markerikson in #2965
-
1.9.0 - 2022-11-04
-
1.9.0-rc.1 - 2022-11-02
https://deploy-preview-2401--redux-starter-kit-docs.netlify.app/
- Fix "running thunks" types and remove unnecessary RTKQ selectors by @ markerikson in #2856
- Make autobatching notification queueing configurable by @ markerikson in #2857
-
1.9.0-rc.0 - 2022-10-30
-
1.9.0-beta.0 - 2022-10-19
-
1.9.0-alpha.2 - 2022-10-09
-
1.9.0-alpha.1 - 2022-08-28
-
1.9.0-alpha.0 - 2022-08-19
-
1.8.6 - 2022-10-09
-
1.8.5 - 2022-08-19
-
1.8.4 - 2022-08-11
-
1.8.3 - 2022-06-30
from @reduxjs/toolkit GitHub release notesThis release fixes a couple issues with the
skip/skipTokenoptions for query hooks, and makes a small perf tweak to serializing query args.Changelog
Skip Behavior
We made a change in v1.9.0 that tried to make some skip behavior more consistent, including clearing out the cached data. However, we had overlooked that our own docs actually said "skipping a query will keep the cached data", and several users pointed this out as they'd been relying on that behavior.
We've reverted that change. Now, setting
{skip: true}orskipTokenfor a query with existing results will keep thedatavalue (reflecting the last successful query), butcurrentDatawill be undefined (reflecting the current settings).We also identified and fixed an issue that could cause subscription entries to leak under a specific combination of timing and settings changes.
Query Arg Serialization Perf
RTKQ relies on serializing query arguments to serve as the cache keys, with the default using
JSON.stringify()+ some logic for sorting keys. There was a report that in some apps, large query arg objects could take a while to stringify and this was being done repeatedly. We've added aWeakMap-based cache for query args to avoid re-serializing existing arg values.What's Changed
Full Changelog: v1.9.2...v1.9.3
This bugfix release fixes a memory leak in
createListenerMiddleware, optimizes performance insideserializableMiddleware, adds new options forfetchBaseQuery, adds support for pathRegExpexclusions inserializableMiddlewareandimmutabilityMiddleware, and improves some TS types.Changelog
Bug Fixes
createListenerMiddlewarehad a memory leak that turned out to be due to use ofPromise.race(). We've restructured the logic to fix that.fetchBaseQuerynow correctly combines global options with endpoint / default options in all cases.New Options
fetchBaseQuerynow supports ajsonReplaceroption that will be used when processing JSON.Both dev check middleware now support regular expressions in the
ignoredPathsarray in addition to strings. This adds extra flexibility in skipping certain fields.TS Changes
The
CaseReducertype was sometimes incorrectly inferring its return type in rare cases. That's been fixed.The
isAnyOf/isAllOfmatcher function TS types have been tweaked to not require an individual first parameter. This allows spreading arrays of matchers as arguments, likeconst isLoading = isAnyOf(...interestingPendingThunksArray).Other Changes
The
serializableMiddlewarenow uses aWeakSetif available to cache values it's seen. This should significantly speed up checks against large state values in development builds.What's Changed
ThunkWithReturnValueinterface by @ giomogna in #3108raceWithSignalmethod instead ofPromise.raceby @ phryneas in #3021Full Changelog: v1.9.1...v1.9.2
This bugfix release fixes assorted issues that were reported with RTK 1.9.0, and adds a few additional requested tweaks and improvements.
Changelog
Fixes
The
createAsyncThunk.withTypesfunction was fully broken (it type-checked correctly, but pointed to the wrong function due to a name shadowing issue). That now works correctly.The
maxRetriesoption for RTKQ was inadvertently filtering out0values, and those are now accepted.fulfillWithValuehad incorrect types that made it appear as if the data was nested an additional level deeper. The types are now correct.The
ActionCreatorWithoutPayloadtype was tweaked to force an error when an action creator is accidentally called with an argument, which happens in cases likeonClick={todoAdded}. This avoids accidentally passing values like React event objects as the payload.Timer handling for
batchActionsandautoBatchEnhancernow works in more JS runtime environments.Other Changes
The
TagDescriptiontype is now exported from RTKQ.API endpoints now have a
.namefield containing the endpoint name, such as"getPokemon".Calling
promise.abort()on acreateAsyncThunkpromise before an asyncconditionresolves will now be treated as if theconditionitself returnedfalse, bailing out and not dispatching anything.The
mergeoption now receives a third argument containing{arg, baseQueryMeta, fulfilledTimeStamp, requestId}, in case that info is useful in deciding how to merge.The
@ reduxjs/rtk-codemodspackage has been updated to fix cases where thecreateSliceBuildercodemod didn't preserve fields with function variable arguments, like[todoAdded]: adapter.addOne. That package has been updated to v0.0.3.What's Changed
Full Changelog: v1.9.0...v1.9.1
Read more
This release candidate updates the auto-batching enhancer to accept additional options for queuing subscriber notifications, and improves RTKQ perf by removing some unnecessary internal memoized selectors.
Please try this out and give us feedback (even if it's just "tried updating and everything's fine")! If no further issues come up we intend to publish 1.9 in the next few days.
Changelog
Autobatch Enhancer Options
The initial implementation of the
autoBatchEnhancer()always queued delayed subscriber notifications usingqueueMicrotask. We've updated it to accept alternate options that queue withsetTimeout,requestAnimationFrame, or bring-your-own-callback (more similar toredux-batched-subscribe).The variation in JS event loop timing behavior (microtasks, macrotasks, and frames) means having these options may be useful in different situations.
What's Changed
Full Changelog: v1.9.0-rc.0...v1.9.0-rc.1
Read more
Commit messages
Package name: @reduxjs/toolkit
Compare
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:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs