From 2dd8992ec7b981266742d98ed599a15ac7d61845 Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Sat, 20 Jul 2024 01:35:07 +0200 Subject: [PATCH] fix: missing `emitWarning` import (#24587) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ext/node/polyfills/_events.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/node/polyfills/_events.mjs b/ext/node/polyfills/_events.mjs index 46afb37b19..163b93d9bc 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); } }