Skip to content

Releases: immutable-js/immutable-js

3.7.1

29 Mar 20:29
Compare
Choose a tag to compare

New:

  • contains() is now called includes() to match the ES6 specification. contains() still exists as an alias.

3.7.0

27 Mar 05:29
Compare
Choose a tag to compare

New:

  • merge() family of functions now get the currently merging key as a 3rd argument, in case merge strategy should alter based on key.
  • IndexedCursor now has push(), pop(), unshift() and shift() to more closely mirror List.
  • Records initialize lazily. Creating a new Record type with Record({foo:"bar"}) involves a small bit of work. For applications with a large amount of Records, lazy initialization should help startup times.
  • Maps can now be constructed by a List of Lists instead of only a List of Arrays.
  • toString() prints Map string keys in quotes.

Fixes:

  • is() allows usage of valueOf to return primitives without recursing or encountering a reference error.
  • merge()/union() work inside withMutations when initial collection is empty. #405
  • Producing subcursors using cursor.cursor() now returns a proper typed cursor. #381
  • When a Record is passed to the same Record creation function, it's now returned directly.
  • Ensure Records toString() correctly. #383
  • Iterating over a sliced Seq can no longer cause an infinite recursion. #394
  • Ensure we don't throw when hashing non-extensible object in a modern environment.
  • Fix issue where non-existent function could be called if a collection doesn't have a size.

3.6.4

08 Mar 01:02
Compare
Choose a tag to compare

Fixes:

  • 3.6.3 was a broken npm release.

3.6.3

07 Mar 22:24
Compare
Choose a tag to compare

Fixes:

  • Improve test coverage of Stack, fixing #332 and #353
  • Numerous typo fixings. Me spel gud.
  • Fix collection toString() when an ES6 Symbol is a value in the collection.
  • Consider a prototype-free object a "plain object". Fixes #302
  • No long enumerates extra key in canDefineProperty in rare cases in some versions of Chrome

3.6.2

12 Jan 23:05
Compare
Choose a tag to compare

Fixes:

  • Improves performance of creating Cursors.

3.6.1

12 Jan 21:11
Compare
Choose a tag to compare

Fixes:

  • Iterating over a Cursor to a List could result in an infinite loop.

3.6.0

12 Jan 17:27
Compare
Choose a tag to compare

New:

  • findEntry() and findLastEntry() will return [key, value] tuples of the first value to pass a predicate. Related to find() and findLast() which only return value.
  • contrib/Cursor now has the wider suite of methods found on List and Map including:
    • updateIn()
    • setIn()
    • deleteIn()
    • merge()
    • mergeWith()
    • mergeIn()
    • mergeDeep()
    • mergeDeepWith()
    • mergeDeepIn()

Fixes:

  • UMD module wrapper safer to use with CommonJS -> AMD bundlers.
  • Clarified some examples in documentation

3.5.0

07 Jan 03:31
Compare
Choose a tag to compare

New:

  • zip(), zipWith() and interleave() for combining multiple collections are new methods on indexed collections.
  • isEmpty() is safer than comparing count() or size to 0.
  • groupBy() now returns OrderedMap when called on an ordered collection.
  • hashCode() included in public API

Fixes:

  • Custom toJSON() methods on values in a collection respected when provided to JSON.stringify().
  • Fixed issue with browserify including Cursor.
  • Throws TypeError if getIn/updateIn/hasIn/etc. are not provided valid key paths.

3.4.1

18 Dec 22:29
Compare
Choose a tag to compare

Fixes:

  • deleteIn alias now exists for all types (was missing from Map).
  • Improve min/max to be order-independent when handling null/undefined/NaN

3.4.0

16 Dec 23:25
Compare
Choose a tag to compare

New:

  • Improved documentation in Immutable.d.ts, resulting in better generated documentation.
  • remove and removeIn are now alises for the methods delete and deleteIn. No effect on execution (but deleteIn is new).
  • Added deleteIn on Record.
  • Added hasIn - deeply query for value existence.
  • Cursor onChange function can now intercept the new value and return an override (3598f8c).
  • +0 and -0 are treated as the same value in Immutable.is (key equality and Set existence).
  • valueOf() is now used when determining value equality between two objects. This allows Date to be used as Map key, and provides a more straight-forward way to implement value equality for custom types.

Fixes:

  • Mapping over infinite Seq no longer throws error about Infinite iteration. (Improve accuracy of infinite iteration warning overall).
  • Ensure setIn can set undefined as a value.
  • List iterators no longer return invalid values if the List was the result of a slice or shift.