From bf2f2b74faeeb5ad7fc8e483a80bae3064e3e717 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Fri, 25 Sep 2020 15:22:52 -0500 Subject: [PATCH] vm: add importModuleDynamically option to compileFunction This reverts commit 2d5d77306f6dff9110c1f77fefab25f973415770. See: https://github.com/nodejs/node/pull/32985 See: https://github.com/nodejs/node/pull/33364 See: https://github.com/nodejs/node/issues/33166 Fixes: https://github.com/nodejs/node/issues/31860 PR-URL: https://github.com/nodejs/node/pull/35431 Reviewed-By: Matteo Collina Reviewed-By: Antoine du Hamel Reviewed-By: Ujjwal Sharma --- doc/api/vm.md | 13 +++++++++ lib/internal/modules/cjs/loader.js | 40 ++++++++------------------- lib/vm.js | 17 ++++++++++++ test/parallel/test-vm-module-basic.js | 19 ++++++++++++- 4 files changed, 60 insertions(+), 29 deletions(-) diff --git a/doc/api/vm.md b/doc/api/vm.md index 1bd9303fc4ef0d..cb97cda7d791c0 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -813,6 +813,9 @@ const vm = require('vm');