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

fix(bin/options): correct check for color support (options.color) #1555

merged 2 commits into from Oct 30, 2018


Copy link

@jayjun jayjun commented Oct 30, 2018

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

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),

return require("supports-color")

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.

return require("supports-color").stdout

is the correct way to use supports-color now.

Breaking Changes


Additional Info

Copy link

@alexander-akait alexander-akait left a comment

Looks good, due no tests please add comment in code why we use this with link on issue/PR

@alexander-akait alexander-akait added this to the 3.1.11 milestone Oct 30, 2018
@michael-ciniawsky michael-ciniawsky changed the title fix(options): fix color option fix(bin/options): correct check for color support (options.color) Oct 30, 2018
Copy link

@michael-ciniawsky michael-ciniawsky left a comment

@jayjun Thx

Copy link

@codecov codecov bot commented Oct 30, 2018

Codecov Report

Merging #1555 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1555   +/-   ##
  Coverage   74.02%   74.02%           
  Files          10       10           
  Lines         670      670           
  Hits          496      496           
  Misses        174      174
Impacted Files Coverage Δ
bin/options.js 100% <100%> (ø) ⬆️
lib/Server.js 81.36% <0%> (ø) ⬆️
bin/utils.js 44.44% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 927a2b3...a1493fb. Read the comment docs.

@michael-ciniawsky michael-ciniawsky merged commit 55398b5 into webpack:master Oct 30, 2018
1 of 3 checks passed
@jayjun jayjun deleted the color branch Oct 30, 2018
matheus1lva pushed a commit to matheus1lva/GrCartuchos that referenced this issue Dec 21, 2018
## The devDependency [webpack-dev-server]( was updated from `3.1.10` to `3.1.11`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.


<summary>Release Notes for v3.1.11</summary>

<p><a name="user-content-3.1.11"></a></p>
<h2><a href="">3.1.11</a> (2018-12-21)</h2>
<h3>Bug Fixes</h3>
<li><strong>bin/options:</strong> correct check for color support (<code>options.color</code>) (<a href="" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack-dev-server/pull/1555/hovercard">#1555</a>) (<a href="">55398b5</a>)</li>
<li><strong>package:</strong> update <code>spdy</code> v3.4.1...4.0.0 (assertion error) (<a href="" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack-dev-server/issues/1491/hovercard">#1491</a>) (<a href="" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack-dev-server/pull/1563/hovercard">#1563</a>) (<a href="">7a3a257</a>)</li>
<li><strong>Server:</strong> correct <code>node</code> version checks (<a href="" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack-dev-server/pull/1543/hovercard">#1543</a>) (<a href="">927a2b3</a>)</li>
<li><strong>Server:</strong> mime type for wasm in contentBase directory (<a href="" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack-dev-server/issues/1575/hovercard">#1575</a>) (<a href="" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack-dev-server/pull/1580/hovercard">#1580</a>) (<a href="">fadae5d</a>)</li>
<li>add url for compatibility with webpack@5 (<a href="" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack-dev-server/issues/1598/hovercard">#1598</a>) (<a href="" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack-dev-server/pull/1599/hovercard">#1599</a>) (<a href="">68dd49a</a>)</li>
<li>check origin header for websocket connection (<a href="" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack-dev-server/pull/1603/hovercard">#1603</a>) (<a href="">b3217ca</a>)</li>

<p>The new version differs by 9 commits.</p>
<li><a href=""><code>ff2874f</code></a> <code>chore(release): 3.1.11</code></li>
<li><a href=""><code>b3217ca</code></a> <code>fix: check origin header for websocket connection (#1603)</code></li>
<li><a href=""><code>68dd49a</code></a> <code>fix: add url for compatibility with webpack@5 (#1598) (#1599)</code></li>
<li><a href=""><code>fadae5d</code></a> <code>fix(Server): mime type for wasm in contentBase directory (#1575) (#1580)</code></li>
<li><a href=""><code>7a3a257</code></a> <code>fix(package): update <code>spdy</code> v3.4.1...4.0.0 (assertion error) (#1491) (#1563)</code></li>
<li><a href=""><code>1fe82de</code></a> <code>ci(travis): Node 11 (on OS X) crashes, use 10 for now (#1588)</code></li>
<li><a href=""><code>55398b5</code></a> <code>fix(bin/options): correct check for color support (<code>options.color</code>) (#1555)</code></li>
<li><a href=""><code>927a2b3</code></a> <code>fix(Server): correct <code>node</code> version checks (#1543)</code></li>
<li><a href=""><code>fa96a76</code></a> <code>chore(PULL_REQUEST_TEMPLATE): allow features (#1539)</code></li>
<p>See the <a href="">full diff</a></p>

  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions]( If those don’t help, you can always [ask the humans behind Greenkeeper](


Your [Greenkeeper]( bot 🌴
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants