@supertape/formatter-progress-bar 6.1.0 → 7.0.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.
- package/lib/progress-bar.js +7 -9
- package/package.json +8 -8
package/lib/progress-bar.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {Writable} from 'node:stream';
|
|
2
|
+
import process from 'node:process';
|
|
2
3
|
import cliProgress from 'cli-progress';
|
|
3
4
|
import chalk from 'chalk';
|
|
4
5
|
import fullstore from 'fullstore';
|
|
5
6
|
import {isCI} from 'ci-info';
|
|
6
|
-
import process from 'node:process';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
globalThis._isCI = isCI;
|
|
9
9
|
|
|
10
10
|
const OK = '👌';
|
|
11
11
|
const WARNING = '⚠️';
|
|
@@ -117,7 +117,7 @@ export const comment = ({out}) => ({message}) => {
|
|
|
117
117
|
out(`# ${message}`);
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
-
export const end = ({barStore, out}) => ({count, passed, failed,
|
|
120
|
+
export const end = ({barStore, out}) => ({count, passed, failed, skipped}) => {
|
|
121
121
|
barStore().stop();
|
|
122
122
|
|
|
123
123
|
out('');
|
|
@@ -126,8 +126,8 @@ export const end = ({barStore, out}) => ({count, passed, failed, skiped}) => {
|
|
|
126
126
|
out(`# tests ${count}`);
|
|
127
127
|
out(`# pass ${passed}`);
|
|
128
128
|
|
|
129
|
-
if (
|
|
130
|
-
out(formatSkip(
|
|
129
|
+
if (skipped)
|
|
130
|
+
out(formatSkip(skipped));
|
|
131
131
|
|
|
132
132
|
out('');
|
|
133
133
|
|
|
@@ -175,7 +175,7 @@ const defaultStreamOptions = {
|
|
|
175
175
|
const getStream = ({total} = defaultStreamOptions) => {
|
|
176
176
|
const is = total >= SUPERTAPE_PROGRESS_BAR_MIN;
|
|
177
177
|
|
|
178
|
-
if (is && !
|
|
178
|
+
if (is && !globalThis._isCI || SUPERTAPE_PROGRESS_BAR === '1')
|
|
179
179
|
return stderr;
|
|
180
180
|
|
|
181
181
|
return new Writable();
|
|
@@ -214,6 +214,4 @@ function formatOk() {
|
|
|
214
214
|
return `# ✅ ${spaces}ok`;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
return `# ${WARNING} skip ${skiped}`;
|
|
219
|
-
}
|
|
217
|
+
const formatSkip = (skipped) => `# ${WARNING} skip ${skipped}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supertape/formatter-progress-bar",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
5
5
|
"description": "📼 Supertape formatter progress bar",
|
|
6
6
|
"homepage": "http://github.com/coderaiser/supertape",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "module",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "git://github.com/coderaiser/supertape.git"
|
|
14
|
+
"url": "git+https://github.com/coderaiser/supertape.git"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"test": "madrun test",
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
"supertape"
|
|
36
36
|
],
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"c8": "^
|
|
38
|
+
"c8": "^10.1.2",
|
|
39
39
|
"eslint": "^9.1.1",
|
|
40
|
-
"eslint-plugin-putout": "^
|
|
41
|
-
"madrun": "^
|
|
40
|
+
"eslint-plugin-putout": "^29.0.2",
|
|
41
|
+
"madrun": "^11.0.0",
|
|
42
42
|
"montag": "^1.0.0",
|
|
43
43
|
"nodemon": "^3.0.1",
|
|
44
44
|
"pullout": "^5.0.1",
|
|
45
|
-
"putout": "^
|
|
46
|
-
"supertape": "^
|
|
45
|
+
"putout": "^41.0.2",
|
|
46
|
+
"supertape": "^11.0.0"
|
|
47
47
|
},
|
|
48
48
|
"license": "MIT",
|
|
49
49
|
"engines": {
|
|
50
|
-
"node": ">=
|
|
50
|
+
"node": ">=20"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|