@iobroker/repochecker 5.24.0 → 5.24.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/README.md +9 -10
- package/lib/M0000_PackageJson.js +3 -3
- package/lib/M1000_IOPackageJson.js +4 -3
- package/lib/M3000_Testing.js +2 -2
- package/lib/M4000_Repository.js +33 -5
- package/lib/M5000_Code.js +5 -2
- package/lib/config.js +11 -7
- package/lib/config_StateRoles.js +3 -3
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -56,6 +56,15 @@ 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.24.2 (2026-11-12)
|
|
60
|
+
* (mcm1957) Handling of src-webcomponents directory added
|
|
61
|
+
|
|
62
|
+
### 5.24.1 (2026-11-11)
|
|
63
|
+
* (mcm1957) Some stateroles have been corrected
|
|
64
|
+
* (mcm1957) Fix S4050 false positive: copyright check in README.md now only applies to lines within the Changelog section (see: #1194)
|
|
65
|
+
* (mcm1957) Fix W5042 false positive: TypeScript declaration files (*.d.ts) are no longer scanned for runtime dependencies (see: #1151)
|
|
66
|
+
* (mcm1957) Make E1068 "common.keywords" must not contain ... an error
|
|
67
|
+
|
|
59
68
|
### 5.24.0 (2026-11-09)
|
|
60
69
|
* (@copilot) jsDelivr file downloads retry transient errors and HTML responses received for JSON files. see: #1201
|
|
61
70
|
* (@mcm1957) Wildcard support added for source directory exclusions; all `src-*` entries replaced by a single `src-*` pattern (fixes false positive E9507 for directories like `src-web`). see: #1209
|
|
@@ -67,16 +76,6 @@ GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
67
76
|
### 5.23.1 (2026-10-16)
|
|
68
77
|
* (@mcm1957) More pecial handling of some core adapters added.
|
|
69
78
|
|
|
70
|
-
### 5.23.0 (2026-10-14)
|
|
71
|
-
|
|
72
|
-
* (@mcm1957) Fixed: failed workflow runs now correctly show as [E3032] instead of [W3032] (see [#1196](https://github.com/ioBroker/ioBroker.repochecker/issues/1196)).
|
|
73
|
-
* (@mcm1957) Special handling of some core adapters added.
|
|
74
|
-
* (@mcm1957) Fixed: githubToken and axios instance are now isolated per check; concurrent checks no longer share authorization state or redaction context (see [#1193](https://github.com/ioBroker/ioBroker.repochecker/issues/1193)).
|
|
75
|
-
|
|
76
|
-
### 5.22.16 (2026-10-13)
|
|
77
|
-
|
|
78
|
-
* (@mcm1957) Fixed false positive [E6025] when README.md contains `#` headings inside fenced code blocks.
|
|
79
|
-
|
|
80
79
|
[Older changelogs can be found there](CHANGELOG_OLD.md)
|
|
81
80
|
|
|
82
81
|
## License
|
package/lib/M0000_PackageJson.js
CHANGED
|
@@ -122,9 +122,9 @@ const devDependenciesPackageJson = {
|
|
|
122
122
|
optional: true,
|
|
123
123
|
},
|
|
124
124
|
'@iobroker/testing': {
|
|
125
|
-
required: '6.2.
|
|
126
|
-
recommended: '6.
|
|
127
|
-
actual: '6.3.
|
|
125
|
+
required: '6.2.2',
|
|
126
|
+
recommended: '6.3.1',
|
|
127
|
+
actual: '6.3.2',
|
|
128
128
|
onlyWWW: false,
|
|
129
129
|
alternatives: ['@iobroker/legacy-testing'],
|
|
130
130
|
},
|
|
@@ -735,8 +735,9 @@ async function checkIOPackageJson(context) {
|
|
|
735
735
|
context.ioPackageJson.common.keywords.map(k => k.toLowerCase()).includes(keyword),
|
|
736
736
|
).length > 0
|
|
737
737
|
) {
|
|
738
|
-
context.
|
|
739
|
-
`[
|
|
738
|
+
context.errors.push(
|
|
739
|
+
`[W
|
|
740
|
+
E1068] "common.keywords" must not contain "${forbiddenKeywords.join(', ')}" io-package.json`,
|
|
740
741
|
);
|
|
741
742
|
}
|
|
742
743
|
|
|
@@ -1894,7 +1895,7 @@ exports.checkIOPackageJson = checkIOPackageJson;
|
|
|
1894
1895
|
// [1065] "common.mode" not found in io-package.json
|
|
1895
1896
|
// [1066] "common.mode: ${context.ioPackageJson.common.mode}" is unknown in io-package.json.
|
|
1896
1897
|
// [1067] scheduled adapters must have "common.schedule" property in io-package.json
|
|
1897
|
-
// [1068] "common.keywords"
|
|
1898
|
+
// [1068] "common.keywords" must not contain "${forbiddenKeywords.join(', ')}" io-package.json0
|
|
1898
1899
|
// [1069] "common.keywords" must be an array within io-package.json and contain some useful keywords
|
|
1899
1900
|
// [1070] "common.licenseInformation.type" is invalid. Select valid type (e.g. free)
|
|
1900
1901
|
// [1071] "common.licenseInformation.link" is required for non-free adapters
|
package/lib/M3000_Testing.js
CHANGED
|
@@ -283,7 +283,7 @@ async function checkTagTriggeredRun(context, workflowRuns, version, taggedVersio
|
|
|
283
283
|
`[S3055] "${WORKFLOW_FILE_SHORT}": log for "${adapterJob.name}" job in ${formatRunLink(tagRun)} for ${sourceLabel} does no longer exist.`,
|
|
284
284
|
);
|
|
285
285
|
}
|
|
286
|
-
} else {
|
|
286
|
+
} else if (!context.cfg.isWebExtension) {
|
|
287
287
|
const missingAdapterLines = findMissingExpectedLines(
|
|
288
288
|
EXPECTED_TEST_INTEGRATION_LINES,
|
|
289
289
|
adapterLog,
|
|
@@ -1131,7 +1131,7 @@ async function checkTests(context) {
|
|
|
1131
1131
|
`[S3055] "${WORKFLOW_FILE_SHORT}": log for "${adapterJob.name}" job in ${formatRunLink(lastRun)} on branch "${defaultBranch}" does no longer exist.`,
|
|
1132
1132
|
);
|
|
1133
1133
|
}
|
|
1134
|
-
} else {
|
|
1134
|
+
} else if (!context.cfg.isWebExtension) {
|
|
1135
1135
|
const missingAdapterLines = findMissingExpectedLines(
|
|
1136
1136
|
EXPECTED_TEST_INTEGRATION_LINES,
|
|
1137
1137
|
adapterLog,
|
package/lib/M4000_Repository.js
CHANGED
|
@@ -522,7 +522,7 @@ async function checkEmailAddresses(context) {
|
|
|
522
522
|
// 2) copyright lines at README.md and LICENSE (each file checked as one group).
|
|
523
523
|
// A missing email address is only a suggestion here and is raised to an
|
|
524
524
|
// error again for new adapters via lib/postprocessing.js.
|
|
525
|
-
const checkCopyrightFile = async (path, fileDescription, suggestionCode) => {
|
|
525
|
+
const checkCopyrightFile = async (path, fileDescription, suggestionCode, sectionName) => {
|
|
526
526
|
let content;
|
|
527
527
|
try {
|
|
528
528
|
content = await common.getFile(context, path);
|
|
@@ -530,12 +530,33 @@ async function checkEmailAddresses(context) {
|
|
|
530
530
|
// file existence is checked elsewhere - do not raise a second error here
|
|
531
531
|
return;
|
|
532
532
|
}
|
|
533
|
+
|
|
534
|
+
// If a sectionName is given, restrict the scan to that H2 section only.
|
|
535
|
+
// This prevents copyright lines in other parts of the file (e.g. disclaimer
|
|
536
|
+
// paragraphs outside the license section) from triggering false positives.
|
|
537
|
+
let textToScan = content || '';
|
|
538
|
+
if (sectionName) {
|
|
539
|
+
const escapedSection = sectionName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
540
|
+
const headerRegex = new RegExp(`^##[ \\t]+${escapedSection}[ \\t]*$`, 'im');
|
|
541
|
+
const headerMatch = headerRegex.exec(textToScan);
|
|
542
|
+
if (headerMatch) {
|
|
543
|
+
const sectionStart = headerMatch.index + headerMatch[0].length;
|
|
544
|
+
const sectionTail = textToScan.slice(sectionStart);
|
|
545
|
+
const nextHeaderMatch = /^##[ \t]+/m.exec(sectionTail);
|
|
546
|
+
const sectionEnd = nextHeaderMatch ? sectionStart + nextHeaderMatch.index : textToScan.length;
|
|
547
|
+
textToScan = textToScan.slice(sectionStart, sectionEnd);
|
|
548
|
+
} else {
|
|
549
|
+
// Section not found — nothing to check
|
|
550
|
+
textToScan = '';
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
533
554
|
// Only look at actual copyright notice lines of the form
|
|
534
555
|
// "Copyright (c) <year> <name> <email>"
|
|
535
556
|
// where <year> is a single year (nnnn) or a range (nnnn-mmmm / nnnn - mmmm).
|
|
536
557
|
// Requiring the year specification avoids matching license boilerplate such
|
|
537
558
|
// as "The above copyright notice and this permission notice shall be ...".
|
|
538
|
-
const copyrightLines =
|
|
559
|
+
const copyrightLines = textToScan
|
|
539
560
|
.split('\n')
|
|
540
561
|
.filter(line => COPYRIGHT_NOTICE_REGEX.test(line))
|
|
541
562
|
.filter(line => !COPYRIGHT_LINE_EXCLUSIONS.some(excl => line.includes(excl)));
|
|
@@ -549,16 +570,23 @@ async function checkEmailAddresses(context) {
|
|
|
549
570
|
}
|
|
550
571
|
}
|
|
551
572
|
|
|
552
|
-
|
|
573
|
+
// No copyright lines found — nothing to check
|
|
574
|
+
if (copyrightLines.length === 0) {
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
if (invalid.length === 0) {
|
|
553
579
|
context.checks.push(`Valid email address found for copyright line in ${fileDescription}`);
|
|
554
580
|
return;
|
|
555
581
|
}
|
|
556
582
|
|
|
557
|
-
const detail =
|
|
583
|
+
const detail = ` (${invalid.join(', ')})`;
|
|
558
584
|
context.warnings.push(`[${suggestionCode}] No valid email address found for copyright line in ${fileDescription}${detail}`);
|
|
559
585
|
};
|
|
560
586
|
|
|
561
|
-
|
|
587
|
+
// For README.md, only check copyright lines within the "## License" section.
|
|
588
|
+
// Copyright text in other sections (e.g. disclaimer paragraphs) must not be checked.
|
|
589
|
+
await checkCopyrightFile('/README.md', 'README.md', 'S4050', 'License');
|
|
562
590
|
await checkCopyrightFile('/LICENSE', 'LICENSE', 'S4051');
|
|
563
591
|
|
|
564
592
|
// Additional checks for each valid email address collected above
|
package/lib/M5000_Code.js
CHANGED
|
@@ -1772,6 +1772,7 @@ async function checkCode(context) {
|
|
|
1772
1772
|
'/src-tab',
|
|
1773
1773
|
'/src-vis',
|
|
1774
1774
|
'/src-web',
|
|
1775
|
+
'/src-webcomponents',
|
|
1775
1776
|
'/src-widgets',
|
|
1776
1777
|
'/src-www',
|
|
1777
1778
|
'/web-src',
|
|
@@ -1916,10 +1917,12 @@ async function checkCode(context) {
|
|
|
1916
1917
|
continue;
|
|
1917
1918
|
}
|
|
1918
1919
|
|
|
1919
|
-
// Skip excluded file base names
|
|
1920
|
+
// Skip excluded file base names, *.d.ts (TypeScript declaration files are not runtime code),
|
|
1921
|
+
// *.test.* and *.config.* files
|
|
1920
1922
|
const fileBaseName = path.basename(filePath);
|
|
1921
1923
|
if (
|
|
1922
1924
|
excludedSourceFiles.has(fileBaseName) ||
|
|
1925
|
+
fileBaseName.endsWith('.d.ts') ||
|
|
1923
1926
|
fileBaseName.includes('.test.') ||
|
|
1924
1927
|
fileBaseName.includes('.config.')
|
|
1925
1928
|
) {
|
|
@@ -2097,7 +2100,7 @@ async function checkCode(context) {
|
|
|
2097
2100
|
const compactValue = context.ioPackageJson.common.compact;
|
|
2098
2101
|
if (compactValue === false) {
|
|
2099
2102
|
context.warnings.push(
|
|
2100
|
-
`[S5050] process.exit() is called in source files (${fileList}). Calling process.exit() is discouraged in ioBroker adapters. Please avoid it
|
|
2103
|
+
`[S5050] process.exit() is called in source files (${fileList}). Calling process.exit() is discouraged in ioBroker adapters. Please avoid it. (Suggestion only as compact:false set.)`,
|
|
2101
2104
|
);
|
|
2102
2105
|
} else {
|
|
2103
2106
|
// compact is true or undefined — compact mode is active or may become active
|
package/lib/config.js
CHANGED
|
@@ -523,6 +523,9 @@ async function updateConfig(context) {
|
|
|
523
523
|
context.filesList = filesList;
|
|
524
524
|
context.cfg.usesJson5 = filesList.some(file => file.endsWith('.json5') && !file.includes('node_modules'));
|
|
525
525
|
|
|
526
|
+
// Mark webextension mode
|
|
527
|
+
context.cfg.isWebExtension = context.ioPackageJson.common.mode === 'extension';
|
|
528
|
+
|
|
526
529
|
// detect whether the adapter uses a react based UI
|
|
527
530
|
context.usesReact = await detectReact(context);
|
|
528
531
|
|
|
@@ -594,13 +597,14 @@ function logEnvironment(context) {
|
|
|
594
597
|
}
|
|
595
598
|
common.info(' ');
|
|
596
599
|
common.info('Configuration flags set:');
|
|
597
|
-
common.info(` hasJsonConfig: ${context.cfg.hasJsonConfig ? 'true' : 'false'}`);
|
|
598
|
-
common.info(` npmExists: ${context.cfg.npmExists ? 'true' : 'false'}`);
|
|
599
|
-
common.info(` onlyWWW: ${context.cfg.onlyWWW ? 'true' : 'false'}`);
|
|
600
|
-
common.info(`
|
|
601
|
-
common.info(`
|
|
602
|
-
common.info(`
|
|
603
|
-
common.info(`
|
|
600
|
+
common.info(` hasJsonConfig : ${context.cfg.hasJsonConfig ? 'true' : 'false'}`);
|
|
601
|
+
common.info(` npmExists : ${context.cfg.npmExists ? 'true' : 'false'}`);
|
|
602
|
+
common.info(` onlyWWW : ${context.cfg.onlyWWW ? 'true' : 'false'}`);
|
|
603
|
+
common.info(` isWebExtension: ${context.cfg.isWebExtension ? 'true' : 'false'}`);
|
|
604
|
+
common.info(` usesJson5 : ${context.cfg.usesJson5 ? 'true' : 'false'}`);
|
|
605
|
+
common.info(` usesReact : ${context.usesReact ? 'true' : 'false'}`);
|
|
606
|
+
common.info(` isNewAdapter : ${context.cfg.isNewAdapter ? 'true' : 'false'}`);
|
|
607
|
+
common.info(` strict : ${common.isStrict() ? 'true' : 'false'}`);
|
|
604
608
|
common.info(' ');
|
|
605
609
|
|
|
606
610
|
common.info('Statistics:');
|
package/lib/config_StateRoles.js
CHANGED
|
@@ -433,7 +433,7 @@ const STATE_ROLE_RULES = {
|
|
|
433
433
|
read: true,
|
|
434
434
|
},
|
|
435
435
|
json: {
|
|
436
|
-
types: ['string', 'json'],
|
|
436
|
+
types: ['string', 'array', 'json'],
|
|
437
437
|
},
|
|
438
438
|
level: {
|
|
439
439
|
types: ['number'],
|
|
@@ -1042,10 +1042,10 @@ const STATE_ROLE_RULES = {
|
|
|
1042
1042
|
'media.jump': {},
|
|
1043
1043
|
'media.link': {},
|
|
1044
1044
|
'media.mode.repeat': {
|
|
1045
|
-
types: ['
|
|
1045
|
+
types: ['number'],
|
|
1046
1046
|
},
|
|
1047
1047
|
'media.mode.shuffle': {
|
|
1048
|
-
types: ['
|
|
1048
|
+
types: ['boolean'],
|
|
1049
1049
|
},
|
|
1050
1050
|
'media.mute': {
|
|
1051
1051
|
types: ['boolean'],
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.24.
|
|
2
|
+
"version": "5.24.2",
|
|
3
3
|
"name": "@iobroker/repochecker",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"ajv": "^8.20.0",
|
|
6
|
-
"axios": "^1.
|
|
6
|
+
"axios": "^1.21.0",
|
|
7
7
|
"compare-versions": "^6.1.1",
|
|
8
|
-
"dotenv": "^
|
|
8
|
+
"dotenv": "^18.0.9",
|
|
9
9
|
"image-size": "^1.2.0",
|
|
10
|
-
"js-yaml": "^5.
|
|
10
|
+
"js-yaml": "^5.5.0",
|
|
11
11
|
"json5": "^2.2.3",
|
|
12
|
-
"minimatch": "^
|
|
12
|
+
"minimatch": "^11.0.5",
|
|
13
13
|
"semver": "^7.8.5"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|