immer
11.2.9 · 22 Oct 2026MIT89.4M / weekRepositoryHomepagenpmAtom feed
193 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 9.x
9.0.16
22 Oct 2022Protect isDraftable against undefined constructor
9.0.15
13 Jun 2022Add "types" to exports for TypeScript 4.7
9.0.14
12 May 2022Use .esm.js module for backwards compatibility with old build tools
9.0.13
11 May 2022Consistent recipe return type in produceWithPatches
Incorrect return type for async produceWithPatches
9.0.9
11 Jan 2022Make sure produceWithPatches accepts promises
9.0.7
24 Nov 2021Append to array when key is "-"
9.0.6
31 Aug 2021- security
security: Follow up on CVE-2020-28477 where
path: [["__proto__"], "x"]could still pollute the prototype
9.0.5
5 Jul 2021Release missing dist/ folder
9.0.3
9 Jun 2021isPlainObject: Add quick comparison between input and
Objectto short-circuit taxingFunction.toStringinvocations
9.0.2
25 Apr 2021Fix type inference for produce incorrectly inferring promise
9.0.1
20 Mar 2021immerablefield being lost during patch value cloning
9.0.0
19 Mar 2021- breaking
It is no longer allowed to return
nothingfrom a recipe if the target state doesn't acceptundefined. - breaking
It is no longer allowed to return arbitrary things from a recipe. Recipes should either return nothing, or something that is assignable to the original state type. This will catch mistakes with accidental returns earlier.
- 8.x
- 7.x
7.0.7
24 Jul 2020Made NOTHING and IMMERABLE shared symbols. Fixes #632
Make sure changing an undefined value to undefined is not picked up as change. Fixes #646
Out of range assignments were broken in ES5 mode. Fixes #638
Bug Fixes
Made NOTHING and IMMERABLE shared symbols. Fixes #632
Make sure changing an undefined value to undefined is not picked up as change. Fixes #646
Out of range assignments were broken in ES5 mode. Fixes #638
Set finalization can get stuck in a loop, fixes #628
Trigger setters with the correct context, fixes #604
7.0.6
24 Jul 2020flow: added types for produceWithPatches
7.0.4
22 Jun 2020Flow: Add tests for Map and Set and fix base type
New map keys were not added if value is undefined
7.0.1
12 Jun 2020Add missing type
currentfor pre-TS 3.7 types
7.0.0
10 Jun 2020- breaking
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
Produce no longer accepts non-draftable objects as first argument
- breaking
Original can only be called on drafts and will throw otherwise (fixes #605)
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
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
Produce no longer accepts non-draftable objects as first argument
- breaking
Original can only be called on drafts and will throw otherwise (fixes #605)
- breaking
non-enumerable and symbolic fields will never be frozen
- breaking
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.
- 6.x
6.0.9
27 May 2020Maintenance only: docs, tests, build or refactoring. Nothing changes in how you use it.
6.0.3
31 Mar 2020Copy flow types to where flow can find them
Flow failed to find the Immer typings
6.0.1
4 Mar 2020Rename compat
index.d.tstoimmer.d.ts
6.0.0
3 Mar 2020- breaking
Support for ES5, patches and Map/Set collections has to be explicitly enable now: immerjs.github.io/immer/docs/installation
- breaking
Custom serialization hooks are no longer supported
Merge pull request #536 from immerjs/multi-bundle (0d87fc8), closes #536
Adding large data sets to a draft has been optimized (in case autofreeze is disabled)
Added compatibility typing support for TypeScript versions pre 3.7
Breaking changes
- breaking
Support for ES5, patches and Map/Set collections has to be explicitly enable now: immerjs.github.io/immer/docs/installation
- breaking
Custom serialization hooks are no longer supported
- 5.x
5.3.6
12 Feb 2020Mark immer as sideEffect free module (although effects will be limited for now)