@little-nebulae/error 1.4.1 → 1.5.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 (2) hide show
  1. package/dist/index.d.ts +7 -2
  2. package/package.json +15 -10
package/dist/index.d.ts CHANGED
@@ -1,10 +1,15 @@
1
- import { Tagged, UnknownRecord } from "type-fest";
1
+ import { JsonValue, Tagged, UnknownRecord } from "type-fest";
2
2
  type BaseErrorMeta = UnknownRecord | null;
3
3
  interface BaseErrorType<TCode extends string, TCause = unknown, TMeta extends BaseErrorMeta = null> extends Error {
4
4
  cause: TCause;
5
5
  code: TCode;
6
6
  meta: TMeta;
7
7
  }
8
+ interface FlatError<TCode extends string = string, TMeta extends JsonValue = null> {
9
+ code: TCode;
10
+ message: string;
11
+ meta: TMeta;
12
+ }
8
13
  export declare abstract class BaseError<TCode extends string, TCause = unknown, TMeta extends BaseErrorMeta = null> extends Error implements BaseErrorType<TCode, TCause, TMeta> {
9
14
  abstract readonly name: string;
10
15
  cause: TCause;
@@ -75,4 +80,4 @@ export declare function composeErrorMessage({ operation, reason }: {
75
80
  operation: string;
76
81
  reason?: string;
77
82
  }): string;
78
- export type { BaseErrorMeta, BaseErrorType };
83
+ export type { BaseErrorMeta, BaseErrorType, FlatError };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@little-nebulae/error",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist"
@@ -17,24 +17,29 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@arethetypeswrong/core": "0.18.5",
20
- "@oxc-node/cli": "1.0.1",
20
+ "@oxc-node/cli": "1.0.2",
21
21
  "@types/node": "26.6.6",
22
- "oxfmt": "0.75.0",
23
- "oxlint": "1.90.0",
24
- "oxlint-tsgolint": "7.0.2005",
22
+ "oxfmt": "0.78.0",
23
+ "oxlint": "1.93.0",
24
+ "oxlint-tsgolint": "7.0.2007",
25
25
  "publint": "0.3.25",
26
- "tsdown": "0.23.2",
27
- "type-fest": "5.10.0",
26
+ "tsdown": "0.23.7",
27
+ "type-fest": "6.0.0",
28
28
  "typescript": "7.1.0-beta",
29
- "vitest": "5.0.5"
29
+ "vitest": "5.1.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "type-fest": "^5.0.0"
32
+ "type-fest": "^6.0.0"
33
33
  },
34
34
  "devEngines": {
35
35
  "packageManager": {
36
36
  "name": "pnpm",
37
- "version": "12.16.1",
37
+ "version": "12.21.0",
38
+ "onFail": "warn"
39
+ },
40
+ "runtime": {
41
+ "name": "node",
42
+ "version": "26.13.1",
38
43
  "onFail": "warn"
39
44
  }
40
45
  },