Releases: immutable-js/immutable-js
Releases · immutable-js/immutable-js
3.3.0
New:
setIn
added toRecord
- Added
mergeIn
anddeepMergeIn
toMap
andList
. updateIn
, and all*In
methods accept any Iterable as key path, not just Array.- Optimization for
concat
,merge
andunion
. Ifthis
is empty, and a single non-empty argument is provided, then attempt to return the argument unmodified.
Fixes:
- Documentation improvements
- Tests to ensure equality symmetry and hash equality
- Performance improvements to collection hashing
3.2.1
3.2.0
3.1.0
New:
- Performance enhancement to Maps and Sets with 8 or fewer entries.
OrderedSet
introduced.- Map and Set can now be
sort
ed, returning an OrderedMap or OrderedSet, respectively. - Improved
sortBy
,maxBy
andminBy
performance
Fixed:
Map#set
orSet#add
now return themselves for a no-op involving a hash collision.- Accessing an Indexed Iterable (such as
List
) with strings are now coerced to number when possible, mirroring the behavior of native Array. List
,Stack
andSet
constructors documentation now matches behavior.- Records now ignore unknown keys provided to constructors.
- OrderedMap no longer leaks memory when keys are removed.
3.0.3
A number of issues with v3.0.0 spotted and fixed by the growing Immutable.js community.
Fixes:
- Indexed and Set constructors no longer accept Objects, an unintended edge case which led to easy to make mistakes.
- Indexed and Set constructors accept Keyed Iterables as lists of [K,V] entries rather than dropping the keys, better mirroring ES6 Map and Set behavior.
- Collection constructors no longer throw when provided null/undefined and instead return empty collections. Better mirroring the behavior of ES6 Map/Set.
- concat accepts arguments of similar type as it's
this
's constructor. Ensures objects passed to concat are not exploded into an array of fields which is almost never intended. - Record equality works as advertised
- Record iteration now includes default fields
- Map iteration no longer incorrectly yield values on ES6 browsers (Chrome canary)
- Implicit
any
removed from TypeScript files - OrderedMap no longer breaks when keys are removed.
- Cursor iterators now reference proper
this
. - Improvements to example code and Readme.
3.0.2
3.0.1
3.0.0
v3.0.0 brings the Immutable collection API closer to ES6 Map and Set, introduces opt-in lazy operations, clarifies the differences between keyed and non-keyed collections and more.
A lot has changed, please check out the upgrade guide for more details and help for upgrading your code to work with this new version of the library.
New:
- Collection methods (
map
,filter
, etc) are now eager by default. Seq
andtoSeq
for explicit lazy operations.- Renamed
Sequence
toIterable
- Renamed
Vector
toList
- Renamed
length
tosize
- Constructors now always accept Iterable.
empty()
andfrom()
removedof(...values)
on indexed and set collections
contrib/
directoryCursor
now moved to contrib.
- "is type" predicates exist on all major Iterable types, such as
Map.isMap()
. groupBy()
andcountBy()
return concreteMap
.- Added:
keyOf()
andlastKeyOf()
on KeyedIterable are similar toindexOf()
andlastIndexOf()
on IndexedIterable.