chore(deps): update dependency immutable@>=4.0.0-rc.1 <4.3.9 to v5 - #76
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency immutable@>=4.0.0-rc.1 <4.3.9 to v5#76renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
^4.3.9→^5.0.0](https://renovatebot.com/diffs/npm/immutable@>=4.0.0-rc.1 <4.3.9/4.3.9/5.1.9)Release Notes
immutable-js/immutable-js (immutable@>=4.0.0-rc.1 <4.3.9)
v5.1.9Compare Source
Listgrown past 32 elements while all its values areundefinedno longer reads those values back asnull(affectedget, iteration,toArray,equalsandhashCode)v5.1.8Compare Source
v5.1.7Compare Source
v5.1.6Compare Source
reversedSequence.sizein__iteratorinstead of this #2196v5.1.5Compare Source
v5.1.4Compare Source
Documentation
Internal
v5.1.3Compare Source
TypeScript
Documentation
There has been a huge amount of changes in the documentation, mainly migrate from an autogenerated documentation from .d.ts file, to a proper documentation in markdown.
The playground has been included on nearly all method examples.
We added a page about browser extensions too: https://immutable-js.com/browser-extension/
Internal
v5.1.2Compare Source
v5.1.1Compare Source
v5.1.0Compare Source
RetrievePath#2070 by @jdeniauInternal
v5.0.3Compare Source
v5.0.2Compare Source
v5.0.1Compare Source
v5.0.0Compare Source
Breaking changes
To sum up, the big change in 5.0 is a Typescript change related to
Mapthat 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 forMapfor 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: useisIterabledirectlyCollection.isKeyed: useisKeyeddirectlyCollection.isIndexed: useisIndexeddirectlyCollection.isAssociative: useisAssociativedirectlyCollection.isOrdered: useisOrdereddirectly[BREAKING]
OrdererMapandOrderedSethashCode implementation has been fixedReleased in 5.0.0-rc.1
Fix issue implementation of
hashCodeforOrdererMapandOrderedSetwhere 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
undefinedwould 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 Immutabledirectly:If you want the non-recommanded, but shorter migration path, you can do this:
[TypeScript Break] Improve TypeScript definition for
MapReleased 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
Mapreally 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
MapOfwill 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
Mapmethods implemented ?For now, only
get,getIn,set,update,delete,remove,toJS,toJSONmethods are implemented. All other methods will fallback to the basicMapdefinition. 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.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.