@jsenv/test 3.5.32 → 3.5.34

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_test.js +26 -10
  2. package/package.json +5 -5
@@ -578,17 +578,29 @@ if (
578
578
  }
579
579
 
580
580
  function envForceColor() {
581
- if ('FORCE_COLOR' in env) {
582
- if (env.FORCE_COLOR === 'true') {
583
- return 1;
584
- }
581
+ if (!('FORCE_COLOR' in env)) {
582
+ return;
583
+ }
585
584
 
586
- if (env.FORCE_COLOR === 'false') {
587
- return 0;
588
- }
585
+ if (env.FORCE_COLOR === 'true') {
586
+ return 1;
587
+ }
588
+
589
+ if (env.FORCE_COLOR === 'false') {
590
+ return 0;
591
+ }
592
+
593
+ if (env.FORCE_COLOR.length === 0) {
594
+ return 1;
595
+ }
589
596
 
590
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
597
+ const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
598
+
599
+ if (![0, 1, 2, 3].includes(level)) {
600
+ return;
591
601
  }
602
+
603
+ return level;
592
604
  }
593
605
 
594
606
  function translateLevel(level) {
@@ -659,11 +671,11 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
659
671
  }
660
672
 
661
673
  if ('CI' in env) {
662
- if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
674
+ if (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {
663
675
  return 3;
664
676
  }
665
677
 
666
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
678
+ if (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
667
679
  return 1;
668
680
  }
669
681
 
@@ -3192,6 +3204,10 @@ process.platform === "win32";
3192
3204
 
3193
3205
  process.platform === "linux";
3194
3206
 
3207
+ process.platform === "darwin";
3208
+ process.platform === "linux";
3209
+ process.platform === "freebsd";
3210
+
3195
3211
  const normalizeFileByFileCoveragePaths = (
3196
3212
  fileByFileCoverage,
3197
3213
  rootDirectoryUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/test",
3
- "version": "3.5.32",
3
+ "version": "3.5.34",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,12 +39,12 @@
39
39
  "@jsenv/abort": "4.3.0",
40
40
  "@jsenv/ast": "6.4.1",
41
41
  "@jsenv/exception": "1.1.3",
42
- "@jsenv/filesystem": "4.12.0",
42
+ "@jsenv/filesystem": "4.13.0",
43
43
  "@jsenv/github-check-run": "0.2.5",
44
44
  "@jsenv/node-esm-resolution": "1.0.6",
45
45
  "@jsenv/humanize": "1.2.8",
46
- "@jsenv/plugin-supervisor": "1.6.0",
47
- "@jsenv/sourcemap": "1.2.28",
46
+ "@jsenv/plugin-supervisor": "1.6.1",
47
+ "@jsenv/sourcemap": "1.2.29",
48
48
  "@jsenv/url-meta": "8.5.2",
49
49
  "@jsenv/urls": "2.5.4",
50
50
  "@jsenv/utils": "2.1.2",
@@ -55,7 +55,7 @@
55
55
  "istanbul-reports": "3.1.7",
56
56
  "pidtree": "0.6.0",
57
57
  "strip-ansi": "7.1.0",
58
- "supports-color": "9.4.0",
58
+ "supports-color": "10.0.0",
59
59
  "v8-to-istanbul": "9.3.0"
60
60
  }
61
61
  }