Skip to content

util: styleText the error message should include the color alias#59383

Open
btea wants to merge 4 commits intonodejs:mainfrom
btea:util/error-msg-include-color-alias
Open

util: styleText the error message should include the color alias#59383
btea wants to merge 4 commits intonodejs:mainfrom
btea:util/error-msg-include-color-alias

Conversation

@btea
Copy link
Contributor

@btea btea commented Aug 7, 2025

validateOneOf(key, 'format', ObjectKeys(inspect.colors));

When enumerable is false, ObjectKeys cannot obtain the color alias.

Based on the original comment this seems to be intentional, but I think printing the alias information makes more sense.

@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 Aug 7, 2025
@codecov
Copy link

codecov bot commented Aug 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.65%. Comparing base (35d3bc8) to head (9ef3f10).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #59383      +/-   ##
==========================================
- Coverage   89.65%   89.65%   -0.01%     
==========================================
  Files         676      676              
  Lines      206231   206231              
  Branches    39505    39501       -4     
==========================================
- Hits       184898   184892       -6     
- Misses      13463    13469       +6     
  Partials     7870     7870              
Files with missing lines Coverage Δ
lib/internal/util/inspect.js 99.60% <100.00%> (-0.07%) ⬇️

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