immer
11.2.9 · 22 Oct 2026MIT89.4M / weekRepositoryHomepagenpmAtom feed
Upgrading immer From 9.0.1 to 11.2.9
65 releases in betweenevery note read
Before you upgrade
Tick each one off as you go- breaking11.0.0
- breaking11.0.0
- breaking11.0.0
- breaking11.0.0
- breaking11.0.0
- breaking11.0.0
- breaking11.0.0
- breaking11.0.0
- breaking11.0.0
- breaking11.0.0
Security
Fixes 2 advisories affecting 9.0.1
- Prototype Pollution in immercritical · GHSA-33f9-j839-rf8h
- Prototype Pollution in immerhigh · GHSA-c36v-fmgq-m8hx
- 11.1.9
Prevent prototype pollution via constructor.prototype access (CVE-2026-XXXX)
- 9.0.6
security: Follow up on CVE-2020-28477 where
path: [["__proto__"], "x"]could still pollute the prototype
Release by release
- fixed
Export WritableNonArrayDraft from immer.ts so it gets picked up by type generation in builds
- fixed
- fixed
Skip patches of a draft discarded by writing its base value back
- fixed
- fixed
Snapshot array length before optimized filter callbacks
- fixed
- fixed
Avoid excessive Draft recursion for readonly arrays in recursive types
- fixed
- fixed
Resolve the splice start index against the pre-splice length in array-methods plugin
- fixed
- fixed
Skip nested patches for children of shifted or reordered arrays
- fixed
- fixed
Export WritableNonArrayDraft type.
- fixed
8 other lines we could not sort, mostly version bumps
- 11.1.12
- 11.1.0
Override array methods to avoid proxy creation while iterating and updating
- 10.0.0
Immer is now an ESM package that can be directly imported into the browser. CJS should still work, UMD support has been removed.
- 10.0.0
If you have any
enableES5()call, don't migrate - 10.0.0
When using getters/ setters icmw plain objects, call
useStrictShallowCopy(true)at startup - 10.0.0
Replace all default imports: Replace
import produce from "immer"withimport {produce} from "immer" - 10.0.0
Replace all calls to
enableAllPlugins()withenablePatches(); enableMapSet();to be more specific and smoothen future migrations. - 10.0.0
If any producer returned a Promise, refactor it to leverage
createDraftinstead. Roughly: