@jsenv/core 39.8.0 → 39.8.1

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/dist/jsenv_core.js +22 -10
  2. package/package.json +7 -7
@@ -118,17 +118,29 @@ if (
118
118
  }
119
119
 
120
120
  function envForceColor() {
121
- if ('FORCE_COLOR' in env) {
122
- if (env.FORCE_COLOR === 'true') {
123
- return 1;
124
- }
121
+ if (!('FORCE_COLOR' in env)) {
122
+ return;
123
+ }
125
124
 
126
- if (env.FORCE_COLOR === 'false') {
127
- return 0;
128
- }
125
+ if (env.FORCE_COLOR === 'true') {
126
+ return 1;
127
+ }
128
+
129
+ if (env.FORCE_COLOR === 'false') {
130
+ return 0;
131
+ }
129
132
 
130
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
133
+ if (env.FORCE_COLOR.length === 0) {
134
+ return 1;
131
135
  }
136
+
137
+ const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
138
+
139
+ if (![0, 1, 2, 3].includes(level)) {
140
+ return;
141
+ }
142
+
143
+ return level;
132
144
  }
133
145
 
134
146
  function translateLevel(level) {
@@ -199,11 +211,11 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
199
211
  }
200
212
 
201
213
  if ('CI' in env) {
202
- if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
214
+ if (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {
203
215
  return 3;
204
216
  }
205
217
 
206
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
218
+ if (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
207
219
  return 1;
208
220
  }
209
221
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "39.8.0",
3
+ "version": "39.8.1",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -74,15 +74,15 @@
74
74
  "@jsenv/humanize": "1.2.8",
75
75
  "@jsenv/importmap": "1.2.1",
76
76
  "@jsenv/integrity": "0.0.2",
77
- "@jsenv/js-module-fallback": "1.3.53",
77
+ "@jsenv/js-module-fallback": "1.3.54",
78
78
  "@jsenv/node-esm-resolution": "1.0.6",
79
- "@jsenv/plugin-bundling": "2.7.20",
79
+ "@jsenv/plugin-bundling": "2.7.21",
80
80
  "@jsenv/plugin-minification": "1.5.12",
81
- "@jsenv/plugin-supervisor": "1.6.0",
82
- "@jsenv/plugin-transpilation": "1.4.88",
81
+ "@jsenv/plugin-supervisor": "1.6.1",
82
+ "@jsenv/plugin-transpilation": "1.4.89",
83
83
  "@jsenv/runtime-compat": "1.3.1",
84
84
  "@jsenv/server": "15.3.3",
85
- "@jsenv/sourcemap": "1.2.28",
85
+ "@jsenv/sourcemap": "1.2.29",
86
86
  "@jsenv/url-meta": "8.5.2",
87
87
  "@jsenv/urls": "2.5.4",
88
88
  "@jsenv/utils": "2.1.2",
@@ -108,7 +108,7 @@
108
108
  "@playwright/browser-firefox": "1.49.1",
109
109
  "@playwright/browser-webkit": "1.49.1",
110
110
  "babel-plugin-transform-async-to-promises": "0.8.18",
111
- "eslint": "9.16.0",
111
+ "eslint": "9.17.0",
112
112
  "open": "10.1.0",
113
113
  "playwright": "1.49.1",
114
114
  "prettier": "3.4.2",