Changelog History
Page 1
-
v4.1.0 Changes
May 23, 2022 -
v4.0.0 Changes
October 30, 2018๐ This release brings new functionality and many fixes.
Key changes
- ๐ New members have joined the team
- The project has been relicensed as MIT
- ๐ Better TypeScript and Flow type definitions
- ๐ A brand-new documentation lives at immutable-js.com and can show multiple versions
- ๐ Behavior of
merge
andmergeDeep
has changed - โ
Iterable
is renamed to Collection - โ Records no longer extend from Collections
- All collection types now implement the ES6 iterable protocol
- ๐ New methods:
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.*
-
v4.0.0-rc.9 Changes
October 18, 2017 -
v4.0.0-rc.8 Changes
October 17, 2017BREAKING:
๐
list.concat()
now has a slightly more efficient implementation andmap.concat()
is an alias formap.merge()
. (#1373)๐ In rare cases, this may affect use of
map.concat()
which expected slightly different behavior frommap.merge()
.isImmutable()
now returns true for collections currently within awithMutations()
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 awithMutations()
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()
andsetIn()
, 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:
- โก๏ธ Dramatically better Flow types for
-
v4.0.0-rc.7 Changes
October 05, 2017Fixes:
- ๐ Fixed syntax error in typescript definitions which limited some checking (#1354)
-
v4.0.0-rc.6 Changes
October 05, 2017 -
v4.0.0-rc.5 Changes
October 05, 2017BREAKING:
๐ Concat Lists when merging deeply (#1344)
๐ Previously, calling
map.mergeDeep()
with a value containing aList
would replace the values in the original List. This has always been confusing, and does not properly treatList
as a monoid. Now,List.merge
is simply an alias forList.concat
, andmap.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 viafromJS()
. This was the only function in the library which callsfromJS()
indirectly directly, and it was surprising and made it difficult to understand what the result ofmerge()
would be. Now, the value provided tomerge()
is only shallowly converted to an Immutable collection, similar to related methods in the library. This may change the behavior of your calls tomerge()
.KeyedCollection.toArray() returns array of tuples. (#1340)
Previously, calling
toArray()
on a keyed collection (inclMap
andOrderedMap
) would discard keys and return an Array of values. This has always been confusing, and differs fromArray.from()
. Now, callingtoArray()
on a keyed collection will return an Array of[key, value]
tuples, matching the behavior ofArray.from()
.๐ New:
- ๐ Much better documentation for Records (http://facebook.github.io/immutable-js/docs/#/Record) (#1349)
- ๐ Include version in build (#1345)
- Flow types
RecordOf<T>
andRecordFactory<T>
dramatically improve the Flow types for Records (#1343, #1330)
๐ 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 -
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
andmergeDeep
has changed. See below for details. -
v4.0.0-rc.11 Changes
October 27, 2018Potentially 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: