Skip to content

Update dependency @reduxjs/toolkit to v1.9.7#38

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/reduxjs-toolkit-1.x-lockfile
Open

Update dependency @reduxjs/toolkit to v1.9.7#38
renovate[bot] wants to merge 1 commit intomainfrom
renovate/reduxjs-toolkit-1.x-lockfile

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Feb 22, 2024

This PR contains the following updates:

Package Change Age Confidence
@reduxjs/toolkit (source) 1.9.01.9.7 age confidence

Release Notes

reduxjs/redux-toolkit (@​reduxjs/toolkit)

v1.9.7

Compare Source

This bugfix release rewrites the RTKQ hook TS types to significantly improve TS perf.

Changelog
RTKQ TS Perf

A number of users had reported that Intellisense for RTKQ API objects was extremely slow (multiple seconds) - see discussion in #​3214 . We did some perf investigation on user-provided examples, and concluded that the biggest factor to slow RTKQ TS perf was the calculation of hook names like useGetPokemonQuery, which was generating a large TS union of types.

We've rewritten that hook names type calculation to use mapped types and a couple of intersections. In a specific user-provided stress test repo, it dropped TS calculation time by 60% (2600ms to 1000ms).

There's more potential work we can do to improve things, but this seems like a major perf improvement worth shipping now.

What's Changed

Full Changelog: reduxjs/redux-toolkit@v1.9.6...v1.9.7

v1.9.6

Compare Source

This bugfix release adds a new dev-mode middleware to catch accidentally dispatching an action creator, adds a new listener middleware option around waiting for forks, adds a new option to update provided tags when updateQueryData is used, reworks internal types to better handle uses with TS declaration output, and fixes a variety of small issues.

Changelog
Action Creator Dev Check Middleware

RTK already includes dev-mode middleware that check for the common mistakes of accidentally mutating state and putting non-serializable values into state or actions.

Over the years we've also seen a semi-frequent error where users accidentally pass an action creator reference to dispatch, instead of calling it and dispatching the action it returns.

We've added another dev-mode middleware that specifically catches this error and warns about it.

Additional Options

The listener middleware's listenerApi.fork() method now has an optional autoJoin flag that can be used to keep the effect from finishing until all active forked tasks have completed.

updateQueryData now has an updateProvidedTags option that will force a recalculation of that endpoint's provided tags. It currently defaults to false, and we'll likely turn that to true in the next major.

Other Fixes

The builder.addCase method now throws an error if a type string is empty.

fetchBaseQuery now uses an alternate method to clone the original Request in order to work around an obscure Chrome bug.

The immutability middleware logic was tweaked to avoid a potential stack overflow.

Types Changes

The internal type imports have been reworked to try to fix "type portability" issues when used in combination with TS declaration outputs.

A couple additional types were exported to help with wrapping createAsyncThunk.

What's Changed

Full Changelog: reduxjs/redux-toolkit@v1.9.5...v1.9.6

v1.9.5

Compare Source

This bugfix release includes notable improvements to TS type inference when using the enhancers option in configureStore, and updates the listener middleware to only check predicates if the dispatched value is truly an action object.

What's Changed

Full Changelog: reduxjs/redux-toolkit@v1.9.4...v1.9.5

v1.9.4

Compare Source

This bugfix release includes tweaks to RTKQ options handling, tweaks for perf updates, dependency updates, and updates to our CI tooling.

Also, please check out our ongoing RTK 2.0 alpha releases! They have significant improvements to bundle size, ESM/CJS compatibility, TS typings, and reducer update performance. We're looking for real-world feedback on behavior, performance, and any issues you might run into.

Changelog

RTK Query Options Updates

Passing transformResponse as part of enhanceEndpoints can now override the TS type of the original data.

fetchBaseQuery now properly checks for a global responseHandler option.

Performance and Internals

RTK Query now uses Immer's original() to do comparisons inside of copyWithStructuralSharing, which should significantly speed up performance when applying changes from re-fetched data.

RTKQ's internal subscriptionUpdated action is now marked as batchable.

We've updated dependencies to Immer 9.0.21, Reselect 4.1.8, and Redux 4.2.1.

CI Updates

We've added a suite of example apps built with different frameworks such as CRA 4, CRA 5, Next, and Vite, as well as examples that check for compatibility in Node with CJS and ESM modes and with various TS module resolution modes.

What's Changed

Full Changelog: reduxjs/redux-toolkit@v1.9.3...v1.9.4

v1.9.3

Compare Source

This release fixes a couple issues with the skip/skipToken options 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} or skipToken for a query with existing results will keep the data value (reflecting the last successful query), but currentData will 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 a WeakMap-based cache for query args to avoid re-serializing existing arg values.

