effect-errors 1.2.22 → 1.2.24

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.
@@ -9,7 +9,7 @@ var parseError = function (error) {
9
9
  var _a;
10
10
  var span = ((0, Predicate_1.hasProperty)(error, spanSymbol) && error[spanSymbol]);
11
11
  if (error instanceof Error) {
12
- return new pretty_error_type_1.PrettyError((0, pretty_error_message_1.prettyErrorMessage)(error), (_a = error.stack) === null || _a === void 0 ? void 0 : _a.split('\n').filter(function (el) { return /at (.*)/.exec(el); }).join('\n'), span);
12
+ return new pretty_error_type_1.PrettyError((0, pretty_error_message_1.prettyErrorMessage)(error), (_a = error.stack) === null || _a === void 0 ? void 0 : _a.split('\n').filter(function (el) { return /at (.*)/.exec(el); }).join('\r\n'), span);
13
13
  }
14
14
  return new pretty_error_type_1.PrettyError((0, pretty_error_message_1.prettyErrorMessage)(error), void 0, span);
15
15
  };
@@ -15,14 +15,14 @@ exports.filterStack = void 0;
15
15
  var strip_cwd_path_1 = require("../strip-cwd-path");
16
16
  var filterStack = function (stack, stripCwd) {
17
17
  var e_1, _a;
18
- var lines = stack.split('\n');
18
+ var lines = stack.split('\r\n');
19
19
  var out = [];
20
20
  try {
21
21
  for (var lines_1 = __values(lines), lines_1_1 = lines_1.next(); !lines_1_1.done; lines_1_1 = lines_1.next()) {
22
22
  var line = lines_1_1.value;
23
23
  out.push(line.replace(/at .*effect_cutpoint.*\((.*)\)/, 'at $1'));
24
24
  if (line.includes('effect_cutpoint')) {
25
- return out.join('\n');
25
+ return out.join('\r\n');
26
26
  }
27
27
  }
28
28
  }
@@ -33,7 +33,7 @@ var filterStack = function (stack, stripCwd) {
33
33
  }
34
34
  finally { if (e_1) throw e_1.error; }
35
35
  }
36
- var final = out.join('\n').replace(/ {4}at /g, '🭳 at ');
36
+ var final = out.join('\r\n').replace(/ {4}at /g, ' at ');
37
37
  return stripCwd ? (0, strip_cwd_path_1.stripCwdPath)(final) : final;
38
38
  };
39
39
  exports.filterStack = filterStack;
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.2.22",
5
+ "version": "1.2.24",
6
6
  "author": "jpb06 <jp.bois.06@outlook.fr>",
7
7
  "description": "A POC for errors reporting in Effect",
8
8
  "keywords": [],
@@ -27,9 +27,9 @@
27
27
  "run-examples": "bun run ./src/examples/util/run-all"
28
28
  },
29
29
  "dependencies": {
30
- "@effect/schema": "^0.64.10",
30
+ "@effect/schema": "^0.64.11",
31
31
  "chalk": "<5",
32
- "effect": "^2.4.10"
32
+ "effect": "^2.4.11"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@stylistic/eslint-plugin": "^1.7.0",
@@ -45,7 +45,7 @@
45
45
  "eslint-config-prettier": "^9.1.0",
46
46
  "eslint-import-resolver-typescript": "^3.6.1",
47
47
  "eslint-plugin-import": "^2.29.1",
48
- "eslint-plugin-markdown": "^3.0.1",
48
+ "eslint-plugin-markdown": "^4.0.1",
49
49
  "eslint-plugin-prettier": "^5.1.3",
50
50
  "eslint-plugin-vitest": "^0.3.26",
51
51
  "fs-extra": "^11.2.0",
package/pretty-print.js CHANGED
@@ -20,7 +20,7 @@ var prettyPrint = function (cause, _a) {
20
20
  return 'All fibers interrupted without errors.';
21
21
  }
22
22
  var failures = (0, capture_errors_from_cause_1.captureErrorsFrom)(cause);
23
- console.error("\r\n\uD83E\uDEE0 ".concat(chalk_1.default.bold.yellowBright.underline("".concat(failures.length, " error").concat(failures.length > 1 ? 's' : '', " occurred\n"))));
23
+ console.error("\r\n\uD83E\uDEE0 ".concat(chalk_1.default.bold.yellowBright.underline("".concat(failures.length, " error").concat(failures.length > 1 ? 's' : '', " occurred\r\n"))));
24
24
  return failures
25
25
  .map(function (_a, failuresIndex) {
26
26
  var message = _a.message, stack = _a.stack, span = _a.span;