Skip to content

Releases: immutable-js/immutable-js

v4.0.0-rc.3

30 Sep 03:38
Compare
Choose a tag to compare
v4.0.0-rc.3 Pre-release
Pre-release

This RC is now relicensed as MIT (#1320)

BREAKING:

  • Remove Seq.of() (#1311, #1310 )

    This method has been removed since it cannot be correctly typed. It's recommended to convert Seq.of(1, 2, 3) to Seq([1, 2, 3]).

New:

  • Support for Transducers! (ee9c68f)
  • A new method, zipAll() (#1195)
  • Considerably improved Record typing (#1193, #1276)
  • Bundle and distribute an "es module" so Webpack and Rollup can use tree-shaking for smaller builds (#1204)
  • Warn instead of throw when getIn() has a bad path (668f223)
  • Improved TypeScript types for zip(). (#1258)
  • Improved TypeScript types for has(). (#1232)
  • Support typescript strictNullChecks (#1168)

Fixed:

  • Updated Flow types to work with 0.55 and higher (#1312)
  • Updated TypeScript types to work with v2.4 and higher (#1285)
  • Do not throw from hasIn (#1319)
  • Long hash codes no longer cause an infinite loop (#1175)
  • slice() which should return an empty set could return a full set or vice versa (#1245, #1287)
  • Ensure empty slices do not throw when iterated (#1220)
  • Error during equals check on Record with undefined or null (#1208)
  • Fixes missing size property in flow types. (#1173)
  • Fix size of count() after filtering or flattening (#1171)

v4.0.0-rc.2

13 Mar 02:51
Compare
Choose a tag to compare
v4.0.0-rc.2 Pre-release
Pre-release

Changes Since v4.0.0-rc.1:

  • Type definition improvements for filter(), reduce() and concat() (#1155, #1156, #1153)
  • More specific TypeScript type definitions (#1149)
  • Added back delete() and clear() to Record instances (#1157)

v4.0.0-rc.1

11 Mar 03:13
Compare
Choose a tag to compare
v4.0.0-rc.1 Pre-release
Pre-release

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 to Collection, and isIterable() has been renamed to isCollection(). Aliases with the existing names exist to make transitioning code easier.

  • The "predicate" functions, isCollection, isKeyed, isIndexed, isAssociative have been moved from Iterable. to the top level exports.

  • Record is no longer an Immutable Collection type.

    • Now isCollection(myRecord) returns false instead of true.
    • The sequence API (such as map, filter, forEach) no longer exist on Records.
    • delete() and clear() no longer exist on Records.
  • The toJSON() method is now a shallow conversion (previously it was an alias for toJS(), 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 implement equals() and hashCode(), and type definitions now define the interface ValueObject 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.

v3.8.1

18 Apr 22:04
Compare
Choose a tag to compare

Minor touch ups discovered after the last release, plus a few more bug fixes! Plus, you can now contribute to immutable-js using the latest version of node.

New:

  • The methods keyOf, findKey, lastKeyOf, and findLastKey were moved from KeyedIterable to Iterable, so they may be also used on Lists and Sets. (#740)

Fixes:

  • Some issues with the flow definitions have been polished out thanks to @marudor. (#840, #841, #845)
  • Collections which contain Symbol keys or values can now be stringified. (#620)
  • Negative indexing into the keySeq of an IndexedIterable returns correct results. (#811)
  • Can use the value Infinity as a key in a Collection without crashing. (#797)

v3.8.0

16 Apr 00:32
Compare
Choose a tag to compare

Whoa, a new version of Immutable! The big news is that we now export types for both Flow and TypeScript in the npm module! Also that pesky length warning has finally been fully removed. There are also a good amount of small bug fixes and performance improvements. Finally, the API docs have been improved greatly! Check it out http://facebook.github.io/immutable-js/docs/.

A huge huge thanks to everyone in the community for contributing these improvements. The large majority of work cited below is community contributions.

New:

  • Now exports Flow types (#805)
  • Now exports typings for TypeScript use. (#808)
  • Cursor TypeScript definitions (#765)
  • No longer warns when accessing length property of a collection. (88f880f)
  • Map.of() takes key, value interleaved pairs (#727)
  • findEntry and findLastEntry now respect notSetValue argument (#822)

Fixes:

  • Iterable::take(Infinity) takes infinitely instead of 0 (#834)
  • Proper toOrderedMap and toOrderedSet method definitions (#761)
  • Records return themselves for no-op Record#set calls for better performance (#795)
  • Range#toString propertly reports step (#759)
  • Add missing Set#contains (96b0946)

3.7.6

16 Dec 06:03
Compare
Choose a tag to compare

A few minor bug fixes:

  • Fixed issue where lastIndexOf did not always return the correct value #703
  • mergeDeep now has more opportunities to for the "return self" optimization, saving memory #690
  • The TypeScript .d.ts file now aligns with the outputted file for the variations of Immutable Iterables. #647
  • Ensure behavior for slice(0, NaN) is equivalent to that of JS Array #623
  • Ensure ES6 Symbol can be properly hashed #579

And a new API method:

  • myList.insert() #402

3.7.5

02 Sep 22:41
Compare
Choose a tag to compare

Many stability improvements thanks to excellent community submitted fixes.

New:

  • Cursor can now set(value) #516 to replace the value at the cursor.

Fixes:

  • Ensure all tests pass in node v0.12
  • All operations that accept indicies now use ECMA's algorithm for converting input to integers when possible. #545 #598
  • Fix issue where slice/splice with non-number arguments could result in infinite recursion. #511
  • Clearer documentation regarding creating Map from JS Obj #589
  • Immutable now exported as a TypeScript module #567
  • Trailing commas causing issues in IE8 #510
  • Fix memory leak from setSize() and slice() #540
  • Union and Merge of Map or Set always favors the type of the left hand side #515

3.7.4

17 Jun 21:20
Compare
Choose a tag to compare

Fixes:

  • isSuperset can be called with an array of values.

New:

  • contrib/Cursor has proper support for Record
  • tsc will pick up type definitions from node modules

3.7.3

20 May 02:40
Compare
Choose a tag to compare

Fixes:

  • Improvements to documentation around equality, hasIn and withMutations
  • Iterating over empty slice no longer throws.
  • Merge deep methods no longer throw if deep position is not mergeable.

3.7.2

10 Apr 19:21
Compare
Choose a tag to compare
  • Updated PATENTS to v2.
  • Minor improvements to docs and Readme