@html-validate/commitlint-config 3.6.11 → 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/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 = ["white", "yellow", "red"];
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);
@@ -115,7 +119,7 @@ function format(report = {}, options = {}) {
115
119
  return results.filter((r) => Array.isArray(r.warnings) || Array.isArray(r.errors)).map((result) => [...fi(result), ...fr(result)]).reduce((acc, item) => Array.isArray(item) ? [...acc, ...item] : [...acc, item], []).join("\n");
116
120
  }
117
121
  function formatInput(result, options = {}) {
118
- const { color: enabled = true } = options;
122
+ const { color: enabled = true, legacyOutput = false } = options;
119
123
  const { errors = [], warnings = [], input = "" } = result;
120
124
  if (!input) {
121
125
  return [""];
@@ -124,7 +128,14 @@ function formatInput(result, options = {}) {
124
128
  const decoration = enabled ? import_picocolors.default.gray(sign) : sign;
125
129
  const decoratedInput = enabled ? import_picocolors.default.bold(input) : input;
126
130
  const hasProblems = errors.length > 0 || warnings.length > 0;
127
- return options.verbose || hasProblems ? [`${decoration} input: ${decoratedInput}`] : [];
131
+ if (!(options.verbose || hasProblems)) {
132
+ return [];
133
+ }
134
+ if (legacyOutput) {
135
+ return [`${decoration} input: ${decoratedInput}`];
136
+ }
137
+ return [`${decoration} --- input ---
138
+ ${decoratedInput}`];
128
139
  }
129
140
  function formatResult(result = {}, options = {}) {
130
141
  const { signs = DEFAULT_SIGNS, colors = DEFAULT_COLORS, color: enabled = true } = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@html-validate/commitlint-config",
3
- "version": "3.6.11",
3
+ "version": "4.0.1",
4
4
  "description": "Commitlint sharable config used by the various HTML-validate packages",
5
5
  "keywords": [
6
6
  "commitlint"
@@ -44,7 +44,7 @@
44
44
  "postinstall": "node bin/install.js"
45
45
  },
46
46
  "engines": {
47
- "node": "^20.17 || >= 22.16"
47
+ "node": "^22.16.0 || >= 24.0.0"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public"