@chubbyts/chubbyts-throwable-to-error 1.3.2 → 2.0.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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chubbyts/chubbyts-throwable-to-error",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"description": "It converts any throwable into an Error.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"chubbyts",
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"repository": "chubbyts/chubbyts-throwable-to-error",
|
|
14
14
|
"scripts": {
|
|
15
|
-
"build": "
|
|
15
|
+
"build": "tsc",
|
|
16
16
|
"cs-fix": "prettier --write src tests",
|
|
17
17
|
"cs": "prettier --check src tests",
|
|
18
18
|
"infection": "stryker run",
|
|
19
|
-
"lint-fix": "eslint src tests eslint.config.
|
|
19
|
+
"lint-fix": "eslint src tests eslint.config.js vitest.config.ts --fix",
|
|
20
20
|
"lint": "eslint src tests",
|
|
21
21
|
"prepare": "npm run build",
|
|
22
22
|
"test": "vitest"
|
|
@@ -33,24 +33,22 @@
|
|
|
33
33
|
"exports": {
|
|
34
34
|
"./*": {
|
|
35
35
|
"types": "./*.d.ts",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"default": "./*.mjs"
|
|
36
|
+
"import": "./*.js",
|
|
37
|
+
"default": "./*.js"
|
|
39
38
|
}
|
|
40
39
|
},
|
|
41
40
|
"engines": {
|
|
42
41
|
"node": ">=18"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
45
|
-
"@chubbyts/chubbyts-eslint": "^
|
|
46
|
-
"@
|
|
47
|
-
"@stryker-mutator/
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"vitest": "^2.1.8"
|
|
44
|
+
"@chubbyts/chubbyts-eslint": "^4.0.2",
|
|
45
|
+
"@stryker-mutator/core": "^9.0.1",
|
|
46
|
+
"@stryker-mutator/vitest-runner": "^9.0.1",
|
|
47
|
+
"@types/node": "^24.0.1",
|
|
48
|
+
"@vitest/coverage-v8": "^3.2.3",
|
|
49
|
+
"prettier": "^3.5.3",
|
|
50
|
+
"typescript": "^5.8.3",
|
|
51
|
+
"vitest": "^3.2.3"
|
|
54
52
|
},
|
|
55
53
|
"publishConfig": {
|
|
56
54
|
"access": "public"
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.throwableToError = void 0;
|
|
4
|
-
const throwableToError = (e) => {
|
|
5
|
-
if (e instanceof Error) {
|
|
6
|
-
return e;
|
|
7
|
-
}
|
|
8
|
-
const error = new Error(typeof e === 'object' ? `${JSON.stringify(e)}` : `${String(e)}`);
|
|
9
|
-
// eslint-disable-next-line functional/immutable-data
|
|
10
|
-
error.name = typeof e;
|
|
11
|
-
// eslint-disable-next-line functional/immutable-data
|
|
12
|
-
error.stack = undefined;
|
|
13
|
-
return error;
|
|
14
|
-
};
|
|
15
|
-
exports.throwableToError = throwableToError;
|
|
File without changes
|