@iobroker/repochecker 5.1.1 → 5.2.2-alpha.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 CHANGED
@@ -25,6 +25,19 @@ Example:
25
25
  Placeholder for the next version (at the beginning of the line):
26
26
  ### **WORK IN PROGRESS**
27
27
  -->
28
+ ### 5.2.2-alpha.2 (2026-02-25)
29
+ - (mcm1957) Add warning if fa-icon entry still exists.
30
+ - (@copilot) Added W6011/W7004 checks: warn when copyright lines in README.md or LICENSE are separated by an empty line instead of trailing two spaces.
31
+ - (@copilot) Fixed false positive W6009/W7003: warning for non-consecutive copyright lines (separated by other text or empty lines) is no longer issued. [#672]
32
+ - (@copilot) Fixed false positive S0048/S0047 for npm alias dependencies (e.g. `"npm:real-package@^1.2.3"`). [#667]
33
+ - (@copilot) Added jsonConfig components `iframe` and `iframeSendTo` with minAdmin 7.7.28.
34
+ - (@copilot) Added jsonConfig component `yamlEditor` with minAdmin 7.7.31. [#660]
35
+ - (@copilot) Restructured `validComponents` entries in M5500__JsonConfig.js to objects with `function` and `minAdmin` properties.
36
+ - (@copilot) Added `checkDocker` and `infoBox` as known jsonConfig components to fix false-positive E5504 errors; set minAdmin 7.7.31 for `checkDocker`. [#663]
37
+ - (mcm1957) require js-controlelr 6 and admin 7 now. [#641] [#589]
38
+ - (mcm1957) required and suggested releases of standard packages have been updated.
39
+ - (mcm1957) Dependencies to packages named 'admin' and 'iobroker' have been disallowed. [#617]
40
+
28
41
  ### 5.1.1 (2025-12-01)
29
42
  - (@copilot) Updated repository URLs from http://repo.iobroker.live to https://download.iobroker.net
30
43
 
@@ -32,55 +32,55 @@ const dependenciesPackageJson = {
32
32
  // packages which must or should be required as devDependencies
33
33
  const devDependenciesPackageJson = {
34
34
  '@alcalzone/release-script': {
35
- required: '3.8.0',
36
- recommended: '5.0.0',
37
- actual: '5.0.0',
35
+ required: '5.0.0',
36
+ recommended: '5.1.1',
37
+ actual: '5.1.1',
38
38
  optional: true,
39
39
  suggested: true,
40
40
  // Conditional requirements: when this package is >= a certain version,
41
41
  // other packages have updated requirements
42
42
  conditionalRequirements: [
43
43
  {
44
- ifVersion: '5.0.0',
44
+ ifVersion: '5.1.1',
45
45
  targetDependency: '@alcalzone/release-script-plugin-iobroker',
46
- required: '4.0.0',
46
+ required: '5.1.2',
47
47
  },
48
48
  {
49
- ifVersion: '5.0.0',
49
+ ifVersion: '5.1.1',
50
50
  targetDependency: '@alcalzone/release-script-plugin-license',
51
- required: '4.0.0',
51
+ required: '5.1.1',
52
52
  },
53
53
  {
54
- ifVersion: '5.0.0',
54
+ ifVersion: '5.1.1',
55
55
  targetDependency: '@alcalzone/release-script-plugin-manual-review',
56
- required: '4.0.0',
56
+ required: '5.1.1',
57
57
  },
58
58
  ],
59
59
  },
60
60
  '@alcalzone/release-script-plugin-iobroker': {
61
- required: '3.7.2',
62
- recommended: '4.0.0',
63
- actual: '4.0.0',
61
+ required: '4.0.0',
62
+ recommended: '5.1.2',
63
+ actual: '5.1.2',
64
64
  optional: true,
65
65
  suggested: true,
66
66
  },
67
67
  '@alcalzone/release-script-plugin-license': {
68
- required: '3.7.0',
69
- recommended: '4.0.0',
70
- actual: '4.0.0',
68
+ required: '4.0.0',
69
+ recommended: '5.1.1',
70
+ actual: '5.1.1',
71
71
  optional: true,
72
72
  suggested: true,
73
73
  },
74
74
  '@alcalzone/release-script-plugin-manual-review': {
75
- required: '3.7.0',
76
- recommended: '4.0.0',
77
- actual: '4.0.0',
75
+ required: '4.0.0',
76
+ recommended: '5.1.1',
77
+ actual: '5.1.1',
78
78
  optional: true,
79
79
  suggested: true,
80
80
  },
81
81
  '@iobroker/adapter-dev': {
82
82
  required: '1.3.0',
83
- recommended: '1.4.0',
83
+ recommended: '1.5.0',
84
84
  actual: '1.5.0',
85
85
  onlyWWW: false,
86
86
  optional: true,
@@ -102,7 +102,7 @@ const devDependenciesPackageJson = {
102
102
  optional: true,
103
103
  },
104
104
  '@iobroker/testing': {
105
- required: '4.1.3',
105
+ required: '5.2.2',
106
106
  recommended: '5.2.2',
107
107
  actual: '5.2.2',
108
108
  onlyWWW: false,
@@ -112,6 +112,14 @@ const devDependenciesPackageJson = {
112
112
 
113
113
  // packages which must NOT be listed as dependencies in any context
114
114
  const blacklistedAllDependenciesPackageJson = {
115
+ admin: {
116
+ msg: "'admin'must not be listed as any dependency at package.json. Please remove and create new release.",
117
+ err: true,
118
+ },
119
+ iobroker: {
120
+ msg: "'iobroker'must not be listed as any dependency at package.json. Please remove and create new release.",
121
+ err: true,
122
+ },
115
123
  npm: {
116
124
  msg: "'npm'must not be listed as any dependency at package.json. Please remove and create new release.",
117
125
  err: true,
@@ -357,6 +365,39 @@ function applyConditionalRequirements(dependencyTable, packageJsonDeps) {
357
365
  }
358
366
  }
359
367
 
368
+ /**
369
+ * Expands npm alias dependencies into separate entries for both the alias name and the real package name.
370
+ * An npm alias has the format: "alias-name": "npm:real-package@version"
371
+ * The expanded result contains one entry for "alias-name" and one for "real-package", both using the extracted version.
372
+ * Non-alias entries are kept as-is.
373
+ *
374
+ * @param {object} dependencies - The dependencies object from package.json
375
+ * @returns {object} Expanded dependencies object with alias entries split into two entries
376
+ */
377
+ function expandNpmAliases(dependencies) {
378
+ if (!dependencies) {
379
+ return {};
380
+ }
381
+ const expanded = {};
382
+ for (const [name, version] of Object.entries(dependencies)) {
383
+ if (typeof version === 'string' && version.startsWith('npm:')) {
384
+ const withoutPrefix = version.slice(4); // Remove "npm:" prefix
385
+ const lastAt = withoutPrefix.lastIndexOf('@');
386
+ if (lastAt > 0) {
387
+ const realPackage = withoutPrefix.slice(0, lastAt);
388
+ const realVersion = withoutPrefix.slice(lastAt + 1);
389
+ expanded[name] = realVersion;
390
+ expanded[realPackage] = realVersion;
391
+ } else {
392
+ expanded[name] = version;
393
+ }
394
+ } else {
395
+ expanded[name] = version;
396
+ }
397
+ }
398
+ return expanded;
399
+ }
400
+
360
401
  /**
361
402
  * Validates release format according to ioBroker semver subset requirements
362
403
  *
@@ -1116,9 +1157,10 @@ async function checkPackageJson(context) {
1116
1157
  '@iobroker/adapter-dev',
1117
1158
  '@iobroker/testing',
1118
1159
  ];
1160
+ const expandedDependencies = expandNpmAliases(context.packageJson.dependencies);
1119
1161
  let forcedDependencyFlag = false;
1120
- for (const dependency in context.packageJson.dependencies) {
1121
- const dependencyVersion = context.packageJson.dependencies[dependency];
1162
+ for (const dependency in expandedDependencies) {
1163
+ const dependencyVersion = expandedDependencies[dependency];
1122
1164
  if (dependencyVersion.toLowerCase().includes('github.com')) {
1123
1165
  context.warnings.push(
1124
1166
  `[W0043] dependency should not require a github version. Please change "${dependency}:${dependencyVersion}"`,
@@ -1132,19 +1174,19 @@ async function checkPackageJson(context) {
1132
1174
  `[E0054] malformed dependency detected "${dependency}":"${dependencyVersion}". Please fix at package.json.`,
1133
1175
  );
1134
1176
  } else if (
1135
- !context.packageJson.dependencies[dependency].startsWith('^') &&
1136
- !context.packageJson.dependencies[dependency].startsWith('~') &&
1137
- !context.packageJson.dependencies[dependency].startsWith('>') &&
1138
- !context.packageJson.dependencies[dependency].startsWith('<')
1177
+ !dependencyVersion.startsWith('^') &&
1178
+ !dependencyVersion.startsWith('~') &&
1179
+ !dependencyVersion.startsWith('>') &&
1180
+ !dependencyVersion.startsWith('<')
1139
1181
  ) {
1140
1182
  if (enforcedDependencies.includes(dependency)) {
1141
1183
  context.errors.push(
1142
- `[E0044] dependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"`,
1184
+ `[E0044] dependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${dependencyVersion}"`,
1143
1185
  );
1144
1186
  } else {
1145
1187
  forcedDependencyFlag = true;
1146
1188
  // context.warnings.push(
1147
- // `[S0047] dependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"`,
1189
+ // `[S0047] dependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${dependencyVersion}"`,
1148
1190
  // );
1149
1191
  }
1150
1192
  }
@@ -1155,9 +1197,10 @@ async function checkPackageJson(context) {
1155
1197
  );
1156
1198
  }
1157
1199
 
1200
+ const expandedDevDependencies = expandNpmAliases(context.packageJson.devDependencies);
1158
1201
  let forcedDevDependencyFlag = false;
1159
- for (const dependency in context.packageJson.devDependencies) {
1160
- const dependencyVersion = context.packageJson.devDependencies[dependency];
1202
+ for (const dependency in expandedDevDependencies) {
1203
+ const dependencyVersion = expandedDevDependencies[dependency];
1161
1204
  if (dependencyVersion.toLowerCase().includes('github.com')) {
1162
1205
  context.warnings.push(
1163
1206
  `[W0045] devDependency should not require github versions. Please change "${dependency}":"${dependencyVersion}"`,
@@ -1171,10 +1214,10 @@ async function checkPackageJson(context) {
1171
1214
  `[E0055] malformed dependency detected "${dependency}":"${dependencyVersion}". Please fix at package.json.`,
1172
1215
  );
1173
1216
  } else if (
1174
- !context.packageJson.devDependencies[dependency].startsWith('^') &&
1175
- !context.packageJson.devDependencies[dependency].startsWith('~') &&
1176
- !context.packageJson.devDependencies[dependency].startsWith('>') &&
1177
- !context.packageJson.devDependencies[dependency].startsWith('<')
1217
+ !dependencyVersion.startsWith('^') &&
1218
+ !dependencyVersion.startsWith('~') &&
1219
+ !dependencyVersion.startsWith('>') &&
1220
+ !dependencyVersion.startsWith('<')
1178
1221
  ) {
1179
1222
  if (enforcedDependencies.includes(dependency)) {
1180
1223
  context.errors.push(
@@ -1183,7 +1226,7 @@ async function checkPackageJson(context) {
1183
1226
  } else {
1184
1227
  forcedDevDependencyFlag = true;
1185
1228
  // context.warnings.push(
1186
- // `[W0048] devDependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"`,
1229
+ // `[W0048] devDependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${dependencyVersion}"`,
1187
1230
  // );
1188
1231
  }
1189
1232
  }
@@ -30,10 +30,10 @@ async function getIOPackageJson(context) {
30
30
  }
31
31
 
32
32
  const recommendedJsControllerVersion = '6.0.11';
33
- let requiredJsControllerVersion = '5.0.19';
33
+ let requiredJsControllerVersion = '6.0.11';
34
34
 
35
- const recommendedAdminVersion = '7.6.17';
36
- let requiredAdminVersion = '6.17.14'; // set to 6.17.14 if jsonConfig is used
35
+ const recommendedAdminVersion = '7.6.20';
36
+ let requiredAdminVersion = '7.6.17'; // set to 6.17.14 if jsonConfig is used
37
37
 
38
38
  const blacklistIOPackageJson = {
39
39
  $schema: {
@@ -96,6 +96,10 @@ const blacklistIOPackageJson = {
96
96
  msg: '"common.wakeup" is deprecated and ignored. Please remove from io-package.json.',
97
97
  err: true,
98
98
  },
99
+ 'common.adminTab.fa-icon': {
100
+ msg: '"common.adminTab.fa-icon" is deprecated and ignored. Please remove from io-package.json.',
101
+ err: false,
102
+ },
99
103
  };
100
104
 
101
105
  async function validateIOPackageSchema(context) {
@@ -931,12 +935,19 @@ async function checkIOPackageJson(context) {
931
935
  !context.ioPackageJson.common.adminUI?.config &&
932
936
  !context.ioPackageJson.common.adminUI?.custom &&
933
937
  !context.ioPackageJson.common.adminUI?.tab);
934
- common.debug(`admin dependency is ${requireAdmin ? '' : 'not'}required`);
935
938
 
936
- if (context.cfg.hasJsonConfig) {
937
- requiredAdminVersion = common.maxVersion(requiredAdminVersion, '6.17.14');
939
+ // admin itself does never require admin
940
+ if (context.adapterName === 'admin') {
941
+ requireAdmin = false;
938
942
  }
939
943
 
944
+ common.debug(`admin dependency is ${requireAdmin ? '' : 'not'}required`);
945
+
946
+ // no longer needed as minimum admin is 7.x.x now
947
+ // if (context.cfg.hasJsonConfig) {
948
+ // requiredAdminVersion = common.maxVersion(requiredAdminVersion, '6.17.14');
949
+ // }
950
+
940
951
  let currentAdminVersion = undefined;
941
952
  if (context.ioPackageJson.common.globalDependencies) {
942
953
  if (!(context.ioPackageJson.common.globalDependencies instanceof Array)) {
package/lib/M2000_Npm.js CHANGED
@@ -13,6 +13,7 @@ const compareVersions = require('compare-versions');
13
13
  const common = require('./common.js');
14
14
 
15
15
  // disable axios caching
16
+ // @ts-expect-error - old code
16
17
  axios.defaults.headers = {
17
18
  'Cache-Control': 'no-cache',
18
19
  Pragma: 'no-cache',
@@ -21,6 +21,8 @@ const common = require('./common.js');
21
21
  let responsiveErrorLimit = 5;
22
22
  let responsiveWarningLimit = 5;
23
23
 
24
+ const DEFAULT_MIN_ADMIN = '7.6.17';
25
+
24
26
  const stdAttributes = [
25
27
  'xl',
26
28
  'lg',
@@ -54,71 +56,78 @@ const stdAttributes = [
54
56
  ];
55
57
 
56
58
  const validComponents = {
57
- accordion: check_accordion,
58
- alive: check_alive,
59
- autocomplete: check_autocomplete,
60
- autocompleteSendTo: check_autocompleteSendTo,
61
-
62
- certificate: check_certificate,
63
- certificates: check_certificates,
64
- certificateCollection: check_certificateCollection,
65
- checkbox: check_checkbox,
66
- checkLicense: check_checkLicense,
67
- chips: check_chips,
68
- color: check_color,
69
- coordinates: check_coordinates,
70
- cron: check_cron,
71
- custom: check_custom,
72
- datePicker: check_datePicker,
73
- deviceManager: check_deviceManager,
74
- divider: check_divider,
75
-
76
- file: check_file,
77
- fileSelector: check_fileSelector,
78
- func: check_func,
79
-
80
- header: check_header,
81
-
82
- image: check_image,
83
- imageSendTo: check_imageSendTo,
84
- instance: check_instance,
85
- interface: check_interface,
86
- ip: check_ip,
87
-
88
- jsonEditor: check_jsonEditor,
89
-
90
- language: check_language,
91
- license: check_license,
92
-
93
- number: check_number,
94
-
95
- objectId: check_objectId,
96
-
97
- password: check_password,
98
- pattern: check_pattern,
99
- port: check_port,
100
-
101
- qrCode: check_qrCode,
102
-
103
- room: check_room,
104
-
105
- select: check_select,
106
- selectSendTo: check_selectSendTo,
107
- sendTo: check_sendTo,
108
- setState: check_setState,
109
- slider: check_slider,
110
- state: check_state,
111
- staticImage: check_staticImage,
112
- staticLink: check_staticLink,
113
- staticText: check_staticText,
114
-
115
- table: check_table,
116
- text: check_text,
117
- textSendTo: check_textSendTo,
118
- timePicker: check_timePicker,
119
-
120
- user: check_user,
121
- uuid: check_uuid,
59
+ accordion: { function: check_accordion, minAdmin: DEFAULT_MIN_ADMIN },
60
+ alive: { function: check_alive, minAdmin: DEFAULT_MIN_ADMIN },
61
+ autocomplete: { function: check_autocomplete, minAdmin: DEFAULT_MIN_ADMIN },
62
+ autocompleteSendTo: { function: check_autocompleteSendTo, minAdmin: DEFAULT_MIN_ADMIN },
63
+
64
+ certificate: { function: check_certificate, minAdmin: DEFAULT_MIN_ADMIN },
65
+ certificates: { function: check_certificates, minAdmin: DEFAULT_MIN_ADMIN },
66
+ certificateCollection: { function: check_certificateCollection, minAdmin: DEFAULT_MIN_ADMIN },
67
+ checkbox: { function: check_checkbox, minAdmin: DEFAULT_MIN_ADMIN },
68
+ checkDocker: { function: check_checkDocker, minAdmin: '7.7.31' },
69
+ checkLicense: { function: check_checkLicense, minAdmin: DEFAULT_MIN_ADMIN },
70
+ chips: { function: check_chips, minAdmin: DEFAULT_MIN_ADMIN },
71
+ color: { function: check_color, minAdmin: DEFAULT_MIN_ADMIN },
72
+ coordinates: { function: check_coordinates, minAdmin: DEFAULT_MIN_ADMIN },
73
+ cron: { function: check_cron, minAdmin: DEFAULT_MIN_ADMIN },
74
+ custom: { function: check_custom, minAdmin: DEFAULT_MIN_ADMIN },
75
+
76
+ datePicker: { function: check_datePicker, minAdmin: DEFAULT_MIN_ADMIN },
77
+ deviceManager: { function: check_deviceManager, minAdmin: DEFAULT_MIN_ADMIN },
78
+ divider: { function: check_divider, minAdmin: DEFAULT_MIN_ADMIN },
79
+
80
+ file: { function: check_file, minAdmin: DEFAULT_MIN_ADMIN },
81
+ fileSelector: { function: check_fileSelector, minAdmin: DEFAULT_MIN_ADMIN },
82
+ func: { function: check_func, minAdmin: DEFAULT_MIN_ADMIN },
83
+
84
+ header: { function: check_header, minAdmin: DEFAULT_MIN_ADMIN },
85
+
86
+ iframe: { function: check_iframe, minAdmin: '7.7.28' },
87
+ iframeSendTo: { function: check_iframeSendTo, minAdmin: '7.7.28' },
88
+ image: { function: check_image, minAdmin: DEFAULT_MIN_ADMIN },
89
+ imageSendTo: { function: check_imageSendTo, minAdmin: DEFAULT_MIN_ADMIN },
90
+ infoBox: { function: check_infoBox, minAdmin: DEFAULT_MIN_ADMIN },
91
+ instance: { function: check_instance, minAdmin: DEFAULT_MIN_ADMIN },
92
+ interface: { function: check_interface, minAdmin: DEFAULT_MIN_ADMIN },
93
+ ip: { function: check_ip, minAdmin: DEFAULT_MIN_ADMIN },
94
+
95
+ jsonEditor: { function: check_jsonEditor, minAdmin: DEFAULT_MIN_ADMIN },
96
+
97
+ language: { function: check_language, minAdmin: DEFAULT_MIN_ADMIN },
98
+ license: { function: check_license, minAdmin: DEFAULT_MIN_ADMIN },
99
+
100
+ number: { function: check_number, minAdmin: DEFAULT_MIN_ADMIN },
101
+
102
+ objectId: { function: check_objectId, minAdmin: DEFAULT_MIN_ADMIN },
103
+
104
+ password: { function: check_password, minAdmin: DEFAULT_MIN_ADMIN },
105
+ pattern: { function: check_pattern, minAdmin: DEFAULT_MIN_ADMIN },
106
+ port: { function: check_port, minAdmin: DEFAULT_MIN_ADMIN },
107
+
108
+ qrCode: { function: check_qrCode, minAdmin: DEFAULT_MIN_ADMIN },
109
+
110
+ room: { function: check_room, minAdmin: DEFAULT_MIN_ADMIN },
111
+
112
+ select: { function: check_select, minAdmin: DEFAULT_MIN_ADMIN },
113
+ selectSendTo: { function: check_selectSendTo, minAdmin: DEFAULT_MIN_ADMIN },
114
+ sendTo: { function: check_sendTo, minAdmin: DEFAULT_MIN_ADMIN },
115
+ setState: { function: check_setState, minAdmin: DEFAULT_MIN_ADMIN },
116
+ slider: { function: check_slider, minAdmin: DEFAULT_MIN_ADMIN },
117
+ state: { function: check_state, minAdmin: DEFAULT_MIN_ADMIN },
118
+ staticImage: { function: check_staticImage, minAdmin: DEFAULT_MIN_ADMIN },
119
+ staticLink: { function: check_staticLink, minAdmin: DEFAULT_MIN_ADMIN },
120
+ staticText: { function: check_staticText, minAdmin: DEFAULT_MIN_ADMIN },
121
+
122
+ table: { function: check_table, minAdmin: DEFAULT_MIN_ADMIN },
123
+ text: { function: check_text, minAdmin: DEFAULT_MIN_ADMIN },
124
+ textSendTo: { function: check_textSendTo, minAdmin: DEFAULT_MIN_ADMIN },
125
+ timePicker: { function: check_timePicker, minAdmin: DEFAULT_MIN_ADMIN },
126
+
127
+ user: { function: check_user, minAdmin: DEFAULT_MIN_ADMIN },
128
+ uuid: { function: check_uuid, minAdmin: DEFAULT_MIN_ADMIN },
129
+
130
+ yamlEditor: { function: check_yamlEditor, minAdmin: '7.7.31' },
122
131
  };
123
132
 
124
133
  function handleResponsiveError(context, msg) {
@@ -266,6 +275,11 @@ function check_checkLicense(context, path, jsonConfig, _inTable) {
266
275
  chk_responsive(context, path, jsonConfig, 'checkLicense');
267
276
  }
268
277
 
278
+ function check_checkDocker(context, path, jsonConfig, _inTable) {
279
+ common.debug(`check_checkDocker ${path}`);
280
+ chk_responsive(context, path, jsonConfig, 'checkDocker', { sizesOptional: true });
281
+ }
282
+
269
283
  function check_chips(context, path, jsonConfig, _inTable) {
270
284
  common.debug(`check_chips ${path}`);
271
285
  chk_responsive(context, path, jsonConfig, 'chips');
@@ -326,6 +340,16 @@ function check_header(context, path, jsonConfig, _inTable) {
326
340
  chk_responsive(context, path, jsonConfig, 'header', { sizesOptional: true });
327
341
  }
328
342
 
343
+ function check_iframe(context, path, jsonConfig, _inTable) {
344
+ common.debug(`check_iframe ${path}`);
345
+ chk_responsive(context, path, jsonConfig, 'iframe');
346
+ }
347
+
348
+ function check_iframeSendTo(context, path, jsonConfig, _inTable) {
349
+ common.debug(`check_iframeSendTo ${path}`);
350
+ chk_responsive(context, path, jsonConfig, 'iframeSendTo');
351
+ }
352
+
329
353
  function check_image(context, path, jsonConfig, _inTable) {
330
354
  common.debug(`check_image ${path}`);
331
355
  chk_responsive(context, path, jsonConfig, 'image');
@@ -351,6 +375,11 @@ function check_ip(context, path, jsonConfig, _inTable) {
351
375
  chk_responsive(context, path, jsonConfig, 'ip');
352
376
  }
353
377
 
378
+ function check_infoBox(context, path, jsonConfig, _inTable) {
379
+ common.debug(`check_infoBox ${path}`);
380
+ chk_responsive(context, path, jsonConfig, 'infoBox', { sizesOptional: true });
381
+ }
382
+
354
383
  function check_jsonEditor(context, path, jsonConfig, _inTable) {
355
384
  common.debug(`check_jsonEditor ${path}`);
356
385
  chk_responsive(context, path, jsonConfig, 'jsonEditor');
@@ -476,6 +505,11 @@ function check_uuid(context, path, jsonConfig, _inTable) {
476
505
  chk_responsive(context, path, jsonConfig, 'uuid');
477
506
  }
478
507
 
508
+ function check_yamlEditor(context, path, jsonConfig, _inTable) {
509
+ common.debug(`check_yamlEditor ${path}`);
510
+ chk_responsive(context, path, jsonConfig, 'yamlEditor');
511
+ }
512
+
479
513
  function checkComponent(context, path, jsonConfig) {
480
514
  common.debug(`checkComponent (${path})`);
481
515
 
@@ -487,8 +521,8 @@ function checkComponent(context, path, jsonConfig) {
487
521
 
488
522
  if (validComponents[type] === undefined) {
489
523
  context.errors.push(`[E5504] unexpected component "${type}" detected at ${path}`);
490
- } else if (typeof validComponents[type] === 'function') {
491
- validComponents[type](context, path, jsonConfig, false);
524
+ } else if (typeof validComponents[type].function === 'function') {
525
+ validComponents[type].function(context, path, jsonConfig, false);
492
526
  } else {
493
527
  common.debug(`no checks defined for component ${type}`);
494
528
  }
@@ -612,7 +646,7 @@ function checkJsonConfig(context, path, jsonConfig) {
612
646
  if (baseType == 'panel') {
613
647
  checkPanel(context, `${path}/items`, jsonConfig, true);
614
648
  } else if (baseType == 'tabs') {
615
- checkTabs(context, `${path}/items`, jsonConfig['items'], false);
649
+ checkTabs(context, `${path}/items`, jsonConfig['items']);
616
650
  }
617
651
  }
618
652
  }
@@ -124,16 +124,33 @@ async function checkReadme(context) {
124
124
  context.checks.push('Valid copyright year found in README.md');
125
125
  }
126
126
 
127
- // Check for multiple copyright lines and trailing spaces
128
- const copyrightLines = text.split('\n').filter(line => line.trim().match(/^Copyright\s+\(c\)/i));
129
- if (copyrightLines.length > 1) {
130
- // Check all lines except the last one for trailing double spaces
131
- const linesWithoutTrailingSpaces = [];
132
- for (let i = 0; i < copyrightLines.length - 1; i++) {
133
- if (!copyrightLines[i].match(/\s{2,}$/)) {
127
+ // Check for consecutive copyright lines and trailing spaces
128
+ // Only consecutive copyright lines (no other text or empty line between them) require trailing spaces
129
+ const readmeLines = text.split('\n');
130
+ const linesWithoutTrailingSpaces = [];
131
+ let hasConsecutiveCopyrightLines = false;
132
+ const emptyLineBetweenCopyrightLines = [];
133
+ for (let i = 0; i < readmeLines.length - 1; i++) {
134
+ if (
135
+ readmeLines[i].trim().match(/^Copyright\s+\(c\)/i) &&
136
+ readmeLines[i + 1].trim().match(/^Copyright\s+\(c\)/i)
137
+ ) {
138
+ hasConsecutiveCopyrightLines = true;
139
+ if (!readmeLines[i].match(/\s{2,}$/)) {
134
140
  linesWithoutTrailingSpaces.push(i + 1);
135
141
  }
136
142
  }
143
+ // Check for copyright lines separated by a single empty line
144
+ if (
145
+ i < readmeLines.length - 2 &&
146
+ readmeLines[i].trim().match(/^Copyright\s+\(c\)/i) &&
147
+ readmeLines[i + 1].trim() === '' &&
148
+ readmeLines[i + 2].trim().match(/^Copyright\s+\(c\)/i)
149
+ ) {
150
+ emptyLineBetweenCopyrightLines.push(i + 2);
151
+ }
152
+ }
153
+ if (hasConsecutiveCopyrightLines) {
137
154
  if (linesWithoutTrailingSpaces.length > 0) {
138
155
  context.warnings.push(
139
156
  `[W6009] 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.`,
@@ -142,6 +159,11 @@ async function checkReadme(context) {
142
159
  context.checks.push('Multiple copyright lines in README.md have proper trailing spaces');
143
160
  }
144
161
  }
162
+ if (emptyLineBetweenCopyrightLines.length > 0) {
163
+ context.warnings.push(
164
+ `[W6011] 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.`,
165
+ );
166
+ }
145
167
  }
146
168
 
147
169
  // languages = languagedetect.detect(data, 3);
@@ -166,3 +188,4 @@ exports.checkReadme = checkReadme;
166
188
  // [6007] Future year (${readmeYear}) found in copyright. Please use "Copyright (c) ${m[1]}-${year} ${getAuthor(context.packageJson.author)}" at the end of README.md
167
189
  // [6008] Changelog for version ${context.packageJson.version} should be added to README.md.
168
190
  // [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.
191
+ // [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.
@@ -103,16 +103,33 @@ async function checkLicenseFile(context) {
103
103
  context.checks.push(`Valid copyright year ${licenseYear} found in LICENSE`);
104
104
  }
105
105
 
106
- // Check for multiple copyright lines and trailing spaces
107
- const copyrightLines = data.split('\n').filter(line => line.trim().match(/^Copyright\s+\(c\)/i));
108
- if (copyrightLines.length > 1) {
109
- // Check all lines except the last one for trailing double spaces
110
- const linesWithoutTrailingSpaces = [];
111
- for (let i = 0; i < copyrightLines.length - 1; i++) {
112
- if (!copyrightLines[i].match(/\s{2,}$/)) {
106
+ // Check for consecutive copyright lines and trailing spaces
107
+ // Only consecutive copyright lines (no other text or empty line between them) require trailing spaces
108
+ const licenseLines = data.split('\n');
109
+ const linesWithoutTrailingSpaces = [];
110
+ let hasConsecutiveCopyrightLines = false;
111
+ const emptyLineBetweenCopyrightLines = [];
112
+ for (let i = 0; i < licenseLines.length - 1; i++) {
113
+ if (
114
+ licenseLines[i].trim().match(/^Copyright\s+\(c\)/i) &&
115
+ licenseLines[i + 1].trim().match(/^Copyright\s+\(c\)/i)
116
+ ) {
117
+ hasConsecutiveCopyrightLines = true;
118
+ if (!licenseLines[i].match(/\s{2,}$/)) {
113
119
  linesWithoutTrailingSpaces.push(i + 1);
114
120
  }
115
121
  }
122
+ // Check for copyright lines separated by a single empty line
123
+ if (
124
+ i < licenseLines.length - 2 &&
125
+ licenseLines[i].trim().match(/^Copyright\s+\(c\)/i) &&
126
+ licenseLines[i + 1].trim() === '' &&
127
+ licenseLines[i + 2].trim().match(/^Copyright\s+\(c\)/i)
128
+ ) {
129
+ emptyLineBetweenCopyrightLines.push(i + 2);
130
+ }
131
+ }
132
+ if (hasConsecutiveCopyrightLines) {
116
133
  if (linesWithoutTrailingSpaces.length > 0) {
117
134
  context.warnings.push(
118
135
  `[W7003] Multiple copyright lines found in LICENSE but line(s) ${linesWithoutTrailingSpaces.join(', ')} missing trailing spaces. Add two spaces at end of each copyright line (except last) for proper formatting.`,
@@ -121,6 +138,11 @@ async function checkLicenseFile(context) {
121
138
  context.checks.push('Multiple copyright lines in LICENSE have proper trailing spaces');
122
139
  }
123
140
  }
141
+ if (emptyLineBetweenCopyrightLines.length > 0) {
142
+ context.warnings.push(
143
+ `[W7004] Copyright lines in LICENSE 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.`,
144
+ );
145
+ }
124
146
  }
125
147
  }
126
148
  return context;
@@ -136,3 +158,4 @@ exports.checkLicenseFile = checkLicenseFile;
136
158
  // [7001] No actual year found in LICENSE. Please add "Copyright (c) ${year} ${getAuthor(context.packageJson.author)}" at the start of LICENSE
137
159
  // [7002] Cannot read LICENSE file. Please check.');
138
160
  // [7003] Multiple copyright lines found in LICENSE but line(s) ${linesWithoutTrailingSpaces.join(', ')} missing trailing spaces. Add two spaces at end of each copyright line (except last) for proper formatting.
161
+ // [7004] Copyright lines in LICENSE 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.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
- "version": "5.1.1",
2
+ "version": "5.2.2-alpha.2",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
5
  "ajv": "^8.17.1",
6
- "axios": "^1.13.2",
6
+ "axios": "^1.13.4",
7
7
  "compare-versions": "^6.1.1",
8
8
  "image-size": "^1.2.0",
9
9
  "js-yaml": "^4.1.1",
@@ -17,8 +17,9 @@
17
17
  "@types/node": "^24.10.1",
18
18
  "@types/semver": "^7.7.1"
19
19
  },
20
- "publishConfig": {
21
- "access": "public"
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/ioBroker/ioBroker.repochecker.git"
22
23
  },
23
24
  "files": [
24
25
  "lib/",
@@ -27,7 +28,7 @@
27
28
  "doc/issues.json"
28
29
  ],
29
30
  "engines": {
30
- "node": ">=16"
31
+ "node": ">=18"
31
32
  },
32
33
  "main": "index.js",
33
34
  "bin": "index.js",
@@ -35,9 +36,6 @@
35
36
  "prepublishOnly": "node doc/readme.js",
36
37
  "start": "node index.js",
37
38
  "lint": "eslint -c eslint.config.mjs .",
38
- "release": "release-script",
39
- "release-patch": "release-script patch --yes --no-update-lockfile",
40
- "release-minor": "release-script minor --yes --no-update-lockfile",
41
- "release-major": "release-script major --yes --no-update-lockfile"
39
+ "release": "release-script"
42
40
  }
43
41
  }