@little-nebulae/error 1.3.0 → 1.4.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/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -108,9 +108,9 @@ export declare function isUriError(error: Error): error is URIError;
|
|
|
108
108
|
//#endregion
|
|
109
109
|
//#region src/helpers/compose-error-message.d.ts
|
|
110
110
|
export declare const DEFAULT_FAILURE_REASON = "some unexpected error";
|
|
111
|
-
export declare function composeErrorMessage
|
|
112
|
-
operation:
|
|
113
|
-
reason
|
|
114
|
-
}):
|
|
111
|
+
export declare function composeErrorMessage({ operation, reason }: {
|
|
112
|
+
operation: string;
|
|
113
|
+
reason?: string;
|
|
114
|
+
}): string;
|
|
115
115
|
//#endregion
|
|
116
116
|
export type { BaseErrorMeta, BaseErrorType };
|
package/dist/index.js
CHANGED
|
@@ -112,7 +112,7 @@ function isUriError(error) {
|
|
|
112
112
|
//#endregion
|
|
113
113
|
//#region src/helpers/compose-error-message.ts
|
|
114
114
|
const DEFAULT_FAILURE_REASON = "some unexpected error";
|
|
115
|
-
function composeErrorMessage({ operation, reason }) {
|
|
115
|
+
function composeErrorMessage({ operation, reason = DEFAULT_FAILURE_REASON }) {
|
|
116
116
|
return `Failed to ${operation} due to ${reason}.`;
|
|
117
117
|
}
|
|
118
118
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@little-nebulae/error",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@arethetypeswrong/core": "0.18.5",
|
|
20
|
-
"@
|
|
20
|
+
"@oxc-node/cli": "0.1.6",
|
|
21
|
+
"@types/node": "26.6.5",
|
|
21
22
|
"oxfmt": "0.72.0",
|
|
22
23
|
"oxlint": "1.87.0",
|
|
23
|
-
"oxlint-tsgolint": "7.0.
|
|
24
|
+
"oxlint-tsgolint": "7.0.2004",
|
|
24
25
|
"publint": "0.3.25",
|
|
25
|
-
"tsdown": "0.23.
|
|
26
|
-
"tsx": "4.23.15",
|
|
26
|
+
"tsdown": "0.23.1",
|
|
27
27
|
"type-fest": "5.10.0",
|
|
28
28
|
"typescript": "7.0.2",
|
|
29
29
|
"vitest": "5.0.3"
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"devEngines": {
|
|
35
35
|
"packageManager": {
|
|
36
36
|
"name": "pnpm",
|
|
37
|
-
"version": "12.
|
|
37
|
+
"version": "12.11.2",
|
|
38
38
|
"onFail": "warn"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsdown",
|
|
43
|
-
"try": "
|
|
43
|
+
"try": "oxnode ./src/try.ts",
|
|
44
44
|
"fmt": "oxfmt --disable-nested-config",
|
|
45
45
|
"fmt:check": "oxfmt --check --disable-nested-config",
|
|
46
46
|
"lint": "oxlint --disable-nested-config",
|