Skip to content

chore(deps): update dependency immer to v11#1729

Open
renovate[bot] wants to merge 1 commit intodevfrom
renovate/immer-11.x
Open

chore(deps): update dependency immer to v11#1729
renovate[bot] wants to merge 1 commit intodevfrom
renovate/immer-11.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Nov 23, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
immer 10.2.011.1.4 age adoption passing confidence

Release Notes

immerjs/immer (immer)

v11.1.4

Compare Source

Bug Fixes
  • handle nested proxies after spreading and inserting into an array (90a7765)

v11.1.3

Compare Source

Bug Fixes

v11.1.2

Compare Source

Bug Fixes
  • bogus commit to retest release (c329ddb)

v11.1.0

Compare Source

This feature release adds a new optional "array method overrides" plugin that significantly speeds up array methods when accessing drafts.

Changelog

Performance Improvements

As part of the recent performance optimization work, our benchmarks showed that all Proxy-based immutable update libraries were drastically slower than vanilla JS when calling both mutating and non-mutating array methods. After investigation, it turns out that an array method like arr.filter() causes the Proxy's get trap to trigger for every single item in the array. This in turn forces creation of a new Proxy and internal Immer metadata for every item, even though this was just a read operation and no items were being updated.

This release adds a new enableArrayMethods plugin that will override draft array methods to bypass the draft and directly operate on the underlying wrapped array instance. This significantly speeds up array operations.

When enabled, the plugin overrides these array methods:

  • Mutating: push, pop, shift, unshift, splice, reverse, sort
  • Non-mutating: filter, slice, concat, flat, find, findIndex, findLast, findLastIndex, some, every, indexOf, lastIndexOf, includes, join, toString, toLocaleString

Our benchmarks show that the overridden methods (plus the other perf changes in Immer 10.2 and 11.0) are 50-80% faster than the baseline behavior of Immer 10.1.

The plugin adds about 1.5-2K minified to Immer's bundle size.

It's important to note that the plugin does change the "safe to mutate a draft" semantics of Immer. Any of these methods that receives an array item as a callback argument will not automatically wrap that item in a Proxy!. That means that if you try to mutate an argument in a method such as filter, it will actually mutate the real underlying object, which will cause bugs in your app. This is an intentional design tradeoff. Semantically, all of these methods imply read-only access to array values, so if your code tries to mutate an array item in a callback, that is a bug in your code.

Note that this does not override map, flatMap, forEach, or reduce / reduceRight. Those methods do imply either side effects and potential mutations, or returning arbitrary values. Given that, we determined it was both safest and simplest to keep their behavior as-is.

See the Array Methods Plugin docs page for further details on the behavior of the overridden methods.

What's Changed

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

Configuration

📅 Schedule: (UTC)

  • 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 added the dependencies Pull requests that update a dependency file label Nov 23, 2025
