@icebreakers/commitlint-config 4.0.5 → 4.0.6

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 CHANGED
@@ -92,3 +92,9 @@ The factory keeps commit prompts in sync with any custom type definitions. If yo
92
92
  - If commitlint cannot find the config file, ensure it is named `commitlint.config.ts` (or `.cjs`) at the repository root.
93
93
  - For workspaces that ship custom prompts, pass a `prompt` object instead of re-building the schema by hand.
94
94
  - To disable commits in scripts (e.g. release bots), set `COMMITLINT_DISABLED=true` and skip the hook execution.
95
+
96
+ ## Project links
97
+
98
+ - Documentation: https://repoctl.icebreaker.top
99
+ - Repository: https://github.com/sonofmagic/repoctl/tree/main/packages/commitlint
100
+ - Issues: https://github.com/sonofmagic/repoctl/issues
package/README.zh.md CHANGED
@@ -90,3 +90,9 @@ export default icebreaker({
90
90
  - commitlint 找不到配置时,请确认文件名为 `commitlint.config.ts`(或 `.cjs`),且位于仓库根目录。
91
91
  - 如需扩展交互式提示,直接传入 `prompt` 即可,无需手动拼装 Schema。
92
92
  - 若需在某些脚本中临时关闭校验,可在环境变量中设置 `COMMITLINT_DISABLED=true` 并跳过钩子。
93
+
94
+ ## 项目链接
95
+
96
+ - 文档:https://repoctl.icebreaker.top
97
+ - 仓库:https://github.com/sonofmagic/repoctl/tree/main/packages/commitlint
98
+ - 问题反馈:https://github.com/sonofmagic/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 || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
23
  value: mod,
24
24
  enumerable: true
25
25
  }) : target, mod));
@@ -110,10 +110,8 @@ function buildScopeRules(options) {
110
110
  "always",
111
111
  scopeValues
112
112
  ];
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
- }
113
+ if (options.required !== void 0) if (options.required) rules["scope-empty"] = [severity, "never"];
114
+ else rules["scope-empty"] = [_commitlint_types.RuleConfigSeverity.Disabled];
117
115
  const scopeCases = mergeUnique(asArray(options.case));
118
116
  if (scopeCases.length > 0) rules["scope-case"] = [
119
117
  severity,
@@ -131,18 +129,14 @@ function buildSubjectRules(options) {
131
129
  options.caseCondition ?? "never",
132
130
  forbiddenCases
133
131
  ];
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
- }
132
+ if (options.allowEmpty !== void 0) if (options.allowEmpty) rules["subject-empty"] = [_commitlint_types.RuleConfigSeverity.Disabled];
133
+ else rules["subject-empty"] = [options.allowEmptySeverity ?? _commitlint_types.RuleConfigSeverity.Error, "never"];
134
+ if (options.fullStop !== void 0) if (options.fullStop) rules["subject-full-stop"] = [
135
+ options.fullStopSeverity ?? _commitlint_types.RuleConfigSeverity.Error,
136
+ "always",
137
+ options.fullStopCharacter ?? "."
138
+ ];
139
+ else rules["subject-full-stop"] = [_commitlint_types.RuleConfigSeverity.Disabled];
146
140
  return rules;
147
141
  }
148
142
  function buildHeaderRules(options) {
package/dist/index.js CHANGED
@@ -83,10 +83,8 @@ function buildScopeRules(options) {
83
83
  "always",
84
84
  scopeValues
85
85
  ];
86
- if (options.required !== void 0) {
87
- if (options.required) rules["scope-empty"] = [severity, "never"];
88
- else rules["scope-empty"] = [RuleConfigSeverity.Disabled];
89
- }
86
+ if (options.required !== void 0) if (options.required) rules["scope-empty"] = [severity, "never"];
87
+ else rules["scope-empty"] = [RuleConfigSeverity.Disabled];
90
88
  const scopeCases = mergeUnique(asArray(options.case));
91
89
  if (scopeCases.length > 0) rules["scope-case"] = [
92
90
  severity,
@@ -104,18 +102,14 @@ function buildSubjectRules(options) {
104
102
  options.caseCondition ?? "never",
105
103
  forbiddenCases
106
104
  ];
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
- }
105
+ if (options.allowEmpty !== void 0) if (options.allowEmpty) rules["subject-empty"] = [RuleConfigSeverity.Disabled];
106
+ else rules["subject-empty"] = [options.allowEmptySeverity ?? RuleConfigSeverity.Error, "never"];
107
+ if (options.fullStop !== void 0) if (options.fullStop) rules["subject-full-stop"] = [
108
+ options.fullStopSeverity ?? RuleConfigSeverity.Error,
109
+ "always",
110
+ options.fullStopCharacter ?? "."
111
+ ];
112
+ else rules["subject-full-stop"] = [RuleConfigSeverity.Disabled];
119
113
  return rules;
120
114
  }
121
115
  function buildHeaderRules(options) {
package/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "@icebreakers/commitlint-config",
3
3
  "type": "module",
4
- "version": "4.0.5",
5
- "description": "Commitlint preset from Icebreaker's dev-configs",
4
+ "version": "4.0.6",
5
+ "description": "Commitlint preset from the repoctl development toolchain",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
8
+ "homepage": "https://repoctl.icebreaker.top",
8
9
  "repository": {
9
10
  "type": "git",
10
- "url": "git+https://github.com/sonofmagic/dev-configs.git",
11
+ "url": "git+https://github.com/sonofmagic/repoctl.git",
11
12
  "directory": "packages/commitlint"
12
13
  },
13
14
  "bugs": {
14
- "url": "https://github.com/sonofmagic/dev-configs/issues"
15
+ "url": "https://github.com/sonofmagic/repoctl/issues"
15
16
  },
16
17
  "keywords": [
17
18
  "commitlint",
18
- "dev-configs",
19
+ "repoctl",
19
20
  "icebreakers"
20
21
  ],
21
22
  "sideEffects": false,
@@ -42,7 +43,7 @@
42
43
  }
43
44
  },
44
45
  "peerDependencies": {
45
- "conventional-changelog-conventionalcommits": ">=9.0.0"
46
+ "conventional-changelog-conventionalcommits": ">=10.4.0"
46
47
  },
47
48
  "peerDependenciesMeta": {
48
49
  "conventional-changelog-conventionalcommits": {