Skip to content
This repository was archived by the owner on Sep 2, 2023. It is now read-only.
This repository was archived by the owner on Sep 2, 2023. It is now read-only.

Named Exports for builtin modules #49

@benjamingr

Description

@benjamingr

This is more of a technical discussion than an API discussion since it doesn't deal with universal code or ESM/cjs interop but rather with how named builtin modules are exported using named exports.

@devsnek has went ahead and worked on nodejs/node#18131 for adding named exports for builtins. It is currently blocked on nodejs/node#18131 (comment)

I think we should either:

  • expose another (internal) symbol for things Node wants to hide from inspect and put it specifically on proxies we use for live bindings
  • modify customInspect to run before showProxy
  • Don't wrap the live bindings in proxies, start with explicitly not supporting it in named exports and move to setters/getters slowly.

I'm willing to work on either one - pinging involved parties for discussion @addaleax @jdalton @devsnek @TimothyGu @BridgeAR @ljharb

I think the first solution is the easiest - opinions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions