@jakubmazanec/error 3.0.4 → 3.0.5-unstable.91147a2
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/build/main.d.ts +1 -1
- package/build/main.js +0 -1
- package/build/main.js.map +2 -2
- package/build/types/CustomError.d.ts +2 -2
- package/build/types/CustomErrorWithData.d.ts +2 -2
- package/build/types.d.ts +5 -5
- package/build/types.js +0 -5
- package/build/types.js.map +3 -3
- package/package.json +3 -3
- package/source/main.ts +1 -1
- package/source/types/CustomError.ts +2 -2
- package/source/types/CustomErrorWithData.ts +2 -2
- package/source/types.ts +5 -5
package/build/main.d.ts
CHANGED
package/build/main.js
CHANGED
package/build/main.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../source/main.ts"],
|
|
4
|
-
"sourcesContent": ["export {UNKNOWN_ERROR} from './constants.js';\nexport * from './createCustomError.js';\nexport * from './createCustomErrorWithData.js';\nexport * from './types.js';\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAQ,qBAAoB;AAC5B,cAAc;AACd,cAAc;
|
|
4
|
+
"sourcesContent": ["export {UNKNOWN_ERROR} from './constants.js';\nexport * from './createCustomError.js';\nexport * from './createCustomErrorWithData.js';\nexport type * from './types.js';\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAQ,qBAAoB;AAC5B,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import { type UNKNOWN_ERROR } from '../constants.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Type representing custom error.
|
|
4
4
|
*/
|
|
5
|
-
export type CustomError<ErrorCode extends string> =
|
|
5
|
+
export type CustomError<ErrorCode extends string> = {
|
|
6
6
|
/** String that is used to quickly determine the nature of the error and why it could have occurred. */
|
|
7
7
|
code: ErrorCode | typeof UNKNOWN_ERROR;
|
|
8
|
-
};
|
|
8
|
+
} & Error;
|
|
@@ -2,9 +2,9 @@ import { type UNKNOWN_ERROR } from '../constants.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Type representing custom error that can have an arbitrary data attached.
|
|
4
4
|
*/
|
|
5
|
-
export type CustomErrorWithData<ErrorCode extends string, ErrorData> =
|
|
5
|
+
export type CustomErrorWithData<ErrorCode extends string, ErrorData> = {
|
|
6
6
|
/** String that is used to quickly determine the nature of the error and why it could have occurred. */
|
|
7
7
|
code: ErrorCode | typeof UNKNOWN_ERROR;
|
|
8
8
|
/** Data related to the error that can be used during the error handling process to gain more information or take an action. */
|
|
9
9
|
data?: ErrorData;
|
|
10
|
-
};
|
|
10
|
+
} & Error;
|
package/build/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './types/CustomError.js';
|
|
2
|
-
export * from './types/CustomErrorOptions.js';
|
|
3
|
-
export * from './types/CustomErrorWithData.js';
|
|
4
|
-
export * from './types/CustomErrorWithDataOptions.js';
|
|
5
|
-
export * from './types/ErrorMessages.js';
|
|
1
|
+
export type * from './types/CustomError.js';
|
|
2
|
+
export type * from './types/CustomErrorOptions.js';
|
|
3
|
+
export type * from './types/CustomErrorWithData.js';
|
|
4
|
+
export type * from './types/CustomErrorWithDataOptions.js';
|
|
5
|
+
export type * from './types/ErrorMessages.js';
|
package/build/types.js
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
export * from "./types/CustomError.js";
|
|
3
|
-
export * from "./types/CustomErrorOptions.js";
|
|
4
|
-
export * from "./types/CustomErrorWithData.js";
|
|
5
|
-
export * from "./types/CustomErrorWithDataOptions.js";
|
|
6
|
-
export * from "./types/ErrorMessages.js";
|
|
7
2
|
//# sourceMappingURL=types.js.map
|
package/build/types.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": [],
|
|
4
|
+
"sourcesContent": [],
|
|
5
|
+
"mappings": "",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jakubmazanec/error",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5-unstable.91147a2",
|
|
4
4
|
"description": "Collection of utilities for creating and handling errors.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"zod": "^3.23.8"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@jakubmazanec/eslint-config": "
|
|
33
|
+
"@jakubmazanec/eslint-config": "4.0.0-unstable.91147a2",
|
|
34
34
|
"@types/lodash": "^4.17.13",
|
|
35
35
|
"@types/node": "^22.9.0",
|
|
36
36
|
"@vitest/coverage-v8": "^2.1.4",
|
|
37
37
|
"concurrently": "^9.1.0",
|
|
38
38
|
"del-cli": "^6.0.0",
|
|
39
39
|
"esbuild": "^0.24.0",
|
|
40
|
-
"eslint": "^
|
|
40
|
+
"eslint": "^9.14.0",
|
|
41
41
|
"lodash": "^4.17.21",
|
|
42
42
|
"prettier": "^3.3.3",
|
|
43
43
|
"prettier-plugin-packagejson": "^2.5.3",
|
package/source/main.ts
CHANGED
|
@@ -3,7 +3,7 @@ import {type UNKNOWN_ERROR} from '../constants.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Type representing custom error.
|
|
5
5
|
*/
|
|
6
|
-
export type CustomError<ErrorCode extends string> =
|
|
6
|
+
export type CustomError<ErrorCode extends string> = {
|
|
7
7
|
/** String that is used to quickly determine the nature of the error and why it could have occurred. */
|
|
8
8
|
code: ErrorCode | typeof UNKNOWN_ERROR;
|
|
9
|
-
};
|
|
9
|
+
} & Error;
|
|
@@ -3,10 +3,10 @@ import {type UNKNOWN_ERROR} from '../constants.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Type representing custom error that can have an arbitrary data attached.
|
|
5
5
|
*/
|
|
6
|
-
export type CustomErrorWithData<ErrorCode extends string, ErrorData> =
|
|
6
|
+
export type CustomErrorWithData<ErrorCode extends string, ErrorData> = {
|
|
7
7
|
/** String that is used to quickly determine the nature of the error and why it could have occurred. */
|
|
8
8
|
code: ErrorCode | typeof UNKNOWN_ERROR;
|
|
9
9
|
|
|
10
10
|
/** Data related to the error that can be used during the error handling process to gain more information or take an action. */
|
|
11
11
|
data?: ErrorData;
|
|
12
|
-
};
|
|
12
|
+
} & Error;
|
package/source/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './types/CustomError.js';
|
|
2
|
-
export * from './types/CustomErrorOptions.js';
|
|
3
|
-
export * from './types/CustomErrorWithData.js';
|
|
4
|
-
export * from './types/CustomErrorWithDataOptions.js';
|
|
5
|
-
export * from './types/ErrorMessages.js';
|
|
1
|
+
export type * from './types/CustomError.js';
|
|
2
|
+
export type * from './types/CustomErrorOptions.js';
|
|
3
|
+
export type * from './types/CustomErrorWithData.js';
|
|
4
|
+
export type * from './types/CustomErrorWithDataOptions.js';
|
|
5
|
+
export type * from './types/ErrorMessages.js';
|