-
Notifications
You must be signed in to change notification settings - Fork 1k
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(colors): Add more chalk colors. And prepare for chalk upgrade #10939
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tobbe
force-pushed
the
tobbe-chalk-colors
branch
from
July 12, 2024 08:57
e9bbeb2
to
81691e0
Compare
Tobbe
commented
Jul 12, 2024
@@ -125,7 +125,8 @@ export const formatMessage = (logData: any) => { | |||
pretty = chalk.white(msg) | |||
} | |||
if (level === 'warn') { | |||
pretty = chalk.magenta(msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched from magenta to orange here to align with the color we use for warnings in other places in Redwood
Tobbe
added
release:breaking
This PR is a breaking change
and removed
release:chore
This PR is a chore (means nothing for users)
labels
Jul 12, 2024
Tobbe
changed the title
chore(colors): Add more chalk colors. And prepare for chalk upgrade
feat(colors): Add more chalk colors. And prepare for chalk upgrade
Jul 12, 2024
dac09
pushed a commit
to dac09/redwood
that referenced
this pull request
Jul 15, 2024
…g-dual * 'main' of github.com:redwoodjs/redwood: chore(web): Use attw args instead of custom output parsing (redwoodjs#10944) chore(web): publint and attw (redwoodjs#10943) chore(auth): Fix esm cjs exports and add tooling to verify correctness (redwoodjs#10942) chore(middleware): Move middleware out of rwjs/vite -> rwjs/web/middleware (redwoodjs#10917) feat(colors): Add more chalk colors. And prepare for chalk upgrade (redwoodjs#10939) fix(g directive): Notes formatting (redwoodjs#10940)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of (ab)using
colors.error
just to get a red color,colors.warning
just to get an orange color etc, let's define a few more useful colors.The names I've chosen for the colors are from https://github.com/orgs/community/discussions/16925
And that also includes some good guidelines/hints on how/when to use the different colors.
This is what the different colors look like in my terminal. Depending on your selected color scheme they might be different for you
In addition to all this I also stopped using
keyword
as chalk v4 (which we're using) is the last version to support that. So for upgrading to v6 (current latest) we can't use that anymore. The hex code I picked is what chalk use in their docs/code as an equivalent tokeyword('orange')
.And for completeness, here are the rest of the colors
This is breaking because we no longer export
green
as a color. Usetip
orsuccess
instead depending on what you want to convey.