summaryrefslogtreecommitdiff
path: root/ext/node/polyfills
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills')
-rw-r--r--ext/node/polyfills/01_require.js4
-rw-r--r--ext/node/polyfills/02_init.js1
-rw-r--r--ext/node/polyfills/console.ts4
3 files changed, 4 insertions, 5 deletions
diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js
index c29073901..aec8c55b8 100644
--- a/ext/node/polyfills/01_require.js
+++ b/ext/node/polyfills/01_require.js
@@ -945,7 +945,7 @@ Module.prototype.require = function (id) {
// The only observable difference is that in Deno `arguments.callee` is not
// null.
Module.wrapper = [
- "(function (exports, require, module, __filename, __dirname, Buffer, clearImmediate, clearInterval, clearTimeout, console, global, process, setImmediate, setInterval, setTimeout, performance) { (function (exports, require, module, __filename, __dirname) {",
+ "(function (exports, require, module, __filename, __dirname, Buffer, clearImmediate, clearInterval, clearTimeout, global, process, setImmediate, setInterval, setTimeout, performance) { (function (exports, require, module, __filename, __dirname) {",
"\n}).call(this, exports, require, module, __filename, __dirname); })",
];
Module.wrap = function (script) {
@@ -1029,7 +1029,6 @@ Module.prototype._compile = function (content, filename, format) {
clearImmediate,
clearInterval,
clearTimeout,
- console,
global,
process,
setImmediate,
@@ -1049,7 +1048,6 @@ Module.prototype._compile = function (content, filename, format) {
clearImmediate,
clearInterval,
clearTimeout,
- console,
global,
process,
setImmediate,
diff --git a/ext/node/polyfills/02_init.js b/ext/node/polyfills/02_init.js
index 7a697abe4..870ff12f3 100644
--- a/ext/node/polyfills/02_init.js
+++ b/ext/node/polyfills/02_init.js
@@ -76,7 +76,6 @@ nodeGlobals.Buffer = nativeModuleExports["buffer"].Buffer;
nodeGlobals.clearImmediate = nativeModuleExports["timers"].clearImmediate;
nodeGlobals.clearInterval = nativeModuleExports["timers"].clearInterval;
nodeGlobals.clearTimeout = nativeModuleExports["timers"].clearTimeout;
-nodeGlobals.console = nativeModuleExports["console"];
nodeGlobals.global = globalThis;
nodeGlobals.process = nativeModuleExports["process"];
nodeGlobals.setImmediate = nativeModuleExports["timers"].setImmediate;
diff --git a/ext/node/polyfills/console.ts b/ext/node/polyfills/console.ts
index c72cfb160..b1364481f 100644
--- a/ext/node/polyfills/console.ts
+++ b/ext/node/polyfills/console.ts
@@ -9,7 +9,9 @@ import { windowOrWorkerGlobalScope } from "ext:runtime/98_global_scope_shared.js
// to native `console` object provided by V8.
const console = windowOrWorkerGlobalScope.console.value;
-export default Object.assign({}, console, { Console });
+Object.assign(console, { Console });
+
+export default console;
export { Console };
export const {