Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Nov 28, 2025

This PR contains the following updates:

Package Change Age Confidence
immer ^9.0.21 -> ^11.0.0 age confidence

Release Notes

immerjs/immer (immer)

v11.0.1

Compare Source

Bug Fixes

v11.0.0

Compare Source

Performance Improvements
  • Rewrite finalization system to use a callback approach instead of tree traversal (#​1183) (d6c1202)
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:

  • Added cleanup callbacks for each draft that's created
  • Added callbacks to handle root drafts, assigned values, and recursing
    inside of plain values
  • Updated state creation to return [draft, state] to avoid a lookup
  • Rewrote patch generation system to work with callbacks instead of
    during tree traversal
  • Update self-reference test with new behavior
  • Apply code review suggestions
  • Byte-shave scopes and patch plugin usage
  • Inline finalizeAssigned
  • Move fixPotentialSetContents to plugin
  • Byte-shave typeof utils
  • Byte-shave Object references
  • Byte-shave field names and arrow functions

v10.2.0

Compare Source

Features
  • Optimize Immer performance where possible, introduce setUseStrictIteration (#​1164) (e1996ce)

v10.1.3

Compare Source

Bug Fixes

v10.1.2

Compare Source

Bug Fixes

v10.1.1

Compare Source

Bug Fixes

v10.1.0

Compare Source

Features
  • performance: Make non-strict mode faster for classes. Addresses #​1071 (53e3203). Immer 10.x solved slow iteration for plain JS objects. This update applies the same handling to class instances. In cases this makes class instance handling 3 times faster. Note that this slightly modifies the behavior of Immer with classes in obscure corner cases, in ways that match current documentation, but do not match previous behavior. If you run into issues with this release icmw. class instances, use setUseStrictShallowCopy("class_only") to revert to the old behavior. For more details see https://immerjs.github.io/immer/complex-objects#semantics-in-detail

v10.0.4

Compare Source

Bug Fixes

v10.0.3

Compare Source

Bug Fixes

v10.0.2

Compare Source

Bug Fixes

v10.0.1

Compare Source

Bug Fixes

v10.0.0

Compare Source

Release notes
  • [breaking change] Immer 10 only supports modern browsers, that have support for Proxy, Reflect, Symbol and Map and Set.
  • [breaking change] There is no longer a UMD build exposed (thanks Mark Erikson for modernizing the build setup in #​1032!
  • [breaking change] getters and setters are ignored by default on plain object, as this is a very uncommon case and provides a significant performance boost (ca 33%, but depends a lot on the scenario). Fixes #​867, #​1012. Thanks hrsh7th for implementing it in #​941!
  • [breaking change] Promise based reducers are no longer supported. Conceptually it is an anti pattern to hold on to drafts over time. If needed the old behavior can still be achieved by leveraging createDraft and finishDraft.
  • [breaking change] ES5 mode (for legacy browsers) has been dropped. If your project relies on enableES5(), you SHOULD NOT upgrade Immer. enableES5 has been removed.
  • [breaking change] produce is no longer exposed as the default export. This improves eco system compatibility, and makes sure that there is only one correct way of doing things
  • [breaking change] enableAllPlugins has been removed, use enablePatches(); enableMapSet() instead
  • [breaking change] shortening the length of a JSON array now results in delete patches, rather than a mutation of the length property, in accordance with JSON spec. Thanks kshramt for implementing this in #​964!
  • Immer is now an ESM package that can be directly imported into the browser. CJS should still work, UMD support has been removed.

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 produce has remained roughly the same at 3.3 KB.

For more details, see #​1015

Migration steps
  1. If you have any enableES5() call, don't migrate
  2. When using getters/ setters icmw plain objects, call useStrictShallowCopy(true) at startup
  3. Replace all default imports: Replace import produce from "immer" with import {produce} from "immer"
  4. Replace all calls to enableAllPlugins() with enablePatches(); enableMapSet(); to be more specific and smoothen future migrations.
  5. If any producer returned a Promise, refactor it to leverage createDraft instead. Roughly:
const newState = await produce(oldState, recipe)

// becomes
const draft  = createDraft(oldState)
await recipe(draft)
const newState = finishDraft(draft)

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.


  • 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 added the dependencies This pull request updates dependency files label Nov 28, 2025
@coveralls
Copy link

coveralls commented Nov 28, 2025

Pull Request Test Coverage Report for Build 20351776721

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 39.773%

Totals Coverage Status
Change from base Build 20351587002: 0.0%
Covered Lines: 4847
Relevant Lines: 11272

💛 - Coveralls

@renovate renovate bot force-pushed the renovate/immer-11.x branch 7 times, most recently from 5878006 to 62625dd Compare December 4, 2025 17:58
@renovate renovate bot force-pushed the renovate/immer-11.x branch 4 times, most recently from 0245881 to 8065da5 Compare December 10, 2025 04:13
@renovate renovate bot force-pushed the renovate/immer-11.x branch 15 times, most recently from 4284965 to 70feeb8 Compare December 18, 2025 21:13
"i18next": "^25.0.0",
"i18next-browser-languagedetector": "^8.0.0",
"immer": "^9.0.21",
"immer": "^11.0.0",

This comment was marked as outdated.

@renovate renovate bot force-pushed the renovate/immer-11.x branch from 70feeb8 to 4a420e9 Compare December 18, 2025 21:24
@renovate renovate bot force-pushed the renovate/immer-11.x branch from 4a420e9 to a3b70da Compare December 18, 2025 21:42
"i18next": "^25.0.0",
"i18next-browser-languagedetector": "^8.0.0",
"immer": "^9.0.21",
"immer": "^11.0.0",
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies This pull request updates dependency files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants