@iobroker/repochecker 5.0.0-alpha.0 → 5.0.0-alpha.1
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 +13 -3
- package/index.js +1 -1
- package/lib/M0000_PackageJson.js +46 -24
- package/lib/M1000_IOPackageJson.js +6 -4
- package/lib/M2000_Npm.js +20 -4
- package/lib/M4000_Repository.js +15 -8
- package/lib/M5000_Code.js +1 -1
- package/lib/M6000_Readme.js +10 -3
- package/lib/M9000_GitNpmIgnore.js +1 -1
- package/lib/common.js +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,10 +31,20 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
|
|
|
31
31
|
Placeholder for the next version (at the beginning of the line):
|
|
32
32
|
### **WORK IN PROGRESS**
|
|
33
33
|
-->
|
|
34
|
-
### 5.0.0-alpha.
|
|
34
|
+
### 5.0.0-alpha.1 (2025-09-29)
|
|
35
|
+
- (mcm1957) Strict mode requirements have been loosend at schema validation.
|
|
36
|
+
- (mcm1957) Do not log missing jsonConfig schema at vscode is no jsonConfig is used. [#548]
|
|
37
|
+
- (mcm1957) News entry at io-package.json is no longer required for alpha release. [#532]
|
|
38
|
+
- (mcm1957) Report missing README changelog for alpha releases as suggestion only. [#533]
|
|
39
|
+
- (mcm1957) Release of @iobroker/testing has been updated to 5.1.1.
|
|
40
|
+
- (mcm1957) Text for dependency update suggestion has been changed to make more clear that this should be really done. [#515]
|
|
41
|
+
- (mcm1957) Suggestion to migrate to jsonConfig has been changed to suggest jsonConfig or react based UI. [#524]
|
|
42
|
+
- (mcm1957) Alpha release are no longer reported as missing at npm / latest. [#425]
|
|
43
|
+
- (mcm1957) Suggestions to avoid fixed dependencies has been compressed to a maximum of one suggestion even if multiple ffixed dependencies exist [#512].
|
|
44
|
+
- (mcm1957) E4033 is always an error [#541].
|
|
45
|
+
- (mcm1957) Empty adaptername in finding has been fixed [#549].
|
|
46
|
+
- (mcm1957) Text for 9006 has been changed (.commitinfo hint) [#542].
|
|
35
47
|
- (@copilot) Renumbered all error, warning and suggestion codes from 3-digit to 4-digit format according to new numbering system
|
|
36
|
-
|
|
37
|
-
### 4.3.0-alpha.0 (2025-09-29)
|
|
38
48
|
- (@copilot) Added version format validation check (E061) for invalid semver format according to ioBroker requirements
|
|
39
49
|
- (@copilot) Added structured GitHub issue templates for bug reports, false positives, new checks, check changes, and enhancements
|
|
40
50
|
- (@copilot) Fixed deprecated function checking for adapter methods called outside class context
|
package/index.js
CHANGED
|
@@ -77,7 +77,7 @@ function getGithubApiData(context) {
|
|
|
77
77
|
.get(context.githubUrlApi)
|
|
78
78
|
.then(response => {
|
|
79
79
|
context.githubApiData = response.data;
|
|
80
|
-
|
|
80
|
+
common.debug(`API Data: ${JSON.stringify(context.githubApiData)}`);
|
|
81
81
|
|
|
82
82
|
if (!context.branch) {
|
|
83
83
|
context.branch = context.githubApiData.default_branch; // main vs. master
|
package/lib/M0000_PackageJson.js
CHANGED
|
@@ -58,7 +58,7 @@ const devDependenciesPackageJson = {
|
|
|
58
58
|
},
|
|
59
59
|
'@iobroker/testing': {
|
|
60
60
|
required: '4.1.3',
|
|
61
|
-
recommended: '5.1.
|
|
61
|
+
recommended: '5.1.1',
|
|
62
62
|
onlyWWW: false,
|
|
63
63
|
alternatives: ['@iobroker/legacy-testing'],
|
|
64
64
|
},
|
|
@@ -300,13 +300,16 @@ async function checkPackageJson(context) {
|
|
|
300
300
|
|
|
301
301
|
let passed;
|
|
302
302
|
|
|
303
|
-
if (!context.githubUrlOriginal.match(/\/iobroker\./i)) {
|
|
303
|
+
//if (!context.githubUrlOriginal.match(/\/iobroker\./i)) {
|
|
304
|
+
//console.log(`DEBUG: ${context.githubApiData.name}`)
|
|
305
|
+
if (!context.githubApiData.name.match(/^iobroker\./i)) {
|
|
304
306
|
context.errors.push('[E0002] No "ioBroker." found in the name of repository');
|
|
305
307
|
} else {
|
|
306
308
|
context.checks.push('"ioBroker" was found in the name of repository');
|
|
307
309
|
}
|
|
308
310
|
|
|
309
|
-
if (context.githubUrlOriginal.includes('/iobroker.')) {
|
|
311
|
+
//if (context.githubUrlOriginal.includes('/iobroker.')) {
|
|
312
|
+
if (context.githubApiData.name.match(/^iobroker\./)) {
|
|
310
313
|
context.errors.push(
|
|
311
314
|
'[E0003] Repository must have name ioBroker.adaptername, but now io"b"roker is in lowercase',
|
|
312
315
|
);
|
|
@@ -314,16 +317,21 @@ async function checkPackageJson(context) {
|
|
|
314
317
|
context.checks.push('Repository has name ioBroker.adaptername (not iobroker.adaptername)');
|
|
315
318
|
}
|
|
316
319
|
|
|
317
|
-
const m = context.githubUrlOriginal.match(/\/ioBroker\.(.*)$/);
|
|
320
|
+
//const m = context.githubUrlOriginal.match(/\/ioBroker\.(.*)$/);
|
|
321
|
+
let m;
|
|
322
|
+
m = context.githubApiData.name.match(/^ioBroker\.(.*)$/);
|
|
323
|
+
if (!m || !m[1]) {
|
|
324
|
+
m = context.githubApiData.name.match(/^iobroker\.(.*)$/);
|
|
325
|
+
}
|
|
318
326
|
let adapterName = '';
|
|
319
327
|
if (!m || !m[1]) {
|
|
320
|
-
context.errors.push(`[E0004] No adapter name found in URL: ${context.githubUrlOriginal}`);
|
|
328
|
+
context.errors.push(`[E0004] No valid adapter name found in URL: ${context.githubUrlOriginal}`);
|
|
321
329
|
} else {
|
|
322
330
|
context.checks.push('Adapter name found in the URL');
|
|
323
331
|
adapterName = m[1].replace(/\/master$/, '').replace(/\/main$/, '');
|
|
324
332
|
}
|
|
325
333
|
|
|
326
|
-
context.adapterName = adapterName;
|
|
334
|
+
context.adapterName = adapterName !== '' ? adapterName : 'unknown';
|
|
327
335
|
|
|
328
336
|
if (adapterName.match(/[A-Z]/)) {
|
|
329
337
|
context.errors.push('[E0005] Adapter name must be lowercase');
|
|
@@ -460,12 +468,12 @@ async function checkPackageJson(context) {
|
|
|
460
468
|
context.checks.push('Repository found in package.json');
|
|
461
469
|
|
|
462
470
|
const allowedRepoUrls = [
|
|
463
|
-
context.githubApiData.html_url, // https://github.com/klein0r/ioBroker.luftdaten
|
|
464
|
-
`git+${context.githubApiData.html_url}`, // git+https://github.com/klein0r/ioBroker.luftdaten
|
|
465
|
-
context.githubApiData.git_url, // git://github.com/klein0r/ioBroker.luftdaten.git
|
|
466
|
-
context.githubApiData.ssh_url, // git@github.com:klein0r/ioBroker.luftdaten.git
|
|
467
|
-
context.githubApiData.clone_url, // https://github.com/klein0r/ioBroker.luftdaten.git
|
|
468
|
-
`git+${context.githubApiData.clone_url}`, // git+https://github.com/klein0r/ioBroker.luftdaten.git
|
|
471
|
+
context.githubApiData.html_url.replace('/iobroker.', '/ioBroker.'), // https://github.com/klein0r/ioBroker.luftdaten
|
|
472
|
+
`git+${context.githubApiData.html_url.replace('/iobroker.', '/ioBroker.')}`, // git+https://github.com/klein0r/ioBroker.luftdaten
|
|
473
|
+
context.githubApiData.git_url.replace('/iobroker.', '/ioBroker.'), // git://github.com/klein0r/ioBroker.luftdaten.git
|
|
474
|
+
context.githubApiData.ssh_url.replace('/iobroker.', '/ioBroker.'), // git@github.com:klein0r/ioBroker.luftdaten.git
|
|
475
|
+
context.githubApiData.clone_url.replace('/iobroker.', '/ioBroker.'), // https://github.com/klein0r/ioBroker.luftdaten.git
|
|
476
|
+
`git+${context.githubApiData.clone_url.replace('/iobroker.', '/ioBroker.')}`, // git+https://github.com/klein0r/ioBroker.luftdaten.git
|
|
469
477
|
];
|
|
470
478
|
|
|
471
479
|
// https://docs.npmjs.com/cli/v7/configuring-npm/package-json#repository
|
|
@@ -480,7 +488,7 @@ async function checkPackageJson(context) {
|
|
|
480
488
|
|
|
481
489
|
if (!allowedRepoUrls.includes(context.packageJson.repository.url)) {
|
|
482
490
|
context.errors.push(
|
|
483
|
-
`[E0019] Invalid repository URL in package.json: ${context.packageJson.repository.url}. Expected: ${context.githubApiData.
|
|
491
|
+
`[E0019] Invalid repository URL in package.json: ${context.packageJson.repository.url}. Expected: ${context.githubApiData.clone_url}`,
|
|
484
492
|
);
|
|
485
493
|
} else {
|
|
486
494
|
context.checks.push('Repository URL is valid in package.json');
|
|
@@ -488,7 +496,7 @@ async function checkPackageJson(context) {
|
|
|
488
496
|
} else if (context.packageJson.repository && typeof context.packageJson.repository === 'string') {
|
|
489
497
|
if (!allowedRepoUrls.includes(context.packageJson.repository)) {
|
|
490
498
|
context.errors.push(
|
|
491
|
-
`[E0019] Invalid repository URL in package.json: ${context.packageJson.repository}. Expected: ${context.githubApiData.
|
|
499
|
+
`[E0019] Invalid repository URL in package.json: ${context.packageJson.repository}. Expected: ${context.githubApiData.clone_url}`,
|
|
492
500
|
);
|
|
493
501
|
} else {
|
|
494
502
|
context.checks.push('Repository URL is valid in package.json');
|
|
@@ -803,11 +811,11 @@ async function checkPackageJson(context) {
|
|
|
803
811
|
// if dependency exists, version requirements must be met
|
|
804
812
|
if (!compareVersions.compare(dependencyVersion, requiredVersion, '>=')) {
|
|
805
813
|
context.errors.push(
|
|
806
|
-
`[E0033] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is
|
|
814
|
+
`[E0033] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} (or newer) is current. Please update dependencies at package.json`,
|
|
807
815
|
);
|
|
808
816
|
} else if (!compareVersions.compare(dependencyVersion, recommendedVersion, '>=')) {
|
|
809
817
|
context.warnings.push(
|
|
810
|
-
`[W0034] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is
|
|
818
|
+
`[W0034] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} (or newer) is current. Please update dependencies at package.json`,
|
|
811
819
|
);
|
|
812
820
|
} else {
|
|
813
821
|
context.checks.push(`dependency ${dependency} ${dependencyVersion} is ok`);
|
|
@@ -859,11 +867,11 @@ async function checkPackageJson(context) {
|
|
|
859
867
|
// if dependency exists, version requirements must be met
|
|
860
868
|
if (!compareVersions.compare(dependencyVersion, requiredVersion, '>=')) {
|
|
861
869
|
context.errors.push(
|
|
862
|
-
`[E0036] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is
|
|
870
|
+
`[E0036] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} (or newer) is current. Please update devDependencies at package.json`,
|
|
863
871
|
);
|
|
864
872
|
} else if (!compareVersions.compare(dependencyVersion, recommendedVersion, '>=')) {
|
|
865
873
|
context.warnings.push(
|
|
866
|
-
`[W0037] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is
|
|
874
|
+
`[W0037] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} (or newer) is current. Please update devDependencies at package.json`,
|
|
867
875
|
);
|
|
868
876
|
} else {
|
|
869
877
|
context.checks.push(`devDependency ${dependency} ${dependencyVersion} is ok`);
|
|
@@ -901,6 +909,7 @@ async function checkPackageJson(context) {
|
|
|
901
909
|
'@iobroker/adapter-dev',
|
|
902
910
|
'@iobroker/testing',
|
|
903
911
|
];
|
|
912
|
+
let forcedDependencyFlag = false;
|
|
904
913
|
for (const dependency in context.packageJson.dependencies) {
|
|
905
914
|
const dependencyVersion = context.packageJson.dependencies[dependency];
|
|
906
915
|
if (dependencyVersion.toLowerCase().includes('github.com')) {
|
|
@@ -926,13 +935,20 @@ async function checkPackageJson(context) {
|
|
|
926
935
|
`[E0044] dependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"`,
|
|
927
936
|
);
|
|
928
937
|
} else {
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
938
|
+
forcedDependencyFlag = true;
|
|
939
|
+
// context.warnings.push(
|
|
940
|
+
// `[S0047] dependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"`,
|
|
941
|
+
// );
|
|
932
942
|
}
|
|
933
943
|
}
|
|
934
944
|
}
|
|
945
|
+
if (forcedDependencyFlag) {
|
|
946
|
+
context.warnings.push(
|
|
947
|
+
`[S0047] At least one dependency at package.json requires a specific version. Consider using "~1.2.3" or "^1.2.3" syntax unless freezing dependencies is really desired.`,
|
|
948
|
+
);
|
|
949
|
+
}
|
|
935
950
|
|
|
951
|
+
let forcedDevDependencyFlag = false;
|
|
936
952
|
for (const dependency in context.packageJson.devDependencies) {
|
|
937
953
|
const dependencyVersion = context.packageJson.devDependencies[dependency];
|
|
938
954
|
if (dependencyVersion.toLowerCase().includes('github.com')) {
|
|
@@ -958,12 +974,18 @@ async function checkPackageJson(context) {
|
|
|
958
974
|
`[E0046] devDependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${dependencyVersion}"`,
|
|
959
975
|
);
|
|
960
976
|
} else {
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
977
|
+
forcedDevDependencyFlag = true;
|
|
978
|
+
// context.warnings.push(
|
|
979
|
+
// `[W0048] devDependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"`,
|
|
980
|
+
// );
|
|
964
981
|
}
|
|
965
982
|
}
|
|
966
983
|
}
|
|
984
|
+
if (forcedDevDependencyFlag) {
|
|
985
|
+
context.warnings.push(
|
|
986
|
+
`[S0048] At least one devDpendency at package.json requires a specific version. Consider using "~1.2.3" or "^1.2.3" syntax unless freezing dependencies is really desired.`,
|
|
987
|
+
);
|
|
988
|
+
}
|
|
967
989
|
|
|
968
990
|
if (!context.packageJson.keywords || !Array.isArray(context.packageJson.keywords)) {
|
|
969
991
|
context.errors.push('[E0039] "keywords" must be an array within package.json and contain some useful keywords');
|
|
@@ -116,7 +116,7 @@ async function validateIOPackageSchema(context) {
|
|
|
116
116
|
|
|
117
117
|
// Initialize AJV validator
|
|
118
118
|
// @ts-expect-error not constructable - but working
|
|
119
|
-
const ajv = new Ajv({ allErrors: true, verbose: true });
|
|
119
|
+
const ajv = new Ajv({ allErrors: true, verbose: true, strictTypes: false });
|
|
120
120
|
const validate = ajv.compile(schema);
|
|
121
121
|
|
|
122
122
|
// Validate io-package.json against schema
|
|
@@ -676,9 +676,11 @@ async function checkIOPackageJson(context) {
|
|
|
676
676
|
});
|
|
677
677
|
|
|
678
678
|
if (!context.ioPackageJson.common.news[context.ioPackageJson.common.version]) {
|
|
679
|
-
context.
|
|
680
|
-
|
|
681
|
-
|
|
679
|
+
if (!common.isAlphaVersion(context.ioPackageJson.common.version)) {
|
|
680
|
+
context.errors.push(
|
|
681
|
+
`[E1036] No "common.news" found for actual version ${context.ioPackageJson.common.version} in io-package.json`,
|
|
682
|
+
);
|
|
683
|
+
}
|
|
682
684
|
}
|
|
683
685
|
|
|
684
686
|
let missingLang = [];
|
package/lib/M2000_Npm.js
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
const axios = require('axios');
|
|
11
11
|
const compareVersions = require('compare-versions');
|
|
12
12
|
|
|
13
|
+
const common = require('./common.js');
|
|
14
|
+
|
|
13
15
|
// disable axios caching
|
|
14
16
|
axios.defaults.headers = {
|
|
15
17
|
'Cache-Control': 'no-cache',
|
|
@@ -33,7 +35,9 @@ async function checkNpm(context) {
|
|
|
33
35
|
try {
|
|
34
36
|
const _response = await axios(`https://www.npmjs.com/package/iobroker.${context.adapterName}`);
|
|
35
37
|
if (!_response.data) {
|
|
36
|
-
context.errors.push(
|
|
38
|
+
context.errors.push(
|
|
39
|
+
`[E2000] Package iobroker.${context.adapterName} found on npm. Please publish at npm`,
|
|
40
|
+
);
|
|
37
41
|
return context;
|
|
38
42
|
}
|
|
39
43
|
body = _response.data;
|
|
@@ -70,13 +74,25 @@ async function checkNpm(context) {
|
|
|
70
74
|
`[E2003] Version of package.json (${context.packageJson.version}) lower than latest version on NPM (${(body['dist-tags'] && body['dist-tags'].latest) || JSON.stringify(body)})`,
|
|
71
75
|
);
|
|
72
76
|
} else {
|
|
73
|
-
context.
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
if (!common.isAlphaVersion(context.packageJson.version)) {
|
|
78
|
+
context.warnings.push(
|
|
79
|
+
`[W2002] Version of package.json (${context.packageJson.version}) doesn't match latest version on NPM (${(body['dist-tags'] && body['dist-tags'].latest) || JSON.stringify(body)})`,
|
|
80
|
+
);
|
|
81
|
+
} else {
|
|
82
|
+
context.checks.push(`Alpha version ${context.packageJson.version} not checked`);
|
|
83
|
+
}
|
|
76
84
|
}
|
|
77
85
|
} else {
|
|
78
86
|
context.checks.push(`Version of package.json ${context.packageJson.version} matches latest version on NPM`);
|
|
79
87
|
}
|
|
88
|
+
|
|
89
|
+
if (body['dist-tags'] && body['dist-tags'].latest) {
|
|
90
|
+
if (!context.ioPackageJson.common.news[body['dist-tags'].latest]) {
|
|
91
|
+
context.errors.push(
|
|
92
|
+
`[E2005] No "common.news" in io-package.json found for version ${body['dist-tags'].latest} marked as "latest" at npm`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
80
96
|
}
|
|
81
97
|
|
|
82
98
|
if (context.ioPackageJson && context.ioPackageJson.common && context.ioPackageJson.common.news) {
|
package/lib/M4000_Repository.js
CHANGED
|
@@ -303,8 +303,8 @@ async function checkRepository(context) {
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
if (!context.stableRepoLive[dependency]) {
|
|
306
|
-
context.
|
|
307
|
-
`[
|
|
306
|
+
context.errors.push(
|
|
307
|
+
`[E4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository`,
|
|
308
308
|
);
|
|
309
309
|
} else {
|
|
310
310
|
const versDependency = dependencies[dependency];
|
|
@@ -412,21 +412,28 @@ async function checkVSCodeSchemas(context) {
|
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
+
let usesJsonConfig =
|
|
416
|
+
(context.ioPackageJson.common.adminUI?.config && context.ioPackageJson.common.adminUI?.config === 'json') ||
|
|
417
|
+
(context.ioPackageJson.common.adminUI?.custom && context.ioPackageJson.common.adminUI?.custom === 'json') ||
|
|
418
|
+
(context.ioPackageJson.common.adminUI?.tab && context.ioPackageJson.common.adminUI?.tab === 'json');
|
|
419
|
+
|
|
420
|
+
common.debug('Adapter uses jsonConfig, lets check vscode setup');
|
|
421
|
+
|
|
415
422
|
// Check for jsonConfig schemas
|
|
416
423
|
const jsonConfigFiles = ['admin/jsonConfig.json', 'admin/jsonCustom.json', 'admin/jsonTab.json'];
|
|
417
424
|
const json5ConfigFiles = ['admin/jsonConfig.json5', 'admin/jsonCustom.json5', 'admin/jsonTab.json5'];
|
|
418
425
|
|
|
419
|
-
// Check if adapter has any json5 files in admin directory
|
|
420
|
-
|
|
421
426
|
// Find schema that matches jsonConfig files
|
|
422
427
|
const jsonConfigSchema = schemas.find(
|
|
423
428
|
schema => schema.fileMatch && jsonConfigFiles.every(file => schema.fileMatch.includes(file)),
|
|
424
429
|
);
|
|
425
430
|
|
|
426
431
|
if (!jsonConfigSchema) {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
432
|
+
if (usesJsonConfig) {
|
|
433
|
+
context.warnings.push(
|
|
434
|
+
`[W4042] Missing schema definition for jsonConfig files in .vscode/settings.json. Add: {"fileMatch": ${JSON.stringify(jsonConfigFiles)}, "url": "${config.schemaUrls.jsonConfig}"}`,
|
|
435
|
+
);
|
|
436
|
+
}
|
|
430
437
|
} else {
|
|
431
438
|
// Check if URL is correct
|
|
432
439
|
if (jsonConfigSchema.url !== config.schemaUrls.jsonConfig) {
|
|
@@ -444,7 +451,7 @@ async function checkVSCodeSchemas(context) {
|
|
|
444
451
|
);
|
|
445
452
|
|
|
446
453
|
if (!json5ConfigSchema) {
|
|
447
|
-
if (context.cfg.usesJson5) {
|
|
454
|
+
if (usesJsonConfig && context.cfg.usesJson5) {
|
|
448
455
|
context.warnings.push(
|
|
449
456
|
`[W4044] Missing schema definition for JSON5 config files in .vscode/settings.json. Adapt: {"fileMatch": ${JSON.stringify(jsonConfigFiles.concat(json5ConfigFiles))}, "url": "${config.schemaUrls.jsonConfig}"}`,
|
|
450
457
|
);
|
package/lib/M5000_Code.js
CHANGED
|
@@ -251,7 +251,7 @@ async function checkCode(context) {
|
|
|
251
251
|
(context.ioPackageJson.common.adminUI.config !== 'json' &&
|
|
252
252
|
context.ioPackageJson.common.adminUI.config !== 'none'))
|
|
253
253
|
) {
|
|
254
|
-
context.warnings.push('[S5022] Please consider migrating to admin 5 UI (jsonConfig).');
|
|
254
|
+
context.warnings.push('[S5022] Please consider migrating to admin 5 UI (jsonConfig) or react based UI.');
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
if (
|
package/lib/M6000_Readme.js
CHANGED
|
@@ -34,9 +34,15 @@ async function checkReadme(context) {
|
|
|
34
34
|
context.checks.push('README.md contains Changelog');
|
|
35
35
|
|
|
36
36
|
if (!data.includes(`### ${context.packageJson.version}`)) {
|
|
37
|
-
context.
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
if (!common.isAlphaVersion(context.packageJson.version)) {
|
|
38
|
+
context.errors.push(
|
|
39
|
+
`[E6006] Current adapter version ${context.packageJson.version} not found in README.md`,
|
|
40
|
+
);
|
|
41
|
+
} else {
|
|
42
|
+
context.warnings.push(
|
|
43
|
+
`[S6008] Changelog for version ${context.packageJson.version} should be added to README.md.`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
40
46
|
} else {
|
|
41
47
|
context.checks.push('README.md contains current adapter version');
|
|
42
48
|
}
|
|
@@ -130,3 +136,4 @@ exports.checkReadme = checkReadme;
|
|
|
130
136
|
// [6005] No actual year found in copyright. Please add "Copyright (c) ${year} ${getAuthor(context.packageJson.author)}" at the end of README.md
|
|
131
137
|
// [6006] Could not retrieve timestamp of LATEST revision at npm.
|
|
132
138
|
// [6007] Future year (${readmeYear}) found in copyright. Please use "Copyright (c) ${m[1]}-${year} ${getAuthor(context.packageJson.author)}" at the end of README.md
|
|
139
|
+
// [6008] Changelog for version ${context.packageJson.version} should be added to README.md.
|
|
@@ -97,7 +97,7 @@ async function checkGitIgnore(context) {
|
|
|
97
97
|
if (!isIgnored) {
|
|
98
98
|
// convert to warning mid of 2026
|
|
99
99
|
context.warnings.push(
|
|
100
|
-
'[S9006] .commitinfo file should be excluded by .gitignore,
|
|
100
|
+
'[S9006] .commitinfo file should be excluded by .gitignore, please add a line with text ".commitinfo" to .gitignore',
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
103
|
}
|
package/lib/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/*
|
|
3
|
-
This module contains
|
|
3
|
+
This module contains general utility routines for iobroker.repochecker
|
|
4
4
|
|
|
5
5
|
*/
|
|
6
6
|
const axios = require('axios');
|
|
@@ -228,6 +228,13 @@ function getDependencies(deps) {
|
|
|
228
228
|
return ret;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
+
/*
|
|
232
|
+
return true if version is not a normal proction versoion
|
|
233
|
+
*/
|
|
234
|
+
function isAlphaVersion(version) {
|
|
235
|
+
return !(version && version.match(/^\d+\.\d+\.\d+$/));
|
|
236
|
+
}
|
|
237
|
+
|
|
231
238
|
/*
|
|
232
239
|
return the greater of two semver versions
|
|
233
240
|
*/
|
|
@@ -295,6 +302,7 @@ exports.getFile = getFile;
|
|
|
295
302
|
exports.getFilesList = getFilesList;
|
|
296
303
|
exports.getDependencyArray = getDependencyArray;
|
|
297
304
|
exports.getDependencies = getDependencies;
|
|
305
|
+
exports.isAlphaVersion = isAlphaVersion;
|
|
298
306
|
exports.maxVersion = maxVersion;
|
|
299
307
|
exports.parseSemver = parseSemver;
|
|
300
308
|
exports.validateSemver = validateSemver;
|
package/package.json
CHANGED