Skip to content

Conversation

@rahuld109
Copy link
Contributor

Summary

Removes the kleur dependency by using Node.js native styleText from node:util.

Created a small utility (src/utils/styleText.js) that wraps styleText with a Proxy to support kleur's chainable API - so existing code like kleur.green().bold('text') keeps working without changes.

Also added unit tests covering the different usage patterns (chaining, number values, destructuring, etc).

Changes

  • New src/utils/styleText.js utility
  • Updated 8 files to import from the new utility
  • Removed kleur from dependencies
  • Added 12 unit tests

Testing

  • All tests pass
  • Lint passes

Closes #637

- Add src/utils/styleText.js utility using node:util styleText
- Update all commands to use internal styleText instead of kleur
- Remove kleur dependency from package.json

Closes NodeSecure#637
@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.93%. Comparing base (28ee6a9) to head (7f5421d).
⚠️ Report is 292 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (28ee6a9) and HEAD (7f5421d). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (28ee6a9) HEAD (7f5421d)
6 3
Additional details and impacted files
@@             Coverage Diff              @@
##            master     #639       +/-   ##
============================================
- Coverage   100.00%   57.93%   -42.07%     
============================================
  Files           15       46       +31     
  Lines          649     3461     +2812     
  Branches         0       15       +15     
============================================
+ Hits           649     2005     +1356     
- Misses           0     1456     +1456     

☔ View full report in Codecov by Sentry.
📢 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.

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.

Remove kleur

3 participants