镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Vendor Events on NPM #37435

Description

@benjamingr

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 :)

Activity

  1. added
    eventsIssues and PRs related to EventEmitter and the events module.
    feature requestIssues requesting new Node.js features.
    on Feb 18, 2021
  2. mscdex commented on Feb 18, 2021

    @mscdex
    Contributor

    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.

  3. goto-bus-stop commented on Feb 27, 2021

    @goto-bus-stop
    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 😅

  4. benjamingr commented on Mar 2, 2021

    @benjamingr
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    eventsIssues and PRs related to EventEmitter and the events module.feature requestIssues requesting new Node.js features.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions