1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -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 Bartek Iwańczuk
parent 3fe388ff5f
commit 2dd8992ec7
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750

View file

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