fix(deps): update dependency immutable to v5 #9727
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^3.8.2
->^5.0.0
Release Notes
immutable-js/immutable-js (immutable)
v5.0.0
Compare Source
Breaking changes
To sum up, the big change in 5.0 is a Typescript change related to
Map
that is typed closer to the JS object. This is a huge change for TS users, but do not impact the runtime behavior. (see Improve TypeScript definition forMap
for more details)Other breaking changes are:
[BREAKING] Remove deprecated methods:
Released in 5.0.0-rc.1
Map.of('k', 'v')
: useMap([ [ 'k', 'v' ] ])
orMap({ k: 'v' })
Collection.isIterable
: useisIterable
directlyCollection.isKeyed
: useisKeyed
directlyCollection.isIndexed
: useisIndexed
directlyCollection.isAssociative
: useisAssociative
directlyCollection.isOrdered
: useisOrdered
directly[BREAKING]
OrdererMap
andOrderedSet
hashCode implementation has been fixedReleased in 5.0.0-rc.1
Fix issue implementation of
hashCode
forOrdererMap
andOrderedSet
where equal objects might not return the samehashCode
.Changed in #2005
[BREAKING] Range function needs at least two defined parameters
Released in 5.0.0-beta.5
Range with
undefined
would end in an infinite loop. Now, you need to define at least the start and end values.If you need an infinite range, you can use
Range(0, Infinity)
.Changed in #1967 by @jdeniau
[Minor BC break] Remove default export
Released in 5.0.0-beta.1
Immutable does not export a default object containing all it's API anymore.
As a drawback, you can not
immport Immutable
directly:If you want the non-recommanded, but shorter migration path, you can do this:
[TypeScript Break] Improve TypeScript definition for
Map
Released in 5.0.0-beta.1
This was previously typed as
Map<string, string | number>
and return type of
m.get('length')
orm.get('inexistant')
was typed asstring | number | undefined
.This made
Map
really unusable with TypeScript.Now the Map is typed like this:
and the return type of
m.get('length')
is typed asnumber
.The return of
m.get('inexistant')
throw the TypeScript error:If you want to keep the old definition
This is a minor BC for TS users, so if you want to keep the old definition, you can declare you Map like this:
If you need to type the Map with a larger definition
You might want to declare a wider definition, you can type your Map like this:
Keep in mind that the
MapOf
will try to be consistant with the simple TypeScript object, so you can not do this:Like a simple object, it will only work if the type is forced:
Are all
Map
methods implemented ?For now, only
get
,getIn
,set
,update
,delete
,remove
,toJS
,toJSON
methods are implemented. All other methods will fallback to the basicMap
definition. Other method definition will be added later, but as some might be really complex, we prefer the progressive enhancement on the most used functions.Fixes
Internal
Special thanks to @arnfaldur that migrated every type tests to tsd just before that.
v4.3.7
Compare Source
v4.3.6
Compare Source
Repeat(<value>).equals(undefined)
incorrectly returning true #1994 by @butchlerv4.3.5
Compare Source
What's Changed
New Contributors
Full Changelog: immutable-js/immutable-js@v4.3.4...v4.3.5
v4.3.4
Compare Source
v4.3.3
Compare Source
v4.3.2
Compare Source
v4.3.1
Compare Source
some
#1944v4.3.0
Compare Source
v4.2.4
Compare Source
v4.2.3
Compare Source
groupBy
return either aMap
or anOrderedMap
: make the type more precise than baseCollection
#1924v4.2.2
Compare Source
partition
method #1920 by Dagurv4.2.1
Compare Source
toJS
to avoir circular referencev4.2.0
Compare Source
partition
method to all containers #1916 by johnw42v4.1.0
Compare Source
v4.0.0
Compare Source
This release brings new functionality and many fixes.
Key changes
merge
andmergeDeep
has changedIterable
is renamed to CollectionDiff of changed API (click to expand)
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
andmergeDeep
has changed. See below for details.BREAKING
merge()
No longer use value-equality within
merge()
(#1391)No longer deeply coerce argument to merge() (#1339)
mergeDeep()
Replace incompatible collections when merging nested data (#1840)
Concat Lists when merging deeply (#1344)
Seq
Remove IteratorSequence. Do not attempt to detect iterators in
Seq()
. (#1589)Remove
Seq.of()
(#1311, #1310)isImmutable()
isImmutable()
now returns true for collections currently within awithMutations()
call. (#1374)toArray()
KeyedCollection.toArray() returns array of tuples. (#1340)
concat()
list.concat()
now has a slightly more efficient implementation andmap.concat()
is an alias formap.merge()
. (#1373)Collection, formerly
Iterable
Iterable
class has been renamed toCollection
, andisIterable()
has been renamed toisCollection()
.Aliases with the existing names exist to make transitioning code easier.
Record
isCollection(myRecord)
returnsfalse
instead oftrue
.map
,filter
,forEach
) no longer exist on Records.delete()
andclear()
no longer exist on Records.Other breaking changes
Potentially Breaking: Improve hash speed and avoid collision for common values (#1629)
Node buffers no longer considered value-equal (#1437)
Plain Objects and Arrays are no longer considered opaque values (#1369)
The "predicate" functions,
isCollection
,isKeyed
,isIndexed
,isAssociative
have been moved fromIterable.
to the top level exports.The
toJSON()
method performs 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.
Potentially Breaking: [TypeScript] Remove
Iterable<T>
as tuple from Map constructor types (#1626)New
taking advantage of the latest features from both tools.
Add "sideEffects: false" to package.json (#1661)
Use ES standard for iterator method reuse (#1867)
Generalize
fromJS()
andSeq()
to support Sets (#1865)Top level predicate functions (#1600)
Improve performance of toJS (#1581)
Added optional
notSetValue
infirst()
andlast()
(#1556)Make
isArrayLike
check more precise to avoid false positives (#1520)map()
for List, Map, and Set returns itself for no-ops (#1455) (5726bd1
)Hash functions as objects, allowing functions as values in collections (#1485)
Functional API for
get()
,set()
, and more which support both Immutable.js collections and plain Objects and Arrays (#1369)Relicensed as MIT (#1320)
Support for Transducers! (ee9c68f1)
Add new method,
zipAll()
(#1195)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 (668f2236)A new predicate function
isValueObject()
helps to detect objects which implementequals()
andhashCode()
,and type definitions now define the interface
ValueObject
which you can implement in your own code to create objects whichbehave as values and can be keys in Maps or entries in Sets.
Using
fromJS()
with a "reviver" function now provides access to the key path to each translated value. (#1118)Fixed
Fix issue with IE11 and missing Symbol.iterator (#1850)
Fix ordered set with map (#1663)
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)
Fix for RC~12: Records from different factories aren't equal (#1734)
"too much recursion" error when creating a Record type from an instance of another Record (#1690)
Fix glob for npm format script on Windows (#18)
Remove deprecated cursor API (#13)
Add missing es exports (#1740)
Support nulls in genTypeDefData.js (#185)
Support isPlainObj in IE11 and other esoteric parameters f3a6d5ce
Set.map
produces valid underlying map (#1606)Support isPlainObj with
constructor
key (#1627)groupBy
no longer returns a mutable Map instance (#1602)Fix issue where refs can recursively collide, corrupting
.size
(#1598)Throw error in
mergeWith()
method if missing the requiredmerger
function (#1543)Update
isPlainObj()
to workaround Safari bug and allow cross-realm values (#1557)Fix missing "& T" to some methods in RecordInstance (#1464)
Make notSetValue optional for typed Records (#1461) (
a1029bb
)Export type of RecordInstance (#1434)
Fix Record
size
check in merge() (#1521)Fix Map#concat being not defined (#1402)
getIn()
no longer throws when encountering a missing path (#1361)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)
Fix size of count() after filtering or flattening (#1171)
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.