Assets 2

Fixes:

  • Update to support Flow v0.85 and makes Record strict typing optional to ease migration from v3 or earlier v4 release candidates (#1636)
Pre-release

@leebyron leebyron released this Oct 27, 2018 · 7 commits to master since this release

Assets 2

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)
  • Set.map 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)
Pre-release

@leebyron leebyron released this Sep 19, 2018 · 18 commits to master since this release

Assets 2

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)
Pre-release

@leebyron leebyron released this Oct 18, 2017 · 95 commits to master since this release

Assets 2

Fixes:

  • 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)
Pre-release

@leebyron leebyron released this Oct 17, 2017 · 101 commits to master since this release

Assets 2

BREAKING:

  • 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)
Pre-release

@leebyron leebyron released this Oct 5, 2017 · 127 commits to master since this release

Assets 2

Fixes:

  • Fixed syntax error in typescript definitions which limited some checking (#1354)
Pre-release

@leebyron leebyron released this Oct 5, 2017 · 129 commits to master since this release

Assets 2

Fixes:

  • Flow types now understand list.filter(Boolean) will remove null values (#1352)
  • Added missing flow types for Record.hasIn and Record.getIn (#1350)
Pre-release

@leebyron leebyron released this Oct 5, 2017 · 135 commits to master since this release

Assets 2

BREAKING:

  • 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)

@leebyron leebyron released this Oct 5, 2017 · 456 commits to master since this release

Assets 2

This patch release relicenses with the MIT license, but includes no other changes. Intended for those who have not yet been able to update to the 4.x builds, but have a legal need for the change in license.

Pre-release

@leebyron leebyron released this Oct 5, 2017 · 172 commits to master since this release

Assets 2

Fixes:

  • 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)