Skip to content

Conversation

@erunion
Copy link
Member

@erunion erunion commented Dec 2, 2021

🧰 Changes

This swaps out the colors library for chalk. chalk is a drop-in replacement for colors.

Why?

  1. chalk has a lot more dev support than colors.
  2. I've always loathed how colors works by modifying String.prototype. Sure you can load colors/safe to do colors.green() but that's not the default flow.
  3. oas-normalize and its dependency on @readme/openapi-parser uses it by way of @readme/better-ajv-parser so loading in colors here for yet another way of colorizing CLI messaging is silly.
  4. We've been inconsistent in how we load it in the files that do have colors, so often you'll see text.green and it only works because that command is loaded in ./bin/rdme where require('colors') was present. Woof.
  5. It's got better detection for managing environments where CLI coloring might not be available.

🧬 QA & Testing

  • All tests still pass?

@erunion erunion added the dependencies Pull requests that update a dependency file label Dec 2, 2021
@erunion erunion changed the title feat: swapping our colors for chalk feat: swapping out the colors library for chalk Dec 2, 2021
Copy link
Contributor

@RyanGWU82 RyanGWU82 left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

@erunion erunion merged commit 7f252ae into main Dec 2, 2021
@erunion erunion deleted the feat/swap-colors-for-chalk branch December 2, 2021 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants