@iobroker/repochecker 5.10.3 → 5.10.4
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 +3 -0
- package/lib/M3000_Testing.js +3 -1
- package/lib/M5000_Code.js +4 -3
- package/lib/M6000_Readme.js +18 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,9 @@ Example:
|
|
|
25
25
|
Placeholder for the next version (at the beginning of the line):
|
|
26
26
|
### **WORK IN PROGRESS**
|
|
27
27
|
-->
|
|
28
|
+
### 5.10.4 (2026-04-12)
|
|
29
|
+
- (@copilot) Enhanced E6013 check: detects additional discouraged installation methods in README.md, including `iobroker`/`iob` npm install and url commands, and `npm install`/`npm i` with `owner/iobroker.adaptername` GitHub shorthand. Updated error message to mention "directly from GitHub, directly from npm or using npm commands".
|
|
30
|
+
|
|
28
31
|
### 5.10.3 (2026-04-11)
|
|
29
32
|
- (@copilot) Fixed false positive W5042 for TypeScript type-only imports: `import type { Foo } from 'pkg'` no longer registers `pkg` as a required runtime dependency. Related to [#833]
|
|
30
33
|
|
package/lib/M3000_Testing.js
CHANGED
|
@@ -283,7 +283,9 @@ async function checkTests(context) {
|
|
|
283
283
|
if (context.cfg.onlyWWW) {
|
|
284
284
|
context.checks.push('Job "adapter-tests" check skipped (onlyWWW adapter).');
|
|
285
285
|
} else if (!jobs['adapter-tests']) {
|
|
286
|
-
context.errors.push(
|
|
286
|
+
context.errors.push(
|
|
287
|
+
`[E3011] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" is missing. Please add it.`,
|
|
288
|
+
);
|
|
287
289
|
} else {
|
|
288
290
|
context.checks.push('Job "adapter-tests" found.');
|
|
289
291
|
|
package/lib/M5000_Code.js
CHANGED
|
@@ -709,7 +709,7 @@ async function checkCode(context) {
|
|
|
709
709
|
context.ioPackageJson.common.adminUI.config === 'json' &&
|
|
710
710
|
context.filesList.includes('/admin/words.js')
|
|
711
711
|
) {
|
|
712
|
-
common.debug('/admin/words.js detected while jsonConfig is used.')
|
|
712
|
+
common.debug('/admin/words.js detected while jsonConfig is used.');
|
|
713
713
|
let isWordsJsUsed = false;
|
|
714
714
|
|
|
715
715
|
const excludeFiles = [
|
|
@@ -719,7 +719,7 @@ async function checkCode(context) {
|
|
|
719
719
|
'/eslint.config.mjs',
|
|
720
720
|
'/.eslintignore',
|
|
721
721
|
'/.create-adapter.json',
|
|
722
|
-
];
|
|
722
|
+
];
|
|
723
723
|
for (const fileName of Object.keys(context)) {
|
|
724
724
|
if (fileName.startsWith('/') && typeof context[fileName] === 'string' && !excludeFiles.includes(fileName)) {
|
|
725
725
|
const content = context[fileName];
|
|
@@ -751,7 +751,8 @@ async function checkCode(context) {
|
|
|
751
751
|
if (
|
|
752
752
|
(context.filesList.includes('/admin/jsonConfig.json') ||
|
|
753
753
|
context.filesList.includes('/admin/jsonConfig.json5')) &&
|
|
754
|
-
|
|
754
|
+
context.ioPackageJson.common.adminUI &&
|
|
755
|
+
context.ioPackageJson.common.adminUI.config === 'materialize'
|
|
755
756
|
) {
|
|
756
757
|
context.errors.push(
|
|
757
758
|
'[E5046] Using admin/jsonConfig.json(5) requires common.adminUI to be set to "common.adminUI": { "config": "json" }.',
|
package/lib/M6000_Readme.js
CHANGED
|
@@ -443,13 +443,29 @@ async function checkReadme(context) {
|
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
// Check for iobroker url (github) install instructions or other undesired install methods
|
|
446
|
+
const repoOwner = (context.repository || '').split('/')[0];
|
|
447
|
+
const escapedOwner = repoOwner.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
448
|
+
const escapedAdapterName = (context.adapterName || 'unknown').replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
449
|
+
const ownerAdapterPattern = `${escapedOwner}\\/iobroker\\.${escapedAdapterName}`;
|
|
446
450
|
if (
|
|
451
|
+
// iobroker/iob url commands (with or without https://github.com/ prefix)
|
|
452
|
+
new RegExp(
|
|
453
|
+
`(?:^|\\n)[^\\n]*(?:iobroker|iob)\\s+url\\s+(?:https?:\\/\\/github\\.com\\/)?${ownerAdapterPattern}`,
|
|
454
|
+
'i',
|
|
455
|
+
).test(data) ||
|
|
456
|
+
// iobroker/iob npm install commands with owner/repo GitHub shorthand
|
|
457
|
+
new RegExp(`(?:^|\\n)[^\\n]*(?:iobroker|iob)\\s+npm\\s+install\\s+${ownerAdapterPattern}`, 'i').test(
|
|
458
|
+
data,
|
|
459
|
+
) ||
|
|
460
|
+
// npm install/i with owner/repo GitHub shorthand
|
|
461
|
+
new RegExp(`(?:^|\\n)[^\\n]*npm\\s+(?:install|i)\\s+${ownerAdapterPattern}`, 'i').test(data) ||
|
|
462
|
+
// Generic iobroker url https://github.com (fallback for any GitHub URL)
|
|
447
463
|
/(?:^|\n)[^\n]*iobroker\s+url\s+https:\/\/github\.com\//i.test(data) ||
|
|
448
464
|
/install\s+the\s+adapter\s+via\s+iobroker\s+admin\s+as\s+a\s+zip\s+file/i.test(data) ||
|
|
449
465
|
/install\s+from\s+own\s+url/i.test(data)
|
|
450
466
|
) {
|
|
451
467
|
context.errors.push(
|
|
452
|
-
'[E6013] README.md suggests to install the adapter directly from GitHub. Installation from GitHub is discouraged. Please remove these instructions.',
|
|
468
|
+
'[E6013] README.md suggests to install the adapter directly from GitHub, directly from npm or using npm commands. Installation from GitHub is discouraged. Please remove these instructions.',
|
|
453
469
|
);
|
|
454
470
|
} else {
|
|
455
471
|
context.checks.push('README.md does not contain GitHub URL install instructions');
|
|
@@ -519,7 +535,7 @@ exports.checkReadme = checkReadme;
|
|
|
519
535
|
// [6009] Multiple copyright lines found in README.md but line(s) ${linesWithoutTrailingSpaces.join(', ')} missing trailing spaces. Add two spaces at end of each copyright line (except last) for proper formatting.
|
|
520
536
|
// [6011] Copyright lines in README.md are separated by empty line(s) at line(s) ${emptyLineBetweenCopyrightLines.join(', ')}. Remove the empty line(s) between copyright lines and terminate each line (except last) with two spaces.
|
|
521
537
|
// [E6012] README.md contains instructions to install the adapter using direct npm commands. Adapters must not be installed using direct npm commands. Please remove these instructions.
|
|
522
|
-
// [E6013] README.md
|
|
538
|
+
// [E6013] README.md suggests to install the adapter directly from GitHub, directly from npm or using npm commands. Installation from GitHub is discouraged. Please remove these instructions.
|
|
523
539
|
// [S6014] README.md contains an "## Installation" section. Adapter installation is covered by standard ioBroker procedures. This section should be removed unless the adapter requires special installation handling.
|
|
524
540
|
// [E6015] README.md appears to be written in German (detected word: "..."). README.md must be written in English.
|
|
525
541
|
// [W6016] README.md does not appear to be written in English. README.md must be written in English.
|
package/package.json
CHANGED