@html-validate/commitlint-config 4.0.0 → 4.0.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/dist/commitlint.js +25 -91
- package/dist/config.js +1 -5
- package/dist/formatter.js +5 -1
- package/package.json +1 -1
package/dist/commitlint.js
CHANGED
|
@@ -234121,10 +234121,7 @@ var bodyMaxLength = (parsed, _when = void 0, value = 0) => {
|
|
|
234121
234121
|
if (!input) {
|
|
234122
234122
|
return [true];
|
|
234123
234123
|
}
|
|
234124
|
-
return [
|
|
234125
|
-
max_length_default(input, value),
|
|
234126
|
-
`body must not be longer than ${value} characters`
|
|
234127
|
-
];
|
|
234124
|
+
return [max_length_default(input, value), `body must not be longer than ${value} characters`];
|
|
234128
234125
|
};
|
|
234129
234126
|
|
|
234130
234127
|
// node_modules/@commitlint/rules/lib/body-max-line-length.js
|
|
@@ -234133,10 +234130,7 @@ var bodyMaxLineLength = (parsed, _when = void 0, value = 0) => {
|
|
|
234133
234130
|
if (!input) {
|
|
234134
234131
|
return [true];
|
|
234135
234132
|
}
|
|
234136
|
-
return [
|
|
234137
|
-
max_line_length_default(input, value),
|
|
234138
|
-
`body's lines must not be longer than ${value} characters`
|
|
234139
|
-
];
|
|
234133
|
+
return [max_line_length_default(input, value), `body's lines must not be longer than ${value} characters`];
|
|
234140
234134
|
};
|
|
234141
234135
|
|
|
234142
234136
|
// node_modules/@commitlint/rules/lib/body-min-length.js
|
|
@@ -234144,10 +234138,7 @@ var bodyMinLength = (parsed, _when = void 0, value = 0) => {
|
|
|
234144
234138
|
if (!parsed.body) {
|
|
234145
234139
|
return [true];
|
|
234146
234140
|
}
|
|
234147
|
-
return [
|
|
234148
|
-
min_length_default(parsed.body, value),
|
|
234149
|
-
`body must not be shorter than ${value} characters`
|
|
234150
|
-
];
|
|
234141
|
+
return [min_length_default(parsed.body, value), `body must not be shorter than ${value} characters`];
|
|
234151
234142
|
};
|
|
234152
234143
|
|
|
234153
234144
|
// node_modules/@commitlint/rules/lib/footer-empty.js
|
|
@@ -234173,11 +234164,7 @@ var footerLeadingBlank = (parsed, when = "always") => {
|
|
|
234173
234164
|
const succeeds = leading === "";
|
|
234174
234165
|
return [
|
|
234175
234166
|
negated6 ? !succeeds : succeeds,
|
|
234176
|
-
message([
|
|
234177
|
-
"footer",
|
|
234178
|
-
negated6 ? "may not" : "must",
|
|
234179
|
-
"have leading blank line"
|
|
234180
|
-
])
|
|
234167
|
+
message(["footer", negated6 ? "may not" : "must", "have leading blank line"])
|
|
234181
234168
|
];
|
|
234182
234169
|
};
|
|
234183
234170
|
|
|
@@ -234187,10 +234174,7 @@ var footerMaxLength = (parsed, _when = void 0, value = 0) => {
|
|
|
234187
234174
|
if (!input) {
|
|
234188
234175
|
return [true];
|
|
234189
234176
|
}
|
|
234190
|
-
return [
|
|
234191
|
-
max_length_default(input, value),
|
|
234192
|
-
`footer must not be longer than ${value} characters`
|
|
234193
|
-
];
|
|
234177
|
+
return [max_length_default(input, value), `footer must not be longer than ${value} characters`];
|
|
234194
234178
|
};
|
|
234195
234179
|
|
|
234196
234180
|
// node_modules/@commitlint/rules/lib/footer-max-line-length.js
|
|
@@ -234210,10 +234194,7 @@ var footerMinLength = (parsed, _when = void 0, value = 0) => {
|
|
|
234210
234194
|
if (!parsed.footer) {
|
|
234211
234195
|
return [true];
|
|
234212
234196
|
}
|
|
234213
|
-
return [
|
|
234214
|
-
min_length_default(parsed.footer, value),
|
|
234215
|
-
`footer must not be shorter than ${value} characters`
|
|
234216
|
-
];
|
|
234197
|
+
return [min_length_default(parsed.footer, value), `footer must not be shorter than ${value} characters`];
|
|
234217
234198
|
};
|
|
234218
234199
|
|
|
234219
234200
|
// node_modules/@commitlint/rules/lib/header-case.js
|
|
@@ -234348,9 +234329,7 @@ var scopeDelimiterStyle = ({ scope }, when = "always", value = []) => {
|
|
|
234348
234329
|
const isNever = when === "never";
|
|
234349
234330
|
return [
|
|
234350
234331
|
isNever ? !isAllDelimitersAllowed : isAllDelimitersAllowed,
|
|
234351
|
-
message([
|
|
234352
|
-
`scope delimiters must ${isNever ? "not " : ""}be one of [${delimiters.join(", ")}]`
|
|
234353
|
-
])
|
|
234332
|
+
message([`scope delimiters must ${isNever ? "not " : ""}be one of [${delimiters.join(", ")}]`])
|
|
234354
234333
|
];
|
|
234355
234334
|
};
|
|
234356
234335
|
|
|
@@ -234393,10 +234372,7 @@ var scopeMaxLength = (parsed, _when = void 0, value = 0) => {
|
|
|
234393
234372
|
if (!input) {
|
|
234394
234373
|
return [true];
|
|
234395
234374
|
}
|
|
234396
|
-
return [
|
|
234397
|
-
max_length_default(input, value),
|
|
234398
|
-
`scope must not be longer than ${value} characters`
|
|
234399
|
-
];
|
|
234375
|
+
return [max_length_default(input, value), `scope must not be longer than ${value} characters`];
|
|
234400
234376
|
};
|
|
234401
234377
|
|
|
234402
234378
|
// node_modules/@commitlint/rules/lib/scope-min-length.js
|
|
@@ -234405,10 +234381,7 @@ var scopeMinLength = (parsed, _when = void 0, value = 0) => {
|
|
|
234405
234381
|
if (!input) {
|
|
234406
234382
|
return [true];
|
|
234407
234383
|
}
|
|
234408
|
-
return [
|
|
234409
|
-
min_length_default(input, value),
|
|
234410
|
-
`scope must not be shorter than ${value} characters`
|
|
234411
|
-
];
|
|
234384
|
+
return [min_length_default(input, value), `scope must not be shorter than ${value} characters`];
|
|
234412
234385
|
};
|
|
234413
234386
|
|
|
234414
234387
|
// node_modules/@commitlint/rules/lib/signed-off-by.js
|
|
@@ -234494,10 +234467,7 @@ var subjectMaxLength = (parsed, _when = void 0, value = 0) => {
|
|
|
234494
234467
|
if (!input) {
|
|
234495
234468
|
return [true];
|
|
234496
234469
|
}
|
|
234497
|
-
return [
|
|
234498
|
-
max_length_default(input, value),
|
|
234499
|
-
`subject must not be longer than ${value} characters`
|
|
234500
|
-
];
|
|
234470
|
+
return [max_length_default(input, value), `subject must not be longer than ${value} characters`];
|
|
234501
234471
|
};
|
|
234502
234472
|
|
|
234503
234473
|
// node_modules/@commitlint/rules/lib/subject-min-length.js
|
|
@@ -234506,10 +234476,7 @@ var subjectMinLength = (parsed, _when = void 0, value = 0) => {
|
|
|
234506
234476
|
if (!input) {
|
|
234507
234477
|
return [true];
|
|
234508
234478
|
}
|
|
234509
|
-
return [
|
|
234510
|
-
min_length_default(input, value),
|
|
234511
|
-
`subject must not be shorter than ${value} characters`
|
|
234512
|
-
];
|
|
234479
|
+
return [min_length_default(input, value), `subject must not be shorter than ${value} characters`];
|
|
234513
234480
|
};
|
|
234514
234481
|
|
|
234515
234482
|
// node_modules/@commitlint/rules/lib/subject-exclamation-mark.js
|
|
@@ -234541,11 +234508,7 @@ var trailerExists = (parsed, when = "always", value = "") => {
|
|
|
234541
234508
|
const hasTrailer = matches > 0;
|
|
234542
234509
|
return [
|
|
234543
234510
|
negated6 ? !hasTrailer : hasTrailer,
|
|
234544
|
-
message([
|
|
234545
|
-
"message",
|
|
234546
|
-
negated6 ? "must not" : "must",
|
|
234547
|
-
"have `" + value + "` trailer"
|
|
234548
|
-
])
|
|
234511
|
+
message(["message", negated6 ? "must not" : "must", "have `" + value + "` trailer"])
|
|
234549
234512
|
];
|
|
234550
234513
|
};
|
|
234551
234514
|
|
|
@@ -234596,11 +234559,7 @@ var typeEnum = (parsed, when = "always", value = []) => {
|
|
|
234596
234559
|
const result = enum_default(input, value);
|
|
234597
234560
|
return [
|
|
234598
234561
|
negated6 ? !result : result,
|
|
234599
|
-
message([
|
|
234600
|
-
`type must`,
|
|
234601
|
-
negated6 ? `not` : null,
|
|
234602
|
-
`be one of [${value.join(", ")}]`
|
|
234603
|
-
])
|
|
234562
|
+
message([`type must`, negated6 ? `not` : null, `be one of [${value.join(", ")}]`])
|
|
234604
234563
|
];
|
|
234605
234564
|
};
|
|
234606
234565
|
|
|
@@ -234610,10 +234569,7 @@ var typeMaxLength = (parsed, _when = void 0, value = 0) => {
|
|
|
234610
234569
|
if (!input) {
|
|
234611
234570
|
return [true];
|
|
234612
234571
|
}
|
|
234613
|
-
return [
|
|
234614
|
-
max_length_default(input, value),
|
|
234615
|
-
`type must not be longer than ${value} characters`
|
|
234616
|
-
];
|
|
234572
|
+
return [max_length_default(input, value), `type must not be longer than ${value} characters`];
|
|
234617
234573
|
};
|
|
234618
234574
|
|
|
234619
234575
|
// node_modules/@commitlint/rules/lib/type-min-length.js
|
|
@@ -234622,10 +234578,7 @@ var typeMinLength = (parsed, _when = void 0, value = 0) => {
|
|
|
234622
234578
|
if (!input) {
|
|
234623
234579
|
return [true];
|
|
234624
234580
|
}
|
|
234625
|
-
return [
|
|
234626
|
-
min_length_default(input, value),
|
|
234627
|
-
`type must not be shorter than ${value} characters`
|
|
234628
|
-
];
|
|
234581
|
+
return [min_length_default(input, value), `type must not be shorter than ${value} characters`];
|
|
234629
234582
|
};
|
|
234630
234583
|
|
|
234631
234584
|
// node_modules/@commitlint/rules/lib/index.js
|
|
@@ -234822,15 +234775,7 @@ function formatErrors(errors) {
|
|
|
234822
234775
|
// node_modules/@commitlint/config-validator/lib/validate.js
|
|
234823
234776
|
var require2 = createRequire(import.meta.url);
|
|
234824
234777
|
var schema = require2("./commitlint.schema.json");
|
|
234825
|
-
var TYPE_OF = [
|
|
234826
|
-
"undefined",
|
|
234827
|
-
"string",
|
|
234828
|
-
"number",
|
|
234829
|
-
"object",
|
|
234830
|
-
"function",
|
|
234831
|
-
"boolean",
|
|
234832
|
-
"symbol"
|
|
234833
|
-
];
|
|
234778
|
+
var TYPE_OF = ["undefined", "string", "number", "object", "function", "boolean", "symbol"];
|
|
234834
234779
|
var Ajv = import_ajv.default;
|
|
234835
234780
|
function validateConfig(source, config) {
|
|
234836
234781
|
const ajv = new Ajv({
|
|
@@ -235045,13 +234990,7 @@ var dynamicImport = async (id) => {
|
|
|
235045
234990
|
const imported = await (path2.isAbsolute(id) ? import(pathToFileURL(id).toString()) : import(id));
|
|
235046
234991
|
return "default" in imported && imported.default || imported;
|
|
235047
234992
|
};
|
|
235048
|
-
var pathSuffixes = [
|
|
235049
|
-
"",
|
|
235050
|
-
".js",
|
|
235051
|
-
".json",
|
|
235052
|
-
`${path2.sep}index.js`,
|
|
235053
|
-
`${path2.sep}index.json`
|
|
235054
|
-
];
|
|
234993
|
+
var pathSuffixes = ["", ".js", ".json", `${path2.sep}index.js`, `${path2.sep}index.json`];
|
|
235055
234994
|
var specifierSuffixes = ["", ".js", ".json", "/index.js", "/index.json"];
|
|
235056
234995
|
var resolveFrom = (lookup, parent) => {
|
|
235057
234996
|
if (path2.isAbsolute(lookup)) {
|
|
@@ -235225,10 +235164,7 @@ function resolveFromNpxCache(specifier) {
|
|
|
235225
235164
|
return void 0;
|
|
235226
235165
|
}
|
|
235227
235166
|
function resolveGlobalSilent(specifier) {
|
|
235228
|
-
for (const globalPackages of [
|
|
235229
|
-
global_directory_default.npm.packages,
|
|
235230
|
-
global_directory_default.yarn.packages
|
|
235231
|
-
]) {
|
|
235167
|
+
for (const globalPackages of [global_directory_default.npm.packages, global_directory_default.yarn.packages]) {
|
|
235232
235168
|
try {
|
|
235233
235169
|
return resolveFrom(specifier, globalPackages);
|
|
235234
235170
|
} catch (err) {
|
|
@@ -235628,6 +235564,9 @@ async function loadPlugin(plugins, pluginName, options = {}) {
|
|
|
235628
235564
|
|
|
235629
235565
|
// node_modules/@commitlint/load/lib/load.js
|
|
235630
235566
|
var resolveFormatter = (formatter, parent) => {
|
|
235567
|
+
if (!formatter.startsWith(".")) {
|
|
235568
|
+
return formatter;
|
|
235569
|
+
}
|
|
235631
235570
|
try {
|
|
235632
235571
|
return resolveFrom(formatter, parent);
|
|
235633
235572
|
} catch (error) {
|
|
@@ -236763,21 +236702,16 @@ async function getCommitMessages(settings) {
|
|
|
236763
236702
|
return getEditCommit(cwd, edit);
|
|
236764
236703
|
}
|
|
236765
236704
|
if (last) {
|
|
236766
|
-
const gitCommandResult = await V("git", ["log", "-1", "--pretty=format:%B"], {
|
|
236705
|
+
const gitCommandResult = await V("git", ["log", "-1", "--pretty=format:%B"], {
|
|
236706
|
+
nodeOptions: { cwd }
|
|
236707
|
+
});
|
|
236767
236708
|
let output2 = gitCommandResult.stdout.trim();
|
|
236768
236709
|
if (output2[0] == '"' && output2[output2.length - 1] == '"')
|
|
236769
236710
|
output2 = output2.slice(1, -1);
|
|
236770
236711
|
return [output2];
|
|
236771
236712
|
}
|
|
236772
236713
|
if (!from && fromLastTag) {
|
|
236773
|
-
const output2 = await V("git", [
|
|
236774
|
-
"describe",
|
|
236775
|
-
"--abbrev=40",
|
|
236776
|
-
"--always",
|
|
236777
|
-
"--first-parent",
|
|
236778
|
-
"--long",
|
|
236779
|
-
"--tags"
|
|
236780
|
-
], { nodeOptions: { cwd } });
|
|
236714
|
+
const output2 = await V("git", ["describe", "--abbrev=40", "--always", "--first-parent", "--long", "--tags"], { nodeOptions: { cwd } });
|
|
236781
236715
|
const stdout = output2.stdout.trim();
|
|
236782
236716
|
if (stdout.length === 40) {
|
|
236783
236717
|
from = stdout;
|
package/dist/config.js
CHANGED
|
@@ -31,11 +31,7 @@ var lib_default = {
|
|
|
31
31
|
"body-leading-blank": [RuleConfigSeverity.Warning, "always"],
|
|
32
32
|
"body-max-line-length": [RuleConfigSeverity.Error, "always", 100],
|
|
33
33
|
"footer-leading-blank": [RuleConfigSeverity.Warning, "always"],
|
|
34
|
-
"footer-max-line-length": [
|
|
35
|
-
RuleConfigSeverity.Error,
|
|
36
|
-
"always",
|
|
37
|
-
100
|
|
38
|
-
],
|
|
34
|
+
"footer-max-line-length": [RuleConfigSeverity.Error, "always", 100],
|
|
39
35
|
"header-max-length": [RuleConfigSeverity.Error, "always", 100],
|
|
40
36
|
"header-trim": [RuleConfigSeverity.Error, "always"],
|
|
41
37
|
"subject-case": [
|
package/dist/formatter.js
CHANGED
|
@@ -107,7 +107,11 @@ var require_picocolors = __commonJS({
|
|
|
107
107
|
// node_modules/@commitlint/format/lib/format.js
|
|
108
108
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
109
109
|
var DEFAULT_SIGNS = [" ", "\u26A0", "\u2716"];
|
|
110
|
-
var DEFAULT_COLORS = [
|
|
110
|
+
var DEFAULT_COLORS = [
|
|
111
|
+
"white",
|
|
112
|
+
"yellow",
|
|
113
|
+
"red"
|
|
114
|
+
];
|
|
111
115
|
function format(report = {}, options = {}) {
|
|
112
116
|
const { results = [] } = report;
|
|
113
117
|
const fi = (result) => formatInput(result, options);
|