@icebreakers/commitlint-config 4.0.6 → 4.1.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.
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/dist/index.cjs +17 -11
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +16 -10
- package/package.json +15 -9
package/README.md
CHANGED
|
@@ -96,5 +96,5 @@ The factory keeps commit prompts in sync with any custom type definitions. If yo
|
|
|
96
96
|
## Project links
|
|
97
97
|
|
|
98
98
|
- Documentation: https://repoctl.icebreaker.top
|
|
99
|
-
- Repository: https://github.com/
|
|
100
|
-
- Issues: https://github.com/
|
|
99
|
+
- Repository: https://github.com/icelib/repoctl/tree/main/packages/commitlint
|
|
100
|
+
- Issues: https://github.com/icelib/repoctl/issues
|
package/README.zh.md
CHANGED
|
@@ -94,5 +94,5 @@ export default icebreaker({
|
|
|
94
94
|
## 项目链接
|
|
95
95
|
|
|
96
96
|
- 文档:https://repoctl.icebreaker.top
|
|
97
|
-
- 仓库:https://github.com/
|
|
98
|
-
- 问题反馈:https://github.com/
|
|
97
|
+
- 仓库:https://github.com/icelib/repoctl/tree/main/packages/commitlint
|
|
98
|
+
- 问题反馈:https://github.com/icelib/repoctl/issues
|
package/dist/index.cjs
CHANGED
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
}
|
|
20
20
|
return to;
|
|
21
21
|
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
23
23
|
value: mod,
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
@@ -110,8 +110,10 @@ function buildScopeRules(options) {
|
|
|
110
110
|
"always",
|
|
111
111
|
scopeValues
|
|
112
112
|
];
|
|
113
|
-
if (options.required !== void 0)
|
|
114
|
-
|
|
113
|
+
if (options.required !== void 0) {
|
|
114
|
+
if (options.required) rules["scope-empty"] = [severity, "never"];
|
|
115
|
+
else rules["scope-empty"] = [_commitlint_types.RuleConfigSeverity.Disabled];
|
|
116
|
+
}
|
|
115
117
|
const scopeCases = mergeUnique(asArray(options.case));
|
|
116
118
|
if (scopeCases.length > 0) rules["scope-case"] = [
|
|
117
119
|
severity,
|
|
@@ -129,14 +131,18 @@ function buildSubjectRules(options) {
|
|
|
129
131
|
options.caseCondition ?? "never",
|
|
130
132
|
forbiddenCases
|
|
131
133
|
];
|
|
132
|
-
if (options.allowEmpty !== void 0)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
options.
|
|
138
|
-
|
|
139
|
-
|
|
134
|
+
if (options.allowEmpty !== void 0) {
|
|
135
|
+
if (options.allowEmpty) rules["subject-empty"] = [_commitlint_types.RuleConfigSeverity.Disabled];
|
|
136
|
+
else rules["subject-empty"] = [options.allowEmptySeverity ?? _commitlint_types.RuleConfigSeverity.Error, "never"];
|
|
137
|
+
}
|
|
138
|
+
if (options.fullStop !== void 0) {
|
|
139
|
+
if (options.fullStop) rules["subject-full-stop"] = [
|
|
140
|
+
options.fullStopSeverity ?? _commitlint_types.RuleConfigSeverity.Error,
|
|
141
|
+
"always",
|
|
142
|
+
options.fullStopCharacter ?? "."
|
|
143
|
+
];
|
|
144
|
+
else rules["subject-full-stop"] = [_commitlint_types.RuleConfigSeverity.Disabled];
|
|
145
|
+
}
|
|
140
146
|
return rules;
|
|
141
147
|
}
|
|
142
148
|
function buildHeaderRules(options) {
|
package/dist/index.d.cts
CHANGED
|
@@ -44,9 +44,9 @@ interface IcebreakerCommitlintOptions {
|
|
|
44
44
|
}
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region src/index.d.ts
|
|
47
|
-
declare function createIcebreakerCommitlintConfig(options?: IcebreakerCommitlintOptions): UserConfig$1;
|
|
48
|
-
declare function icebreaker(options?: IcebreakerCommitlintOptions): UserConfig$1;
|
|
49
|
-
type IcebreakerCommitlintConfig = ReturnType<typeof icebreaker>;
|
|
47
|
+
export declare function createIcebreakerCommitlintConfig(options?: IcebreakerCommitlintOptions): UserConfig$1;
|
|
48
|
+
export declare function icebreaker(options?: IcebreakerCommitlintOptions): UserConfig$1;
|
|
49
|
+
export type IcebreakerCommitlintConfig = ReturnType<typeof icebreaker>;
|
|
50
50
|
declare const _default: UserConfig$1;
|
|
51
51
|
//#endregion
|
|
52
|
-
export { type CommitHeaderOptions, type CommitScopeOptions, type CommitSubjectOptions, type CommitTypeDefinition, type CommitTypesOptions, type UserConfig as CommitlintUserConfig,
|
|
52
|
+
export { type CommitHeaderOptions, type CommitScopeOptions, type CommitSubjectOptions, type CommitTypeDefinition, type CommitTypesOptions, type UserConfig as CommitlintUserConfig, type IcebreakerCommitlintOptions, RuleConfigSeverity, _default as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -44,9 +44,9 @@ interface IcebreakerCommitlintOptions {
|
|
|
44
44
|
}
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region src/index.d.ts
|
|
47
|
-
declare function createIcebreakerCommitlintConfig(options?: IcebreakerCommitlintOptions): UserConfig$1;
|
|
48
|
-
declare function icebreaker(options?: IcebreakerCommitlintOptions): UserConfig$1;
|
|
49
|
-
type IcebreakerCommitlintConfig = ReturnType<typeof icebreaker>;
|
|
47
|
+
export declare function createIcebreakerCommitlintConfig(options?: IcebreakerCommitlintOptions): UserConfig$1;
|
|
48
|
+
export declare function icebreaker(options?: IcebreakerCommitlintOptions): UserConfig$1;
|
|
49
|
+
export type IcebreakerCommitlintConfig = ReturnType<typeof icebreaker>;
|
|
50
50
|
declare const _default: UserConfig$1;
|
|
51
51
|
//#endregion
|
|
52
|
-
export { type CommitHeaderOptions, type CommitScopeOptions, type CommitSubjectOptions, type CommitTypeDefinition, type CommitTypesOptions, type UserConfig as CommitlintUserConfig,
|
|
52
|
+
export { type CommitHeaderOptions, type CommitScopeOptions, type CommitSubjectOptions, type CommitTypeDefinition, type CommitTypesOptions, type UserConfig as CommitlintUserConfig, type IcebreakerCommitlintOptions, RuleConfigSeverity, _default as default };
|
package/dist/index.js
CHANGED
|
@@ -83,8 +83,10 @@ function buildScopeRules(options) {
|
|
|
83
83
|
"always",
|
|
84
84
|
scopeValues
|
|
85
85
|
];
|
|
86
|
-
if (options.required !== void 0)
|
|
87
|
-
|
|
86
|
+
if (options.required !== void 0) {
|
|
87
|
+
if (options.required) rules["scope-empty"] = [severity, "never"];
|
|
88
|
+
else rules["scope-empty"] = [RuleConfigSeverity.Disabled];
|
|
89
|
+
}
|
|
88
90
|
const scopeCases = mergeUnique(asArray(options.case));
|
|
89
91
|
if (scopeCases.length > 0) rules["scope-case"] = [
|
|
90
92
|
severity,
|
|
@@ -102,14 +104,18 @@ function buildSubjectRules(options) {
|
|
|
102
104
|
options.caseCondition ?? "never",
|
|
103
105
|
forbiddenCases
|
|
104
106
|
];
|
|
105
|
-
if (options.allowEmpty !== void 0)
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
options.
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
if (options.allowEmpty !== void 0) {
|
|
108
|
+
if (options.allowEmpty) rules["subject-empty"] = [RuleConfigSeverity.Disabled];
|
|
109
|
+
else rules["subject-empty"] = [options.allowEmptySeverity ?? RuleConfigSeverity.Error, "never"];
|
|
110
|
+
}
|
|
111
|
+
if (options.fullStop !== void 0) {
|
|
112
|
+
if (options.fullStop) rules["subject-full-stop"] = [
|
|
113
|
+
options.fullStopSeverity ?? RuleConfigSeverity.Error,
|
|
114
|
+
"always",
|
|
115
|
+
options.fullStopCharacter ?? "."
|
|
116
|
+
];
|
|
117
|
+
else rules["subject-full-stop"] = [RuleConfigSeverity.Disabled];
|
|
118
|
+
}
|
|
113
119
|
return rules;
|
|
114
120
|
}
|
|
115
121
|
function buildHeaderRules(options) {
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/commitlint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.1.1",
|
|
5
5
|
"description": "Commitlint preset from the repoctl development toolchain",
|
|
6
|
-
"author": "ice breaker <
|
|
6
|
+
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"homepage": "https://repoctl.icebreaker.top",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/
|
|
11
|
+
"url": "git+https://github.com/icelib/repoctl.git",
|
|
12
12
|
"directory": "packages/commitlint"
|
|
13
13
|
},
|
|
14
14
|
"bugs": {
|
|
15
|
-
"url": "https://github.com/
|
|
15
|
+
"url": "https://github.com/icelib/repoctl/issues"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"commitlint",
|
|
@@ -31,10 +31,16 @@
|
|
|
31
31
|
"module": "./dist/index.js",
|
|
32
32
|
"types": "./dist/index.d.ts",
|
|
33
33
|
"files": [
|
|
34
|
+
"README.md",
|
|
35
|
+
"README.zh.md",
|
|
34
36
|
"dist"
|
|
35
37
|
],
|
|
36
38
|
"engines": {
|
|
37
|
-
"node": ">=22.
|
|
39
|
+
"node": ">=22.13.0"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public",
|
|
43
|
+
"registry": "https://registry.npmjs.org"
|
|
38
44
|
},
|
|
39
45
|
"tsd": {
|
|
40
46
|
"directory": "test-d",
|
|
@@ -51,13 +57,13 @@
|
|
|
51
57
|
}
|
|
52
58
|
},
|
|
53
59
|
"dependencies": {
|
|
54
|
-
"@commitlint/config-conventional": "^21.2.
|
|
55
|
-
"@commitlint/types": "^21.2.
|
|
60
|
+
"@commitlint/config-conventional": "^21.2.3",
|
|
61
|
+
"@commitlint/types": "^21.2.3",
|
|
56
62
|
"conventional-changelog-conventionalcommits": "^10.4.0"
|
|
57
63
|
},
|
|
58
64
|
"devDependencies": {
|
|
59
|
-
"@commitlint/lint": "^21.2.
|
|
60
|
-
"@commitlint/load": "^21.2.
|
|
65
|
+
"@commitlint/lint": "^21.2.3",
|
|
66
|
+
"@commitlint/load": "^21.2.3"
|
|
61
67
|
},
|
|
62
68
|
"scripts": {
|
|
63
69
|
"dev": "tsdown --watch --sourcemap",
|