# What changed in immer

> 26 changes in immer 10 to 11 from its official release notes, upgrade guides and advisories: 2 breaking, 1 security, 3 new APIs and options. Each one cited. Sources checked 2026-10-17. HTML: https://unstale.sh/npm/immer/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## immer 11

### Breaking changes

- Reads of a revoked Map or Set draft now throw. (11.1.21) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.21)
- Loose iteration is enabled by default. (11.0.0) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.0.0)

### Security

- Prevents prototype pollution via constructor.prototype access. (11.1.9) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.9)

### New APIs and options

- Adds an optional plugin that overrides specified draft array methods to operate directly on the underlying array, significantly speeding up array operations. (11.1.0) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.0)
- With the plugin enabled, array items passed to callbacks are not automatically wrapped in Proxies, so mutating them can change the underlying objects. (11.1.0) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.0)

### Performance

- Finalization now uses targeted callbacks instead of recursive tree traversal, improving performance. (11.0.0) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.0.0)

### Fixes and other changes

- A deletion is no longer recorded when a base value is written back. (11.1.20) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.20)
- The array-methods plugin now forwards thisArg, so callbacks receive the intended this value. (11.1.19) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.19)
- Removed the global var declaration for Iterator that conflicted with the ESNext lib. (11.1.18) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.18)
- Preserves structural sharing for no-op array-method calls. (11.1.17) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.17)
- Inserted array indices are keyed by name in the array-methods plugin. (11.1.16) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.16)
- Corrected the return type of curried produceWithPatches. (11.1.15) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.15)
- Throws the proper Immer error when an applyPatches path traverses null. (11.1.14) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.14)
- Fixes relocated base references for drafts after reverse or sort in the array-methods plugin. (11.1.13) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.13)
- Reverts the prevention of prototype pollution via constructor.prototype access. (11.1.12) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.12)
- Improves DraftMap.entries() compatibility. (11.1.11) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.11)
- Improves DraftMap.values() compatibility. (11.1.11) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.11)
- Assigning undefined to a prototype-inherited key no longer gets dropped. (11.1.10) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.10)
- The typings now assert that the draft value is unwrapped. (11.1.8) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.8)
- The typings now assert that the draft value is unwrapped. (11.1.8) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.8)
- Higher-order type inference for WritableDraft is improved. (11.1.7) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.7)
- Removes an invalid curried producer type. (11.1.6) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.6)
- Handles nested proxies after spreading and inserting into an array. (11.1.4) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.5), [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.4)
- Fixes recursive T for WritableDraft. (11.1.3) — [release notes](https://github.com/immerjs/immer/releases/tag/v11.1.3)

## immer 10

### New APIs and options

- Introduces setUseStrictIteration. (10.2.0) — [release notes](https://github.com/immerjs/immer/releases/tag/v10.2.0)

### Performance

- Immer performance is optimized where possible. (10.2.0) — [release notes](https://github.com/immerjs/immer/releases/tag/v10.2.0)
