fix(ext/node): basic vm.runInNewContext implementation (#21527)

Simple implementation to support webpack (& Next.js):
8766092180/lib/javascript/JavascriptParser.js (L4329)
This commit is contained in:
Divy Srivastava 2023-12-11 12:38:45 +05:30 committed by GitHub
parent 0bee37a5e2
commit 02e138dca9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 131 additions and 7 deletions

View file

@ -30,6 +30,7 @@ mod path;
mod polyfill;
mod resolution;
pub use ops::v8::VM_CONTEXT_INDEX;
pub use package_json::PackageJson;
pub use path::PathClean;
pub use polyfill::is_builtin_node_module;
@ -243,6 +244,7 @@ deno_core::extension!(deno_node,
ops::winerror::op_node_sys_to_uv_error,
ops::v8::op_v8_cached_data_version_tag,
ops::v8::op_v8_get_heap_statistics,
ops::v8::op_vm_run_in_new_context,
ops::idna::op_node_idna_domain_to_ascii,
ops::idna::op_node_idna_domain_to_unicode,
ops::idna::op_node_idna_punycode_decode,