-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Open
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.never-staleMark issue so that it is never considered staleMark issue so that it is never considered stalerealmIssues and PRs related to the ShadowRealm API and node::RealmIssues and PRs related to the ShadowRealm API and node::RealmvmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
Description
Scripts/Modules running in the context created with vm.createContext can not access various Node.js built-in apis/modules like URL, node:assert, node:http, etc. This makes it cumbersome to create a disposable context for use cases like hot-module-reload to run existing node.js apps.
We can provide a built-in API to create a context (or a new NodeRealm for compatibility) with full-fledged Node.js built-in modules support. It allows object exchanges between realms and shares the same loop with the main context.
, similar to the existing vm.context.
/cc @mcollina @nodejs/realm @nodejs/vm
mcollina, dmitry-vsl and SimenBcjihrig, debadree25, dongjour99 and SimenB
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.never-staleMark issue so that it is never considered staleMark issue so that it is never considered stalerealmIssues and PRs related to the ShadowRealm API and node::RealmIssues and PRs related to the ShadowRealm API and node::RealmvmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
Type
Projects
Status
Awaiting Triage