Skip to content

Releases: immutable-js/immutable-js

v4.2.4

10 Mar 15:17
Compare
Choose a tag to compare

What's Changed

Full Changelog: v4.2.3...v4.2.4

v4.2.3

02 Feb 20:11
Compare
Choose a tag to compare

What's Changed

  • upgrade dtslint to test version >= 4.6 by @jdeniau in #1921
  • groupBy return either a Map or an OrderedMap: make the type more precise by @jdeniau in #1924

Full Changelog: v4.2.2...v4.2.3

v4.2.2

02 Jan 11:20
f172ca1
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.2.1...v4.2.2

v4.2.1

23 Dec 13:37
7e33ca9
Compare
Choose a tag to compare

What's Changed

  • [Typescript] rollback some of the change on toJS to avoir circular reference by @jdeniau in #1922

Full Changelog: v4.2.0...v4.2.1

v4.2.0

22 Dec 15:36
d88f722
Compare
Choose a tag to compare
  • Added a partition method to all containers #1916 by johnw42
  • [TypeScript] Better type for toJS #1917 by jdeniau
    • [TS Minor Break] tests are ran with TS > 4.5 only. It was tested with TS > 2.1 previously, but we want to level up TS types with recent features. TS 4.5 has been released more than one year before this release. If it does break your implementation (it might not), you should probably consider upgrading to the latest TS version.

v4.1.0

23 May 19:04
Compare
Choose a tag to compare

v4.0.0

07 Oct 23:49
Compare
Choose a tag to compare

Docs: https://immutable-js.com/docs/v4.0.0/
Full Changelog: v3.8.1...v4.0.0

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.zip
+  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.map
-  Record.mapEntries
-  Record.mapKeys
-  Record.max
-  Record.maxBy
-  Record.min
-  Record.minBy
-  Record.reduce
-  Record.reduceRight
-  Record.rest
-  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.*

Note for users of v4.0.0-rc.12

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.

BREAKING

merge()

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

  • 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,
    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().

mergeDeep()

  • Replace incompatible collections when merging nested data (#1840)

    It will no longer merge lists of tuples into maps. For more information see
    #1840 and the updated mergeDeep() documentation.

  • 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 deeply-found lists
    instead of replacing them.

Seq

  • 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

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

isImmutable()

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

toArray()

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

concat()

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

Collection, formerly Iterable

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

Record

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

Other breaking changes

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

  • Node buffers no longer considered value-equal (#1437)

  • Plain Objects and Arrays are no longer considered opaque valu...

Read more

v4.0.0-rc.15

16 Sep 22:55
Compare
Choose a tag to compare
v4.0.0-rc.15 Pre-release
Pre-release

This is the last planned RC release before releasing a stable 4.0!! 🎉 🎉 🎉

BREAKING:

  • Replace incompatible collections when merging nested data with mergeDeep() (#1840)
    • This means that mergeDeep() will no longer merge lists of tuples into maps. For more information see #1840 and the updated mergeDeep() documentation.

New:

  • Add "sideEffects: false" to package.json (#1661)
  • Update Flow types to be compatible with the latest version (#1863)
  • Use ES standard for iterator method reuse (#1867)
  • Generalize fromJS() and Seq() to support Sets (#1865)

Fixes:

  • Fix some TS type defs (#1847)
    • Adds ArrayLike<T> as option to type factory functions and fromJS now returns Collection<unknown> instead of just unknown.
  • Fix issue with IE11 and missing Symbol.iterator (#1850)
  • Simplify typescript definition files to support all UMD use cases (#1854)

4.0.0-rc.14

07 Jul 23:54
Compare
Choose a tag to compare
4.0.0-rc.14 Pre-release
Pre-release
  • Fixes some TypeScript issues (Map constructor, update function, mapEntries)
  • Fix add zipall to orderedset
  • Improve documentation

4.0.0-rc.13

07 Jul 22:46
Compare
Choose a tag to compare
4.0.0-rc.13 Pre-release
Pre-release

Hi there !

It's been a while since 4.0.0-rc.12 ! If you want to know why, there is a warm message from @leebyron, who developed and maintained immutable during all these years.

In the meantime, @Methuselah96 and @conartist6 did fork immutable-js on another repository, opened a slack, and helped with some great talent (@bdurrer, @mcclure, @hahnlee, @mishawakerman), they tried to fixed issues in the 4.x version in order to release that 4.0.0 version !

We are not there right now, but we are getting closer. There are still some PRs and issues until then, but they might be minor.

Once again, thanks a LOT to @leebyron for all the hard work that he put on immutable during all this years.

This version is not published to npmjs, you can try the 4.0.0-rc.14 instead.

This RC does not contain any BC break since 4.0.0-rc.12.

Fixes that should be resolved in this version :

  • Fix ordered set with map (#1663)
  • fix: do not modify iter during List.map and Map.map (#1649)
  • Fix ordered map delete all (#1777)
  • Hash symbols as objects (#1753)
  • Fix returning a Record in merge() when Record is empty (#1785)
  • Similar factories should be equals (#1734)
  • "too much recursion" error when creating a Record type from an instance of another Record (#1690)
  • Record clear does work (#1565)
  • Fix glob for npm format script on Windows immutable-js-oss#18
  • Remove deprecated cursor API immutable-js-oss#13
  • Add missing es exports (#1740)
  • Support nulls in genTypeDefData.js (#185)
  • Support isPlainObj in IE11 and other esoteric parameters f3a6d5c
  • Fix benchmarks immutable-js-oss#21
  • ensure that subtract works correcly (#1716, #1603)
  • assert that setIn works as expected (#1428)
  • check that "delete" works as "remove" (#1474)