summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Hagemeister <marvin@deno.com>2024-07-20 01:35:07 +0200
committerGitHub <noreply@github.com>2024-07-19 23:35:07 +0000
commitc77b8b96efa083e75fb2b437935c0b1f58b79ccd (patch)
tree59450e3e86afab7a99d564bb38dfbf42ac30cb49
parentafcae364beb2cffa8e583b4ffd3a55b59336cb1b (diff)
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>
-rw-r--r--ext/node/polyfills/_events.mjs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/node/polyfills/_events.mjs b/ext/node/polyfills/_events.mjs
index 46afb37b1..163b93d9b 100644
--- a/ext/node/polyfills/_events.mjs
+++ b/ext/node/polyfills/_events.mjs
@@ -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);
}
}