supertape 12.2.0 → 12.4.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,13 @@
1
+ 2026.02.03, v12.4.0
2
+
3
+ feature:
4
+ - 84129f0 supertape: format: at on long stack traces
5
+
6
+ 2026.02.02, v12.3.0
7
+
8
+ feature:
9
+ - 498e933 supertape: env: improve options
10
+
1
11
  2026.01.30, v12.2.0
2
12
 
3
13
  feature:
package/lib/env/index.js CHANGED
@@ -1,10 +1,20 @@
1
1
  import process from 'node:process';
2
+ import justSnakeCase from 'just-snake-case';
2
3
 
4
+ const isBool = (a) => typeof a === 'boolean';
3
5
  const {entries} = Object;
6
+
4
7
  const addLoader = (a) => {
5
8
  return `"${a} --import supertape/css"`;
6
9
  };
7
10
 
11
+ const parseValue = (a) => {
12
+ if (isBool(a))
13
+ return a ? 1 : 0;
14
+
15
+ return a;
16
+ };
17
+
8
18
  export const defineEnv = (config, overrides = {}) => {
9
19
  const {env = process.env} = overrides;
10
20
  const {NODE_OPTIONS = ''} = env;
@@ -16,9 +26,9 @@ export const defineEnv = (config, overrides = {}) => {
16
26
  continue;
17
27
  }
18
28
 
19
- const name = `SUPERTAPE_${key.toUpperCase()}`;
29
+ const name = `SUPERTAPE_${justSnakeCase(key).toUpperCase()}`;
20
30
 
21
- result[name] = value;
31
+ result[name] = parseValue(value);
22
32
  }
23
33
 
24
34
  return result;
package/lib/format.js CHANGED
@@ -10,7 +10,7 @@ export const parseAt = (stack, {reason}) => {
10
10
  return stack;
11
11
 
12
12
  if (lines.length > 10 && lines[0].startsWith('Error: '))
13
- return lines[0];
13
+ return lines[REASON_USER] || lines[0];
14
14
 
15
15
  const line = lines[reason === 'user' ? REASON_USER : REASON_EXCEPTION];
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supertape",
3
- "version": "12.2.0",
3
+ "version": "12.4.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",
@@ -52,6 +52,7 @@
52
52
  "glob": "^13.0.0",
53
53
  "jest-diff": "^30.0.3",
54
54
  "json-with-bigint": "^3.4.4",
55
+ "just-snake-case": "^3.2.0",
55
56
  "once": "^1.4.0",
56
57
  "resolve": "^1.17.0",
57
58
  "stacktracey": "^2.1.7",