@chubbyts/chubbyts-throwable-to-error 1.0.1 → 1.1.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/README.md +2 -2
- package/dist/throwable-to-error.js +2 -0
- package/package.json +12 -9
package/README.md
CHANGED
|
@@ -23,14 +23,14 @@ It converts any throwable into an Error.
|
|
|
23
23
|
|
|
24
24
|
## Requirements
|
|
25
25
|
|
|
26
|
-
* node:
|
|
26
|
+
* node: 16
|
|
27
27
|
|
|
28
28
|
## Installation
|
|
29
29
|
|
|
30
30
|
Through [NPM](https://www.npmjs.com) as [@chubbyts/chubbyts-throwable-to-error][1].
|
|
31
31
|
|
|
32
32
|
```ts
|
|
33
|
-
npm i @chubbyts/chubbyts-throwable-to-error@^1.0
|
|
33
|
+
npm i @chubbyts/chubbyts-throwable-to-error@^1.1.0
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
## Usage
|
|
@@ -6,7 +6,9 @@ const throwableToError = (e) => {
|
|
|
6
6
|
return e;
|
|
7
7
|
}
|
|
8
8
|
const error = new Error(typeof e === 'object' ? `${JSON.stringify(e)}` : `${String(e)}`);
|
|
9
|
+
// eslint-disable-next-line functional/immutable-data
|
|
9
10
|
error.name = typeof e;
|
|
11
|
+
// eslint-disable-next-line functional/immutable-data
|
|
10
12
|
error.stack = undefined;
|
|
11
13
|
return error;
|
|
12
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chubbyts/chubbyts-throwable-to-error",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "It converts any throwable into an Error.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chubbyts",
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"cs-fix": "prettier --write src tests",
|
|
15
15
|
"cs": "prettier --check src tests",
|
|
16
|
+
"lint-fix": "eslint src tests --fix",
|
|
17
|
+
"lint": "eslint src tests",
|
|
16
18
|
"test": "jest",
|
|
17
19
|
"infection": "stryker run",
|
|
18
20
|
"build": "rm -Rf dist && tsc",
|
|
@@ -40,18 +42,19 @@
|
|
|
40
42
|
"dist"
|
|
41
43
|
],
|
|
42
44
|
"engines": {
|
|
43
|
-
"node": ">=
|
|
45
|
+
"node": ">=16"
|
|
44
46
|
},
|
|
45
47
|
"dependencies": {},
|
|
46
48
|
"devDependencies": {
|
|
47
|
-
"@
|
|
48
|
-
"@stryker-mutator/
|
|
49
|
-
"@
|
|
50
|
-
"@types/
|
|
49
|
+
"@chubbyts/chubbyts-eslint": "^1.1.1",
|
|
50
|
+
"@stryker-mutator/core": "^6.4.2",
|
|
51
|
+
"@stryker-mutator/jest-runner": "^6.4.2",
|
|
52
|
+
"@types/jest": "^29.5.1",
|
|
53
|
+
"@types/node": "^20.1.1",
|
|
51
54
|
"jest": "^29.5.0",
|
|
52
|
-
"prettier": "^2.8.
|
|
53
|
-
"ts-jest": "^29.0
|
|
54
|
-
"typescript": "^
|
|
55
|
+
"prettier": "^2.8.8",
|
|
56
|
+
"ts-jest": "^29.1.0",
|
|
57
|
+
"typescript": "^5.0.4"
|
|
55
58
|
},
|
|
56
59
|
"publishConfig": {
|
|
57
60
|
"access": "public"
|