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

Do not clobber forked process color level. #1713

Closed
wants to merge 1 commit into from

Conversation

jamiebuilds
Copy link
Contributor

Cherry picked changes from #1455 to resolve #1701


Chalk uses supports-color to determine what color level should be
rendered. However, currently our parent ava process uses that to
colorize its output, however, when we fork our test processes we clobber
the color configuration that supports-color uses to determine the
level (see https://github.com/chalk/supports-color/blob/master/index.js#L37-L42)

This PR carries the current color level through to the forked processes
so if they log output that is colorized it will remain so with the same
fidelity of colors as the parent ava process.

Chalk uses `supports-color` to determine what color level should be
rendered. However, currently our parent `ava` process uses that to
colorize its output, however, when we fork our test processes we clobber
the color configuration that `supports-color` uses to determine the
level (see https://github.com/chalk/supports-color/blob/master/index.js#L37-L42)

This PR carries the current color level through to the forked processes
so if they log output that is colorized it will remain so with the same
fidelity of colors as the parent ava process.
@novemberborn
Copy link
Member

Thanks @jamiebuilds. What do you think about bundling chalk and supports-color with AVA? That's the contention in #1701 that still needs to be resolved. (Please respond there instead.)

@novemberborn
Copy link
Member

We should make some more changes, see #1701 (comment). I still need to land #1722 though.

@novemberborn novemberborn added the blocked waiting on something else to be resolved first label Apr 2, 2018
@novemberborn
Copy link
Member

Closing due to inactivity. There's been changes in how AVA uses chalk, so we need a slightly different approach. See #1701 (comment).

@jamiebuilds jamiebuilds deleted the colorlvl branch April 22, 2018 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked waiting on something else to be resolved first
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure workers inherit color level from main process
3 participants