Skip to content

fix: Console.log to console.error #58369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mrigueti
Copy link

watch: print diagnostics messages to stderr instead of stdout

This fixes an issue where watch mode diagnostics were being printed to
stdout, which could interfere with the actual output of programs that
use stdout for their normal output. According to convention, diagnostic
and status messages should be directed to stderr.

Fixes: #56478

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label May 17, 2025
@mrigueti mrigueti changed the title Console.log to console.error fix: Console.log to console.error May 17, 2025
Copy link

codecov bot commented May 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.22%. Comparing base (4edb139) to head (562fba5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58369      +/-   ##
==========================================
- Coverage   90.24%   90.22%   -0.02%     
==========================================
  Files         633      633              
  Lines      186860   186860              
  Branches    36675    36674       -1     
==========================================
- Hits       168623   168596      -27     
- Misses      11035    11058      +23     
- Partials     7202     7206       +4     

see 37 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@@ -175,7 +175,7 @@ async function init() {

init();

// Exiting gracefully to avoid stdout/stderr getting written after
// Exiting gracefully to avoid stderr/stderr getting written after
Copy link
Contributor

Choose a reason for hiding this comment

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

That doesn't sound right

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--watch prints messages to stdout, but should print to stderr
3 participants