25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Changelog
1.7.2
- Disabled
sideEffects module flag, it somehow blows breaks the Angular build, fixes #198
1.7.1
- Fixed issue in the flow type for
nothing
1.7.0
- Introduced the
nothing token to be able to produce the undefined value (which would otherwise be indistinguishable from not updating the draft at all).
1.6.0
- Introduced the
original(draft) function, that, given an object from the draft, returns the original object from the base state. This can be useful if you need to do reference equality checks, or comparisons with the base state. See #179 by @RichieAHB.
- Writing or removing non-numeric properties on arrays is now strictly forbidden (Immer didn’t throw before, but correct behavior wasn’t guaranteed either)
1.5.0
- Added support for patches, through #168. See the patches section for details
1.4.0
- Improved TypeScript typings; if the base state is declared as
readonly, the draft object will be upcasted to a writeable version. Fixes #97 through #161 by @knpwrs
- It is now possible to use both
import produce from "immer" and import {produce} from "immer". Implements #136
- Added several performance tests to the repository
1.3.1
- Fixed bug #148 where original state was not always returned if the producer returned undefined and the original state was a primitive. By @stefanwille through #157
1.3.0
- Improved the behavior of recursive producer calls. A producer that is called from another producer is now a no-op; that is, the draft will only be finalized once the outer-most producer completes. Pro and cons of this approach are discussed in here. Fixes #100
- Immer no longer relies on
Object.assign to be present / polyfilled. See#139 by @celebro
- Improved some error messages, see #144 by @btnwtn
1.2.1
1.2
1.1.2
- Fixed #117, proxy was not finalized when returning a subset of the state
- Fixed #116, changes to arrays that ended up with the same length were not properly detected.
1.1.1
- Fixed curried reducers not return new states correctly. Fixes #105
1.1.0
- It is now possible to return an entirely new state from a producer as well. Immer will verify that you didn’t both change the draft and returned a new state. Implements #103
- Improved TypeScript typings. See #99 by Anton Fedchenko
1.0.3 (15-Feb-2018)
- Fixed detection of production mode. Fixes #95
1.0.2 (13-Feb-2018)
flow-bin and cpx were accidentally dependencies instead of dev-dependencies. Fixed
1.0.1 (2-Feb-2018)
- Fixed an issue in checking property existence. See #86 by iruca3. Also fixes #89
1.0.0 (31-Jan-2018)
- Producer functions will now always be invoked with the draft as context (
this). See the readme.
- Freezing the data will now be automatically (by default) be disabled in production builds. By Gregory Assasie
- Fixed Flow typings. Fixes #80. By Marcin Szczepanski in #85
- Fixed issue where constructor type was not preserved. By iruca3 through #81
0.8.5
- Immer will automatically turn auto-freezing of in production. Use
setAutoFreeze to manually control it. See #46, #76
- Fixed issue where objects were unnecessary proxied, causing exceptions. See #78
0.8.4
- Added flow typings
- Added polyfill for
Object.is, fixes #77
0.8.3
- Added ‘polyfill’ for
Symbol, fixes #75
0.8.2
- Fixed: TS typings were no longer exposed
0.8.2
- Several general improvements: if an instances of an object are in the tree they will now be one instance in the resulting tree as well, also in the ES5 impl
- Always freeze data that is newly added to the draft
- Fixed #75, don’t use Symbols if not available.
0.8.1
- Fixed #66, assigning an already frozen object to a state threw resulting in exceptions being thrown as Immer unnecessarily tried to rewrite them.
0.8.0
- The built is now being rolled up #64 by Arthur Denner. A minified gzipped built is only 2kb!
- There are no longer separate builds available for the proxy and es5 implementation. The sources where merged to allow for more code reuse.
- The package now exposes an ES module as well.
0.7.0
- Immer will now use
Object.is instead of === for equality checks
0.6.1
- Fixed issue where proxies inside new objects where not cleaned up. Fixes Fixes #53
0.6.0
- The default import now bundles both the es5 and proxy implementation as a convenient default. For more optimal bundle sizes, import
immer/proxy or immer/es5
0.5.0
- Make sure es5.js is transpiled
0.4.2
- Fixed generating a wrong property descriptor for the
length property of arrays. Fixes #50
- Defining custom properties on drafts is no longer supported
0.4.1
0.4.0
- Introduce support for currying. #37
- Added argument checking
- The name of the immer import is now idiomatically
produce. So the recommend import statement is: import produce from "immer".
0.3.1
- Republished, somehow NPM still returned 0.2.2
0.3.0 (8-1-2018)
0.2.2
- Fixed #32: changes are not properly reflected in proxies when using for example
console.dir
0.2.1
0.2.0
- Immer now supports JavaScript engines without Proxies as well! Just require
immer from "immer/es5". See #22
0.1.2 (2-1-2018)
- Fixed issue where trailing commas could break consumers. Fixes #21.
0.1.1 (2-1-2018)
- Fixed issue where TypeScript typings were not correctly exposed. Fixes #18.
0.1.0 (1-1-2018)
- Fixed
immer function export, it is now properly exposed as the default export. So import immer from "immer". See #15
- Immer now automatically freezes any state modifications made. Turn this is using
setAutoFreeze(false) for more efficiency in production builds. See #15
- Added support for frozen state trees in strict mode. See #15
immer will now warn if you accidentally return something from the thunk. Fixes [#] through #16. By Gregory Assasie.
- Proxies are now automatically cleaned up. This makes it impossible to read proxies after the
immer function has finished. This prevents users from accidentally reading stale date. #14 by @benbraou
0.0.4 (31-12-2017)