1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

fix: missing emitWarning import (#24587)

We were missing an import of `emitWarning` in our streams
implementation. The code prior to this PR assumed that `process` would
be available as a global.

Fixes https://github.com/denoland/deno/issues/23709

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Marvin Hagemeister 2024-07-20 01:35:07 +02:00 committed by GitHub
parent afcae364be
commit c77b8b96ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,6 +46,7 @@ import {
} from "ext:deno_node/internal/validators.mjs"; } from "ext:deno_node/internal/validators.mjs";
import { spliceOne } from "ext:deno_node/_utils.ts"; import { spliceOne } from "ext:deno_node/_utils.ts";
import { nextTick } from "ext:deno_node/_process/process.ts"; import { nextTick } from "ext:deno_node/_process/process.ts";
import { nodeGlobals } from "ext:deno_node/00_globals.js";
const kCapture = Symbol("kCapture"); const kCapture = Symbol("kCapture");
const kErrorMonitor = Symbol("events.errorMonitor"); const kErrorMonitor = Symbol("events.errorMonitor");
@ -468,7 +469,7 @@ function _addListener(target, type, listener, prepend) {
w.emitter = target; w.emitter = target;
w.type = type; w.type = type;
w.count = existing.length; w.count = existing.length;
process.emitWarning(w); nodeGlobals.process.emitWarning(w);
} }
} }