Releases: redbadger/immutable-cursor
v2.0.1
- Upgraded
[email protected]
to fix an issue wherebabel-runtime
would have to be specified as a dependency within the consuming project (that includesimmutable-cursor
) to avoid aCannot find module 'babel-runtime/helpers/extends'
error.
v2.0.0
- Fixed disparities between the 1.x.x branch and
contrib/cursor
, relating to theonChange
callback API. Thanks to netfaly for their efforts.- Reversed arguments of
onChange
callback (nownextValue, prevValue, ...
). - Add third
keyPath
argument toonChange
callback.
- Reversed arguments of
v1.0.2
Nothing new. Bumped purely because of https://github.com/npm/npm-www/issues/931#issuecomment-65521502 shakes fist
v1.0.1
Remove broken Git pre-commit install on postinstall
v1.0.0
New
True cursor immutability
The previous way of ensuring that update transactions from derived cursors act on the root data store has been completely replaced. The method formerly used (inclusion of a 'live' reference to the root data, to allow each cursor the ability to directly modify it), meant that mutations are leaked throughout the system.
Instead, an instantiation of a Clojure-inspired atom sits above the system, with reference to it's mutative method within each cursor. This ensures that the only mutations in the entire system are within the root atom, thus ensuring that the cursors themselves stay immutable.
Breaking changes
- The scope of the 'on-change' handler to modify the root atom through it's return value has been removed completely.
- The arguments passed to the 'on-change' handler have changed. Previously they were
newState, prevState, keyPath
; they're nowprevState, nextState
.
Updates
- Bumped
immutable
to3.7.6
v0.0.3
Remove broken Git pre-commit install on postinstall
This has been broken since initial publish of 0.0.1
. A big sorry to anyone who attempted to install it 🎺
v0.0.2
Fix dependency type