Skip to content

Commit

Permalink
Update dependency @reduxjs/toolkit to v1.9.7 (#9)
Browse files Browse the repository at this point in the history
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@reduxjs/toolkit](https://redux-toolkit.js.org)
([source](https://togithub.com/reduxjs/redux-toolkit)) | [`1.9.2` ->
`1.9.7`](https://renovatebot.com/diffs/npm/@reduxjs%2ftoolkit/1.9.2/1.9.7)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@reduxjs%2ftoolkit/1.9.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@reduxjs%2ftoolkit/1.9.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@reduxjs%2ftoolkit/1.9.2/1.9.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@reduxjs%2ftoolkit/1.9.2/1.9.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>reduxjs/redux-toolkit (@&#8203;reduxjs/toolkit)</summary>

###
[`v1.9.7`](https://togithub.com/reduxjs/redux-toolkit/releases/tag/v1.9.7)

[Compare
Source](https://togithub.com/reduxjs/redux-toolkit/compare/v1.9.6...v1.9.7)

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
[#&#8203;3214](https://togithub.com/reduxjs/redux-toolkit/issues/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

- chore: Switch 4.9.2-rc to 4.9.5 since 4.9.5 has been released in
TypeScript by [@&#8203;kahirokunn](https://togithub.com/kahirokunn) in
[reduxjs/redux-toolkit#3772
- Copy of "Work around known TS bug with type inference
[#&#8203;3761](https://togithub.com/reduxjs/redux-toolkit/issues/3761)"
by [@&#8203;julian-ford](https://togithub.com/julian-ford) in
[reduxjs/redux-toolkit#3777
- Rework named hooks type (v1.9) by
[@&#8203;EskiMojo14](https://togithub.com/EskiMojo14) in
[reduxjs/redux-toolkit#3769

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

###
[`v1.9.6`](https://togithub.com/reduxjs/redux-toolkit/releases/tag/v1.9.6)

[Compare
Source](https://togithub.com/reduxjs/redux-toolkit/compare/v1.9.5...v1.9.6)

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

- create action creator middleware by
[@&#8203;EskiMojo14](https://togithub.com/EskiMojo14) in
[reduxjs/redux-toolkit#3414
- Implement auto fork joining by
[@&#8203;ericanderson](https://togithub.com/ericanderson) in
[reduxjs/redux-toolkit#3407
- types: make it easier to wrap createAsyncThunk by
[@&#8203;shrouxm](https://togithub.com/shrouxm) in
[reduxjs/redux-toolkit#3393
- Fixed Stackoverflow bug if children prop is a ref to root/parent
object by [@&#8203;cheprasov](https://togithub.com/cheprasov) in
[reduxjs/redux-toolkit#3428
- Fix TransformedResponse type to unwrap promise by
[@&#8203;EskiMojo14](https://togithub.com/EskiMojo14) in
[reduxjs/redux-toolkit#3500
- Throw error when type is empty in builder.addCase by
[@&#8203;chawes13](https://togithub.com/chawes13) in
[reduxjs/redux-toolkit#3572
- \[RED-23] fix: Updated type references to resolve portable types issue
by [@&#8203;tdurnford](https://togithub.com/tdurnford) in
[reduxjs/redux-toolkit#3728
- add option to update provided tags by
[@&#8203;dutzi](https://togithub.com/dutzi) in
[reduxjs/redux-toolkit#3255
- \[RED-26] Remove Request.clone() usage in fetchBaseQuery by
[@&#8203;alex-vukov](https://togithub.com/alex-vukov) in
[reduxjs/redux-toolkit#3720
- Try working around TS 4.1 mismatch by
[@&#8203;markerikson](https://togithub.com/markerikson) in
[reduxjs/redux-toolkit#3739

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

###
[`v1.9.5`](https://togithub.com/reduxjs/redux-toolkit/releases/tag/v1.9.5)

[Compare
Source](https://togithub.com/reduxjs/redux-toolkit/compare/v1.9.4...v1.9.5)

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

- update to latest remark-typescript-tools by
[@&#8203;EskiMojo14](https://togithub.com/EskiMojo14) in
[reduxjs/redux-toolkit#3311
- add isAction helper function, and ensure listener middleware only runs
for actions by [@&#8203;EskiMojo14](https://togithub.com/EskiMojo14) in
[reduxjs/redux-toolkit#3372
- Allow inference of enhancer state extensions, and fix inference when
using callback form by
[@&#8203;EskiMojo14](https://togithub.com/EskiMojo14) in
[reduxjs/redux-toolkit#3207

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

###
[`v1.9.4`](https://togithub.com/reduxjs/redux-toolkit/releases/tag/v1.9.4)

[Compare
Source](https://togithub.com/reduxjs/redux-toolkit/compare/v1.9.3...v1.9.4)

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

- Test published artifacts in CI by
[@&#8203;markerikson](https://togithub.com/markerikson) in
[reduxjs/redux-toolkit#3213
- Use Git revision in version and add Node CI examples by
[@&#8203;markerikson](https://togithub.com/markerikson) in
[reduxjs/redux-toolkit#3258
- Add `arethetypeswrong` automated CLI check by
[@&#8203;markerikson](https://togithub.com/markerikson) in
[reduxjs/redux-toolkit#3294
- Add `attw` CLI option to treat problems as non-errors by
[@&#8203;markerikson](https://togithub.com/markerikson) in
[reduxjs/redux-toolkit#3316
- Use original instead of immer draft for perf by
[@&#8203;GeorchW](https://togithub.com/GeorchW) in
[reduxjs/redux-toolkit#3270
- enable enhanceEndpoints.transformResponse to override ResultType by
[@&#8203;dmitrigrabov](https://togithub.com/dmitrigrabov) in
[reduxjs/redux-toolkit#2953
- Fix global `responseHandler` being used in `fetchBaseQuery` by
[@&#8203;praxxis](https://togithub.com/praxxis) in
[reduxjs/redux-toolkit#3137
- reset internalState.currentSubscriptions on `resetApiState` by
[@&#8203;phryneas](https://togithub.com/phryneas) in
[reduxjs/redux-toolkit#3333
- Bump deps and mark `subscriptionUpdated` as autobatched by
[@&#8203;markerikson](https://togithub.com/markerikson) in
[reduxjs/redux-toolkit#3364

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

###
[`v1.9.3`](https://togithub.com/reduxjs/redux-toolkit/releases/tag/v1.9.3)

[Compare
Source](https://togithub.com/reduxjs/redux-toolkit/compare/v1.9.2...v1.9.3)

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](https://togithub.com/reduxjs/redux-toolkit/releases/tag/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

- Revert "clear data on skip" back to its original behavior by
[@&#8203;markerikson](https://togithub.com/markerikson) in
[reduxjs/redux-toolkit#3188
- Use a WeakMap cache for query arg serialization for perf by
[@&#8203;markerikson](https://togithub.com/markerikson) in
[reduxjs/redux-toolkit#3193

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

</details>

---

### 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.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/realbrodiwhite/royalgames-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI2MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
  • Loading branch information
realbrodiwhite committed Mar 21, 2024
2 parents 91bcbf0 + 9edb627 commit 5f4a540
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5f4a540

Please sign in to comment.