@@ -6,10 +6,10 @@ Subject: Pass all globals through "require"
66(cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62)
77
88diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
9- index 19a7d7e671f5abfa55b62290dcf3796a2c4e9013..3161afa33889f1682a1689e76fbcadc397f4b01c 100644
9+ index b077ee386b..f408d6c152 100644
1010--- a/lib/internal/modules/cjs/loader.js
1111+++ b/lib/internal/modules/cjs/loader.js
12- @@ -142 ,6 +142 ,13 @@ const {
12+ @@ -146 ,6 +146 ,13 @@ const {
1313 CHAR_FORWARD_SLASH,
1414 } = require('internal/constants');
1515
@@ -23,8 +23,8 @@ index 19a7d7e671f5abfa55b62290dcf3796a2c4e9013..3161afa33889f1682a1689e76fbcadc3
2323 const {
2424 isProxy,
2525 } = require('internal/util/types');
26- @@ -1236 ,10 +1243 ,12 @@ Module.prototype._compile = function(content, filename) {
27- if (requireDepth === 0) statCache = new SafeMap();
26+ @@ -1371 ,10 +1378 ,12 @@ Module.prototype._compile = function(content, filename) {
27+ if (requireDepth === 0) { statCache = new SafeMap(); }
2828 if (inspectorWrapper) {
2929 result = inspectorWrapper(compiledWrapper, thisValue, exports,
3030- require, module, filename, dirname);
@@ -37,4 +37,4 @@ index 19a7d7e671f5abfa55b62290dcf3796a2c4e9013..3161afa33889f1682a1689e76fbcadc3
3737+ dirname, process, localGlobal, localBuffer]);
3838 }
3939 hasLoadedAnyUserCJSModule = true;
40- if (requireDepth === 0) statCache = null;
40+ if (requireDepth === 0) { statCache = null; }
0 commit comments