This is a pre-release version of Immutable.js. Please try it at your own risk and report any issues you encounter so an official release can be shipped with great confidence.
As a pre-release, this changelog doesn't contain everything that has changed. Take a look at the commit log for a complete view, and expect a more thorough changelog for the official release.
Breaking Changes
-
The
Iterable
class has been renamed toCollection
, andisIterable()
has been renamed toisCollection()
. Aliases with the existing names exist to make transitioning code easier. -
The "predicate" functions,
isCollection
,isKeyed
,isIndexed
,isAssociative
have been moved fromIterable.
to the top level exports. -
Record is no longer an Immutable Collection type.
- Now
isCollection(myRecord)
returnsfalse
instead oftrue
. - The sequence API (such as
map
,filter
,forEach
) no longer exist on Records. delete()
andclear()
no longer exist on Records.
- Now
-
The
toJSON()
method is now a shallow conversion (previously it was an alias fortoJS()
, which remains a deep conversion). -
Some minor implementation details have changed, which may require updates to libraries which deeply integrate with Immutable.js's private APIs.
-
The Cursor API is officially deprecated. Use immutable-cursor instead.
New Stuff!
-
A new predicate function
isValueObject()
helps to detect objects which implementequals()
andhashCode()
, and type definitions now define the interfaceValueObject
which you can implement in your own code to create objects which behave as values and can be keys in Maps or entries in Sets. -
The Flowtype and TypeScript type definitions have been completely rewritten with much higher quality and accuracy, taking advantage of the latest features from both amazing tools.
-
Using
fromJS()
with a "reviver" function now provides access to the key path to each translated value. (#1118)
Bug fixes
- Numerous bug fixes have gone into this release.