All Versions
Latest Version
Avg Release Cycle
98 days
Latest Release
1336 days ago

Changelog History
Page 1

  • v4.0.0 Changes

    October 30, 2018

    ๐Ÿš€ This release brings new functionality and many fixes.

    1. Key changes
    2. Note for users of v4.0.0-rc.12
    3. Breaking changes
    4. New ๐Ÿ›  1. Fixed

    Key changes

       Diff of changed API (click to expand)

    +  Collection.[Symbol.iterator]
    +  Collection.toJSON
    +  Collection.update
    +  Collection.Indexed.[Symbol.iterator]
    +  Collection.Indexed.toJSON
    +  Collection.Indexed.update
    +  Collection.Indexed.zipAll
    +  Collection.Keyed.[Symbol.iterator]
    +  Collection.Keyed.toJSON
    +  Collection.Keyed.update
    +  Collection.Set.[Symbol.iterator]
    +  Collection.Set.toJSON
    +  Collection.Set.update
    -  Collection.size
    -  Collection.Indexed.size
    -  Collection.Keyed.size
    -  Collection.Set.size
    +  List.[Symbol.iterator]
    +  List.toJSON
    +  List.wasAltered
    +  List.zipAll
    -  List.mergeDeep
    -  List.mergeDeepWith
    -  List.mergeWith
    +  Map.[Symbol.iterator]
    +  Map.deleteAll
    +  Map.toJSON
    +  Map.wasAltered
    +  OrderedMap.[Symbol.iterator]
    +  OrderedMap.deleteAll
    +  OrderedMap.toJSON
    +  OrderedMap.wasAltered
    +  OrderedSet.[Symbol.iterator]
    +  OrderedSet.toJSON
    +  OrderedSet.update
    +  OrderedSet.wasAltered
    +  OrderedSet.zipAll
    +  OrderedSet.zipWith
    +  Record.[Symbol.iterator]
    +  Record.asImmutable
    +  Record.asMutable
    +  Record.clear
    +  Record.delete
    +  Record.deleteIn
    +  Record.merge
    +  Record.mergeDeep
    +  Record.mergeDeepIn
    +  Record.mergeDeepWith
    +  Record.mergeIn
    +  Record.mergeWith
    +  Record.set
    +  Record.setIn
    +  Record.toJSON
    +  Record.update
    +  Record.updateIn
    +  Record.wasAltered
    +  Record.withMutations
    +  Record.Factory.displayName
    -  Record.butLast
    -  Record.concat
    -  Record.count
    -  Record.countBy
    -  Record.entries
    -  Record.entrySeq
    -  Record.every
    -  Record.filter
    -  Record.filterNot
    -  Record.find
    -  Record.findEntry
    -  Record.findKey
    -  Record.findLast
    -  Record.findLastEntry
    -  Record.findLastKey
    -  Record.first
    -  Record.flatMap
    -  Record.flatten
    -  Record.flip
    -  Record.forEach
    -  Record.groupBy
    -  Record.includes
    -  Record.isEmpty
    -  Record.isSubset
    -  Record.isSuperset
    -  Record.join
    -  Record.keyOf
    -  Record.keySeq
    -  Record.keys
    -  Record.last
    -  Record.lastKeyOf
    -  Record.mapEntries
    -  Record.mapKeys
    -  Record.max
    -  Record.maxBy
    -  Record.min
    -  Record.minBy
    -  Record.reduce
    -  Record.reduceRight
    -  Record.reverse
    -  Record.skip
    -  Record.skipLast
    -  Record.skipUntil
    -  Record.skipWhile
    -  Record.slice
    -  Record.some
    -  Record.sort
    -  Record.sortBy
    -  Record.take
    -  Record.takeLast
    -  Record.takeUntil
    -  Record.takeWhile
    -  Record.toArray
    -  Record.toIndexedSeq
    -  Record.toKeyedSeq
    -  Record.toList
    -  Record.toMap
    -  Record.toOrderedMap
    -  Record.toOrderedSet
    -  Record.toSet
    -  Record.toSetSeq
    -  Record.toStack
    -  Record.valueSeq
    -  Record.values
    +  Seq.[Symbol.iterator]
    +  Seq.toJSON
    +  Seq.update
    +  Seq.Indexed.[Symbol.iterator]
    +  Seq.Indexed.toJSON
    +  Seq.Indexed.update
    +  Seq.Indexed.zipAll
    +  Seq.Keyed.[Symbol.iterator]
    +  Seq.Keyed.toJSON
    +  Seq.Keyed.update
    +  Seq.Set.[Symbol.iterator]
    +  Seq.Set.toJSON
    +  Seq.Set.update
    +  Set.[Symbol.iterator]
    +  Set.toJSON
    +  Set.update
    +  Set.wasAltered
    +  Stack.[Symbol.iterator]
    +  Stack.toJSON
    +  Stack.update
    +  Stack.wasAltered
    +  Stack.zipAll
    +  ValueObject.equals
    +  ValueObject.hashCode
    -  Iterable.*
    -  Iterable.Indexed.*
    -  Iterable.Keyed.*
    -  Iterable.Set.*
  • v4.0.0-rc.9 Changes

    October 18, 2017


    • ๐Ÿ‘Œ Improved typescript definitions for new functional API (#1395)
    • ๐Ÿ‘Œ Improved flow types for Record setIn()/getIn() key-paths. (#1399)
    • ๐Ÿ‘Œ Improved flow types for functional merge() definitions. (#1400)
  • v4.0.0-rc.8 Changes

    October 17, 2017


    ๐Ÿ”€ list.concat() now has a slightly more efficient implementation and map.concat() is an alias for map.merge(). (#1373)

    ๐Ÿ”€ In rare cases, this may affect use of map.concat() which expected slightly different behavior from map.merge().

    isImmutable() now returns true for collections currently within a withMutations() call. (#1374)

    Previously, isImmutable() did double-duty of both determining if a value was a Collection or Record from this library as well as if it was outside a withMutations() call. This latter case caused confusion and was rarely used.

    Plain Objects and Arrays are no longer considered opaque values (#1369)

    โšก๏ธ This changes the behavior of a few common methods with respect to plain Objects and Arrays where these were previously considered opaque to merge() and setIn(), they now are treated as collections and can be merged into and updated (persistently). This offers an exciting alternative to small Lists and Records.

    ๐Ÿ”€ No longer use value-equality within merge() (#1391)

    ๐ŸŽ This rectifies an inconsistent behavior between x.merge(y) and x.mergeDeep(y) where merge would use === on leaf values to determine return-self optimizations, while mergeDeep would use is(). This improves consistency across the library and avoids a possible performance pitfall.

    ๐Ÿ†• New:

    • โšก๏ธ Dramatically better Flow types for getIn(), setIn(), updateIn() which understand key paths (#1366, #1377)
    • ๐Ÿ‘ Functional API for get(), set(), and more which support both Immutable.js collections and plain Objects and Arrays (#1369)

    ๐Ÿ›  Fixed:

    • getIn() no longer throws when encountering a missing path (#1361)
    • Flow string enums can now be used as Map keys or Record fields (#1376)
    • Flow now allows record.get() to provide a not-set-value (#1378)
    • ๐Ÿ›  Fixed Flow return type for Seq.Set() (3e671a2)
  • v4.0.0-rc.7 Changes

    October 05, 2017


    • ๐Ÿ›  Fixed syntax error in typescript definitions which limited some checking (#1354)
  • v4.0.0-rc.6 Changes

    October 05, 2017


    • ๐Ÿšš Flow types now understand list.filter(Boolean) will remove null values (#1352)
    • โž• Added missing flow types for Record.hasIn and Record.getIn (#1350)
  • v4.0.0-rc.5 Changes

    October 05, 2017


    ๐Ÿ”€ Concat Lists when merging deeply (#1344)

    ๐Ÿ”€ Previously, calling map.mergeDeep() with a value containing a List would replace the values in the original List. This has always been confusing, and does not properly treat List as a monoid. Now, List.merge is simply an alias for List.concat, and map.mergeDeep() will concatenate lists instead of replacing them.

    ๐Ÿ”€ No longer deeply coerce argument to merge() (#1339)

    ๐Ÿ”€ Previously, the argument provided to merge() was deeply converted to Immutable collections via fromJS(). This was the only function in the library which calls fromJS() indirectly directly, and it was surprising and made it difficult to understand what the result of merge() would be. Now, the value provided to merge() is only shallowly converted to an Immutable collection, similar to related methods in the library. This may change the behavior of your calls to merge().

    KeyedCollection.toArray() returns array of tuples. (#1340)

    Previously, calling toArray() on a keyed collection (incl Map and OrderedMap) would discard keys and return an Array of values. This has always been confusing, and differs from Array.from(). Now, calling toArray() on a keyed collection will return an Array of [key, value] tuples, matching the behavior of Array.from().

    ๐Ÿ†• New:

    ๐Ÿ›  Fixed:

    • zipAll type should predict undefined values (#1322)
    • ๐Ÿ–จ Do not throw when printing value that cannot be coerced to primitive (#1334)
    • Ensure set.subtract() accepts any iterable. (#1338)
    • ๐Ÿ›  Fix TypeScript definitions for merge functions (#1336)
    • Ensure when OrderedSet becomes empty, that it remains OrderedSet (#1335)
    • ๐Ÿ›  Fix slow iterator for Set (#1333)
    • โž• Add proper typescript type for map.flip() (#1332)
    • Set wasAltered() to false after List.asImmutable() (#1331)
  • v4.0.0-rc.4 Changes

    October 05, 2017


    • ๐Ÿ›  Fixed a regression from rc.3 where value hashing was not working (#1325, #1328)
    • Stop the iteration of an exhausted, unknown-sized sequence when slicing (#1324)
    • Flow type the prototype chain of "plain object" inputs (#1328)
  • v4.0.0-rc.12 Changes

    October 30, 2018

    ๐Ÿ›  There were mostly bugfixes and improvements since RC 12. Upgrading should be painless for most users. However, there is one breaking change: The behavior of merge and mergeDeep has changed. See below for details.

  • v4.0.0-rc.11 Changes

    October 27, 2018

    Potentially Breaking:

    • ๐Ÿ‘Œ Improve hash speed and avoid collision for common values (#1629)

    Causes some hash values to change, which could impact the order of iteration of values in some Maps (which are already advertised as unordered, but highlighting just to be safe)

    • ๐Ÿšš [TypeScript] Remove Iterable<T> as tuple from Map constructor types (#1626)

    ๐Ÿšš > Typescript allowed constructing a Map with a list of List instances, assuming each was a key, value pair. While this runtime behavior still works, this type led to more issues than it solved so it has been removed. (Note, this may break previous v4 rcs, but is not a change against v3)

    ๐Ÿ›  Fixes:

    • Give Records a displayName (#1625)
    • produces valid underlying map (#1606)
    • ๐Ÿ‘Œ Support isPlainObj with constructor key (#1627)

    ๐Ÿ“„ Docs:

    • ๐Ÿ›  Fix missing sub-types in API docs (#1619)
    • โž• Add docsearch (#1610)
    • โž• Add styles to doc search (#1628)
  • v4.0.0-rc.10 Changes

    September 19, 2018

    ๐Ÿš€ It's been a long time since the last release candidate, but quite a bit of work has happened since the last once. One step closer to a final release!

    ๐Ÿ’ฅ Breaking:

    • โœ‚ Remove IteratorSequence. Do not attempt to detect iterators in Seq(). (#1589)

    Iterables can still be provided to Seq(), and most Iterators are also
    Iterables, so this change should not affect the vast majority of uses.
    ๐Ÿ‘€ > For more information, see PR #1589

    • Node buffers no longer considered value-equal

    This was actually broken as of v4.0.0-rc.1 (2dcf3ef)
    but was highlighted as a breaking change by (#1437)

    ๐Ÿ†• New:

    • Top level predicate functions (#1600)

    New functions are exported from the immutable module:
    isSeq(), isList(), isMap(), isOrderedMap(), isStack(), isSet(), isOrderedSet(), and isRecord().

    • ๐Ÿ‘Œ Support Typescript 3 (#1593)
    • ๐Ÿ‘Œ Support latest Flow (#1531)
    • โž• Add RecordOf<TProps> type alias for TypeScript, matching Flow (#1578)
    • ๐Ÿ‘Œ Improved Flow support for Record subclasses (still not advised) (#1414)
    • ๐Ÿ‘Œ Improve performance of toJS (#1581)

    โœ… > Cursory test is >10% faster than both v3.8.2 and v4.0.0-rc.7,

    and corrects the regression since v4.0.0-rc.9.

    • โž• Added optional notSetValue in first() and last() (#1556)
    • Enable flow strict (#1580)
    • ๐Ÿ‘‰ Make isArrayLike check more precise to avoid false positives (#1520)
    • map() for List, Map, and Set returns itself for no-ops (#1455) (5726bd1)
    • Hash functions as objects, allowing functions as values in collections (#1485)

    ๐Ÿ›  Fix:

    • groupBy no longer returns a mutable Map instance (#1602)
    • ๐Ÿ›  Fix issue where refs can recursively collide, corrupting .size (#1598)
    • ๐Ÿ”€ Throw error in mergeWith() method if missing the required merger function (#1543)
    • โšก๏ธ Update isPlainObj() to workaround Safari bug and allow cross-realm values (#1557)
    • ๐Ÿ”€ The mergeDeepWith merger is untypable in TS/Flow. (#1532)
    • ๐Ÿ›  Fix missing "& T" to some methods in RecordInstance (#1464)
    • ๐Ÿ‘‰ Make notSetValue optional for typed Records (#1461) (a1029bb)
    • Export type of RecordInstance (#1434)
    • ๐Ÿ›  Fix Record size check in merge() (#1521)
    • ๐Ÿ›  Fix Map#concat being not defined (#1402)