[PR #37] [MERGED] Bump @reduxjs/toolkit from 1.4.0 to 1.5.0 in /ui #826

Closed
opened 2026-03-15 21:37:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynqmon/pull/37
Author: @dependabot[bot]
Created: 3/5/2021
Status: Merged
Merged: 3/5/2021
Merged by: @hibiken

Base: masterHead: dependabot/npm_and_yarn/ui/reduxjs/toolkit-1.5.0


📝 Commits (1)

  • e1952d0 Bump @reduxjs/toolkit from 1.4.0 to 1.5.0 in /ui

📊 Changes

2 files changed (+7 additions, -12 deletions)

View changed files

📝 ui/package.json (+1 -1)
📝 ui/yarn.lock (+6 -11)

📄 Description

Bumps @reduxjs/toolkit from 1.4.0 to 1.5.0.

Release notes

Sourced from @​reduxjs/toolkit's releases.

v1.5.0

This release updates Immer to v8.x, adds a set of "matcher" utilities to simplify checking if dispatched actions match against a range of known action types, adds additional customization of async thunk error handling, and adds miscellaneous improvements around TS types and some reducer edge cases.

Changes

Immer v8

In RTK v1.4, we upgraded Immer to v7.x, which added a new current API for debugging.

Immer recently released v8.0.0, which changes its default behavior around auto-freezing state values. Previously, Immer only auto-froze data in development mode, partly under the assumption that freezing would be slower overall. Due to internal changes in Immer 7, Immer now checks if data is frozen and can bail out of some of its processing early. As a result, Immer 8 switches to always freezing return values, even in production, Per discussion in the Immer issues linked from the v8 release announcement, this apparently is actually faster on average.

This is a noticeable change in behavior, but we consider it not breaking for RTK on the grounds that you shouldn't be mutating state outside of a reducer anyway, so there shouldn't be any visible effect on correctly-written Redux logic.

We've updated our Immer dependency to v8.x.

Per the Immer docs on auto-freezing, it may be more efficient to shallowly pre-freeze very large data that won't change by using Immer's freeze utility. RTK now re-exports freeze as well.

Action Matching Utilities

In RTK v1.4, we added the ability to write "matching reducers" that can respond to more than one potential action based on a predicate function, such as builder.addMatcher( (action) => action.type.endsWith('/pending'), reducer).

Many users have asked for the ability to directly list a series of RTK-generated action creators as possible actions to match against. For RTK 1.5, we're adding several utilities that will help handle that process.

First, we've added isAnyOf(matchers) and isAllOf(matchers). These effectively perform boolean || and && checks, and accept an array containing RTK action creators or action-matching predicates. They return a new matching callback that can be passed to builder.addMatcher().

const isActionSpecial = (action: any): action is SpecialAction => {
  return action.payload === 'SPECIAL'
}

const thunkA = createAsyncThunk<string>('a', () => 'result');

// later createSlice({ name, initialState, reducers: {}, extraReducers: (builder) => { builder.addMatcher(isAllOf(isActionSpecial, thunkA.fulfilled), reducer); } })

When used with TypeScript, isAllOf and isAnyOf will correctly narrow down the possible type of action based on the actions they match against.

We've also added a set of matching utilities specifically meant to help check if a given action corresponds to the lifecycle actions dispatched by some specific async thunks. isPending, isFulfilled, isRejected, isRejectedWithValue, and isAsyncThunkAction all accept an array of thunks generated by createAsyncThunk, and will match the corresponding action types from those thunks:

</tr></table> 

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hibiken/asynqmon/pull/37 **Author:** [@dependabot[bot]](https://github.com/apps/dependabot) **Created:** 3/5/2021 **Status:** ✅ Merged **Merged:** 3/5/2021 **Merged by:** [@hibiken](https://github.com/hibiken) **Base:** `master` ← **Head:** `dependabot/npm_and_yarn/ui/reduxjs/toolkit-1.5.0` --- ### 📝 Commits (1) - [`e1952d0`](https://github.com/hibiken/asynqmon/commit/e1952d04e937b2499a968836ad5420b16f8a2a55) Bump @reduxjs/toolkit from 1.4.0 to 1.5.0 in /ui ### 📊 Changes **2 files changed** (+7 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `ui/package.json` (+1 -1) 📝 `ui/yarn.lock` (+6 -11) </details> ### 📄 Description Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 1.4.0 to 1.5.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/reduxjs/redux-toolkit/releases"><code>@​reduxjs/toolkit's releases</code></a>.</em></p> <blockquote> <h2>v1.5.0</h2> <p>This release updates Immer to v8.x, adds a set of &quot;matcher&quot; utilities to simplify checking if dispatched actions match against a range of known action types, adds additional customization of async thunk error handling, and adds miscellaneous improvements around TS types and some reducer edge cases.</p> <h2>Changes</h2> <h3>Immer v8</h3> <p>In <a href="https://github.com/reduxjs/redux-toolkit/releases/tag/v1.4.0">RTK v1.4</a>, we upgraded Immer to v7.x, which added a new <code>current</code> API for debugging.</p> <p>Immer recently released <a href="https://github.com/immerjs/immer/releases/tag/v8.0.0">v8.0.0</a>, which changes its default behavior around auto-freezing state values. Previously, Immer only auto-froze data in development mode, partly under the assumption that freezing would be slower overall. Due to internal changes in Immer 7, Immer now checks if data is frozen and can bail out of some of its processing early. As a result, Immer 8 switches to <em>always</em> freezing return values, even in production, Per discussion in the Immer issues linked from the v8 release announcement, this apparently is actually faster on average.</p> <p>This is a noticeable change in behavior, but we consider it not breaking for RTK on the grounds that you shouldn't be mutating state outside of a reducer anyway, so there shouldn't be any visible effect on correctly-written Redux logic.</p> <p>We've updated our Immer dependency to v8.x.</p> <p>Per <a href="https://immerjs.github.io/immer/docs/freezing">the Immer docs on auto-freezing</a>, it may be more efficient to shallowly pre-freeze very large data that won't change by using Immer's <code>freeze</code> utility. RTK now re-exports <code>freeze</code> as well.</p> <h3>Action Matching Utilities</h3> <p>In <a href="https://github.com/reduxjs/redux-toolkit/releases/tag/v1.4.0">RTK v1.4</a>, we added the ability to write &quot;matching reducers&quot; that can respond to more than one potential action based on a predicate function, such as <code>builder.addMatcher( (action) =&gt; action.type.endsWith('/pending'), reducer)</code>.</p> <p>Many users have asked for the ability to directly list a series of RTK-generated action creators as possible actions to match against. For RTK 1.5, we're adding several utilities that will help handle that process.</p> <p>First, we've added <code>isAnyOf(matchers)</code> and <code>isAllOf(matchers)</code>. These effectively perform boolean <code>||</code> and <code>&amp;&amp;</code> checks, and accept an array containing RTK action creators or action-matching predicates. They return a new matching callback that can be passed to <code>builder.addMatcher()</code>.</p> <pre lang="ts"><code>const isActionSpecial = (action: any): action is SpecialAction =&gt; { return action.payload === 'SPECIAL' } <p>const thunkA = createAsyncThunk&lt;string&gt;('a', () =&gt; 'result');</p> <p>// later createSlice({ name, initialState, reducers: {}, extraReducers: (builder) =&gt; { builder.addMatcher(isAllOf(isActionSpecial, thunkA.fulfilled), reducer); } }) </code></pre></p> <p>When used with TypeScript, <code>isAllOf</code> and <code>isAnyOf</code> will correctly narrow down the possible type of <code>action</code> based on the actions they match against.</p> <p>We've also added a set of matching utilities specifically meant to help check if a given action corresponds to the lifecycle actions dispatched by some specific async thunks. <code>isPending</code>, <code>isFulfilled</code>, <code>isRejected</code>, <code>isRejectedWithValue</code>, and <code>isAsyncThunkAction</code> all accept an array of thunks generated by <code>createAsyncThunk</code>, and will match the corresponding action types from those thunks:</p> <pre lang="ts"><code>&lt;/tr&gt;&lt;/table&gt; </code></pre> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/reduxjs/redux-toolkit/commit/5fe2e34fa7639a4971f3ad2a466d44b2ec7aa4a0"><code>5fe2e34</code></a> 1.5.0</li> <li><a href="https://github.com/reduxjs/redux-toolkit/commit/6e95fb0d7bfcca4690ec4b35a6dccaf9cfa2dc59"><code>6e95fb0</code></a> upcoming: RTK 1.5.0 (<a href="https://github-redirect.dependabot.com/reduxjs/redux-toolkit/issues/813">#813</a>)</li> <li><a href="https://github.com/reduxjs/redux-toolkit/commit/8e8b11576e868a6625ad6fcc9b3fb4f637ff225b"><code>8e8b115</code></a> Update advanced-tutorial.md (<a href="https://github-redirect.dependabot.com/reduxjs/redux-toolkit/issues/727">#727</a>)</li> <li><a href="https://github.com/reduxjs/redux-toolkit/commit/e5c3befcc7da850f2ae2bcb103b8144e6a3e888b"><code>e5c3bef</code></a> feat(docs): added links for both redux &amp; react (<a href="https://github-redirect.dependabot.com/reduxjs/redux-toolkit/issues/819">#819</a>)</li> <li><a href="https://github.com/reduxjs/redux-toolkit/commit/7fda27adc0d91bdd285a2d89b7a004b9ca1d3cd1"><code>7fda27a</code></a> Export isPlainObject (<a href="https://github-redirect.dependabot.com/reduxjs/redux-toolkit/issues/795">#795</a>)</li> <li><a href="https://github.com/reduxjs/redux-toolkit/commit/bbb455ed9db4544fb7a7c445ba1606b6dca9edd0"><code>bbb455e</code></a> add <code>requestId</code> property to the promise returned by <code>createAsyncThunk</code> (<a href="https://github-redirect.dependabot.com/reduxjs/redux-toolkit/issues/784">#784</a>)</li> <li><a href="https://github.com/reduxjs/redux-toolkit/commit/f8d8969c86268276347dc1d7b09a76529a5f8503"><code>f8d8969</code></a> fix formatting (<a href="https://github-redirect.dependabot.com/reduxjs/redux-toolkit/issues/785">#785</a>)</li> <li><a href="https://github.com/reduxjs/redux-toolkit/commit/1add4b9c99fbd6e87cf3b5ea40f91b6742ff430e"><code>1add4b9</code></a> Update usage-with-typescript.md (<a href="https://github-redirect.dependabot.com/reduxjs/redux-toolkit/issues/783">#783</a>)</li> <li><a href="https://github.com/reduxjs/redux-toolkit/commit/121fe32c3add396c63f9b6f22c1f133a05f1c365"><code>121fe32</code></a> Tests: Add additional upsertMany test cases (<a href="https://github-redirect.dependabot.com/reduxjs/redux-toolkit/issues/781">#781</a>)</li> <li><a href="https://github.com/reduxjs/redux-toolkit/commit/85ef77bae7bdcc491d935cb84839a6cf1bea7f45"><code>85ef77b</code></a> Fix a tiny little typo (<a href="https://github-redirect.dependabot.com/reduxjs/redux-toolkit/issues/780">#780</a>)</li> <li>Additional commits viewable in <a href="https://github.com/reduxjs/redux-toolkit/compare/v1.4.0...v1.5.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@reduxjs/toolkit&package-manager=npm_and_yarn&previous-version=1.4.0&new-version=1.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will 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 version` will 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 dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 21:37:13 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynqmon#826
No description provided.