Skip to content

Don't report Node deprecation warnings as script errors - #14616

Merged
sean-mcmanus merged 2 commits into
mainfrom
seanmcm/devbox2-wsl/agent6/no-error-on-node-deprecation-warning
Jul 29, 2026
Merged

Don't report Node deprecation warnings as script errors#14616
sean-mcmanus merged 2 commits into
mainfrom
seanmcm/devbox2-wsl/agent6/no-error-on-node-deprecation-warning

Conversation

@sean-mcmanus

@sean-mcmanus sean-mcmanus commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

yarn install-and-copy-binaries-for-test printed a red ERROR: for a harmless Node [DEP0169] url.parse() deprecation warning that the VS Code CLI writes to stderr, even though the extension installed successfully and the binaries were copied. The script called error() unconditionally whenever the --install-extension subprocess produced any stderr output.

runVSCodeCommand only resolves when the command succeeds (it throws VSCodeCommandError on a non-zero exit), so its stderr here is inherently non-fatal (e.g. Node deprecation warnings). It is now logged with warn() instead of error(), which handles DEP0169 and any future deprecation warning without an allow-list.

The same DEP0169 pattern is also added to the test.ts filterStdio() deny-list, alongside the existing DEP0005 entry, so the yarn test path stays quiet as well.

This PR was created by Copilot with Claude Opus 4.8 (in VS Code). Any PR comments starting with Copilot says: are generated by Copilot.

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the extension’s test/CI helper scripts so that non-fatal stderr output (notably Node deprecation warnings like DEP0169) is not surfaced as a hard error when the underlying VS Code CLI command succeeds. This reduces noisy “ERROR” log output while keeping genuine failures unchanged.

Changes:

  • Treat successful runVSCodeCommand stderr output as a warning (not an error) in installAndCopyBinaries.ts.
  • Suppress DEP0169 deprecation warning lines in test.ts stdout/stderr filtering to keep yarn test output clean.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Extension/.scripts/test.ts Adds DEP0169 to the stdio filter deny-list to suppress harmless Node deprecation output during tests.
Extension/.scripts/installAndCopyBinaries.ts Logs runVSCodeCommand stderr as warn() (non-fatal) rather than error() when the command succeeds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sean-mcmanus
sean-mcmanus merged commit 72d590a into main Jul 29, 2026
6 checks passed
@sean-mcmanus
sean-mcmanus deleted the seanmcm/devbox2-wsl/agent6/no-error-on-node-deprecation-warning branch July 29, 2026 16:56
@github-project-automation github-project-automation Bot moved this from Pull Request to Done in cpptools Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants