supports-color 4.3.0 → 4.4.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 +9 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -41,14 +41,6 @@ let supportLevel = (() => {
41
41
  return 1;
42
42
  }
43
43
 
44
- if ('CI' in env) {
45
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env)) {
46
- return 1;
47
- }
48
-
49
- return 0;
50
- }
51
-
52
44
  if (process.stdout && !process.stdout.isTTY) {
53
45
  return 0;
54
46
  }
@@ -71,6 +63,14 @@ let supportLevel = (() => {
71
63
  return 1;
72
64
  }
73
65
 
66
+ if ('CI' in env) {
67
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
68
+ return 1;
69
+ }
70
+
71
+ return 0;
72
+ }
73
+
74
74
  if ('TEAMCITY_VERSION' in env) {
75
75
  return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
76
76
  }
@@ -89,7 +89,7 @@ let supportLevel = (() => {
89
89
  }
90
90
  }
91
91
 
92
- if (/^(screen|xterm)-256(?:color)?/.test(env.TERM)) {
92
+ if (/-256(color)?$/i.test(env.TERM)) {
93
93
  return 2;
94
94
  }
95
95
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supports-color",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "description": "Detect whether a terminal supports color",
5
5
  "license": "MIT",
6
6
  "repository": "chalk/supports-color",