@chubbyts/chubbyts-throwable-to-error 1.2.1 → 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.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +6 -4
  3. package/package.json +14 -28
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2023 Dominik Zogg
1
+ Copyright (c) 2024 Dominik Zogg
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![CI](https://github.com/chubbyts/chubbyts-throwable-to-error/workflows/CI/badge.svg?branch=master)](https://github.com/chubbyts/chubbyts-throwable-to-error/actions?query=workflow%3ACI)
4
4
  [![Coverage Status](https://coveralls.io/repos/github/chubbyts/chubbyts-throwable-to-error/badge.svg?branch=master)](https://coveralls.io/github/chubbyts/chubbyts-throwable-to-error?branch=master)
5
- [![Infection MSI](https://badge.stryker-mutator.io/github.com/chubbyts/chubbyts-throwable-to-error/master)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyts/chubbyts-throwable-to-error/master)
5
+ [![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fchubbyts%2Fchubbyts-throwable-to-error%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyts/chubbyts-throwable-to-error/master)
6
6
  [![npm-version](https://img.shields.io/npm/v/@chubbyts/chubbyts-throwable-to-error.svg)](https://www.npmjs.com/package/@chubbyts/chubbyts-throwable-to-error)
7
7
 
8
8
  [![bugs](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-throwable-to-error&metric=bugs)](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: 16
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.2.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
- 2023 Dominik Zogg
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.2.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": "node ./build.js",
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": "jest"
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,
@@ -51,20 +39,18 @@
51
39
  }
52
40
  },
53
41
  "engines": {
54
- "node": ">=16"
42
+ "node": ">=18"
55
43
  },
56
- "dependencies": {},
57
44
  "devDependencies": {
58
- "@chubbyts/chubbyts-eslint": "^2.0.3",
59
- "@chubbyts/chubbyts-packaging": "^2.0.3",
60
- "@stryker-mutator/core": "^7.1.1",
61
- "@stryker-mutator/jest-runner": "^7.1.1",
62
- "@types/jest": "^29.5.3",
63
- "@types/node": "^20.4.4",
64
- "jest": "^29.6.1",
65
- "prettier": "^3.0.0",
66
- "ts-jest": "^29.1.1",
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"