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

supportsColor.level => supportsColor.stdout.level #521

Closed
wants to merge 1 commit into from
Closed

supportsColor.level => supportsColor.stdout.level #521

wants to merge 1 commit into from

Conversation

cw881014
Copy link

@cw881014 cw881014 commented Nov 8, 2017

you wrote wrong

console.log(supportsColor.level)
undefined

console.log(supportsColor.stdout.level >= 2)
true

you wrote wrong

console.log(supportsColor.level)
undefined

console.log(supportsColor.stdout.level >= 2)

true
@coveralls
Copy link

coveralls commented Nov 8, 2017

Coverage Status

Coverage increased (+1.2%) to 75.0% when pulling c7a4989 on cw881014:patch-1 into 7116906 on visionmedia:master.

@TooTallNate
Copy link
Contributor

This is because of supports-color@5 breaking API change (/cc @Qix-).

It's probably easy enough to check both APIs for now in debug?

@Qix-
Copy link
Member

Qix- commented Nov 8, 2017

Yeah so use (supportsColor.stdout || supportsColor).level and then probably use stderr because I believe we use it instead of stdout (can you confirm @TooTallNate?)

@TooTallNate
Copy link
Contributor

Yes, supportsColor.stderr please.

@realityking
Copy link
Contributor

This can be closed, it was fixed with 285dfe1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants