Skip to content

Releases: redbadger/immutable-cursor

v2.0.1

01 May 00:29
Compare
Choose a tag to compare
  • Upgraded [email protected] to fix an issue where babel-runtime would have to be specified as a dependency within the consuming project (that includes immutable-cursor) to avoid a Cannot find module 'babel-runtime/helpers/extends' error.

v2.0.0

30 Apr 21:21
Compare
Choose a tag to compare
  • Fixed disparities between the 1.x.x branch and contrib/cursor, relating to the onChange callback API. Thanks to netfaly for their efforts.
    • Reversed arguments of onChange callback (now nextValue, prevValue, ...).
    • Add third keyPath argument to onChange callback.

v1.0.2

17 May 14:33
Compare
Choose a tag to compare

Nothing new. Bumped purely because of https://github.com/npm/npm-www/issues/931#issuecomment-65521502 shakes fist

v1.0.1

15 May 22:54
Compare
Choose a tag to compare

Remove broken Git pre-commit install on postinstall

v1.0.0

15 May 22:14
Compare
Choose a tag to compare

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 now prevState, nextState.

Updates

  • Bumped immutable to 3.7.6

v0.0.3

15 May 23:30
Compare
Choose a tag to compare

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

06 May 23:36
Compare
Choose a tag to compare
Fix dependency type