@chubbyts/chubbyts-throwable-to-error 1.2.0 → 1.3.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/LICENSE +1 -1
- package/README.md +6 -4
- package/package.json +16 -30
- /package/dist/{throwable-to-error.js → throwable-to-error.mjs} +0 -0
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/chubbyts/chubbyts-throwable-to-error/actions?query=workflow%3ACI)
|
|
4
4
|
[](https://coveralls.io/github/chubbyts/chubbyts-throwable-to-error?branch=master)
|
|
5
|
-
[](https://dashboard.stryker-mutator.io/reports/github.com/chubbyts/chubbyts-throwable-to-error/master)
|
|
6
6
|
[](https://www.npmjs.com/package/@chubbyts/chubbyts-throwable-to-error)
|
|
7
7
|
|
|
8
8
|
[](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-throwable-to-error)
|
|
@@ -23,19 +23,21 @@ It converts any throwable into an Error.
|
|
|
23
23
|
|
|
24
24
|
## Requirements
|
|
25
25
|
|
|
26
|
-
* node:
|
|
26
|
+
* node: 18
|
|
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.
|
|
33
|
+
npm i @chubbyts/chubbyts-throwable-to-error@^1.3.0
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
## Usage
|
|
37
37
|
|
|
38
38
|
```ts
|
|
39
|
+
import { throwableToError } from '@chubbyts/chubbyts-throwable-to-error/dist/throwable-to-error';
|
|
40
|
+
|
|
39
41
|
try {
|
|
40
42
|
throw {key: 'value'};
|
|
41
43
|
} catch (e) {
|
|
@@ -45,6 +47,6 @@ try {
|
|
|
45
47
|
|
|
46
48
|
## Copyright
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
2025 Dominik Zogg
|
|
49
51
|
|
|
50
52
|
[1]: https://www.npmjs.com/package/@chubbyts/chubbyts-throwable-to-error
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chubbyts/chubbyts-throwable-to-error",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"description": "It converts any throwable into an Error.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"chubbyts",
|
|
@@ -12,26 +12,14 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"repository": "chubbyts/chubbyts-throwable-to-error",
|
|
14
14
|
"scripts": {
|
|
15
|
-
"build": "
|
|
15
|
+
"build": "node ./build.mjs",
|
|
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 --fix",
|
|
19
|
+
"lint-fix": "eslint src tests eslint.config.mjs --fix",
|
|
20
20
|
"lint": "eslint src tests",
|
|
21
21
|
"prepare": "npm run build",
|
|
22
|
-
"test": "
|
|
23
|
-
},
|
|
24
|
-
"jest": {
|
|
25
|
-
"preset": "ts-jest",
|
|
26
|
-
"testEnvironment": "node",
|
|
27
|
-
"collectCoverageFrom": [
|
|
28
|
-
"src/**/*.ts"
|
|
29
|
-
],
|
|
30
|
-
"coverageThreshold": {
|
|
31
|
-
"global": {
|
|
32
|
-
"lines": 100
|
|
33
|
-
}
|
|
34
|
-
}
|
|
22
|
+
"test": "vitest"
|
|
35
23
|
},
|
|
36
24
|
"prettier": {
|
|
37
25
|
"printWidth": 120,
|
|
@@ -46,25 +34,23 @@
|
|
|
46
34
|
"./*": {
|
|
47
35
|
"types": "./*.d.ts",
|
|
48
36
|
"require": "./*.cjs",
|
|
49
|
-
"import": "./*.
|
|
50
|
-
"default": "./*.
|
|
37
|
+
"import": "./*.mjs",
|
|
38
|
+
"default": "./*.mjs"
|
|
51
39
|
}
|
|
52
40
|
},
|
|
53
41
|
"engines": {
|
|
54
|
-
"node": ">=
|
|
42
|
+
"node": ">=18"
|
|
55
43
|
},
|
|
56
|
-
"dependencies": {},
|
|
57
44
|
"devDependencies": {
|
|
58
|
-
"@chubbyts/chubbyts-eslint": "^
|
|
59
|
-
"@chubbyts/chubbyts-packaging": "^
|
|
60
|
-
"@stryker-mutator/core": "^7.1
|
|
61
|
-
"@stryker-mutator/
|
|
62
|
-
"@types/
|
|
63
|
-
"@
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"typescript": "^5.1.6"
|
|
45
|
+
"@chubbyts/chubbyts-eslint": "^3.0.1",
|
|
46
|
+
"@chubbyts/chubbyts-packaging": "^3.0.0",
|
|
47
|
+
"@stryker-mutator/core": "^8.7.1",
|
|
48
|
+
"@stryker-mutator/vitest-runner": "^8.7.1",
|
|
49
|
+
"@types/node": "^22.10.2",
|
|
50
|
+
"@vitest/coverage-v8": "^2.1.8",
|
|
51
|
+
"prettier": "^3.4.2",
|
|
52
|
+
"typescript": "^5.7.2",
|
|
53
|
+
"vitest": "^2.1.8"
|
|
68
54
|
},
|
|
69
55
|
"publishConfig": {
|
|
70
56
|
"access": "public"
|
|
File without changes
|