Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: swapping out the colors library for chalk #396

Merged
merged 2 commits into from
Dec 2, 2021

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! 🎉

.github/dependabot.yml Show resolved Hide resolved
@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.

2 participants