From a0e8a257211012b9d18dd8e9f32bb9ce740bf27d Mon Sep 17 00:00:00 2001 From: Karen He <32376376+baekrxnn@users.noreply.github.com> Date: Thu, 27 Jun 2019 16:34:53 -0700 Subject: [PATCH] vm: remove usage of public util module PR-URL: https://github.com/nodejs/node/pull/28460 Reviewed-By: Anatoli Papirovski Reviewed-By: Masashi Hirano Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Yongsheng Zhang Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- lib/vm.js | 5 ++++- test/parallel/test-bootstrap-modules.js | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/vm.js b/lib/vm.js index 8e29762a2950f7..a666a05c8a7c10 100644 --- a/lib/vm.js +++ b/lib/vm.js @@ -33,7 +33,10 @@ const { ERR_INVALID_ARG_TYPE, ERR_VM_MODULE_NOT_MODULE, } = require('internal/errors').codes; -const { isModuleNamespaceObject, isArrayBufferView } = require('util').types; +const { + isModuleNamespaceObject, + isArrayBufferView, +} = require('internal/util/types'); const { validateInt32, validateUint32, diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index f96aba36863b7c..24ba7d34f57981 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -64,7 +64,6 @@ const expectedModules = new Set([ 'NativeModule path', 'NativeModule timers', 'NativeModule url', - 'NativeModule util', 'NativeModule vm', ]);