@iobroker/repochecker 2.2.1 → 2.2.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 +4 -0
- package/doc/issues.json +13 -1
- package/index.js +61 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,6 +20,10 @@ Branch (`master/main/dev`) is optional.
|
|
|
20
20
|
-->
|
|
21
21
|
|
|
22
22
|
## Changelog
|
|
23
|
+
### 2.2.2 (2024-03-29)
|
|
24
|
+
* (mcm1957) Checking of adapter-core has been fixed
|
|
25
|
+
* (mcm1957) Load all potential interesting files, fixes [#149]
|
|
26
|
+
|
|
23
27
|
### 2.2.1 (2024-03-26)
|
|
24
28
|
* (mcm1957) Added check that own adapter is not listed at common.restartAdapters
|
|
25
29
|
* (mcm1957) Added check of version strings at common.news
|
package/doc/issues.json
CHANGED
|
@@ -495,11 +495,23 @@
|
|
|
495
495
|
"title": "`common.localLink` in io-package.json is deprecated. Please define object `common.localLinks`: { `_default`: `...` }"
|
|
496
496
|
},
|
|
497
497
|
"W173": {
|
|
498
|
-
"title": "`@iobroker/adapter-core` should be
|
|
498
|
+
"title": "`@iobroker/adapter-core` (${context.packageJson.dependencies['@iobroker/adapter-core']}) should be ${recommendedAdapterCoreVersion} or newer - please update"
|
|
499
499
|
},
|
|
500
500
|
"W174": {
|
|
501
501
|
"title": "`common.wakeup` is deprectaed. Please remove from io-package.json"
|
|
502
502
|
},
|
|
503
|
+
"W177": {
|
|
504
|
+
"title": "`common.main` is deprecated in io-package.json. For js-controller >= 3.3 please use package.json main and remove `common.main` from io-package.json."
|
|
505
|
+
},
|
|
506
|
+
"W178": {
|
|
507
|
+
"title": "`common.materialize` is deprecated in io-package.json. For admin version >= 5 please use the property `common.adminUI`"
|
|
508
|
+
},
|
|
509
|
+
"W179": {
|
|
510
|
+
"title": "`common.materializeTab` is deprecated in io-package.json. For admin version >= 5 please use the property `common.adminUI`."
|
|
511
|
+
},
|
|
512
|
+
"W180": {
|
|
513
|
+
"title": "`common.noConfig` is deprecated in io-package.json. For admin version >= 5 please use `common.adminUI.config`:`none`."
|
|
514
|
+
},
|
|
503
515
|
"W302": {
|
|
504
516
|
"title": "Use github actions instead of travis-ci"
|
|
505
517
|
},
|
package/index.js
CHANGED
|
@@ -759,7 +759,23 @@ function checkIOPackageJson(context) {
|
|
|
759
759
|
if (context.ioPackageJson.common.title) {
|
|
760
760
|
context.warnings.push('[W171] "common.title" is deprecated in io-package.json. Please remove from io-package.json.');
|
|
761
761
|
}
|
|
762
|
+
/*
|
|
763
|
+
if (context.ioPackageJson.common.main) {
|
|
764
|
+
context.warnings.push('[W177] "common.main" is deprecated in io-package.json. For js-controller >= 3.3 please use package.json main and remove "common.main" from io-package.json.');
|
|
765
|
+
}
|
|
762
766
|
|
|
767
|
+
if (context.ioPackageJson.common.materialize) {
|
|
768
|
+
context.warnings.push('[W178] "common.materialize" is deprecated in io-package.json. For admin version >= 5 please use the property "common.adminUI"');
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
if (context.ioPackageJson.common.materializeTab) {
|
|
772
|
+
context.warnings.push('[W179] "common.materializeTab" is deprecated in io-package.json. For admin version >= 5 please use the property "common.adminUI".');
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
if (context.ioPackageJson.common.noConfig) {
|
|
776
|
+
context.warnings.push('[W180] "common.noConfig" is deprecated in io-package.json. For admin version >= 5 please use "common.adminUI.config":"none".');
|
|
777
|
+
}
|
|
778
|
+
*/
|
|
763
779
|
if (!context.ioPackageJson.common.titleLang) {
|
|
764
780
|
context.errors.push('[E104] No "common.titleLang" found in io-package.json');
|
|
765
781
|
} else {
|
|
@@ -1125,11 +1141,12 @@ function checkIOPackageJson(context) {
|
|
|
1125
1141
|
}
|
|
1126
1142
|
|
|
1127
1143
|
/*
|
|
1128
|
-
- adapter-core 3.0.0+ requires node 16+
|
|
1144
|
+
- adapter-core 3.0.0+ requires node 16+ - solved as node 16 is global minimum
|
|
1129
1145
|
- adapter-core 3.0.6 is recommended as minimum
|
|
1130
1146
|
*/
|
|
1131
|
-
|
|
1132
|
-
|
|
1147
|
+
|
|
1148
|
+
if (!compareVersions.compare(context.packageJson.dependencies['@iobroker/adapter-core'], `${recommendedAdapterCoreVersion}`, '>=')) {
|
|
1149
|
+
context.warnings.push(`[W173] "@iobroker/adapter-core" (${context.packageJson.dependencies['@iobroker/adapter-core']}) should be ${recommendedAdapterCoreVersion} or newer - please update`);
|
|
1133
1150
|
} else {
|
|
1134
1151
|
context.checks.push(`adapter-core ${context.packageJson.dependencies['@iobroker/adapter-core']} matches recommendation`);
|
|
1135
1152
|
}
|
|
@@ -1161,7 +1178,7 @@ function checkIOPackageJson(context) {
|
|
|
1161
1178
|
|
|
1162
1179
|
if (!context.ioPackageJson.common.onlyWWW) {
|
|
1163
1180
|
if (!context.ioPackageJson.common.tier) {
|
|
1164
|
-
context.warnings.push(`[W115] common.tier is required in io-package.json. Please check https://
|
|
1181
|
+
context.warnings.push(`[W115] common.tier is required in io-package.json. Please check https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/objectsschema.md#adapter.`);
|
|
1165
1182
|
} else if (![1, 2, 3].includes(context.ioPackageJson.common.tier)) {
|
|
1166
1183
|
context.errors.push(`[E155] Invalid common.tier value: ${context.ioPackageJson.common.tier}. Only 1, 2 or 3 are allowed!`);
|
|
1167
1184
|
} else {
|
|
@@ -1272,7 +1289,7 @@ function checkIOPackageJson(context) {
|
|
|
1272
1289
|
}
|
|
1273
1290
|
// do not put any code behind this line
|
|
1274
1291
|
|
|
1275
|
-
// max number is
|
|
1292
|
+
// max number is E180
|
|
1276
1293
|
}
|
|
1277
1294
|
});
|
|
1278
1295
|
});
|
|
@@ -1540,36 +1557,50 @@ function checkCode(context) {
|
|
|
1540
1557
|
'.travis.yml',
|
|
1541
1558
|
'gulpfile.js',
|
|
1542
1559
|
'.releaseconfig.json',
|
|
1543
|
-
|
|
1560
|
+
|
|
1561
|
+
// add all potential files anyway. If they exist they must be valid.
|
|
1562
|
+
// if the are nozt needed a warning could be issued
|
|
1563
|
+
'admin/index_m.html',
|
|
1564
|
+
'admin/words.js',
|
|
1565
|
+
'admin/jsonConfig.json',
|
|
1566
|
+
'admin/jsonConfig.json5',
|
|
1567
|
+
'admin/jsonCustom.json',
|
|
1568
|
+
'admin/jsonCustom.json5',
|
|
1569
|
+
'admin/blockly.js',
|
|
1570
|
+
];
|
|
1571
|
+
allowedLanguages.forEach(lang =>
|
|
1572
|
+
readFiles.push(`admin/i18n/${lang}/translations.json`));
|
|
1573
|
+
allowedLanguages.forEach(lang =>
|
|
1574
|
+
readFiles.push(`admin/i18n/${lang}.json`));
|
|
1544
1575
|
|
|
1545
1576
|
if (context.packageJson.main) {
|
|
1546
1577
|
readFiles.push(context.packageJson.main);
|
|
1547
1578
|
}
|
|
1548
1579
|
|
|
1549
|
-
if (!context.ioPackageJson.common.noConfig) {
|
|
1550
|
-
if (context.ioPackageJson.common.materialize || (context.ioPackageJson.common.adminUI && context.ioPackageJson.common.adminUI.config === 'materialize')) {
|
|
1551
|
-
readFiles.push('admin/index_m.html');
|
|
1552
|
-
readFiles.push('admin/words.js');
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
if (context.ioPackageJson.common.adminUI && context.ioPackageJson.common.adminUI.config === 'json') {
|
|
1556
|
-
readFiles.push('admin/jsonConfig.json');
|
|
1557
|
-
readFiles.push('admin/jsonConfig.json5');
|
|
1558
|
-
allowedLanguages.forEach(lang =>
|
|
1559
|
-
readFiles.push(`admin/i18n/${lang}/translations.json`));
|
|
1560
|
-
allowedLanguages.forEach(lang =>
|
|
1561
|
-
readFiles.push(`admin/i18n/${lang}.json`));
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
if (context.ioPackageJson.common.supportCustoms || context.ioPackageJson.common.jsonCustom || (context.ioPackageJson.common.adminUI && context.ioPackageJson.common.adminUI.custom === 'json')) {
|
|
1565
|
-
readFiles.push('admin/jsonCustom.json');
|
|
1566
|
-
readFiles.push('admin/jsonCustom.json5');
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
if (context.ioPackageJson.common.blockly) {
|
|
1571
|
-
readFiles.push('admin/blockly.js');
|
|
1572
|
-
}
|
|
1580
|
+
// if (!context.ioPackageJson.common.noConfig) {
|
|
1581
|
+
// if (context.ioPackageJson.common.materialize || (context.ioPackageJson.common.adminUI && context.ioPackageJson.common.adminUI.config === 'materialize')) {
|
|
1582
|
+
// readFiles.push('admin/index_m.html');
|
|
1583
|
+
// readFiles.push('admin/words.js');
|
|
1584
|
+
// }
|
|
1585
|
+
//
|
|
1586
|
+
// if (context.ioPackageJson.common.adminUI && context.ioPackageJson.common.adminUI.config === 'json') {
|
|
1587
|
+
// readFiles.push('admin/jsonConfig.json');
|
|
1588
|
+
// readFiles.push('admin/jsonConfig.json5');
|
|
1589
|
+
// allowedLanguages.forEach(lang =>
|
|
1590
|
+
// readFiles.push(`admin/i18n/${lang}/translations.json`));
|
|
1591
|
+
// allowedLanguages.forEach(lang =>
|
|
1592
|
+
// readFiles.push(`admin/i18n/${lang}.json`));
|
|
1593
|
+
// }
|
|
1594
|
+
//
|
|
1595
|
+
// if (context.ioPackageJson.common.supportCustoms || context.ioPackageJson.common.jsonCustom || (context.ioPackageJson.common.adminUI && context.ioPackageJson.common.adminUI.custom === 'json')) {
|
|
1596
|
+
// readFiles.push('admin/jsonCustom.json');
|
|
1597
|
+
// readFiles.push('admin/jsonCustom.json5');
|
|
1598
|
+
// }
|
|
1599
|
+
// }
|
|
1600
|
+
//
|
|
1601
|
+
// if (context.ioPackageJson.common.blockly) {
|
|
1602
|
+
// readFiles.push('admin/blockly.js');
|
|
1603
|
+
// }
|
|
1573
1604
|
|
|
1574
1605
|
// https://github.com/userName/ioBroker.adaptername/archive/${context.branch}.zip
|
|
1575
1606
|
return new Promise((resolve, reject) => {
|
package/package.json
CHANGED