supertape 10.4.0 → 10.6.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/ChangeLog +15 -1
- package/bin/communication.mjs +1 -4
- package/lib/cli.js +18 -9
- package/lib/diff.mjs +1 -4
- package/lib/formatter/harness.js +2 -3
- package/lib/formatter/index.js +1 -1
- package/lib/is-debug.js +1 -1
- package/lib/operators.mjs +1 -4
- package/lib/supertape.d.ts +1 -4
- package/lib/supertape.js +3 -3
- package/package.json +4 -4
- package/lib/simple-import.js +0 -3
package/ChangeLog
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
2024.05.09, v10.6.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- 81503f1 supertape: eslint-plugin-n: drop
|
|
5
|
+
- 2a378d1 supertape: pullout v5.0.1
|
|
6
|
+
- 68a1fa9 supertape: formatter: harness: readableObjectMode: rm
|
|
7
|
+
- 41af461 supertape: eslint v9.1.1
|
|
8
|
+
|
|
9
|
+
2024.03.22, v10.5.0
|
|
10
|
+
|
|
11
|
+
feature:
|
|
12
|
+
- b4e7436 supertape: when cannot import parallel, try series (nodejs/node#52187)
|
|
13
|
+
- ebb9d46 supertape: remove dependency on deep-equal (#10)
|
|
14
|
+
|
|
1
15
|
2024.03.07, v10.4.0
|
|
2
16
|
|
|
3
17
|
feature:
|
|
4
|
-
-
|
|
18
|
+
- ebb9d46 supertape: remove dependency on deep-equal
|
|
5
19
|
|
|
6
20
|
2024.03.01, v10.3.0
|
|
7
21
|
|
package/bin/communication.mjs
CHANGED
package/lib/cli.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const process = require('process');
|
|
4
|
-
const {resolve: resolvePath} = require('path');
|
|
5
|
-
const {once} = require('events');
|
|
6
|
-
const {pathToFileURL} = require('url');
|
|
3
|
+
const process = require('node:process');
|
|
4
|
+
const {resolve: resolvePath} = require('node:path');
|
|
5
|
+
const {once} = require('node:events');
|
|
6
|
+
const {pathToFileURL} = require('node:url');
|
|
7
7
|
|
|
8
8
|
const glob = require('glob');
|
|
9
9
|
const fullstore = require('fullstore');
|
|
10
10
|
const tryToCatch = require('try-to-catch');
|
|
11
11
|
const keypress = require('@putout/cli-keypress');
|
|
12
12
|
|
|
13
|
-
const {simpleImport} = require('./simple-import');
|
|
14
13
|
const {parseArgs, yargsOptions} = require('./cli/parse-args');
|
|
15
14
|
|
|
16
15
|
const supertape = require('..');
|
|
@@ -137,10 +136,15 @@ async function cli({argv, cwd, stdout, isStop, workerFormatter}) {
|
|
|
137
136
|
const promises = [];
|
|
138
137
|
const files = removeDuplicates(allFiles);
|
|
139
138
|
|
|
139
|
+
const resolvedNames = [];
|
|
140
|
+
|
|
141
|
+
// always resolve before import for windows
|
|
140
142
|
for (const file of files) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
resolvedNames.push(pathToFileURL(resolvePath(cwd, file)));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
for (const resolved of resolvedNames) {
|
|
147
|
+
promises.push(import(resolved));
|
|
144
148
|
}
|
|
145
149
|
|
|
146
150
|
filesCount(files.length);
|
|
@@ -148,7 +152,12 @@ async function cli({argv, cwd, stdout, isStop, workerFormatter}) {
|
|
|
148
152
|
if (!promises.length)
|
|
149
153
|
return OK;
|
|
150
154
|
|
|
151
|
-
await Promise.all(promises);
|
|
155
|
+
const [importError] = await tryToCatch(Promise.all.bind(Promise), promises);
|
|
156
|
+
|
|
157
|
+
if (importError)
|
|
158
|
+
for (const resolved of resolvedNames)
|
|
159
|
+
await import(resolved);
|
|
160
|
+
|
|
152
161
|
const [result] = await once(supertape.run(), 'end');
|
|
153
162
|
|
|
154
163
|
return result;
|
package/lib/diff.mjs
CHANGED
package/lib/formatter/harness.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const {Transform} = require('stream');
|
|
3
|
+
const {Transform: _Transform} = require('node:stream');
|
|
4
4
|
const {assign} = Object;
|
|
5
5
|
|
|
6
|
-
module.exports.createHarness = (reporter) => {
|
|
6
|
+
module.exports.createHarness = (reporter, {Transform = _Transform} = {}) => {
|
|
7
7
|
const prepared = prepare(reporter);
|
|
8
8
|
const stream = new Transform({
|
|
9
|
-
readableObjectMode: true,
|
|
10
9
|
writableObjectMode: true,
|
|
11
10
|
|
|
12
11
|
transform(chunk, encoding, callback) {
|
package/lib/formatter/index.js
CHANGED
package/lib/is-debug.js
CHANGED
package/lib/operators.mjs
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {isDeepStrictEqual} from 'node:util';
|
|
2
2
|
import diff from './diff.mjs';
|
|
3
|
-
import {
|
|
4
|
-
formatOutput,
|
|
5
|
-
parseAt,
|
|
6
|
-
} from './format.js';
|
|
3
|
+
import {formatOutput, parseAt} from './format.js';
|
|
7
4
|
|
|
8
5
|
const {entries} = Object;
|
|
9
6
|
const isAsync = (a) => a[Symbol.toStringTag] === 'AsyncFunction';
|
package/lib/supertape.d.ts
CHANGED
package/lib/supertape.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const process = require('process');
|
|
4
|
-
const {EventEmitter} = require('events');
|
|
5
|
-
const {PassThrough} = require('stream');
|
|
3
|
+
const process = require('node:process');
|
|
4
|
+
const {EventEmitter} = require('node:events');
|
|
5
|
+
const {PassThrough} = require('node:stream');
|
|
6
6
|
|
|
7
7
|
const stub = require('@cloudcmd/stub');
|
|
8
8
|
const once = require('once');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supertape",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.6.0",
|
|
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",
|
|
@@ -75,18 +75,18 @@
|
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@babel/core": "^8.0.0-alpha.5",
|
|
77
77
|
"@iocmd/wait": "^2.1.0",
|
|
78
|
+
"@putout/eslint-flat": "^1.0.4",
|
|
78
79
|
"c8": "^9.0.0",
|
|
79
80
|
"check-dts": "^0.7.0",
|
|
80
81
|
"currify": "^4.0.0",
|
|
81
|
-
"eslint": "^
|
|
82
|
-
"eslint-plugin-n": "^16.0.1",
|
|
82
|
+
"eslint": "^9.1.1",
|
|
83
83
|
"eslint-plugin-putout": "^22.0.0",
|
|
84
84
|
"find-up": "^7.0.0",
|
|
85
85
|
"madrun": "^10.0.0",
|
|
86
86
|
"mock-require": "^3.0.2",
|
|
87
87
|
"montag": "^1.0.0",
|
|
88
88
|
"nodemon": "^3.0.1",
|
|
89
|
-
"pullout": "^
|
|
89
|
+
"pullout": "^5.0.1",
|
|
90
90
|
"putout": "^35.0.0",
|
|
91
91
|
"runsome": "^1.0.0",
|
|
92
92
|
"try-catch": "^3.0.0",
|
package/lib/simple-import.js
DELETED