diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-11-02 19:08:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 19:08:09 -0400 |
commit | 77fb26e143d635f713a1ded93100210878c61f19 (patch) | |
tree | 3753ae34c4ccc19c231632d28218d8066ab4ea60 /ext/node/02_require.js | |
parent | 5140795662a9d5eb13031912fa193b7305779c1f (diff) |
fix(npm): add `console` global for node environment (#16519)
This global is already isolated to node during type checking.
Closes #16518
Diffstat (limited to 'ext/node/02_require.js')
-rw-r--r-- | ext/node/02_require.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/02_require.js b/ext/node/02_require.js index c970d3994..b699db00b 100644 --- a/ext/node/02_require.js +++ b/ext/node/02_require.js @@ -662,7 +662,7 @@ Module.wrapper = [ // We provide the non-standard APIs in the CommonJS wrapper // to avoid exposing them in global namespace. - "(function (exports, require, module, __filename, __dirname, globalThis) { const { Buffer, clearImmediate, clearInterval, clearTimeout, global, process, setImmediate, setInterval, setTimeout} = globalThis; var window = undefined; (function () {", + "(function (exports, require, module, __filename, __dirname, globalThis) { const { Buffer, clearImmediate, clearInterval, clearTimeout, console, global, process, setImmediate, setInterval, setTimeout} = globalThis; var window = undefined; (function () {", "\n}).call(this); })", ]; Module.wrap = function (script) { |