@jsenv/humanize 1.1.2 → 1.2.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.
- package/dist/browser/jsenv_humanize_browser.js +3 -0
- package/dist/node/jsenv_humanize_node.js +5 -1
- package/package.json +1 -1
- package/src/.jsenv/jsenv_tests_output.txt +21 -23
- package/src/_tests/js_value/regexp.test.js +1 -0
- package/src/ansi/ansi_node.js +1 -0
- package/src/unicode/unicode_node.js +1 -1
- package/src/unicode/unicode_runtime_agnostic.js +3 -0
|
@@ -68,6 +68,9 @@ const createUnicode = ({
|
|
|
68
68
|
get CIRCLE_CROSS_RAW() {
|
|
69
69
|
return UNICODE.supported ? "\u24E7" : "(\xD7)";
|
|
70
70
|
},
|
|
71
|
+
get CIRCLE_DOTTED_RAW() {
|
|
72
|
+
return UNICODE.supported ? "\u25CC" : "*";
|
|
73
|
+
},
|
|
71
74
|
get COMMAND() {
|
|
72
75
|
return ANSI.color(UNICODE.COMMAND_RAW, ANSI.GREY); // ANSI_MAGENTA)
|
|
73
76
|
},
|
|
@@ -236,6 +236,7 @@ const processSupportsBasicColor = createSupportsColor(process.stdout).hasBasic;
|
|
|
236
236
|
|
|
237
237
|
const ANSI = createAnsi({
|
|
238
238
|
supported:
|
|
239
|
+
process.env.FORCE_COLOR === "1" ||
|
|
239
240
|
processSupportsBasicColor ||
|
|
240
241
|
// GitHub workflow does support ANSI but "supports-color" returns false
|
|
241
242
|
// because stream.isTTY returns false, see https://github.com/actions/runner/issues/241
|
|
@@ -283,6 +284,9 @@ const createUnicode = ({ supported, ANSI }) => {
|
|
|
283
284
|
get CIRCLE_CROSS_RAW() {
|
|
284
285
|
return UNICODE.supported ? `ⓧ` : `(×)`;
|
|
285
286
|
},
|
|
287
|
+
get CIRCLE_DOTTED_RAW() {
|
|
288
|
+
return UNICODE.supported ? `◌` : `*`;
|
|
289
|
+
},
|
|
286
290
|
get COMMAND() {
|
|
287
291
|
return ANSI.color(UNICODE.COMMAND_RAW, ANSI.GREY); // ANSI_MAGENTA)
|
|
288
292
|
},
|
|
@@ -312,7 +316,7 @@ const createUnicode = ({ supported, ANSI }) => {
|
|
|
312
316
|
};
|
|
313
317
|
|
|
314
318
|
const UNICODE = createUnicode({
|
|
315
|
-
supported: isUnicodeSupported(),
|
|
319
|
+
supported: process.env.FORCE_UNICODE === "1" || isUnicodeSupported(),
|
|
316
320
|
ANSI,
|
|
317
321
|
});
|
|
318
322
|
|
package/package.json
CHANGED
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
------------ 23 executions ready ------------
|
|
2
|
+
directory: /Users/damien.maillard/dev/perso/jsenv-core/packages/independent/humanize/src
|
|
3
3
|
---------------------------------------------
|
|
4
|
-
|
|
5
4
|
✔ 01/23 _tests/byte/file_size.test.js [node/0.03s] (1 completed)
|
|
6
5
|
✔ 02/23 _tests/byte/memory.test.js [node/0.03s] (2 completed)
|
|
7
6
|
✔ 03/23 _tests/content_frame/content_frame.test.js [node/0.07s] (3 completed)
|
|
8
|
-
✔ 04/23 _tests/js_value/_inspect.test.html [chromium/0.
|
|
7
|
+
✔ 04/23 _tests/js_value/_inspect.test.html [chromium/0.4s] (4 completed)
|
|
9
8
|
✔ 05/23 _tests/js_value/_inspect.test.html [firefox/0.1s] (5 completed)
|
|
10
|
-
✔ 06/23 _tests/js_value/_inspect.test.html [webkit/0.
|
|
9
|
+
✔ 06/23 _tests/js_value/_inspect.test.html [webkit/0.4s] (6 completed)
|
|
11
10
|
✔ 07/23 _tests/js_value/array.test.js [node/0.03s] (7 completed)
|
|
12
11
|
✔ 08/23 _tests/js_value/biginit.test.js [node/0.03s] (8 completed)
|
|
13
|
-
✔ 09/23 _tests/js_value/boolean.test.js [node/0.
|
|
14
|
-
✔ 10/23 _tests/js_value/date.test.js [node/0.
|
|
15
|
-
✔ 11/23 _tests/js_value/error.test.js [node/0.
|
|
12
|
+
✔ 09/23 _tests/js_value/boolean.test.js [node/0.06s] (9 completed)
|
|
13
|
+
✔ 10/23 _tests/js_value/date.test.js [node/0.05s] (10 completed)
|
|
14
|
+
✔ 11/23 _tests/js_value/error.test.js [node/0.07s] (11 completed)
|
|
16
15
|
✔ 12/23 _tests/js_value/function.test.js [node/0.04s] (12 completed)
|
|
17
|
-
✔ 13/23 _tests/js_value/instance.test.js [node/0.
|
|
18
|
-
✔ 14/23 _tests/js_value/null.test.js [node/0.
|
|
19
|
-
✔ 15/23 _tests/js_value/number.test.js [node/0.
|
|
20
|
-
✔ 16/23 _tests/js_value/object.test.js [node/0.
|
|
21
|
-
✔ 17/23 _tests/js_value/regexp.test.js [node/0.
|
|
22
|
-
✔ 18/23 _tests/js_value/string.test.js [node/0.
|
|
23
|
-
✔ 19/23 _tests/js_value/symbol.test.js [node/0.
|
|
24
|
-
✔ 20/23 _tests/js_value/undefined.test.js [node/0.
|
|
25
|
-
✔ 21/23 _tests/time/decimals.test.js [node/0.
|
|
26
|
-
✔ 22/23 _tests/time/duration.test.js [node/0.
|
|
27
|
-
✔ 23/23 _tests/time/ellapsed.test.js [node/0.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
duration: 2.4s (setup: 0.4s, execution: 2.3s, teardown: 0.2s)
|
|
16
|
+
✔ 13/23 _tests/js_value/instance.test.js [node/0.04s] (13 completed)
|
|
17
|
+
✔ 14/23 _tests/js_value/null.test.js [node/0.03s] (14 completed)
|
|
18
|
+
✔ 15/23 _tests/js_value/number.test.js [node/0.05s] (15 completed)
|
|
19
|
+
✔ 16/23 _tests/js_value/object.test.js [node/0.06s] (16 completed)
|
|
20
|
+
✔ 17/23 _tests/js_value/regexp.test.js [node/0.04s] (17 completed)
|
|
21
|
+
✔ 18/23 _tests/js_value/string.test.js [node/0.03s] (18 completed)
|
|
22
|
+
✔ 19/23 _tests/js_value/symbol.test.js [node/0.04s] (19 completed)
|
|
23
|
+
✔ 20/23 _tests/js_value/undefined.test.js [node/0.04s] (20 completed)
|
|
24
|
+
✔ 21/23 _tests/time/decimals.test.js [node/0.05s] (21 completed)
|
|
25
|
+
✔ 22/23 _tests/time/duration.test.js [node/0.05s] (22 completed)
|
|
26
|
+
✔ 23/23 _tests/time/ellapsed.test.js [node/0.04s] (all completed)
|
|
27
|
+
------------ 23 executions done -------------
|
|
28
|
+
status: all completed
|
|
29
|
+
duration: 2.5s (setup: 0.4s, execution: 2.4s, teardown: 0.2s)
|
|
32
30
|
---------------------------------------------
|
package/src/ansi/ansi_node.js
CHANGED
|
@@ -5,6 +5,7 @@ const processSupportsBasicColor = createSupportsColor(process.stdout).hasBasic;
|
|
|
5
5
|
|
|
6
6
|
export const ANSI = createAnsi({
|
|
7
7
|
supported:
|
|
8
|
+
process.env.FORCE_COLOR === "1" ||
|
|
8
9
|
processSupportsBasicColor ||
|
|
9
10
|
// GitHub workflow does support ANSI but "supports-color" returns false
|
|
10
11
|
// because stream.isTTY returns false, see https://github.com/actions/runner/issues/241
|
|
@@ -3,6 +3,6 @@ import { createUnicode } from "./unicode_runtime_agnostic.js";
|
|
|
3
3
|
import { ANSI } from "../ansi/ansi_node.js";
|
|
4
4
|
|
|
5
5
|
export const UNICODE = createUnicode({
|
|
6
|
-
supported: isUnicodeSupported(),
|
|
6
|
+
supported: process.env.FORCE_UNICODE === "1" || isUnicodeSupported(),
|
|
7
7
|
ANSI,
|
|
8
8
|
});
|
|
@@ -24,6 +24,9 @@ export const createUnicode = ({ supported, ANSI }) => {
|
|
|
24
24
|
get CIRCLE_CROSS_RAW() {
|
|
25
25
|
return UNICODE.supported ? `ⓧ` : `(×)`;
|
|
26
26
|
},
|
|
27
|
+
get CIRCLE_DOTTED_RAW() {
|
|
28
|
+
return UNICODE.supported ? `◌` : `*`;
|
|
29
|
+
},
|
|
27
30
|
get COMMAND() {
|
|
28
31
|
return ANSI.color(UNICODE.COMMAND_RAW, ANSI.GREY); // ANSI_MAGENTA)
|
|
29
32
|
},
|