Skip to content

Conversation

@msabramo
Copy link
Contributor

@msabramo msabramo commented Sep 14, 2021

Screen Shot 2021-09-13 at 5 24 30 PM

🎉

The GitHub Actions CI has been failing for a while because the output is
not rendering colored. This is because `test.js` was setting
`FORCE_COLOR=1` but this happens after the `import` of `chalk` and thus
also after the import within chalk of
[`supports-color`](https://www.npmjs.com/package/supports-color)

JS likes imports to be at the top of files before any other logic, so
it's not really possible to set `FORCE_COLOR` any earlier within
`test.js`. But it *is* possible to set it in `package.json` while
invoking `ava`...

Fixes: chalkGH-27
These versions of Node no longer pass tests, I think because
[yargs-parser only supports node >= 10](
https://github.com/yargs/yargs-parser/blob/main/package.json#L79-L81):

```js
  "engines": {
    "node": ">=10"
  },
```
@sindresorhus sindresorhus merged commit 17f70c3 into chalk:bare-nl Sep 14, 2021
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