-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(bin/options): correct check for color support (options.color
)
#1555
Conversation
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.
Looks good, due no tests please add comment in code why we use this with link on issue/PR
options.color
)
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.
@jayjun Thx
Codecov Report
@@ Coverage Diff @@
## master #1555 +/- ##
=======================================
Coverage 74.02% 74.02%
=======================================
Files 10 10
Lines 670 670
=======================================
Hits 496 496
Misses 174 174
Continue to review full report at Codecov.
|
For Bugs and Features; did you add new tests?
No, tests would require not setting the option (allow default) and running in different environments (TTY vs. non-TTY). Moreover, supports-color has special behaviour for CIs.
Motivation / Use-Case
Since supports-color 5.0.0 (chalk/supports-color#64),
returns an object instead of the test result. Because an object is truthy, colours are enabled by default irrespective of TTY or
FORCE_COLOR
settings.is the correct way to use supports-color now.
Breaking Changes
None.
Additional Info