mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 04:51:22 +00: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
@ -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 New Issue
Block a user