From 28f5ec89c9314c410d40fe228c10dfdbf9d2b62f Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Fri, 25 Sep 2020 15:22:52 -0500 Subject: [PATCH] Revert "Revert "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 --- 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');