-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
Simplify vm.Module #43899
Copy link
Copy link
Open
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.experimentalIssues and PRs related to experimental features.Issues and PRs related to experimental features.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.loadersIssues and PRs related to ES module loadersIssues and PRs related to ES module loadersnever-staleMark issue so that it is never considered staleMark issue so that it is never considered stalevmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
Metadata
Metadata
Assignees
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.experimentalIssues and PRs related to experimental features.Issues and PRs related to experimental features.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.loadersIssues and PRs related to ES module loadersIssues and PRs related to ES module loadersnever-staleMark issue so that it is never considered staleMark issue so that it is never considered stalevmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
One thing that comes up in user feedback about the
vm.ModuleAPI is that it requires excessive boilerplate, as you can see in the example in the docs: https://nodejs.org/api/vm.html#class-vmmodule. I think that most users want a straightforward ESM equivalent tovm.Script, without needing to define a context or a custom function for linking; the default should be to link modules as Node itself normally does. See also #43288 (comment).