Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 5, 2026

Bumps immer from 10.2.0 to 11.1.3.

Release notes

Sourced from immer's releases.

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.

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

What's Changed

... (truncated)

Commits
  • 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)
  • bdf5cbd [docs] Documented setUseStrictIteration
  • d38a9d0 feat: Override array methods to avoid proxy creation while iterating and upda...
  • Additional commits viewable in compare view

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 show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @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)

Bumps [immer](https://github.com/immerjs/immer) from 10.2.0 to 11.1.3.
- [Release notes](https://github.com/immerjs/immer/releases)
- [Commits](immerjs/immer@v10.2.0...v11.1.3)

---
updated-dependencies:
- dependency-name: immer
  dependency-version: 11.1.3
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jan 5, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 5, 2026

Deploying ant-design-x with  Cloudflare Pages  Cloudflare Pages

Latest commit: 61bc95f
Status: ✅  Deploy successful!
Preview URL: https://eac2305d.ant-design-x.pages.dev
Branch Preview URL: https://dependabot-npm-and-yarn-imme.ant-design-x.pages.dev

View logs

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

Preview failed

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedhusky@​9.1.71001006280100
Addedsize-limit@​12.0.01001008087100
Addedmarked-emoji@​2.0.2811009884100
Addedreact-markdown@​10.1.09910010086100
Addedprettier@​3.7.4901009795100
Addedlint-staged@​16.2.710010010091100

View full report

@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.09%. Comparing base (900bf6f) to head (61bc95f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1619   +/-   ##
=======================================
  Coverage   97.09%   97.09%           
=======================================
  Files         140      140           
  Lines        4273     4273           
  Branches     1188     1204   +16     
=======================================
  Hits         4149     4149           
  Misses        122      122           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

size-limit report 📦

Path Size
packages/x/dist/antdx.min.js 441.38 KB
packages/x-sdk/dist/x-sdk.min.js 7.58 KB
packages/x-markdown/dist/x-markdown.min.js 28.77 KB
packages/x-markdown/dist/plugins/latex.min.js 61.95 KB

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.

1 participant