From d5a134a080a6e7db70782b96e00862720ff103ed Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Wed, 29 Jul 2026 14:46:07 +0000 Subject: [PATCH] Don't report Node deprecation warnings as script errors runVSCodeCommand only resolves on success (it throws on a non-zero exit), so its stderr is non-fatal output such as the Node [DEP0169] url.parse() deprecation warning emitted by the VS Code CLI. Log it as a warning instead of an error in installAndCopyBinaries.ts, and add DEP0169 to the test.ts stdio filter list. --- Extension/.scripts/installAndCopyBinaries.ts | 6 ++++-- Extension/.scripts/test.ts | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Extension/.scripts/installAndCopyBinaries.ts b/Extension/.scripts/installAndCopyBinaries.ts index 69f7f3b37..4eb6a4054 100644 --- a/Extension/.scripts/installAndCopyBinaries.ts +++ b/Extension/.scripts/installAndCopyBinaries.ts @@ -6,7 +6,7 @@ import { runVSCodeCommand } from '@vscode/test-electron'; import { writeFile } from 'node:fs/promises'; import { join } from 'node:path'; -import { $root, error, heading, note } from './common'; +import { $root, error, heading, note, warn } from './common'; import * as copy from './copyExtensionBinaries'; import { install, isolated, options } from "./vscode"; @@ -24,7 +24,9 @@ export async function main() { console.log(result.stdout.toString()); } if (result.stderr) { - error(result.stderr.toString()); + // runVSCodeCommand resolves only when the command succeeds (it throws on a non-zero exit), so stderr here is + // non-fatal output such as Node deprecation warnings and must not be reported as an error. + warn(result.stderr.toString()); } const binaryVersion = await copy.main(isolated); diff --git a/Extension/.scripts/test.ts b/Extension/.scripts/test.ts index 033d7010c..300963684 100644 --- a/Extension/.scripts/test.ts +++ b/Extension/.scripts/test.ts @@ -27,6 +27,7 @@ const filters = [ /^Unexpected token A/, /Cannot register 'cmake.cmakePath'/, /\[DEP0005\] DeprecationWarning/, + /\[DEP0169\] DeprecationWarning/, /--trace-deprecation/, /Iconv-lite warning/, /^Extension '/,