@iobroker/repochecker 5.22.6 → 5.22.8
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 +8 -0
- package/lib/M6000_Readme.js +2 -1
- package/lib/postprocessing.js +96 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,6 +56,14 @@ GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
56
56
|
Placeholder for the next version (at the beginning of the line):
|
|
57
57
|
### **WORK IN PROGRESS**
|
|
58
58
|
-->
|
|
59
|
+
### 5.22.8 (2026-09-28)
|
|
60
|
+
|
|
61
|
+
* (mcm1957) adapt older changelog titles
|
|
62
|
+
|
|
63
|
+
### 5.22.7 (2026-09-25)
|
|
64
|
+
|
|
65
|
+
* (mcm1957) postprocessing: add per-adapter severity remapping table
|
|
66
|
+
|
|
59
67
|
### 5.22.6 (2026-09-25)
|
|
60
68
|
|
|
61
69
|
* (mcm1957) @iobroker/testing 6.2.1 is required now
|
package/lib/M6000_Readme.js
CHANGED
|
@@ -433,7 +433,8 @@ async function checkReadme(context) {
|
|
|
433
433
|
!header.includes('WORK IN PROGRESS') &&
|
|
434
434
|
!header.includes('CHANGELOG_OLD.md') &&
|
|
435
435
|
!header.toLowerCase().includes('older versions') &&
|
|
436
|
-
!header.toLowerCase().includes('older changelog')
|
|
436
|
+
!header.toLowerCase().includes('older changelog') &&
|
|
437
|
+
!header.toLowerCase().includes('older entries')
|
|
437
438
|
) {
|
|
438
439
|
invalidVersionHeaders.push(header);
|
|
439
440
|
}
|
package/lib/postprocessing.js
CHANGED
|
@@ -45,6 +45,20 @@ const filterByAdapter = {
|
|
|
45
45
|
],
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Per-adapter severity remapping table (used by remapIssuesByAdapter).
|
|
50
|
+
*
|
|
51
|
+
* Outer key : adapter name without the "ioBroker." prefix, e.g. 'zigbee'.
|
|
52
|
+
* Inner key : issue code, e.g. 'E3025'.
|
|
53
|
+
* Value : target severity – 'E' (error), 'W' (warning), 'S' (suggestion),
|
|
54
|
+
* or 'N' (drop entirely).
|
|
55
|
+
*/
|
|
56
|
+
const remapSeverityByAdapter = {
|
|
57
|
+
zigbee: {
|
|
58
|
+
E3025: 'W', // Node 26 test requirement not yet fulfilled; keep visible but reduce to warning
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
48
62
|
/**
|
|
49
63
|
* Severity remapping table for new adapters (used by adaptSeverity4New).
|
|
50
64
|
*
|
|
@@ -199,6 +213,87 @@ function filterIssuesByAdapter(context) {
|
|
|
199
213
|
return context;
|
|
200
214
|
}
|
|
201
215
|
|
|
216
|
+
/**
|
|
217
|
+
* Remaps the severity of issues for the current adapter according to remapByAdapter.
|
|
218
|
+
*
|
|
219
|
+
* If context.adapterName is not set, or no entry exists for that adapter
|
|
220
|
+
* in remapByAdapter, the function returns immediately without changes.
|
|
221
|
+
*
|
|
222
|
+
* For every remapped issue an info message is logged via common.info().
|
|
223
|
+
* If at least one issue was remapped a summary info is appended to
|
|
224
|
+
* context.warnings.
|
|
225
|
+
*
|
|
226
|
+
* @param {object} context - The checker context
|
|
227
|
+
* @returns {object} The (possibly modified) context
|
|
228
|
+
*/
|
|
229
|
+
function remapIssuesByAdapter(context) {
|
|
230
|
+
const adapterName = context.adapterName;
|
|
231
|
+
if (!adapterName) {
|
|
232
|
+
return context;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const rules = remapSeverityByAdapter[adapterName];
|
|
236
|
+
if (!rules || Object.keys(rules).length === 0) {
|
|
237
|
+
return context;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
let remappedCount = 0;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Scan one issue array in-place: remove matching entries and re-insert
|
|
244
|
+
* them with the new severity.
|
|
245
|
+
*
|
|
246
|
+
* @param {string[]} arr - context.errors or context.warnings
|
|
247
|
+
*/
|
|
248
|
+
function processArray(arr) {
|
|
249
|
+
const toReroute = [];
|
|
250
|
+
|
|
251
|
+
for (let i = arr.length - 1; i >= 0; i--) {
|
|
252
|
+
const issue = arr[i];
|
|
253
|
+
const match = issue.match(/^\[([EWSI])(\d+)\]/);
|
|
254
|
+
if (!match) {
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
const issueKey = match[1] + match[2]; // e.g. "E3025"
|
|
258
|
+
if (!Object.prototype.hasOwnProperty.call(rules, issueKey)) {
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
const targetSeverity = rules[issueKey];
|
|
262
|
+
common.info(
|
|
263
|
+
`[postprocessing] remapIssuesByAdapter: remapping issue for adapter "${adapterName}" to ${targetSeverity}: ${issue}`,
|
|
264
|
+
);
|
|
265
|
+
arr.splice(i, 1);
|
|
266
|
+
toReroute.push({ targetSeverity, issue });
|
|
267
|
+
remappedCount++;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
for (const { targetSeverity, issue } of toReroute) {
|
|
271
|
+
if (targetSeverity === 'N') {
|
|
272
|
+
continue; // drop entirely
|
|
273
|
+
}
|
|
274
|
+
// Replace the leading [X####] prefix with the new severity letter
|
|
275
|
+
const newIssue = issue.replace(/^\[([EWSI])(\d+)\]/, `[${targetSeverity}$2]`);
|
|
276
|
+
if (targetSeverity === 'E') {
|
|
277
|
+
context.errors.push(newIssue);
|
|
278
|
+
} else {
|
|
279
|
+
context.warnings.push(newIssue);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
processArray(context.errors);
|
|
285
|
+
processArray(context.warnings);
|
|
286
|
+
|
|
287
|
+
if (remappedCount > 0) {
|
|
288
|
+
common.info(
|
|
289
|
+
`[postprocessing] remapIssuesByAdapter: ${remappedCount} issue(s) remapped for adapter "${adapterName}".`,
|
|
290
|
+
);
|
|
291
|
+
context.warnings.push(`[S0000] Info: ${remappedCount} issue(s) have adjusted severity for this adapter.`);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
return context;
|
|
295
|
+
}
|
|
296
|
+
|
|
202
297
|
/**
|
|
203
298
|
* Remaps the severity of issues for new adapters according to mapSeverity4New.
|
|
204
299
|
*
|
|
@@ -288,6 +383,7 @@ function postprocessing(context) {
|
|
|
288
383
|
console.log('\n[postprocessing] running postprocessing tasks');
|
|
289
384
|
|
|
290
385
|
adaptSeverity4New(context);
|
|
386
|
+
remapIssuesByAdapter(context);
|
|
291
387
|
filterIssuesByAdapter(context);
|
|
292
388
|
|
|
293
389
|
return context;
|
package/package.json
CHANGED