From ea01a758e0b528d0448336623297d1831edd2782 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 11 Nov 2025 20:32:49 +0100 Subject: [PATCH] Suppress punycode deprecation warning from dependencies --- packages/coding-agent/src/cli.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/coding-agent/src/cli.ts b/packages/coding-agent/src/cli.ts index 64c14e8c..0264f537 100644 --- a/packages/coding-agent/src/cli.ts +++ b/packages/coding-agent/src/cli.ts @@ -1,5 +1,20 @@ #!/usr/bin/env node +// Suppress punycode deprecation warning from dependencies +// This warning comes from old dependencies still using the deprecated punycode module +const originalEmit = process.emit; +// @ts-expect-error - Monkey-patch emit to filter warnings +process.emit = (event, ...args) => { + if (event === "warning") { + const warning = args[0] as any; + if (warning?.name === "DeprecationWarning" && warning?.code === "DEP0040") { + return false; // Suppress punycode deprecation + } + } + // @ts-expect-error - Call original with event and args + return originalEmit.apply(process, [event, ...args]); +}; + import { main } from "./main.js"; main(process.argv.slice(2)).catch((err) => {