@js-utils-kit/types 1.2.0 → 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.
package/dist/index.d.cts CHANGED
@@ -1,6 +1,56 @@
1
1
  import { ArchiverOptions, ArchiverOptions as ArchiverOptions$1 } from "archiver";
2
- import { HTTP_STATUS } from "@js-utils-kit/constants";
3
2
 
3
+ //#region src/commit/types.d.ts
4
+ /**
5
+ * Metadata describing a supported commit type.
6
+ *
7
+ * @see {@link COMMIT_TYPES}.
8
+ */
9
+ interface CommitTypeMeta {
10
+ /**
11
+ * Conventional commit type identifier
12
+ *
13
+ * @example
14
+ * - feat
15
+ * - fix
16
+ * - chore
17
+ * - BREAKING CHANGE.
18
+ */
19
+ type: string;
20
+ /**
21
+ * Human-readable description of what this commit type represents.
22
+ */
23
+ description: string;
24
+ /**
25
+ * Whether this commit type is allowed to introduce a breaking change.
26
+ *
27
+ * When true, breaking changes may be expressed using:
28
+ * - `!` after the type (e.g. `feat!:`)
29
+ * - `BREAKING CHANGE:` footer
30
+ */
31
+ allowsBreakingChange: boolean;
32
+ /**
33
+ * Whether commits of this type should be considered release-relevant (e.g. included in changelogs).
34
+ */
35
+ isReleaseRelevant?: boolean;
36
+ /**
37
+ * Default semantic version impact when no breaking change is present.
38
+ */
39
+ defaultReleaseType?: 'major' | 'minor' | 'patch' | 'none';
40
+ /**
41
+ * Display-friendly label for UIs or documentation.
42
+ */
43
+ title?: string;
44
+ /**
45
+ * Emoji or icon representing this commit type.
46
+ */
47
+ icon?: string;
48
+ /**
49
+ * Marks this commit type as deprecated.
50
+ */
51
+ deprecated?: boolean;
52
+ }
53
+ //#endregion
4
54
  //#region src/ArchiveFormat.d.ts
5
55
  /**
6
56
  * Supported archive formats.
@@ -91,8 +141,6 @@ type Hour = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15
91
141
  /**
92
142
  * Union type of all supported HTTP status codes.
93
143
  *
94
- * This type is derived directly from {@link HTTP_STATUS} and represents every possible numeric HTTP status value.
95
- *
96
144
  * Useful for enforcing strict type-safety when working with HTTP responses, middleware, validators, and utility functions.
97
145
  *
98
146
  * @example
@@ -104,7 +152,7 @@ type Hour = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15
104
152
  * }
105
153
  * ```
106
154
  */
107
- type HttpStatusCode = (typeof HTTP_STATUS)[keyof typeof HTTP_STATUS];
155
+ type HttpStatusCode = 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511;
108
156
  //#endregion
109
157
  //#region src/MinuteOrSecond.d.ts
110
158
  /**
@@ -150,4 +198,4 @@ interface Trim {
150
198
  normalizeWhitespace(str: string): string;
151
199
  }
152
200
  //#endregion
153
- export { ArchiveFormat, ArchiverOptions, CreateArchiveOptions, Environment, Falsy, Hour, HttpStatusCode, MinuteOrSecond, Trim };
201
+ export { ArchiveFormat, ArchiverOptions, CommitTypeMeta, CreateArchiveOptions, Environment, Falsy, Hour, HttpStatusCode, MinuteOrSecond, Trim };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,56 @@
1
1
  import { ArchiverOptions, ArchiverOptions as ArchiverOptions$1 } from "archiver";
2
- import { HTTP_STATUS } from "@js-utils-kit/constants";
3
2
 
3
+ //#region src/commit/types.d.ts
4
+ /**
5
+ * Metadata describing a supported commit type.
6
+ *
7
+ * @see {@link COMMIT_TYPES}.
8
+ */
9
+ interface CommitTypeMeta {
10
+ /**
11
+ * Conventional commit type identifier
12
+ *
13
+ * @example
14
+ * - feat
15
+ * - fix
16
+ * - chore
17
+ * - BREAKING CHANGE.
18
+ */
19
+ type: string;
20
+ /**
21
+ * Human-readable description of what this commit type represents.
22
+ */
23
+ description: string;
24
+ /**
25
+ * Whether this commit type is allowed to introduce a breaking change.
26
+ *
27
+ * When true, breaking changes may be expressed using:
28
+ * - `!` after the type (e.g. `feat!:`)
29
+ * - `BREAKING CHANGE:` footer
30
+ */
31
+ allowsBreakingChange: boolean;
32
+ /**
33
+ * Whether commits of this type should be considered release-relevant (e.g. included in changelogs).
34
+ */
35
+ isReleaseRelevant?: boolean;
36
+ /**
37
+ * Default semantic version impact when no breaking change is present.
38
+ */
39
+ defaultReleaseType?: 'major' | 'minor' | 'patch' | 'none';
40
+ /**
41
+ * Display-friendly label for UIs or documentation.
42
+ */
43
+ title?: string;
44
+ /**
45
+ * Emoji or icon representing this commit type.
46
+ */
47
+ icon?: string;
48
+ /**
49
+ * Marks this commit type as deprecated.
50
+ */
51
+ deprecated?: boolean;
52
+ }
53
+ //#endregion
4
54
  //#region src/ArchiveFormat.d.ts
5
55
  /**
6
56
  * Supported archive formats.
@@ -91,8 +141,6 @@ type Hour = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15
91
141
  /**
92
142
  * Union type of all supported HTTP status codes.
93
143
  *
94
- * This type is derived directly from {@link HTTP_STATUS} and represents every possible numeric HTTP status value.
95
- *
96
144
  * Useful for enforcing strict type-safety when working with HTTP responses, middleware, validators, and utility functions.
97
145
  *
98
146
  * @example
@@ -104,7 +152,7 @@ type Hour = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15
104
152
  * }
105
153
  * ```
106
154
  */
107
- type HttpStatusCode = (typeof HTTP_STATUS)[keyof typeof HTTP_STATUS];
155
+ type HttpStatusCode = 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511;
108
156
  //#endregion
109
157
  //#region src/MinuteOrSecond.d.ts
110
158
  /**
@@ -150,4 +198,4 @@ interface Trim {
150
198
  normalizeWhitespace(str: string): string;
151
199
  }
152
200
  //#endregion
153
- export { ArchiveFormat, ArchiverOptions, CreateArchiveOptions, Environment, Falsy, Hour, HttpStatusCode, MinuteOrSecond, Trim };
201
+ export { ArchiveFormat, ArchiverOptions, CommitTypeMeta, CreateArchiveOptions, Environment, Falsy, Hour, HttpStatusCode, MinuteOrSecond, Trim };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@js-utils-kit/types",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Type Declarations",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -34,9 +34,7 @@
34
34
  "import": "./dist/index.mjs"
35
35
  }
36
36
  },
37
- "dependencies": {
38
- "@js-utils-kit/constants": "0.1.0"
39
- },
37
+ "dependencies": {},
40
38
  "scripts": {
41
39
  "build": "tsdown"
42
40
  }