You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Until v3, Immutable.is treated two collections containing equivalent Node Buffers as equal, because Node buffers happen to have an .equals() method similar to an Immutable collection.
In v4, this is no longer the case.
How to reproduce
Try the following with Immutable v3 and v4:
import{is,Map}from'immutable'consta=Map({'foo.txt': Buffer.from('hello')})constb=Map({'foo.txt': Buffer.from('hello')})is(a,b)// true in v3, but false in v4
Summary
This change may be a good thing, as the old behaviour always felt a little magical. And I'm not sure if it was ever officially documented. But @leebyron once told me (in #720) that the old behaviour was desirable, even if accidental. So if this change is intentional, I think it should be flagged up in the release notes as a breaking change.
The text was updated successfully, but these errors were encountered:
What happened
Until v3,
Immutable.is
treated two collections containing equivalent Node Buffers as equal, because Node buffers happen to have an.equals()
method similar to an Immutable collection.In v4, this is no longer the case.
How to reproduce
Try the following with Immutable v3 and v4:
Summary
This change may be a good thing, as the old behaviour always felt a little magical. And I'm not sure if it was ever officially documented. But @leebyron once told me (in #720) that the old behaviour was desirable, even if accidental. So if this change is intentional, I think it should be flagged up in the release notes as a breaking change.
The text was updated successfully, but these errors were encountered: