supertape 10.7.0 → 10.7.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 CHANGED
@@ -1,3 +1,11 @@
1
+ 2024.07.03, v10.7.1
2
+
3
+ fix:
4
+ - cfc859b supertape: subscribe: empty
5
+
6
+ feature:
7
+ - 14f15d6 supertape: c8 v10.1.2
8
+
1
9
  2024.06.04, v10.7.0
2
10
 
3
11
  feature:
package/bin/subscribe.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import keyPress from '@putout/cli-keypress';
2
- import harnessCreator from '../lib/formatter/harness.js';
3
2
  import {parse} from 'flatted';
3
+ import harnessCreator from '../lib/formatter/harness.js';
4
4
  import {
5
5
  SPLITTER,
6
6
  CONSOLE_LOG,
@@ -9,6 +9,7 @@ import {
9
9
 
10
10
  const one = (fn) => (a) => fn(a);
11
11
 
12
+ const maybeParse = (a) => a && parse(a);
12
13
  const {createHarness} = harnessCreator;
13
14
  const resolveFormatter = async (name) => await import(`@supertape/formatter-${name}`);
14
15
 
@@ -39,18 +40,18 @@ export async function subscribe({name, exit, worker, stdout}) {
39
40
  });
40
41
  }
41
42
 
42
- function consoleLog({message}) {
43
+ export function consoleLog({message, logger = console}) {
43
44
  const messages = message
44
45
  .split(SPLITTER)
45
- .map(one(parse));
46
+ .map(one(maybeParse));
46
47
 
47
- console.log(...messages);
48
+ logger.log(...messages);
48
49
  }
49
50
 
50
- function consoleError({message}) {
51
+ export function consoleError({message, logger = console}) {
51
52
  const messages = message
52
53
  .split(SPLITTER)
53
- .map(one(parse));
54
+ .map(one(maybeParse));
54
55
 
55
- console.error(...messages);
56
+ logger.error(...messages);
56
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supertape",
3
- "version": "10.7.0",
3
+ "version": "10.7.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",
@@ -76,7 +76,7 @@
76
76
  "devDependencies": {
77
77
  "@iocmd/wait": "^2.1.0",
78
78
  "@putout/eslint-flat": "^2.0.0",
79
- "c8": "^9.0.0",
79
+ "c8": "^10.1.2",
80
80
  "check-dts": "^0.8.0",
81
81
  "currify": "^4.0.0",
82
82
  "eslint": "^9.1.1",