Releases: immerjs/immer
Releases · immerjs/immer
v11.0.1
v11.0.0
11.0.0 (2025-11-23)
Performance Improvements
BREAKING CHANGES
-
enable loose iteration by default
-
Simplify some iteration checks
-
Allow passing type to get/set utils to skip archetype lookup
-
Convert assigned_ to Map
-
Enable loose iteration
-
Replace recursive tree finalization with targeted callbacks
Ported Mutative's "finalization callback" approach as a more targeted and performant implementation for finalization compared to the existing recursive tree traversal approach:
- Added cleanup callbacks for each draft that's created
- Added callbacks to handle root drafts, assigned values, and recursing
inside of plain values - Updated state creation to return [draft, state] to avoid a lookup
- Rewrote patch generation system to work with callbacks instead of
during tree traversal
- Update self-reference test with new behavior
- Apply code review suggestions
- Byte-shave scopes and patch plugin usage
- Inline finalizeAssigned
- Move fixPotentialSetContents to plugin
- Byte-shave typeof utils
- Byte-shave Object references
- Byte-shave field names and arrow functions
v10.2.0
v10.1.3
v10.1.2
v10.1.1
v10.1.0
10.1.0 (2024-04-27)
Features
- performance: Make non-strict mode faster for classes. Addresses #1071 (53e3203). Immer 10.x solved slow iteration for plain JS objects. This update applies the same handling to class instances. In cases this makes class instance handling 3 times faster. Note that this slightly modifies the behavior of Immer with classes in obscure corner cases, in ways that match current documentation, but do not match previous behavior. If you run into issues with this release icmw. class instances, use
setUseStrictShallowCopy("class_only")to revert to the old behavior. For more details see https://immerjs.github.io/immer/complex-objects#semantics-in-detail