Closed goto-bus-stop closed 5 years ago
Updated to events v3, which matches the Node 10 API, including the new .off()
method.
How is this coming along? Any updates?
I'm asking because I opened a related issue in the Parcel repo: https://github.com/parcel-bundler/parcel/issues/1657
I would really like to see this one merged 😄
@jhnns @sokra @bmeurer or any maintainer, is there any hold back on this? I had to add specific resolution override to get v3 features.
Thanks
Matches the Node 10 API. v1 matched Node 4, and some new methods have since been introduced (notably
prepend[Once]Listener
). v2 matched Node 8, but since then Node 10 has added.off()
.The major bump to v2 was because:
listeners()
method regardingonce()
listeners https://github.com/nodejs/node/pull/6881 I think it's super unlikely to affect anyone, but there you go.The major bump to v3 was because:
.off()
method is a common name that could cause collisions with userland implmentations if users modified the EventEmitter prototype. This again is unlikely to hurt anyone, because even if they did define their own.off()
on the EventEmitter prototype, it would 99% certainly be doing the same thing.Deets: https://github.com/Gozala/events/releases/tag/v2.0.0 https://github.com/Gozala/events/releases/tag/v3.0.0