@jsenv/core 39.0.2 → 39.0.4
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.
- package/dist/jsenv_core.js +24 -8
- package/package.json +11 -11
package/dist/jsenv_core.js
CHANGED
|
@@ -811,19 +811,35 @@ const createAnsi = ({ supported }) => {
|
|
|
811
811
|
MAGENTA: "\x1b[35m",
|
|
812
812
|
CYAN: "\x1b[36m",
|
|
813
813
|
GREY: "\x1b[90m",
|
|
814
|
-
color: (text,
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
814
|
+
color: (text, color) => {
|
|
815
|
+
if (!ANSI.supported) {
|
|
816
|
+
return text;
|
|
817
|
+
}
|
|
818
|
+
if (!color) {
|
|
819
|
+
return text;
|
|
820
|
+
}
|
|
821
|
+
if (text && text.trim() === "") {
|
|
822
|
+
// cannot set color of blank chars
|
|
823
|
+
return text;
|
|
824
|
+
}
|
|
825
|
+
return `${color}${text}${RESET}`;
|
|
818
826
|
},
|
|
819
827
|
|
|
820
828
|
BOLD: "\x1b[1m",
|
|
821
829
|
UNDERLINE: "\x1b[4m",
|
|
822
830
|
STRIKE: "\x1b[9m",
|
|
823
|
-
effect: (text,
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
831
|
+
effect: (text, effect) => {
|
|
832
|
+
if (!ANSI.supported) {
|
|
833
|
+
return text;
|
|
834
|
+
}
|
|
835
|
+
if (!effect) {
|
|
836
|
+
return text;
|
|
837
|
+
}
|
|
838
|
+
// cannot add effect to empty string
|
|
839
|
+
if (text === "") {
|
|
840
|
+
return text;
|
|
841
|
+
}
|
|
842
|
+
return `${effect}${text}${RESET}`;
|
|
827
843
|
},
|
|
828
844
|
};
|
|
829
845
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "39.0.
|
|
3
|
+
"version": "39.0.4",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -66,22 +66,22 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@financial-times/polyfill-useragent-normaliser": "1.10.2",
|
|
68
68
|
"@jsenv/abort": "4.3.0",
|
|
69
|
-
"@jsenv/ast": "6.1.
|
|
70
|
-
"@jsenv/filesystem": "4.7.
|
|
71
|
-
"@jsenv/humanize": "1.2.
|
|
69
|
+
"@jsenv/ast": "6.1.4",
|
|
70
|
+
"@jsenv/filesystem": "4.7.5",
|
|
71
|
+
"@jsenv/humanize": "1.2.2",
|
|
72
72
|
"@jsenv/importmap": "1.2.1",
|
|
73
73
|
"@jsenv/integrity": "0.0.2",
|
|
74
|
-
"@jsenv/js-module-fallback": "1.3.
|
|
74
|
+
"@jsenv/js-module-fallback": "1.3.21",
|
|
75
75
|
"@jsenv/node-esm-resolution": "1.0.2",
|
|
76
|
-
"@jsenv/plugin-bundling": "2.6.
|
|
76
|
+
"@jsenv/plugin-bundling": "2.6.15",
|
|
77
77
|
"@jsenv/plugin-minification": "1.5.4",
|
|
78
|
-
"@jsenv/plugin-supervisor": "1.4.
|
|
79
|
-
"@jsenv/plugin-transpilation": "1.4.
|
|
78
|
+
"@jsenv/plugin-supervisor": "1.4.16",
|
|
79
|
+
"@jsenv/plugin-transpilation": "1.4.4",
|
|
80
80
|
"@jsenv/runtime-compat": "1.3.0",
|
|
81
|
-
"@jsenv/server": "15.2.
|
|
82
|
-
"@jsenv/sourcemap": "1.2.
|
|
81
|
+
"@jsenv/server": "15.2.12",
|
|
82
|
+
"@jsenv/sourcemap": "1.2.13",
|
|
83
83
|
"@jsenv/url-meta": "8.4.2",
|
|
84
|
-
"@jsenv/urls": "2.2.
|
|
84
|
+
"@jsenv/urls": "2.2.10",
|
|
85
85
|
"@jsenv/utils": "2.1.1"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|