-
Notifications
You must be signed in to change notification settings - Fork 174
fix(deps): update dependency immer to v11 #3457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 20351776721Details
💛 - Coveralls |
5878006 to
62625dd
Compare
0245881 to
8065da5
Compare
4284965 to
70feeb8
Compare
70feeb8 to
4a420e9
Compare
4a420e9 to
a3b70da
Compare
| "i18next": "^25.0.0", | ||
| "i18next-browser-languagedetector": "^8.0.0", | ||
| "immer": "^9.0.21", | ||
| "immer": "^11.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The updated Immer v11 dependency is a known incompatible pairing with the existing RTK v1.9.7, which can cause bugs in RTK Query array operations.
Severity: HIGH | Confidence: High
🔍 Detailed Analysis
The application is using Redux Toolkit (RTK) version 1.9.7 alongside Immer version 11. This combination is known to be incompatible, with reported bugs specifically affecting RTK Query array operations, particularly in production builds. While the codebase uses setAutoFreeze(false) as a hotfix for other issues, the fundamental problem is the version mismatch between these two libraries, which can lead to incorrect state updates or other runtime errors.
💡 Suggested Fix
To resolve the incompatibility, either upgrade Redux Toolkit (RTK) to a version that is officially compatible with Immer v11, or revert the Immer dependency back to v10.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L66
Potential issue: The application is using Redux Toolkit (RTK) version 1.9.7 alongside
Immer version 11. This combination is known to be incompatible, with reported bugs
specifically affecting RTK Query array operations, particularly in production builds.
While the codebase uses `setAutoFreeze(false)` as a hotfix for other issues, the
fundamental problem is the version mismatch between these two libraries, which can lead
to incorrect state updates or other runtime errors.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7729943
This PR contains the following updates:
^9.0.21->^11.0.0Release Notes
immerjs/immer (immer)
v11.0.1Compare Source
Bug Fixes
v11.0.0Compare Source
Performance Improvements
BREAKING CHANGES
enable loose iteration by default
Simplify some iteration checks
Allow passing type to get/set utils to skip archetype lookup
Convert assigned_ to Map
Enable loose iteration
Replace recursive tree finalization with targeted callbacks
Ported Mutative's "finalization callback" approach as a more targeted and performant implementation for finalization compared to the existing recursive tree traversal approach:
inside of plain values
during tree traversal
v10.2.0Compare Source
Features
setUseStrictIteration(#1164) (e1996ce)v10.1.3Compare Source
Bug Fixes
v10.1.2Compare Source
Bug Fixes
v10.1.1Compare Source
Bug Fixes
applyPatchesto acceptreadonly Patch[](#1094) (4da2e0d)v10.1.0Compare Source
Features
setUseStrictShallowCopy("class_only")to revert to the old behavior. For more details see https://immerjs.github.io/immer/complex-objects#semantics-in-detailv10.0.4Compare Source
Bug Fixes
v10.0.3Compare Source
Bug Fixes
.mjsfile for react-native, which isn't supported by default. Fixes #1058 #1065 (#1075) (f6736a4)v10.0.2Compare Source
Bug Fixes
Objectishtype (#1043) (75e004d)v10.0.1Compare Source
Bug Fixes
v10.0.0Compare Source
Release notes
Proxy,Reflect,SymbolandMapandSet.createDraftandfinishDraft.enableES5(), you SHOULD NOT upgrade Immer.enableES5has been removed.produceis no longer exposed as thedefaultexport. This improves eco system compatibility, and makes sure that there is only one correct way of doing thingsenableAllPluginshas been removed, useenablePatches(); enableMapSet()insteadlengthproperty, in accordance with JSON spec. Thanks kshramt for implementing this in #964!Overall, there is a rough performance increase of 33% for Immer (and in some cases significantly higher), and the (non gzipped) bundle size has reduced from 16 to 11.5 KB, while the the minimal gzipped import of just
producehas remained roughly the same at 3.3 KB.For more details, see #1015
Migration steps
enableES5()call, don't migrateuseStrictShallowCopy(true)at startupimport produce from "immer"withimport {produce} from "immer"enableAllPlugins()withenablePatches(); enableMapSet();to be more specific and smoothen future migrations.createDraftinstead. Roughly: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 is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.