Skip to content

util: add CSS support to formatting - #65942

Open
avivkeller wants to merge 1 commit into
nodejs:mainfrom
avivkeller:util-format-c
Open

util: add CSS support to formatting#65942
avivkeller wants to merge 1 commit into
nodejs:mainfrom
avivkeller:util-format-c

Conversation

@avivkeller

Copy link
Copy Markdown
Member

Ref: #52350
Fixes: #49205

This builds on #49205 (staled out) to add %c support to util.inspect for basic colors and CSS.

Co-Authored-By: Jacob Hummer <jcbhmr@outlook.com>
Signed-off-by: Aviv Keller <me@aviv.sh>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Sep 9, 2026
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 61.61826% with 185 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.12%. Comparing base (fd6682c) to head (68a7c4c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/util/css_to_ansi.js 59.86% 185 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65942      +/-   ##
==========================================
- Coverage   90.16%   90.12%   -0.04%     
==========================================
  Files         771      772       +1     
  Lines      265445   265925     +480     
  Branches    50455    50501      +46     
==========================================
+ Hits       239329   239674     +345     
- Misses      17056    17189     +133     
- Partials     9060     9062       +2     
Files with missing lines Coverage Δ
lib/internal/util/inspect.js 97.08% <100.00%> (+0.01%) ⬆️
lib/internal/util/css_to_ansi.js 59.86% <59.86%> (ø)

... and 38 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.

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. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants