NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #807 most downloaded on npm
Create your next immutable state by mutating the current one
Last release 1 months ago
19 Aug 2026
Ships unpredictably
gaps range from 8 days to 1.3 years
Nearly every release is documented
notes for 60 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
10 years old
196 releases · first in 2016
Nothing published for this version
Nothing published for this version
One column per quarter.
new Immer().produce now has the same type as produce. Fixes #749
Fixed security issue #738: prototype pollution possible when applying patches CVE-2020-28477
always freeze by default, even in production mode. Use setAutoFreeze(process.env.NODE_ENV !== 'production') for the old behavior. See https://github.c
setAutoFreeze(process.env.NODE_ENV !== 'production') for the old behavior. See https://github.com/immerjs/immer/issues/687#issuecomment-728881754 for the rationale. Fixes #649, #681, #687make plugin loading idempotent, fixes #692
## 7.0.14 (2020-10-20) ### Bug Fixes * build issue. Fixes #685 (?)
reconcile if the original value is assigned after creating a draft. Fixes #659
undraftable values should not be cloned for patches, fixes #676
skip ReadonlyMap and ReadonlySet types when not available (#653). Fixes #624
Clearing empty Set&Map should be noop (#682). Fixes #680
clear map creates invalid patches, fixes #663
Use a named type for Draft object for smaller type declaration files
made NOTHING and IMMERABLE shared symbols. Fixes #632
flow: added types for produceWithPatches
Fixed regression in Object.frozen for IE11. Fixes #600
Flow: Add tests for Map and Set and fix base type
getOwnPropertyDescriptors is not available in Internet Explorer and Hermes. Fixes #626
Fixed #620: Symbolic properties were not drafted or finalized correctly
Add missing type current for pre-TS 3.7 types
[BREAKING CHANGE] getters and setters are now handled consistently: own getters and setters will always by copied into fields (like Object.assign does…
Introduced current, which takes a snapshot of the current state of a draft and finalizes it (but without freezing). Current is a great utility to print the current state during debugging (no Proxies in the way), and the output of current can also be safely leaked outside the producer. Implements #441, #591
[BREAKING CHANGE] getters and setters are now handled consistently: own getters and setters will always by copied into fields (like Object.assign does), inherited getters and setters will be left as-is. This should allow using Immer directly on objects that trap their fields, like done in Vue or MobX. Fixes #584, #439, #593, #558
[BREAKING CHANGE] produce no longer accepts non-draftable objects as first argument
[BREAKING CHANGE] original can only be called on drafts and will throw otherwise (fixes #605)
[BREAKING CHANGE] non-enumerable and symbolic fields will never be frozen
[BREAKING CHANGE] the patches for arrays are now computed differently to fix some scenarios in which they were incorrect. In some cases they will be more optimal now, in other cases less. Especially splicing / unshifting items into an existing array might result in a lot of patches. Fixes #468
Improved documentation in several areas, there is now a page for typical update patterns and a separate page on how to work with classes. And additional performance tips have been included. Fixes #457, #115, #462
Fixed #462: All branches of the produced state should be frozen
Fixed #588: Inconsistent behavior with nested produce
Fixed #577: Immer might not work with polyfilled symbols
Fixed #514, #609: Explicitly calling useProxies(false) shouldn’t check for the presence of Proxy.
typo in feature.md (sovled > solved)
Make sure Immer works correctly when Symbol is polyfilled, fixes #577
fixed issue where new items in Set where not recorded after iterating. Fixes #586
Object.isFrozen dies on non objects in Internet Explorer. Fixes #600
copy flow types to where flow can find them
fixed broken minimized error url (issue#550)
rename compat index.d.ts to immer.d.ts
Merge pull request #536 from immerjs/multi-bundle (0d87fc8), closes #536
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
mark immer as sideEffect free module (although effects will be limited for now)
consistent naming for castDraft, fixup 2d27f33f6
attempt to fix locally not reproducible build issue
Set inside patches were not correctly cloned. Fixes #521
Nothing published for this version
general typing improvements for TS 3.7 and up
# 5.1.0 (2019-12-20) ### Features * convert Immer to TypeScript
Nothing published for this version
Nothing published for this version
Merge branch 'oriSomething-fix-472'
Fixed #477, Immer crashes without an Object.assign polyfill
BREAKING CHANGE: Maps and Sets are treated differently now; they will no longer directly mutated when updated inside a draft
❤ immer? 👉 https://opencollective.com/immer
This release introduces first class support for Maps and Sets!
BREAKING CHANGE: Maps and Sets are treated differently now; they will no longer directly mutated when updated inside a draft
Some things to keep in mind:
add, set, delete and clearautoFreeze is enabled, the maps and sets returned from a producer will be artificially frozen by making their mutative APIs unusableOpen questions
Draft's, is limited, see #448 for detailsCredits to @runnez, @aigoncharov and @aleclarson for making this happen!
## 4.0.2 (2019-10-22) ### Bug Fixes * add immerable Flow typedef
Don't use proxies if Proxy.revocable is not defined. Fixes #435
In development mode, any new value stored in a tree will be deeply frozen.
Nothing published for this version
Always use remove command in generateArrayPatches() (d483334), closes #208
Your coding agent can read these notes before it upgrades. Set up the MCP server →