mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
fix(ext/node): attach console stream properties (#25617)
`kBindStreamsLazy` should be called with `process` during init, but it never was.
This commit is contained in:
parent
d162733db2
commit
2c0bf6fd65
3 changed files with 12 additions and 0 deletions
|
@ -128,6 +128,7 @@ import internalTestBinding from "ext:deno_node/internal/test/binding.ts";
|
|||
import internalTimers from "ext:deno_node/internal/timers.mjs";
|
||||
import internalUtil from "ext:deno_node/internal/util.mjs";
|
||||
import internalUtilInspect from "ext:deno_node/internal/util/inspect.mjs";
|
||||
import internalConsole from "ext:deno_node/internal/console/constructor.mjs";
|
||||
import net from "node:net";
|
||||
import os from "node:os";
|
||||
import pathPosix from "node:path/posix";
|
||||
|
@ -198,6 +199,7 @@ function setupBuiltinModules() {
|
|||
http2,
|
||||
https,
|
||||
inspector,
|
||||
"internal/console/constructor": internalConsole,
|
||||
"internal/child_process": internalCp,
|
||||
"internal/crypto/certificate": internalCryptoCertificate,
|
||||
"internal/crypto/cipher": internalCryptoCipher,
|
||||
|
|
|
@ -82,3 +82,8 @@ nodeGlobals.setImmediate = nativeModuleExports["timers"].setImmediate;
|
|||
nodeGlobals.setInterval = nativeModuleExports["timers"].setInterval;
|
||||
nodeGlobals.setTimeout = nativeModuleExports["timers"].setTimeout;
|
||||
nodeGlobals.performance = nativeModuleExports["perf_hooks"].performance;
|
||||
|
||||
nativeModuleExports["internal/console/constructor"].bindStreamsLazy(
|
||||
nativeModuleExports["console"],
|
||||
nativeModuleExports["process"],
|
||||
);
|
||||
|
|
|
@ -667,10 +667,15 @@ Console.prototype.dirxml = Console.prototype.log;
|
|||
Console.prototype.error = Console.prototype.warn;
|
||||
Console.prototype.groupCollapsed = Console.prototype.group;
|
||||
|
||||
export function bindStreamsLazy(console, object) {
|
||||
Console.prototype[kBindStreamsLazy].call(console, object);
|
||||
}
|
||||
|
||||
export { Console, formatTime, kBindProperties, kBindStreamsLazy };
|
||||
export default {
|
||||
Console,
|
||||
kBindStreamsLazy,
|
||||
kBindProperties,
|
||||
formatTime,
|
||||
bindStreamsLazy,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue