@pubinfo-pr/commitlint 0.197.1 → 0.200.1

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.mts +1 -157
  2. package/package.json +6 -6
package/dist/index.d.mts CHANGED
@@ -1,161 +1,5 @@
1
- import { Commit } from "conventional-commits-parser";
1
+ import { UserConfig } from "@commitlint/types";
2
2
 
3
- //#region ../../node_modules/.pnpm/@commitlint+types@20.3.1/node_modules/@commitlint/types/lib/ensure.d.ts
4
- type TargetCaseType = "camel-case" | "kebab-case" | "snake-case" | "pascal-case" | "start-case" | "upper-case" | "uppercase" | "sentence-case" | "sentencecase" | "lower-case" | "lowercase" | "lowerCase";
5
- //#endregion
6
- //#region ../../node_modules/.pnpm/@commitlint+types@20.3.1/node_modules/@commitlint/types/lib/prompt.d.ts
7
- type RuleField = "header" | "type" | "scope" | "subject" | "body" | "footer";
8
- type PromptName = RuleField | "isBreaking" | "breakingBody" | "breaking" | "isIssueAffected" | "issuesBody" | "issues";
9
- type PromptConfig = {
10
- settings: {
11
- scopeEnumSeparator: string;
12
- enableMultipleScopes: boolean;
13
- };
14
- messages: PromptMessages;
15
- questions: Partial<Record<PromptName, {
16
- description?: string;
17
- messages?: {
18
- [K: string]: string;
19
- };
20
- enum?: {
21
- [enumName: string]: {
22
- description?: string;
23
- title?: string;
24
- emoji?: string;
25
- };
26
- };
27
- emojiInHeader?: boolean;
28
- }>>;
29
- };
30
- type PromptMessages = {
31
- skip: string;
32
- max: string;
33
- min: string;
34
- emptyWarning: string;
35
- upperLimitWarning: string;
36
- lowerLimitWarning: string;
37
- [_key: string]: string;
38
- };
39
- type UserPromptConfig = DeepPartial<PromptConfig>;
40
- type DeepPartial<T> = { [P in keyof T]?: { [K in keyof T[P]]?: T[P][K] } };
41
- //#endregion
42
- //#region ../../node_modules/.pnpm/@commitlint+types@20.3.1/node_modules/@commitlint/types/lib/rules.d.ts
43
- /**
44
- * Rules match the input either as successful or failed.
45
- * For example, when `header-full-stop` detects a full stop and is set as "always"; it's true.
46
- * If the `header-full-stop` discovers a full stop but is set to "never"; it's false.
47
- */
48
- type RuleOutcome = Readonly<[boolean, string?]>;
49
- /**
50
- * Rules receive a parsed commit, condition, and possible additional settings through value.
51
- * All rules should provide the most sensible rule condition and value.
52
- */
53
- type RuleType = "async" | "sync" | "either";
54
- type BaseRule<Value = never, Type extends RuleType = "either"> = (parsed: Commit, when?: RuleConfigCondition, value?: Value) => Type extends "either" ? RuleOutcome | Promise<RuleOutcome> : Type extends "async" ? Promise<RuleOutcome> : Type extends "sync" ? RuleOutcome : never;
55
- type Rule<Value = never> = BaseRule<Value, "either">;
56
- type AsyncRule<Value = never> = BaseRule<Value, "async">;
57
- type SyncRule<Value = never> = BaseRule<Value, "sync">;
58
- /**
59
- * Rules always have a severity.
60
- * Severity indicates what to do if the rule is found to be broken
61
- * 0 - Disable this rule
62
- * 1 - Warn for violations
63
- * 2 - Error for violations
64
- */
65
- declare enum RuleConfigSeverity {
66
- Disabled = 0,
67
- Warning = 1,
68
- Error = 2,
69
- }
70
- /**
71
- * Rules always have a condition.
72
- * It can be either "always" (as tested), or "never" (as tested).
73
- * For example, `header-full-stop` can be enforced as "always" or "never".
74
- */
75
- type RuleConfigCondition = "always" | "never";
76
- type RuleConfigTuple<T> = T extends void ? Readonly<[RuleConfigSeverity.Disabled]> | Readonly<[RuleConfigSeverity, RuleConfigCondition]> : Readonly<[RuleConfigSeverity.Disabled]> | Readonly<[RuleConfigSeverity, RuleConfigCondition, T]>;
77
- declare enum RuleConfigQuality {
78
- User = 0,
79
- Qualified = 1,
80
- }
81
- type QualifiedRuleConfig<T> = (() => RuleConfigTuple<T>) | (() => Promise<RuleConfigTuple<T>>) | RuleConfigTuple<T>;
82
- type RuleConfig<V = RuleConfigQuality.Qualified, T = void> = V extends RuleConfigQuality.Qualified ? RuleConfigTuple<T> : QualifiedRuleConfig<T>;
83
- type CaseRuleConfig<V = RuleConfigQuality.User> = RuleConfig<V, TargetCaseType | TargetCaseType[]>;
84
- type LengthRuleConfig<V = RuleConfigQuality.User> = RuleConfig<V, number>;
85
- type EnumRuleConfig<V = RuleConfigQuality.User> = RuleConfig<V, string[]>;
86
- type ObjectRuleConfig<V = RuleConfigQuality.User, T = Record<string, unknown>> = RuleConfig<V, T>;
87
- type RulesConfig<V = RuleConfigQuality.User> = {
88
- "body-case": CaseRuleConfig<V>;
89
- "body-empty": RuleConfig<V>;
90
- "body-full-stop": RuleConfig<V, string>;
91
- "body-leading-blank": RuleConfig<V>;
92
- "body-max-length": LengthRuleConfig<V>;
93
- "body-max-line-length": LengthRuleConfig<V>;
94
- "body-min-length": LengthRuleConfig<V>;
95
- "breaking-change-exclamation-mark": CaseRuleConfig<V>;
96
- "footer-empty": RuleConfig<V>;
97
- "footer-leading-blank": RuleConfig<V>;
98
- "footer-max-length": LengthRuleConfig<V>;
99
- "footer-max-line-length": LengthRuleConfig<V>;
100
- "footer-min-length": LengthRuleConfig<V>;
101
- "header-case": CaseRuleConfig<V>;
102
- "header-full-stop": RuleConfig<V, string>;
103
- "header-max-length": LengthRuleConfig<V>;
104
- "header-min-length": LengthRuleConfig<V>;
105
- "header-trim": RuleConfig<V>;
106
- "references-empty": RuleConfig<V>;
107
- "scope-case": CaseRuleConfig<V> | ObjectRuleConfig<V, {
108
- cases: TargetCaseType[];
109
- delimiters?: string[];
110
- }>;
111
- "scope-delimiter-style": EnumRuleConfig<V>;
112
- "scope-empty": RuleConfig<V>;
113
- "scope-enum": EnumRuleConfig<V> | ObjectRuleConfig<V, {
114
- scopes: string[];
115
- delimiters?: string[];
116
- }>;
117
- "scope-max-length": LengthRuleConfig<V>;
118
- "scope-min-length": LengthRuleConfig<V>;
119
- "signed-off-by": RuleConfig<V, string>;
120
- "subject-case": CaseRuleConfig<V>;
121
- "subject-empty": RuleConfig<V>;
122
- "subject-full-stop": RuleConfig<V, string>;
123
- "subject-max-length": LengthRuleConfig<V>;
124
- "subject-min-length": LengthRuleConfig<V>;
125
- "trailer-exists": RuleConfig<V, string>;
126
- "type-case": CaseRuleConfig<V>;
127
- "type-empty": RuleConfig<V>;
128
- "type-enum": EnumRuleConfig<V>;
129
- "type-max-length": LengthRuleConfig<V>;
130
- "type-min-length": LengthRuleConfig<V>;
131
- [key: string]: AnyRuleConfig<V>;
132
- };
133
- type AnyRuleConfig<V> = RuleConfig<V, unknown> | RuleConfig<V, void>;
134
- //#endregion
135
- //#region ../../node_modules/.pnpm/@commitlint+types@20.3.1/node_modules/@commitlint/types/lib/load.d.ts
136
- interface Plugin {
137
- rules: {
138
- [ruleName: string]: Rule | AsyncRule | SyncRule;
139
- };
140
- }
141
- interface UserConfig {
142
- extends?: string | string[];
143
- formatter?: string;
144
- rules?: Partial<RulesConfig>;
145
- parserPreset?: string | ParserPreset | Promise<ParserPreset>;
146
- ignores?: ((commit: string) => boolean)[];
147
- defaultIgnores?: boolean;
148
- plugins?: (string | Plugin)[];
149
- helpUrl?: string;
150
- prompt?: UserPromptConfig;
151
- [key: string]: unknown;
152
- }
153
- interface ParserPreset {
154
- name?: string;
155
- path?: string;
156
- parserOpts?: unknown;
157
- }
158
- //#endregion
159
3
  //#region src/config/index.d.ts
160
4
  declare const commitPreset: UserConfig & {
161
5
  prompt?: any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pubinfo-pr/commitlint",
3
3
  "type": "module",
4
- "version": "0.197.1",
4
+ "version": "0.200.1",
5
5
  "description": "commitlint config for Pubinfo projects",
6
6
  "exports": {
7
7
  ".": "./dist/index.mjs"
@@ -28,13 +28,13 @@
28
28
  "node": "^20.19.0 || >=22.12.0"
29
29
  },
30
30
  "dependencies": {
31
- "@commitlint/config-conventional": "^20.3.1",
32
- "@commitlint/lint": "^20.3.1",
33
- "@commitlint/load": "^20.3.1",
31
+ "@commitlint/config-conventional": "^19.8.1",
32
+ "@commitlint/lint": "^19.8.1",
33
+ "@commitlint/load": "^19.8.1",
34
34
  "citty": "^0.1.6",
35
35
  "czg": "^1.12.0",
36
- "fs-extra": "^11.3.3",
37
- "unconfig": "^7.4.2"
36
+ "fs-extra": "^11.3.0",
37
+ "unconfig": "^7.3.3"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "tsdown",