@icebreakers/commitlint-config 4.0.1 → 4.0.2
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.cjs +21 -2
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +17 -2
- package/package.json +5 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
//#region \0rolldown/runtime.js
|
|
3
6
|
var __create = Object.create;
|
|
4
7
|
var __defProp = Object.defineProperty;
|
|
@@ -151,6 +154,20 @@ function buildHeaderRules(options) {
|
|
|
151
154
|
//#endregion
|
|
152
155
|
//#region src/constants.ts
|
|
153
156
|
const DEFAULT_EXTENDS = [];
|
|
157
|
+
const DEFAULT_PARSER_PRESET = "conventional-changelog-conventionalcommits";
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/parser-preset.ts
|
|
160
|
+
async function loadConventionalParserOpts() {
|
|
161
|
+
const { default: createConventionalPreset } = await import("conventional-changelog-conventionalcommits");
|
|
162
|
+
return (await createConventionalPreset()).parser;
|
|
163
|
+
}
|
|
164
|
+
const conventionalParserOpts = loadConventionalParserOpts();
|
|
165
|
+
function createConventionalParserPreset() {
|
|
166
|
+
return {
|
|
167
|
+
name: DEFAULT_PARSER_PRESET,
|
|
168
|
+
parserOpts: conventionalParserOpts
|
|
169
|
+
};
|
|
170
|
+
}
|
|
154
171
|
//#endregion
|
|
155
172
|
//#region src/prompt.ts
|
|
156
173
|
function mergePrompts(base, override) {
|
|
@@ -190,7 +207,7 @@ function createIcebreakerCommitlintConfig(options = {}) {
|
|
|
190
207
|
const prompt = mergePrompts(typesConfig.prompt ?? _commitlint_config_conventional.default.prompt, options.prompt);
|
|
191
208
|
return {
|
|
192
209
|
...extendsList.length > 0 ? { extends: extendsList } : {},
|
|
193
|
-
parserPreset:
|
|
210
|
+
parserPreset: createConventionalParserPreset(),
|
|
194
211
|
...Object.keys(mergedRules).length > 0 ? { rules: mergedRules } : {},
|
|
195
212
|
...prompt ? { prompt } : {}
|
|
196
213
|
};
|
|
@@ -198,7 +215,9 @@ function createIcebreakerCommitlintConfig(options = {}) {
|
|
|
198
215
|
function icebreaker(options) {
|
|
199
216
|
return createIcebreakerCommitlintConfig(options);
|
|
200
217
|
}
|
|
218
|
+
var src_default = icebreaker();
|
|
201
219
|
//#endregion
|
|
202
220
|
exports.RuleConfigSeverity = _commitlint_types.RuleConfigSeverity;
|
|
203
221
|
exports.createIcebreakerCommitlintConfig = createIcebreakerCommitlintConfig;
|
|
222
|
+
exports.default = src_default;
|
|
204
223
|
exports.icebreaker = icebreaker;
|
package/dist/index.d.cts
CHANGED
|
@@ -48,5 +48,6 @@ interface IcebreakerCommitlintOptions {
|
|
|
48
48
|
declare function createIcebreakerCommitlintConfig(options?: IcebreakerCommitlintOptions): UserConfig$1;
|
|
49
49
|
declare function icebreaker(options?: IcebreakerCommitlintOptions): UserConfig$1;
|
|
50
50
|
type IcebreakerCommitlintConfig = ReturnType<typeof icebreaker>;
|
|
51
|
+
declare const _default: UserConfig$1;
|
|
51
52
|
//#endregion
|
|
52
|
-
export { type CommitHeaderOptions, type CommitScopeOptions, type CommitSubjectOptions, type CommitTypeDefinition, type CommitTypesOptions, type UserConfig as CommitlintUserConfig, IcebreakerCommitlintConfig, type IcebreakerCommitlintOptions, RuleConfigSeverity, createIcebreakerCommitlintConfig, icebreaker };
|
|
53
|
+
export { type CommitHeaderOptions, type CommitScopeOptions, type CommitSubjectOptions, type CommitTypeDefinition, type CommitTypesOptions, type UserConfig as CommitlintUserConfig, IcebreakerCommitlintConfig, type IcebreakerCommitlintOptions, RuleConfigSeverity, createIcebreakerCommitlintConfig, _default as default, icebreaker };
|
package/dist/index.d.ts
CHANGED
|
@@ -48,5 +48,6 @@ interface IcebreakerCommitlintOptions {
|
|
|
48
48
|
declare function createIcebreakerCommitlintConfig(options?: IcebreakerCommitlintOptions): UserConfig$1;
|
|
49
49
|
declare function icebreaker(options?: IcebreakerCommitlintOptions): UserConfig$1;
|
|
50
50
|
type IcebreakerCommitlintConfig = ReturnType<typeof icebreaker>;
|
|
51
|
+
declare const _default: UserConfig$1;
|
|
51
52
|
//#endregion
|
|
52
|
-
export { type CommitHeaderOptions, type CommitScopeOptions, type CommitSubjectOptions, type CommitTypeDefinition, type CommitTypesOptions, type UserConfig as CommitlintUserConfig, IcebreakerCommitlintConfig, type IcebreakerCommitlintOptions, RuleConfigSeverity, createIcebreakerCommitlintConfig, icebreaker };
|
|
53
|
+
export { type CommitHeaderOptions, type CommitScopeOptions, type CommitSubjectOptions, type CommitTypeDefinition, type CommitTypesOptions, type UserConfig as CommitlintUserConfig, IcebreakerCommitlintConfig, type IcebreakerCommitlintOptions, RuleConfigSeverity, createIcebreakerCommitlintConfig, _default as default, icebreaker };
|
package/dist/index.js
CHANGED
|
@@ -127,6 +127,20 @@ function buildHeaderRules(options) {
|
|
|
127
127
|
//#endregion
|
|
128
128
|
//#region src/constants.ts
|
|
129
129
|
const DEFAULT_EXTENDS = [];
|
|
130
|
+
const DEFAULT_PARSER_PRESET = "conventional-changelog-conventionalcommits";
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/parser-preset.ts
|
|
133
|
+
async function loadConventionalParserOpts() {
|
|
134
|
+
const { default: createConventionalPreset } = await import("conventional-changelog-conventionalcommits");
|
|
135
|
+
return (await createConventionalPreset()).parser;
|
|
136
|
+
}
|
|
137
|
+
const conventionalParserOpts = loadConventionalParserOpts();
|
|
138
|
+
function createConventionalParserPreset() {
|
|
139
|
+
return {
|
|
140
|
+
name: DEFAULT_PARSER_PRESET,
|
|
141
|
+
parserOpts: conventionalParserOpts
|
|
142
|
+
};
|
|
143
|
+
}
|
|
130
144
|
//#endregion
|
|
131
145
|
//#region src/prompt.ts
|
|
132
146
|
function mergePrompts(base, override) {
|
|
@@ -166,7 +180,7 @@ function createIcebreakerCommitlintConfig(options = {}) {
|
|
|
166
180
|
const prompt = mergePrompts(typesConfig.prompt ?? conventionalConfig.prompt, options.prompt);
|
|
167
181
|
return {
|
|
168
182
|
...extendsList.length > 0 ? { extends: extendsList } : {},
|
|
169
|
-
parserPreset:
|
|
183
|
+
parserPreset: createConventionalParserPreset(),
|
|
170
184
|
...Object.keys(mergedRules).length > 0 ? { rules: mergedRules } : {},
|
|
171
185
|
...prompt ? { prompt } : {}
|
|
172
186
|
};
|
|
@@ -174,5 +188,6 @@ function createIcebreakerCommitlintConfig(options = {}) {
|
|
|
174
188
|
function icebreaker(options) {
|
|
175
189
|
return createIcebreakerCommitlintConfig(options);
|
|
176
190
|
}
|
|
191
|
+
var src_default = icebreaker();
|
|
177
192
|
//#endregion
|
|
178
|
-
export { RuleConfigSeverity, createIcebreakerCommitlintConfig, icebreaker };
|
|
193
|
+
export { RuleConfigSeverity, createIcebreakerCommitlintConfig, src_default as default, icebreaker };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/commitlint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.2",
|
|
5
5
|
"description": "Commitlint preset from Icebreaker's dev-configs",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -54,6 +54,10 @@
|
|
|
54
54
|
"@commitlint/types": "^21.2.0",
|
|
55
55
|
"conventional-changelog-conventionalcommits": "^10.2.1"
|
|
56
56
|
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@commitlint/lint": "^21.2.0",
|
|
59
|
+
"@commitlint/load": "^21.2.0"
|
|
60
|
+
},
|
|
57
61
|
"scripts": {
|
|
58
62
|
"dev": "tsdown --watch --sourcemap",
|
|
59
63
|
"build:watch": "tsdown --watch --sourcemap",
|