What's Changed

Full Changelog: reduxjs/redux-toolkit@v1.9.2...v1.9.3

v1.9.2

Compare Source

This bugfix release fixes a memory leak in createListenerMiddleware, optimizes performance inside serializableMiddleware, adds new options for fetchBaseQuery, adds support for path RegExp exclusions in serializableMiddleware and immutabilityMiddleware, and improves some TS types.

Changelog
Bug Fixes

createListenerMiddleware had a memory leak that turned out to be due to use of Promise.race(). We've restructured the logic to fix that.

fetchBaseQuery now correctly combines global options with endpoint / default options in all cases.

New Options

fetchBaseQuery now supports a jsonReplacer option that will be used when processing JSON.

Both dev check middleware now support regular expressions in the ignoredPaths array in addition to strings. This adds extra flexibility in skipping certain fields.

TS Changes

The CaseReducer type was sometimes incorrectly inferring its return type in rare cases. That's been fixed.

The isAnyOf/isAllOf matcher function TS types have been tweaked to not require an individual first parameter. This allows spreading arrays of matchers as arguments, like const isLoading = isAnyOf(...interestingPendingThunksArray).

Other Changes

The serializableMiddleware now uses a WeakSet if available to cache values it's seen. This should significantly speed up checks against large state values in development builds.

What's Changed

Full Changelog: reduxjs/redux-toolkit@v1.9.1...v1.9.2

v1.9.1

Compare Source

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.withTypes function was fully broken (it type-checked correctly, but pointed to the wrong function due to a name shadowing issue). That now works correctly.

The maxRetries option for RTKQ was inadvertently filtering out 0 values, and those are now accepted.

fulfillWithValue had incorrect types that made it appear as if the data was nested an additional level deeper. The types are now correct.

The ActionCreatorWithoutPayload type was tweaked to force an error when an action creator is accidentally called with an argument, which happens in cases like onClick={todoAdded}. This avoids accidentally passing values like React event objects as the payload.

Timer handling for batchActions and autoBatchEnhancer now works in more JS runtime environments.

Other Changes

The TagDescription type is now exported from RTKQ.

API endpoints now have a .name field containing the endpoint name, such as "getPokemon".

Calling promise.abort() on a createAsyncThunk promise before an async condition resolves will now be treated as if the condition itself returned false, bailing out and not dispatching anything.

The merge option now receives a third argument containing {arg, baseQueryMeta, fulfilledTimeStamp, requestId}, in case that info is useful in deciding how to merge.

The @reduxjs/rtk-codemods package has been updated to fix cases where the createSliceBuilder codemod 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: reduxjs/redux-toolkit@v1.9.0...v1.9.1


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch 2 times, most recently from eec18f1 to aab16f0 Compare January 30, 2025 18:55
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from aab16f0 to 958475b Compare February 9, 2025 14:39
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 958475b to a2cd495 Compare March 3, 2025 18:13
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch 3 times, most recently from ac18f8d to d4929bf Compare March 17, 2025 13:38
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch 2 times, most recently from d000714 to 6309b3d Compare April 8, 2025 10:28
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 6309b3d to 6598bfe Compare April 24, 2025 07:53
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 6598bfe to 3d98676 Compare May 19, 2025 20:59
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 3d98676 to e177b4c Compare May 28, 2025 09:58
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from e177b4c to f3e00eb Compare June 4, 2025 12:55
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from f3e00eb to 0e11858 Compare June 22, 2025 13:08
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 0e11858 to ee31ce0 Compare July 2, 2025 13:57
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch 2 times, most recently from 3074f39 to d65fe18 Compare August 13, 2025 11:28
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from d65fe18 to 7223c78 Compare August 19, 2025 19:30
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 7223c78 to 1de3706 Compare August 31, 2025 12:49
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 1de3706 to 979c04c Compare September 25, 2025 16:01
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 979c04c to 9f3ec4d Compare October 21, 2025 14:04
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 9f3ec4d to 71925c4 Compare November 10, 2025 18:04
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 71925c4 to d480a20 Compare November 18, 2025 10:40
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from d480a20 to 90ac8a1 Compare December 3, 2025 14:43
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 90ac8a1 to 3c7983a Compare December 31, 2025 13:38
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 3c7983a to f89b2e8 Compare January 8, 2026 17:54
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch 2 times, most recently from 0f55c23 to d89108f Compare January 23, 2026 18:27
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from d89108f to 5d744e0 Compare February 2, 2026 19:06
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 5d744e0 to 21607b8 Compare February 12, 2026 09:55
@renovate renovate bot force-pushed the renovate/reduxjs-toolkit-1.x-lockfile branch from 21607b8 to 1979177 Compare February 17, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants