From 6297e77b1f5955cc3360fcd747712a052bc4497f Mon Sep 17 00:00:00 2001 From: Daeyeon Jeong Date: Tue, 29 Nov 2022 20:22:49 +0900 Subject: [PATCH] lib: disambiguate `native module` to `binding` Signed-off-by: Daeyeon Jeong PR-URL: https://github.com/nodejs/node/pull/45673 Refs: https://github.com/nodejs/node/pull/44135 Reviewed-By: Chengzhong Wu Reviewed-By: Luigi Pinca Reviewed-By: Joyee Cheung --- lib/internal/bootstrap/node.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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(); } };