summaryrefslogtreecommitdiff
path: root/lib/vm.js
diff options
context:
space:
mode:
authorGus Caplan <me@gus.host>2019-10-04 20:08:00 -0700
committerRich Trott <rtrott@gmail.com>2019-10-14 14:25:38 -0700
commitf9caee986cae09cd4cb47e0a02a5b8672ab2c16d (patch)
tree5f5171ac3a976dfe81ee0667bc2f49afc1921ec1 /lib/vm.js
parent7991b57cfdba96ddcd6553c8233cd6392e16a42a (diff)
downloadandroid-node-v8-f9caee986cae09cd4cb47e0a02a5b8672ab2c16d.tar.gz
android-node-v8-f9caee986cae09cd4cb47e0a02a5b8672ab2c16d.tar.bz2
android-node-v8-f9caee986cae09cd4cb47e0a02a5b8672ab2c16d.zip
vm: add Synthetic modules
- Refactor vm.SourceTextModule (again) - Add vm.Module abstract superclass - Add vm.SyntheticModule Refs: https://heycam.github.io/webidl/#synthetic-module-records PR-URL: https://github.com/nodejs/node/pull/29864 Reviewed-By: Guy Bedford <guybedford@gmail.com>
Diffstat (limited to 'lib/vm.js')
-rw-r--r--lib/vm.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/vm.js b/lib/vm.js
index 90f332c775..8d44a92c80 100644
--- a/lib/vm.js
+++ b/lib/vm.js
@@ -99,7 +99,7 @@ class Script extends ContextifyScript {
importModuleDynamically);
}
const { importModuleDynamicallyWrap } =
- require('internal/vm/source_text_module');
+ require('internal/vm/module');
const { callbackMap } = internalBinding('module_wrap');
callbackMap.set(this, {
importModuleDynamically:
@@ -409,6 +409,10 @@ module.exports = {
};
if (require('internal/options').getOptionValue('--experimental-vm-modules')) {
- const { SourceTextModule } = require('internal/vm/source_text_module');
+ const {
+ Module, SourceTextModule, SyntheticModule,
+ } = require('internal/vm/module');
+ module.exports.Module = Module;
module.exports.SourceTextModule = SourceTextModule;
+ module.exports.SyntheticModule = SyntheticModule;
}