effect-errors 1.3.6 → 1.3.7

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
@@ -166,8 +166,8 @@ export interface CapturedErrors {
166
166
  }
167
167
 
168
168
  export interface CaptureErrorsOptions {
169
- reverseSpans: boolean;
170
- stripCwd: boolean;
169
+ reverseSpans?: boolean;
170
+ stripCwd?: boolean;
171
171
  }
172
172
 
173
173
  type captureErrorsFunction: <E>(cause: Cause<E>, options: CaptureErrorsOptions) => CapturedErrors
@@ -17,7 +17,7 @@ export interface CapturedErrors {
17
17
  errors: ErrorData[];
18
18
  }
19
19
  export interface CaptureErrorsOptions {
20
- reverseSpans: boolean;
21
- stripCwd: boolean;
20
+ reverseSpans?: boolean;
21
+ stripCwd?: boolean;
22
22
  }
23
23
  export declare const captureErrors: <E>(cause: Cause<E>, { reverseSpans, stripCwd }?: CaptureErrorsOptions) => CapturedErrors;
package/capture-errors.js CHANGED
@@ -33,13 +33,13 @@ var captureErrors = function (cause, _a) {
33
33
  }
34
34
  var stack;
35
35
  if (maybeStack !== undefined) {
36
- stack = stripCwd ? (0, strip_cwd_path_1.stripCwdPath)(maybeStack) : maybeStack;
36
+ stack = stripCwd === true ? (0, strip_cwd_path_1.stripCwdPath)(maybeStack) : maybeStack;
37
37
  }
38
38
  return {
39
39
  errorType: errorType,
40
40
  message: message,
41
41
  stack: stack,
42
- spans: reverseSpans ? spans.toReversed() : spans,
42
+ spans: reverseSpans === true ? spans.toReversed() : spans,
43
43
  isPlainString: isPlainString,
44
44
  };
45
45
  });
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "repository": "https://github.com/jpb06/effect-errors.git",
3
3
  "main": "index.js",
4
4
  "name": "effect-errors",
5
- "version": "1.3.6",
5
+ "version": "1.3.7",
6
6
  "author": "jpb06 <jp.bois.06@outlook.fr>",
7
7
  "description": "A POC for errors reporting in Effect",
8
8
  "keywords": [],