Skip to content

refactor: replace chalk with util.styleText - #1183

Merged
panva merged 1 commit into
nodejs:mainfrom
trivikr:remove-chalk
Sep 5, 2026
Merged

refactor: replace chalk with util.styleText#1183
panva merged 1 commit into
nodejs:mainfrom
trivikr:remove-chalk

Conversation

@trivikr

@trivikr trivikr commented Sep 3, 2026

Copy link
Copy Markdown
Member

Replace chalk with Node.js’s built-in util.styleText().

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.81%. Comparing base (c2a22c1) to head (7f62041).

Files with missing lines Patch % Lines
lib/ci/build-types/test_build.js 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1183      +/-   ##
==========================================
- Coverage   57.81%   57.81%   -0.01%     
==========================================
  Files          53       53              
  Lines       10398    10396       -2     
==========================================
- Hits         6012     6010       -2     
  Misses       4386     4386              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

Comment thread lib/verbosity.js
export function debuglog(...args) {
// Prepend a line break in case it's logged while the spinner is running
console.error(chalk.green(util.format('\n[DEBUG]', ...args)));
console.error(styleText('green', format('\n[DEBUG]', ...args)));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unrelated to this PR, but as a drive-by, wouldn't we want the line break before the styleText sequence?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ideally it should be. I'll pick it up in a follow-up PR.

@panva
panva merged commit 37fc1f5 into nodejs:main Sep 5, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants