supertape 12.0.5 → 12.0.6

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 CHANGED
@@ -1,3 +1,8 @@
1
+ 2026.01.08, v12.0.6
2
+
3
+ feature:
4
+ - 563cd9e supertape: --dry-run
5
+
1
6
  2026.01.08, v12.0.5
2
7
 
3
8
  fix:
@@ -33,6 +33,7 @@ const getYargsOptions = () => {
33
33
  'check-scopes',
34
34
  'check-assertions-count',
35
35
  'worker',
36
+ 'dry-run',
36
37
  ],
37
38
  alias: {
38
39
  version: 'v',
package/lib/cli.js CHANGED
@@ -159,10 +159,6 @@ async function _cli(overrides) {
159
159
  workerFormatter,
160
160
  });
161
161
 
162
- const stream = await supertape.createStream();
163
-
164
- stream.pipe(stdout);
165
-
166
162
  const files = removeDuplicates(allFiles);
167
163
 
168
164
  filesCount(files.length);
@@ -170,6 +166,9 @@ async function _cli(overrides) {
170
166
  if (!files.length)
171
167
  return OK;
172
168
 
169
+ const stream = await supertape.createStream();
170
+ stream.pipe(stdout);
171
+
173
172
  const resolvedNames = [];
174
173
 
175
174
  // always resolve before import for windows
@@ -177,8 +176,9 @@ async function _cli(overrides) {
177
176
  resolvedNames.push(pathToFileURL(resolvePath(cwd, file)));
178
177
  }
179
178
 
180
- for (const resolved of resolvedNames)
181
- await import(resolved);
179
+ if (!args.dryRun)
180
+ for (const resolved of resolvedNames)
181
+ await import(resolved);
182
182
 
183
183
  const [result] = await once(supertape.run(), 'end');
184
184
 
package/lib/supertape.js CHANGED
@@ -234,18 +234,15 @@ const loop = maybeOnce(({emitter, tests}) => {
234
234
  })();
235
235
  });
236
236
 
237
- module.exports.run = () => {
238
- /* c8 ignore start */
239
- if (!mainEmitter)
237
+ module.exports.run = ({fake} = {}) => {
238
+ if (!mainEmitter || fake)
240
239
  return fakeEmitter();
241
240
 
242
- /* c8 ignore end */
243
241
  mainEmitter.emit('loop');
244
242
 
245
243
  return mainEmitter;
246
244
  };
247
245
 
248
- /* c8 ignore start */
249
246
  function fakeEmitter() {
250
247
  const emitter = new EventEmitter();
251
248
 
@@ -256,5 +253,4 @@ function fakeEmitter() {
256
253
  });
257
254
 
258
255
  return emitter;
259
- }/* c8 ignore end */
260
-
256
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supertape",
3
- "version": "12.0.5",
3
+ "version": "12.0.6",
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",