supertape 11.0.4 → 11.1.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/ChangeLog +13 -0
- package/bin/subscribe.mjs +2 -2
- package/lib/cli.js +20 -8
- package/package.json +6 -6
package/ChangeLog
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
2025.05.28, v11.1.1
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- 0e700b7 supertape: yargs-parser v22.0.0
|
|
5
|
+
- 7e428a3 supertape: eslint-plugin-putout v27.0.0
|
|
6
|
+
- b287ed9 @supertape/operator-stub: check-dts v0.9.0
|
|
7
|
+
- 23c7718 supertape: putout v40.0.0
|
|
8
|
+
|
|
9
|
+
2025.04.01, v11.1.0
|
|
10
|
+
|
|
11
|
+
feature:
|
|
12
|
+
- 208be9a supertape: @putout/cli-keypress v3.0.0
|
|
13
|
+
|
|
1
14
|
2025.03.24, v11.0.4
|
|
2
15
|
|
|
3
16
|
fix:
|
package/bin/subscribe.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {keypress} from '@putout/cli-keypress';
|
|
2
2
|
import {parse} from 'flatted';
|
|
3
3
|
import harnessCreator from '../lib/formatter/harness.js';
|
|
4
4
|
import {
|
|
@@ -14,7 +14,7 @@ const {createHarness} = harnessCreator;
|
|
|
14
14
|
const resolveFormatter = async (name) => await import(`@supertape/formatter-${name}`);
|
|
15
15
|
|
|
16
16
|
export async function subscribe({name, exit, worker, stdout}) {
|
|
17
|
-
const {isStop} =
|
|
17
|
+
const {isStop} = keypress();
|
|
18
18
|
const harness = createHarness(await resolveFormatter(name));
|
|
19
19
|
|
|
20
20
|
harness.pipe(stdout);
|
package/lib/cli.js
CHANGED
|
@@ -8,11 +8,11 @@ const {pathToFileURL} = require('node:url');
|
|
|
8
8
|
const glob = require('glob');
|
|
9
9
|
const fullstore = require('fullstore');
|
|
10
10
|
const tryToCatch = require('try-to-catch');
|
|
11
|
-
const keypress = require('@putout/cli-keypress');
|
|
11
|
+
const {keypress: _keypress} = require('@putout/cli-keypress');
|
|
12
12
|
|
|
13
13
|
const {parseArgs, yargsOptions} = require('./cli/parse-args');
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const _supertape = require('..');
|
|
16
16
|
const {
|
|
17
17
|
OK,
|
|
18
18
|
FAIL,
|
|
@@ -31,10 +31,22 @@ const {
|
|
|
31
31
|
SUPERTAPE_CHECK_SKIPPED = '0',
|
|
32
32
|
} = process.env;
|
|
33
33
|
|
|
34
|
-
module.exports = async (
|
|
35
|
-
|
|
34
|
+
module.exports = async (overrides = {}) => {
|
|
35
|
+
const {
|
|
36
|
+
argv,
|
|
37
|
+
cwd,
|
|
38
|
+
stdout,
|
|
39
|
+
stderr,
|
|
40
|
+
exit,
|
|
41
|
+
workerFormatter,
|
|
42
|
+
keypress = _keypress,
|
|
43
|
+
supertape = _supertape,
|
|
44
|
+
} = overrides;
|
|
45
|
+
|
|
46
|
+
const isStop = overrides.isStop || keypress().isStop;
|
|
36
47
|
|
|
37
48
|
const [error, result] = await tryToCatch(cli, {
|
|
49
|
+
supertape,
|
|
38
50
|
argv,
|
|
39
51
|
cwd,
|
|
40
52
|
stdout,
|
|
@@ -55,6 +67,9 @@ module.exports = async ({argv, cwd, stdout, stderr, exit, isStop, workerFormatte
|
|
|
55
67
|
skipped,
|
|
56
68
|
} = result;
|
|
57
69
|
|
|
70
|
+
if (isStop())
|
|
71
|
+
return exit(WAS_STOP);
|
|
72
|
+
|
|
58
73
|
if (Number(SUPERTAPE_CHECK_SKIPPED) && skipped)
|
|
59
74
|
return exit(SKIPPED);
|
|
60
75
|
|
|
@@ -66,13 +81,10 @@ module.exports = async ({argv, cwd, stdout, stderr, exit, isStop, workerFormatte
|
|
|
66
81
|
return exit(code);
|
|
67
82
|
}
|
|
68
83
|
|
|
69
|
-
if (isStop())
|
|
70
|
-
return exit(WAS_STOP);
|
|
71
|
-
|
|
72
84
|
return exit(OK);
|
|
73
85
|
};
|
|
74
86
|
|
|
75
|
-
async function cli({argv, cwd, stdout, isStop, workerFormatter}) {
|
|
87
|
+
async function cli({argv, cwd, stdout, isStop, workerFormatter, supertape}) {
|
|
76
88
|
const args = parseArgs(argv);
|
|
77
89
|
|
|
78
90
|
if (args.version) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supertape",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.1",
|
|
4
4
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
5
5
|
"description": "📼 Supertape simplest high speed test runner with superpowers",
|
|
6
6
|
"homepage": "http://github.com/coderaiser/supertape",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@cloudcmd/stub": "^4.0.0",
|
|
43
|
-
"@putout/cli-keypress": "^
|
|
43
|
+
"@putout/cli-keypress": "^3.0.0",
|
|
44
44
|
"@putout/cli-validate-args": "^2.0.0",
|
|
45
45
|
"@supertape/engine-loader": "^2.0.0",
|
|
46
46
|
"@supertape/formatter-fail": "^4.0.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"strip-ansi": "^7.0.0",
|
|
62
62
|
"try-to-catch": "^3.0.0",
|
|
63
63
|
"wraptile": "^3.0.0",
|
|
64
|
-
"yargs-parser": "^
|
|
64
|
+
"yargs-parser": "^22.0.0"
|
|
65
65
|
},
|
|
66
66
|
"keywords": [
|
|
67
67
|
"function",
|
|
@@ -77,17 +77,17 @@
|
|
|
77
77
|
"@iocmd/wait": "^2.1.0",
|
|
78
78
|
"@putout/eslint-flat": "^3.0.0",
|
|
79
79
|
"c8": "^10.1.2",
|
|
80
|
-
"check-dts": "^0.
|
|
80
|
+
"check-dts": "^0.9.0",
|
|
81
81
|
"currify": "^4.0.0",
|
|
82
82
|
"eslint": "^9.1.1",
|
|
83
|
-
"eslint-plugin-putout": "^
|
|
83
|
+
"eslint-plugin-putout": "^27.0.0",
|
|
84
84
|
"find-up": "^7.0.0",
|
|
85
85
|
"madrun": "^11.0.0",
|
|
86
86
|
"mock-require": "^3.0.2",
|
|
87
87
|
"montag": "^1.0.0",
|
|
88
88
|
"nodemon": "^3.0.1",
|
|
89
89
|
"pullout": "^5.0.1",
|
|
90
|
-
"putout": "^
|
|
90
|
+
"putout": "^40.0.0",
|
|
91
91
|
"runsome": "^1.0.0",
|
|
92
92
|
"try-catch": "^3.0.1",
|
|
93
93
|
"typescript": "^5.1.6"
|