tape-six 1.7.5 → 1.7.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/README.md CHANGED
@@ -420,6 +420,7 @@ Test output can be controlled by flags. See [Supported flags](https://github.com
420
420
 
421
421
  The most recent releases:
422
422
 
423
+ - 1.7.6 _Bug fix: `processArgs` alias canonicalization, dead code removal, doc fix._
423
424
  - 1.7.5 _Refactored CLI runners, added `--info` option, renamed `dontCaptureConsole` to `noConsoleCapture`._
424
425
  - 1.7.4 _Bug fixes: uncaught exception handling, `StopTest` suppression in parallel runners._
425
426
  - 1.7.3 _Bug fixes in reporters, runners, and assertions. Documentation corrections and improvements._
package/TESTING.md CHANGED
@@ -515,6 +515,7 @@ Common combinations: `FO` (failures only + stop at first), `FOT` (+ show time).
515
515
  - `TAPE6_PAR` — number of parallel workers.
516
516
  - `TAPE6_TAP` — force TAP output format.
517
517
  - `TAPE6_JSONL` — force JSONL output format.
518
+ - `TAPE6_MIN` — force minimal output format.
518
519
 
519
520
  ## Configuring test discovery
520
521
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tape-six",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
4
4
  "description": "TAP-based unit test library for Node, Deno, Bun, and browsers. ES modules, TypeScript, zero dependencies.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -170,7 +170,13 @@ export const processArgs = argOptions => {
170
170
 
171
171
  const argNames = {};
172
172
  for (const argName of Object.keys(argOptions)) {
173
- const option = argOptions[argName];
173
+ let option = argOptions[argName];
174
+ if (typeof option == 'function') {
175
+ option = {fn: option, isValueRequired: true};
176
+ } else {
177
+ option = {...option};
178
+ }
179
+ option.canonicalName = argName;
174
180
  argNames[argName] = option;
175
181
  if (Array.isArray(option?.aliases)) {
176
182
  for (const alias of option.aliases) {
@@ -191,10 +197,6 @@ export const processArgs = argOptions => {
191
197
  continue;
192
198
  }
193
199
 
194
- if (typeof opt == 'function') {
195
- opt = {fn: opt, isValueRequired: true};
196
- }
197
-
198
200
  if (opt.isValueRequired && !values.length) {
199
201
  if (++i < args.length) {
200
202
  value = args[i];
@@ -206,7 +208,7 @@ export const processArgs = argOptions => {
206
208
  if (typeof opt.fn == 'function') {
207
209
  opt.fn(result.flags, name, value);
208
210
  } else {
209
- result.flags[name] = value;
211
+ result.flags[opt.canonicalName] = value;
210
212
  }
211
213
  }
212
214