Skip to content

chore(deps): bump immer from 10.1.1 to 11.1.4#820

Open
dependabot[bot] wants to merge 1 commit intodevfrom
dependabot/npm_and_yarn/immer-11.1.4
Open

chore(deps): bump immer from 10.1.1 to 11.1.4#820
dependabot[bot] wants to merge 1 commit intodevfrom
dependabot/npm_and_yarn/immer-11.1.4

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Apr 16, 2026

Bumps immer from 10.1.1 to 11.1.4.

Release notes

Sourced from immer's releases.

v11.1.4

11.1.4 (2026-02-10)

Bug Fixes

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

v11.1.3

11.1.3 (2025-12-29)

Bug Fixes

v11.1.2

11.1.2 (2025-12-29)

Bug Fixes

  • bogus commit to retest release (c329ddb)

v11.1.0

11.1.0 (2025-12-20)

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.

... (truncated)

Commits
  • cdccf1a Merge pull request #1210 from immerjs/bugfix/1209-array-plugin-nested-drafts
  • 90a7765 fix: handle nested proxies after spreading and inserting into an array
  • 570c800 chore(tests): add vitest globals to tsconfig.json (#1196)
  • 78ea694 fix: recursive T for WritableDraft (#1197)
  • c329ddb fix: bogus commit to retest release
  • b208d58 fix: Fix broken array patching and ensure all values in draft Maps/Sets are f...
  • d626513 Merge pull request #1198 from immerjs/feature/array-plugin-docs
  • 0fffdc2 Actually add array plugin to docs
  • 34fd86d chore(deps-dev): bump vite from 5.4.20 to 5.4.21 (#1185)
  • 406ade9 chore(deps): bump node-forge from 1.3.1 to 1.3.3 in /website (#1195)
  • Additional commits viewable in compare view

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Apr 16, 2026
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/immer-11.1.4 branch 2 times, most recently from 23833dd to 57ef803 Compare April 16, 2026 13:10
Bumps [immer](https://github.com/immerjs/immer) from 10.1.1 to 11.1.4.
- [Release notes](https://github.com/immerjs/immer/releases)
- [Commits](immerjs/immer@v10.1.1...v11.1.4)

---
updated-dependencies:
- dependency-name: immer
  dependency-version: 11.1.4
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/immer-11.1.4 branch from 57ef803 to 671606c Compare April 16, 2026 20:59
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 javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants