supertape 10.7.3 → 10.9.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 CHANGED
@@ -1,3 +1,15 @@
1
+ 2025.01.05, v10.9.0
2
+
3
+ feature:
4
+ - a2b5dcd supertape: worker: add support of Error
5
+ - 7d8c672 supertape: putout v37.8.2
6
+
7
+ 2024.12.04, v10.8.0
8
+
9
+ feature:
10
+ - 2716d90 supertape: eslint-plugin-putout v23.2.0
11
+ - d251291 supertape: format: improve support
12
+
1
13
  2024.08.22, v10.7.3
2
14
 
3
15
  fix:
package/lib/cli.js CHANGED
@@ -86,6 +86,7 @@ async function cli({argv, cwd, stdout, isStop, workerFormatter}) {
86
86
  }
87
87
 
88
88
  const {validateArgs} = await import('@putout/cli-validate-args');
89
+
89
90
  const error = await validateArgs(args, [
90
91
  ...yargsOptions.boolean,
91
92
  ...yargsOptions.string,
package/lib/format.js CHANGED
@@ -11,6 +11,9 @@ module.exports.parseAt = (stack, {reason}) => {
11
11
  if (lines.length === 1)
12
12
  return stack;
13
13
 
14
+ if (lines.length > 10 && lines[0].startsWith('Error: '))
15
+ return lines[0];
16
+
14
17
  const line = lines[reason === 'user' ? REASON_USER : REASON_EXCEPTION];
15
18
 
16
19
  if (!line)
package/lib/operators.mjs CHANGED
@@ -4,7 +4,10 @@ import {formatOutput, parseAt} from './format.js';
4
4
 
5
5
  const {entries} = Object;
6
6
  const isAsync = (a) => a[Symbol.toStringTag] === 'AsyncFunction';
7
- const encode = (a) => a.replace(')', '\\)').replace('(', '\\(');
7
+
8
+ const encode = (a) => a
9
+ .replace(')', '\\)')
10
+ .replace('(', '\\(');
8
11
 
9
12
  const maybeRegExp = (a) => {
10
13
  if (!isStr(a))
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const {stringify} = require('flatted');
4
+ const isError = (a) => a instanceof Error;
4
5
  const SPLITTER = '>[supertape-splitter]<';
5
6
  const CONSOLE_LOG = 'console:log';
6
7
  const CONSOLE_ERROR = 'console:error';
@@ -34,8 +35,14 @@ module.exports.overrideConsoleError = (parentPort, {console = global.console} =
34
35
  const createConsoleMethod = (type, parentPort) => (...messages) => {
35
36
  const prepared = [];
36
37
 
37
- for (const message of messages)
38
+ for (const message of messages) {
39
+ if (isError(message)) {
40
+ prepared.push(stringify(message.toString()));
41
+ continue;
42
+ }
43
+
38
44
  prepared.push(stringify(message));
45
+ }
39
46
 
40
47
  parentPort.postMessage([
41
48
  type, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supertape",
3
- "version": "10.7.3",
3
+ "version": "10.9.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",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",
27
- "url": "git://github.com/coderaiser/supertape.git"
27
+ "url": "git+https://github.com/coderaiser/supertape.git"
28
28
  },
29
29
  "scripts": {
30
30
  "test": "madrun test",
@@ -80,14 +80,14 @@
80
80
  "check-dts": "^0.8.0",
81
81
  "currify": "^4.0.0",
82
82
  "eslint": "^9.1.1",
83
- "eslint-plugin-putout": "^22.0.0",
83
+ "eslint-plugin-putout": "^23.2.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
89
  "pullout": "^5.0.1",
90
- "putout": "^36.0.2",
90
+ "putout": "^37.8.2",
91
91
  "runsome": "^1.0.0",
92
92
  "try-catch": "^3.0.1",
93
93
  "typescript": "^5.1.6"