Skip to content

Conversation

@SethFalco
Copy link
Member

@SethFalco SethFalco commented Oct 28, 2025

Description

I recently learned that Node.js v20/v21 introduces a simple style API for doing things like color in the terminal. That can replace libraries like chalk, yoctacolor, picocolor, etc.

This doesn't make those other libraries redundant, some of them have their own perks. However, for an application like this, I think using the standard library would be better suited.

As this project already requires Node.js v22 or higher, it should be perfectly safe to use in that regard.

⚠️ Breaking Change

There is a minor difference in config between chalk and the standard library.

Namely:

  • chalk uses overline while stdlib uses overlined
  • chalk has a visible option while stdlib has no such option

I believe the API's overlap in regarding all other properties. We could preserve the backward compatibility more fully by adding our own aliases for these, but I'm not sure if it's worthwhile.

Not Breaking Change

Actually, this is not a breaking change. I see in the code that we hardcoded a list of valid values for the theme, which do not include visible or overline/overlined anyway. As those are the only differences in terms of keywords, I believe this should be backward compatible. 🎉

Checklist

Please review this checklist before submitting a pull request.

  • Code compiles correctly
  • Created tests, if possible
  • All tests passing (npm run test:all)
  • Extended the README / documentation, if necessary

Related

@kbdharun kbdharun added the hacktoberfest-accepted PRs which are eligible for hacktoberfest but won't get merged before 31st label Oct 28, 2025
@SethFalco SethFalco force-pushed the colors branch 2 times, most recently from 9833425 to 71193ee Compare October 30, 2025 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PRs which are eligible for hacktoberfest but won't get merged before 31st

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants