From d0e2067436fc9fe5908168ddf2cc233c4f5af6be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herbert=20Voj=C4=8D=C3=ADk?= Date: Thu, 12 Feb 2015 14:50:47 +0100 Subject: [PATCH] In all native modules, `require` should be called. The NativeModule system passes `NativeModule.require` transparently there. All other require calls in this module are without `NativeModule.` prefix, these three are last to finally finish what should be done back there when lib/module.js was being extracted. The only one which _should_ have the prefix is the in line 295, where actually implements a big fs-based module system and actually requires a native module. That is left unchanged. --- lib/module.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/module.js b/lib/module.js index da51cf5ec0a5..4ac8cfa30a02 100644 --- a/lib/module.js +++ b/lib/module.js @@ -20,11 +20,11 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. var NativeModule = require('native_module'); -var util = NativeModule.require('util'); +var util = require('util'); var runInThisContext = require('vm').runInThisContext; var runInNewContext = require('vm').runInNewContext; var assert = require('assert').ok; -var fs = NativeModule.require('fs'); +var fs = require('fs'); // If obj.hasOwnProperty has been overridden, then calling @@ -61,7 +61,7 @@ Module.globalPaths = []; Module.wrapper = NativeModule.wrapper; Module.wrap = NativeModule.wrap; -var path = NativeModule.require('path'); +var path = require('path'); Module._debug = util.debuglog('module');