@html-validate/commitlint-config 3.6.11 → 4.0.0

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/formatter.js CHANGED
@@ -115,7 +115,7 @@ function format(report = {}, options = {}) {
115
115
  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
116
  }
117
117
  function formatInput(result, options = {}) {
118
- const { color: enabled = true } = options;
118
+ const { color: enabled = true, legacyOutput = false } = options;
119
119
  const { errors = [], warnings = [], input = "" } = result;
120
120
  if (!input) {
121
121
  return [""];
@@ -124,7 +124,14 @@ function formatInput(result, options = {}) {
124
124
  const decoration = enabled ? import_picocolors.default.gray(sign) : sign;
125
125
  const decoratedInput = enabled ? import_picocolors.default.bold(input) : input;
126
126
  const hasProblems = errors.length > 0 || warnings.length > 0;
127
- return options.verbose || hasProblems ? [`${decoration} input: ${decoratedInput}`] : [];
127
+ if (!(options.verbose || hasProblems)) {
128
+ return [];
129
+ }
130
+ if (legacyOutput) {
131
+ return [`${decoration} input: ${decoratedInput}`];
132
+ }
133
+ return [`${decoration} --- input ---
134
+ ${decoratedInput}`];
128
135
  }
129
136
  function formatResult(result = {}, options = {}) {
130
137
  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.0",
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"