@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 CHANGED
@@ -23,14 +23,14 @@ It converts any throwable into an Error.
23
23
 
24
24
  ## Requirements
25
25
 
26
- * node: 14
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.1
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.1",
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": ">=14"
45
+ "node": ">=16"
44
46
  },
45
47
  "dependencies": {},
46
48
  "devDependencies": {
47
- "@stryker-mutator/core": "^6.4.1",
48
- "@stryker-mutator/jest-runner": "^6.4.1",
49
- "@types/jest": "^29.5.0",
50
- "@types/node": "^18.15.3",
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.4",
53
- "ts-jest": "^29.0.5",
54
- "typescript": "^4.9.5"
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"