@renovate renovate Bot had a problem deploying to data-manager-ui/test November 23, 2025 13:02 Failure
@renovate renovate Bot temporarily deployed to data-manager-ui/test November 23, 2025 13:02 Inactive
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from dfabdb4 to c827e2f Compare November 28, 2025 08:55
@renovate renovate Bot had a problem deploying to data-manager-ui/test November 28, 2025 08:55 Failure
@renovate renovate Bot had a problem deploying to data-manager-ui/test November 28, 2025 08:55 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from c827e2f to 7e8c428 Compare December 3, 2025 18:01
@renovate renovate Bot had a problem deploying to data-manager-ui/test December 3, 2025 18:03 Failure
@renovate renovate Bot had a problem deploying to data-manager-ui/test December 3, 2025 18:03 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from 7e8c428 to 1afe1ba Compare December 9, 2025 10:59
@renovate renovate Bot had a problem deploying to data-manager-ui/test December 9, 2025 11:09 Failure
@renovate renovate Bot had a problem deploying to data-manager-ui/test December 9, 2025 11:09 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from 1afe1ba to 2545791 Compare December 9, 2025 11:45
@renovate renovate Bot had a problem deploying to data-manager-ui/test December 9, 2025 12:05 Failure
@renovate renovate Bot had a problem deploying to data-manager-ui/test December 9, 2025 12:05 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from 2545791 to daca641 Compare December 14, 2025 12:24
@renovate renovate Bot had a problem deploying to data-manager-ui/test December 14, 2025 12:34 Failure
@renovate renovate Bot had a problem deploying to data-manager-ui/test December 14, 2025 12:34 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from daca641 to 3811a2e Compare December 15, 2025 16:16
@renovate renovate Bot changed the base branch from master to dev December 15, 2025 16:16
@renovate renovate Bot temporarily deployed to data-manager-ui/test December 15, 2025 16:43 Inactive
@renovate renovate Bot had a problem deploying to data-manager-ui/test December 15, 2025 16:43 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from 3811a2e to fa25da7 Compare December 20, 2025 17:56
@renovate renovate Bot had a problem deploying to data-manager-ui/test December 20, 2025 17:56 Failure
@renovate renovate Bot temporarily deployed to data-manager-ui/test December 20, 2025 17:56 Inactive
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from fa25da7 to dd1bb1b Compare December 27, 2025 16:54
@renovate renovate Bot temporarily deployed to data-manager-ui/test December 27, 2025 16:55 Inactive
@renovate renovate Bot had a problem deploying to data-manager-ui/test December 27, 2025 16:55 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from dd1bb1b to 3083b88 Compare December 27, 2025 17:22
@renovate renovate Bot temporarily deployed to data-manager-ui/test December 27, 2025 17:25 Inactive
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from a10cdcf to a5afb48 Compare December 31, 2025 13:39
@renovate renovate Bot had a problem deploying to data-manager-ui/test December 31, 2025 13:47 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from a5afb48 to b16ac6d Compare December 31, 2025 18:16
@renovate renovate Bot temporarily deployed to data-manager-ui/test December 31, 2025 18:16 Inactive
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from b16ac6d to ee79c46 Compare January 8, 2026 17:39
@renovate renovate Bot temporarily deployed to data-manager-ui/test January 8, 2026 17:39 Inactive
@OliverDudgeon OliverDudgeon force-pushed the dev branch 2 times, most recently from 05696cd to 493084b Compare January 13, 2026 13:24
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from ee79c46 to 3bc76e3 Compare January 13, 2026 13:24
@renovate renovate Bot had a problem deploying to data-manager-ui/test January 13, 2026 13:26 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from 3bc76e3 to 831fc08 Compare January 13, 2026 13:31
@renovate renovate Bot had a problem deploying to data-manager-ui/test January 13, 2026 13:51 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from 831fc08 to 2cc771b Compare January 19, 2026 19:35
@renovate renovate Bot had a problem deploying to data-manager-ui/test January 19, 2026 19:35 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from 2cc771b to cfffb70 Compare February 2, 2026 21:56
@renovate renovate Bot had a problem deploying to data-manager-ui/test February 2, 2026 23:03 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from cfffb70 to 5e43cc0 Compare February 12, 2026 04:33
@renovate renovate Bot temporarily deployed to data-manager-ui/test February 12, 2026 04:33 Inactive
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from 5e43cc0 to af1bfff Compare March 6, 2026 19:59
@renovate renovate Bot had a problem deploying to data-manager-ui/test March 6, 2026 19:59 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from af1bfff to 9b95b1a Compare March 8, 2026 21:04
@renovate renovate Bot had a problem deploying to data-manager-ui/test March 8, 2026 21:04 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from 9b95b1a to 4b11edb Compare March 13, 2026 18:11
@renovate renovate Bot had a problem deploying to data-manager-ui/test March 13, 2026 18:15 Failure
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from 4b11edb to f7a470b Compare April 29, 2026 11:16
@renovate renovate Bot temporarily deployed to data-manager-ui/test April 29, 2026 11:35 Inactive
@renovate renovate Bot force-pushed the renovate/immer-11.x branch from f7a470b to 714c15d Compare April 29, 2026 16:13
@renovate renovate Bot temporarily deployed to data-manager-ui/test April 29, 2026 16:20 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants