Skip to content

Conversation

@TooTallNate
Copy link
Contributor

@TooTallNate TooTallNate commented Dec 28, 2017

Before, the level would be 1 when forcing color when the stream is not a TTY.

$ FORCE_COLOR=1 node -p "require('supports-color').stdout" | cat
{ level: 1, hasBasic: true, has256: false, has16m: false }`

Now, the proper level is calculated based on the environment, even when the stream is not a TTY.

$ FORCE_COLOR=1 node -p "require('supports-color').stdout" | cat
{ level: 3, hasBasic: true, has256: true, has16m: true }

Before, the level would be 1 when forcing color when the stream
is not a TTY.

```
$ FORCE_COLOR=1 node -p "require('supports-color').stdout" | cat
{ level: 1, hasBasic: true, has256: false, has16m: false }`
```

Now, the proper level is calculated based on the environment, even
when the stream is not a TTY.

```
$ FORCE_COLOR=1 node -p "require('supports-color').stdout" | cat
{ level: 3, hasBasic: true, has256: true, has16m: true }
```
@Qix- Qix- requested a review from sindresorhus January 17, 2018 10:27
@sindresorhus sindresorhus merged commit b16e9a4 into chalk:master Feb 11, 2018
@sindresorhus
Copy link
Member

Thanks :)

@TooTallNate TooTallNate deleted the update/calculate-level-with-force branch February 11, 2018 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants