Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendor Events on NPM #37435

Closed
benjamingr opened this issue Feb 18, 2021 · 3 comments
Closed

Vendor Events on NPM #37435

benjamingr opened this issue Feb 18, 2021 · 3 comments
Labels
events Issues and PRs related to the events subsystem / EventEmitter. feature request Issues that request new features to be added to Node.js.

Comments

@benjamingr
Copy link
Member

Context: browserify/events#79

It would be useful if events was vendored in a similar way to readable-stream.

I have brought this possibility up in the events repo https://github.com/browserify/events ( https://www.npmjs.com/package/events )

This should be pretty straightforward given events is mostly self contained.

cc @goto-bus-stop :)

@benjamingr benjamingr added events Issues and PRs related to the events subsystem / EventEmitter. feature request Issues that request new features to be added to Node.js. labels Feb 18, 2021
@mscdex
Copy link
Contributor

mscdex commented Feb 18, 2021

I think we should avoid doing this for any more core modules because of potential compatibility and other issues. We've already encountered this in the past with readable-stream when making certain changes in core coupled with the existence of userland modules that have/had readable-stream pinned to very old versions, causing incompatibilities and/or breakage. I fear the same could happen for other core modules, which could lead to less innovation/improvements in node core.

Additionally, as far as I remember readable-stream was created so that streams2 could be used by older/existing/deployed node versions and not (initially) for the benefit of bundler-type projects like browserify.

@goto-bus-stop
Copy link
Contributor

I think what mscdex says makes sense. It might also be a lot of effort for the Node.js project to turn events into something that can be consumed by the range of browsers/non-browsers that browserify/events aims to support for no clear gain. If it was easy, I would've personally loved to see it happen since I don't have enough time to maintain all the shims that browserify uses, but I think the node.js project probably also has limited time that is better spent elsewhere 😅

@benjamingr
Copy link
Member Author

benjamingr commented Mar 2, 2021

This didn't get a lot of traction and opinions seem negative - so let's close and reopen if people feel strongly about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
events Issues and PRs related to the events subsystem / EventEmitter. feature request Issues that request new features to be added to Node.js.
Projects
None yet
Development

No branches or pull requests

3 participants