diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 108b11a2f960d2..f31bc15f2a13e4 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -104,9 +104,6 @@ process.domain = null; } process._exiting = false; -// process.config is serialized config.gypi -const nativeModule = internalBinding('builtins'); - // TODO(@jasnell): Once this has gone through one full major // release cycle, remove the Proxy and setter and update the // getter to either return a read-only object or always return @@ -162,9 +159,12 @@ const deprecationHandler = { } }; +// process.config is serialized config.gypi +const binding = internalBinding('builtins'); + // eslint-disable-next-line node-core/prefer-primordials let processConfig = new Proxy( - JSONParse(nativeModule.config), + JSONParse(binding.config), deprecationHandler); ObjectDefineProperty(process, 'config', { @@ -310,7 +310,7 @@ const features = { // This needs to be dynamic because --no-node-snapshot disables the // code cache even if the binary is built with embedded code cache. get cached_builtins() { - return nativeModule.hasCachedBuiltins(); + return binding.hasCachedBuiltins(); } };