supports-color 5.0.1 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -50,14 +50,15 @@ function supportsColor(stream) {
50
50
  // libuv that enables 256 color output on Windows. Anything earlier and it
51
51
  // won't work. However, here we target Node.js 8 at minimum as it is an LTS
52
52
  // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
53
- // release that supports 256 colors.
53
+ // release that supports 256 colors. Windows 10 build 14931 is the first release
54
+ // that supports 16m/TrueColor.
54
55
  const osRelease = os.release().split('.');
55
56
  if (
56
57
  Number(process.versions.node.split('.')[0]) >= 8 &&
57
58
  Number(osRelease[0]) >= 10 &&
58
59
  Number(osRelease[2]) >= 10586
59
60
  ) {
60
- return 2;
61
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
61
62
  }
62
63
 
63
64
  return 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supports-color",
3
- "version": "5.0.1",
3
+ "version": "5.1.0",
4
4
  "description": "Detect whether a terminal supports color",
5
5
  "license": "MIT",
6
6
  "repository": "chalk/supports-color",