@chubbyts/chubbyts-throwable-to-error 2.2.0 → 2.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/README.md CHANGED
@@ -30,7 +30,7 @@ It converts any throwable into an Error.
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@^2.2.0
33
+ npm i @chubbyts/chubbyts-throwable-to-error@^2.3.0
34
34
  ```
35
35
 
36
36
  ## Usage
@@ -2,10 +2,10 @@ export const throwableToError = (e) => {
2
2
  if (e instanceof Error) {
3
3
  return e;
4
4
  }
5
- const error = new Error(typeof e === 'object' ? `${JSON.stringify(e)}` : `${String(e)}`);
6
- // eslint-disable-next-line functional/immutable-data
5
+ const error = new Error(typeof e === 'object' ? JSON.stringify(e) : String(e));
6
+ // oxlint-disable-next-line functional/immutable-data
7
7
  error.name = typeof e;
8
- // eslint-disable-next-line functional/immutable-data
8
+ // oxlint-disable-next-line functional/immutable-data
9
9
  error.stack = undefined;
10
10
  return error;
11
11
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chubbyts/chubbyts-throwable-to-error",
3
3
  "type": "module",
4
- "version": "2.2.0",
4
+ "version": "2.3.0",
5
5
  "description": "It converts any throwable into an Error.",
6
6
  "keywords": [
7
7
  "chubbyts",
@@ -31,14 +31,15 @@
31
31
  "node": ">=22"
32
32
  },
33
33
  "devDependencies": {
34
- "@chubbyts/chubbyts-eslint": "^5.2.0",
34
+ "@chubbyts/chubbyts-oxlint": "^1.0.0",
35
35
  "@stryker-mutator/core": "^9.6.1",
36
36
  "@stryker-mutator/vitest-runner": "^9.6.1",
37
- "@types/node": "^25.6.2",
38
- "@vitest/coverage-v8": "^4.1.5",
39
- "prettier": "^3.8.3",
40
- "typescript": "^6.0.3",
41
- "vitest": "^4.1.5"
37
+ "@types/node": "^26.1.1",
38
+ "@vitest/coverage-v8": "^4.1.10",
39
+ "oxlint": "^1.75.0",
40
+ "prettier": "^3.9.6",
41
+ "typescript": "^7.0.2",
42
+ "vitest": "^4.1.10"
42
43
  },
43
44
  "publishConfig": {
44
45
  "access": "public"
@@ -48,8 +49,8 @@
48
49
  "cs-fix": "prettier --write src tests",
49
50
  "cs": "prettier --check src tests",
50
51
  "infection": "stryker run",
51
- "lint-fix": "eslint src tests eslint.config.js vitest.config.ts --fix",
52
- "lint": "eslint src tests",
52
+ "lint-fix": "oxlint --fix src tests vitest.config.ts",
53
+ "lint": "oxlint src tests vitest.config.ts",
53
54
  "test": "vitest"
54
55
  }
55
56
  }