@iobroker/repochecker 3.0.0-alpha.1 → 3.0.0-alpha.3

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
@@ -20,7 +20,7 @@ Branch (`master/main/dev`) is optional.
20
20
  -->
21
21
 
22
22
  ## Changelog
23
- ### 3.0.0-alpha.1 (2024-09-10)
23
+ ### 3.0.0-alpha.3 (2024-09-10)
24
24
  * (mcm1957) index.js has been split into seperated modules.
25
25
 
26
26
  ### 2.10.0 (2024-08-19)
package/index.js CHANGED
@@ -22,7 +22,7 @@ const common = require('./lib/common.js');
22
22
  const config = require('./lib/config.js');
23
23
  const M000_PackageJson = require('./lib/M000_PackageJson.js');
24
24
  const M100_IOPackageJson = require('./lib/M100_IOPackageJson.js');
25
- const M200_Npm = require('./lib/M200_Npm.js');
25
+ const M250_Npm = require('./lib/M250_Npm.js');
26
26
  const M300_Testing = require('./lib/M300_Testing.js');
27
27
  const M400_Repository = require('./lib/M400_Repository.js');
28
28
  const M500_Code = require('./lib/M500_Code.js');
@@ -44,10 +44,10 @@ axios.defaults.headers = {
44
44
  // E0xx
45
45
  // check package.json
46
46
  //
47
- // E1xx
47
+ // E100 - 249
48
48
  // check io-package.json
49
49
  //
50
- // E2xx
50
+ // E250 - 299
51
51
  // check npm and npmjs.org
52
52
  //
53
53
  // E3xx
@@ -140,7 +140,7 @@ function check(request, ctx, callback) {
140
140
  .then(context => M100_IOPackageJson.getIOPackageJson(context))
141
141
  .then(context => M000_PackageJson.checkPackageJson(context))
142
142
  .then(context => M100_IOPackageJson.checkIOPackageJson(context))
143
- .then(context => M200_Npm.checkNpm(context))
143
+ .then(context => M250_Npm.checkNpm(context))
144
144
  .then(context => M400_Repository.checkRepository(context))
145
145
  .then(context => M500_Code.checkCode(context))
146
146
  .then(context => M300_Testing.checkTests(context))
@@ -0,0 +1,449 @@
1
+ 'use strict';
2
+ /*
3
+ This module is a support module for iobroker.repochecker
4
+
5
+ Area checked: package.json
6
+ Numbering : 001 - 099
7
+
8
+ */
9
+
10
+ const compareVersions = require('compare-versions');
11
+
12
+ const common = require('./common.js');
13
+
14
+ const recommendedNodeVersion = '18'; // This is the minimum node version that should be required
15
+ const requiredNodeVersion = '16'; // This is the minimum node version that must be required
16
+
17
+ /* TODO: configuration should be moved to context */
18
+
19
+ const dependenciesPackageJson = {
20
+ '@iobroker/adapter-core': {
21
+ required: '3.1.4',
22
+ recommended: '3.1.6',
23
+ },
24
+ };
25
+
26
+ const devDependenciesPackageJson = {
27
+ '@iobroker/testing': {
28
+ required: '4.1.3',
29
+ recommended: '4.1.3',
30
+ onlyWWW: false,
31
+ },
32
+ };
33
+
34
+ const blacklistPackageJson = {
35
+
36
+ };
37
+
38
+ async function getPackageJson(context) {
39
+ console.log('\ngetPackageJson');
40
+
41
+ const packageJson = await common.downloadFile(context.githubUrl, '/package.json');
42
+ context.packageJson = packageJson;
43
+ if (typeof context.packageJson === 'string') {
44
+ try {
45
+ context.packageJson = JSON.parse(context.packageJson);
46
+ } catch (e) {
47
+ context.errors.push(`[E001] Cannot parse package.json: ${e}`);
48
+ }
49
+ }
50
+ return context;
51
+ }
52
+
53
+ async function checkPackageJson(context) {
54
+ console.log('\ncheckPackageJson [E001 - E099]');
55
+
56
+ if (!context.githubUrlOriginal.match(/\/iobroker\./i)) {
57
+ context.errors.push('[E002] No "ioBroker." found in the name of repository');
58
+ } else {
59
+ context.checks.push('"ioBroker" was found in the name of repository');
60
+ }
61
+
62
+ if (context.githubUrlOriginal.includes('/iobroker.')) {
63
+ context.errors.push('[E003] Repository must have name ioBroker.adaptername, but now io"b"roker is in lowercase');
64
+ } else {
65
+ context.checks.push('Repository has name ioBroker.adaptername (not iobroker.adaptername)');
66
+ }
67
+
68
+ const m = context.githubUrlOriginal.match(/\/ioBroker\.(.*)$/);
69
+ let adapterName = '';
70
+ if (!m || !m[1]) {
71
+ context.errors.push(`[E004] No adapter name found in URL: ${context.githubUrlOriginal}`);
72
+ } else {
73
+ context.checks.push('Adapter name found in the URL');
74
+ adapterName = m[1].replace(/\/master$/, '').replace(/\/main$/, '');
75
+ }
76
+
77
+ context.adapterName = adapterName;
78
+
79
+ if (adapterName.match(/[A-Z]/)) {
80
+ context.errors.push('[E005] Adapter name must be lowercase');
81
+ } else {
82
+ context.checks.push('Adapter name is lowercase');
83
+ }
84
+
85
+ if (adapterName.match(/[^-_a-z\d]/)) {
86
+ context.errors.push(`[E006] Invalid characters found in adapter name "${adapterName}". Only lowercase chars, digits, "-" and "_" are allowed`);
87
+ } else {
88
+ context.checks.push(`No invalid characters found in "${adapterName}"`);
89
+ }
90
+
91
+ if (adapterName.startsWith('_')) {
92
+ context.errors.push(`[E024] Adapter name "${adapterName}" may not start with '_'`);
93
+ } else {
94
+ context.checks.push(`Adapter name "${adapterName}" does not start with '_'`);
95
+ }
96
+
97
+ const n = context.githubUrlOriginal.match(/\/([^/]+)\/iobroker\./i);
98
+ if (!n || !n[1]) {
99
+ context.errors.push('[E007] Cannot find author repo in the URL');
100
+ } else {
101
+ context.authorName = n[1];
102
+ }
103
+
104
+ if (context.packageJson.name !== `iobroker.${adapterName.toLowerCase()}`) {
105
+ context.errors.push(`[E020] Name of adapter in package.json must be lowercase and be equal to "iobroker.${adapterName.toLowerCase()}". Now is "${packageJson.name}"`);
106
+ } else {
107
+ context.checks.push(`Name of adapter in package.json must be lowercase and be equal to "iobroker.${adapterName.toLowerCase()}".`);
108
+ }
109
+
110
+ if (!context.packageJson.version) {
111
+ context.errors.push('[E009] No version found in the package.json');
112
+ } else {
113
+ context.checks.push('Version found in package.json');
114
+ }
115
+
116
+ if (!context.packageJson.description) {
117
+ context.errors.push('[E010] No description found in the package.json');
118
+ } else {
119
+ context.checks.push('Description found in package.json');
120
+ }
121
+
122
+ if (context.packageJson.licenses) {
123
+ context.errors.push('[E021] "licenses" in package.json are deprecated. Please remove and use "license": "NAME" field.');
124
+ } else {
125
+ context.checks.push('No "licenses" found in package.json');
126
+ }
127
+
128
+ if (!context.packageJson.author) {
129
+ context.errors.push('[E013] No author found in the package.json');
130
+ } else {
131
+ context.checks.push('Author found in package.json');
132
+ }
133
+
134
+ if (context.packageJson._args) {
135
+ context.errors.push('[E014] NPM information found in package.json. Please remove all attributes starting with "_"');
136
+ } else {
137
+ context.checks.push('No npm generated attributes found in package.json');
138
+ }
139
+
140
+ if (!context.packageJson.license) {
141
+ context.errors.push('[E015] No license found in package.json');
142
+ } else {
143
+ context.checks.push('"license" found in package.json');
144
+
145
+ // check if license valid
146
+ if (!context.cfg.allowedLicenses.includes(context.packageJson.license)) {
147
+ context.errors.push(`[E016] ${context.packageJson.license} found in package.json is no valid SPDX license. Please use one of listed here: https://spdx.org/licenses/`);
148
+ } else {
149
+ context.checks.push('"license" is valid in package.json');
150
+ }
151
+ }
152
+
153
+ if (!context.packageJson.repository) {
154
+ context.errors.push('[E017] No repository found in the package.json');
155
+ } else {
156
+ context.checks.push('Repository found in package.json');
157
+
158
+ const allowedRepoUrls = [
159
+ context.githubApiData.html_url, // https://github.com/klein0r/ioBroker.luftdaten
160
+ `git+${context.githubApiData.html_url}`, // git+https://github.com/klein0r/ioBroker.luftdaten
161
+ context.githubApiData.git_url, // git://github.com/klein0r/ioBroker.luftdaten.git
162
+ context.githubApiData.ssh_url, // git@github.com:klein0r/ioBroker.luftdaten.git
163
+ context.githubApiData.clone_url, // https://github.com/klein0r/ioBroker.luftdaten.git
164
+ `git+${context.githubApiData.clone_url}` // git+https://github.com/klein0r/ioBroker.luftdaten.git
165
+ ];
166
+
167
+ // https://docs.npmjs.com/cli/v7/configuring-npm/package-json#repository
168
+ if (context.packageJson.repository && typeof context.packageJson.repository === 'object') {
169
+ if (context.packageJson.repository.type !== 'git') {
170
+ context.errors.push(`[E018] Invalid repository type in package.json: ${context.packageJson.repository.type}. It should be git`);
171
+ } else {
172
+ context.checks.push('Repository type is valid in package.json: git');
173
+ }
174
+
175
+ if (!allowedRepoUrls.includes(context.packageJson.repository.url)) {
176
+ context.errors.push(`[E019] Invalid repository URL in package.json: ${context.packageJson.repository.url}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}`);
177
+ } else {
178
+ context.checks.push('Repository URL is valid in package.json');
179
+ }
180
+ } else if (context.packageJson.repository && typeof context.packageJson.repository === 'string') {
181
+ if (!allowedRepoUrls.includes(context.packageJson.repository)) {
182
+ context.errors.push(`[E019] Invalid repository URL in package.json: ${context.packageJson.repository}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}`);
183
+ } else {
184
+ context.checks.push('Repository URL is valid in package.json');
185
+ }
186
+ } else {
187
+ context.errors.push('[E012] Invalid repository object in package.json');
188
+ }
189
+ }
190
+
191
+ if (context.cfg.reservedAdapterNames.includes(adapterName)) {
192
+ context.errors.push('[E022] Adapter name is reserved. Please rename adapter.');
193
+ } else {
194
+ context.checks.push('Adapter name is not reserved');
195
+ }
196
+
197
+ if (!context.ioPackageJson.common.onlyWWW && !context.packageJson.dependencies) {
198
+ context.errors.push('[W030] No dependencies declared at package.json. Is this really correct?');
199
+ }
200
+ if (!context.packageJson.devDependencies) {
201
+ context.errors.push('[E031] No devDependencies declared at package.json. Please correct package.json');
202
+ }
203
+
204
+ if ((context.packageJson.dependencies && context.packageJson.dependencies.npm) || (context.packageJson.optionalDependencies && context.packageJson.optionalDependencies.npm)) {
205
+ context.errors.push('[E023] Do not include "npm" as dependency!');
206
+ } else {
207
+ context.checks.push('npm is not in dependencies');
208
+ }
209
+
210
+ if ((context.packageJson.dependencies && context.packageJson.dependencies['iobroker.js-controller']) ||
211
+ (context.packageJson.devDependencies && context.packageJson.devDependencies['iobroker.js-controller']) ||
212
+ (context.packageJson.optionalDependencies && context.packageJson.optionalDependencies['iobroker.js-controller'])
213
+ ) {
214
+ context.errors.push('[E025] Do not include "iobroker.js-controller" as dependency!');
215
+ } else {
216
+ context.checks.push('iobroker.js-controller is not in dependencies');
217
+ }
218
+
219
+ if (!context.ioPackageJson.common.onlyWWW) {
220
+ if (!context.packageJson.engines) {
221
+ context.errors.push(`[E026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended`);
222
+ } else {
223
+ if (!context.packageJson.engines.node) {
224
+ context.errors.push(`[E026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended`);
225
+ } else {
226
+ context.checks.push('engines attribute containing node requirements exist.');
227
+ // 'engines': { 'node': '>= 18' }
228
+ // 'engines': { 'node': '>= 18.1.2' }
229
+ // 'engines': { 'node': '>= 18.1.2 < 19' }
230
+ const nodeVal = context.packageJson.engines.node;
231
+ const match = nodeVal.match(/^(?<cmp>[<>=~]+)?\s*(?<vers>\d+(\.\d+(\.\d+)?)?(-\w+\.\d+)?)/m);
232
+ if ( ! match ) {
233
+ context.warnings.push(`[W027] Engines clause at at package.json ({'engines' : { 'node' : '${nodeVal}' } }") is not parseable.`);
234
+ } else {
235
+ common.debug( `node check: ${JSON.stringify(match.groups)}`);
236
+ if ( match.groups.cmp !== '>' && match.groups.cmp !== '>=' ) {
237
+ context.warnings.push(`[W028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.`);
238
+ } else {
239
+ if ( ! compareVersions.compare( match.groups.vers, requiredNodeVersion, '>=')) {
240
+ context.errors.push(`[E029] Node.js ${requiredNodeVersion} is required as minimum, node.js ${recommendedNodeVersion} is recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.`);
241
+ } else if ( ! compareVersions.compare( match.groups.vers, recommendedNodeVersion, '>=')) {
242
+ context.warnings.push(`[W028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.`);
243
+ } else {
244
+ context.checks.push(`Correct node.js version ${match.groups.vers} requested by "engines" attribute at package.json.`);
245
+ }
246
+ }
247
+ }
248
+ }
249
+ }
250
+ } else {
251
+ context.checks.push('"engines" check skipped for wwwOnly adapter.');
252
+ }
253
+
254
+ if (!context.ioPackageJson.common.onlyWWW) {
255
+ for (const dependency in dependenciesPackageJson) {
256
+ const requiredVersion = dependenciesPackageJson[dependency].required;
257
+ const recommendedVersion = dependenciesPackageJson[dependency].recommended;
258
+ let dependencyVersion = context.packageJson.dependencies[`${dependency}`] || '';
259
+ dependencyVersion = dependencyVersion.replace(/[\^~]/,'' );
260
+ if (!dependencyVersion) {
261
+ context.errors.push(`[E032] No dependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to dependencies at package.json`);
262
+ } else if (! compareVersions.compare( dependencyVersion, requiredVersion, '>=' )) {
263
+ context.errors.push(`[E033] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update dependencies at package.json`);
264
+ } else if (! compareVersions.compare( dependencyVersion, recommendedVersion, '>=' )) {
265
+ context.warnings.push(`[W034] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating dependencies at package.json`);
266
+ } else {
267
+ context.checks.push('dependency ${dependency} ${dependencyVersion} is ok');
268
+ }
269
+ }
270
+ context.checks.push('"dependenciesPackageJson" checked.');
271
+ } else {
272
+ context.checks.push('"dependenciesPackageJson" check skipped for wwwOnly adapter.');
273
+ }
274
+
275
+ for (const dependency in devDependenciesPackageJson) {
276
+ if ((devDependenciesPackageJson[dependency].onlyWWW === false) && context.ioPackageJson.common.onlyWWW) continue;
277
+ const requiredVersion = devDependenciesPackageJson[dependency].required;
278
+ const recommendedVersion = devDependenciesPackageJson[dependency].recommended;
279
+ let dependencyVersion = context.packageJson.devDependencies[`${dependency}`] || '';
280
+ dependencyVersion = dependencyVersion.replace(/[\^~]/,'' );
281
+ if (!dependencyVersion) {
282
+ context.errors.push(`[E035] No devDependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to devDependencies at package.json`);
283
+ } else if (! compareVersions.compare( dependencyVersion, requiredVersion, '>=' )) {
284
+ context.errors.push(`[E036] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update devDependencies at package.json`);
285
+ } else if (! compareVersions.compare( dependencyVersion, recommendedVersion, '>=' )) {
286
+ context.warnings.push(`[W037] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating devDependencies at package.json`);
287
+ } else {
288
+ context.checks.push('devDependency ${dependency} ${dependencyVersion} is ok');
289
+ }
290
+ }
291
+ context.checks.push('"devDependenciesPackageJson" checked.');
292
+
293
+ const enforcedDependencies = [
294
+ '@iobroker/adapter-core',
295
+ '@alcalzone/release-script',
296
+ '@alcalzone/release-script-plugin-iobroker',
297
+ '@alcalzone/release-script-plugin-license',
298
+ '@alcalzone/release-script-manual-review',
299
+ '@iobroker/adapter-dev',
300
+ '@iobroker/testing'
301
+ ];
302
+ for (const dependency in context.packageJson.dependencies) {
303
+ if (!context.packageJson.dependencies[dependency].startsWith('^') &&
304
+ !context.packageJson.dependencies[dependency].startsWith('~') &&
305
+ !context.packageJson.dependencies[dependency].startsWith('>')
306
+ ) {
307
+ if (context.packageJson.dependencies[dependency].toLowerCase().includes('github.com')) {
308
+ context.warnings.push(`[W043] dependency should not require a github version. Please change "${dependency}:${context.packageJson.dependencies[dependency]}"`);
309
+ } else if (enforcedDependencies.includes(dependency)) {
310
+ context.errors.push(`[E044] dependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"`);
311
+ } else {
312
+ context.warnings.push(`[W047] dependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"`);
313
+ }
314
+ }
315
+ }
316
+
317
+ for (const dependency in context.packageJson.devDependencies) {
318
+ if (!context.packageJson.devDependencies[dependency].startsWith('^') &&
319
+ !context.packageJson.devDependencies[dependency].startsWith('~') &&
320
+ !context.packageJson.devDependencies[dependency].startsWith('>')
321
+ ) {
322
+ if (context.packageJson.devDependencies[dependency].toLowerCase().includes('github.com')) {
323
+ context.warnings.push(`[W045] devDependency should not require github versions. Please change "${dependency}:${context.packageJson.devDependencies[dependency]}"`);
324
+ } else if (enforcedDependencies.includes(dependency)) {
325
+ context.errors.push(`[E046] devDependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"`);
326
+ } else {
327
+ context.warnings.push(`[W048] devDependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"`);
328
+ }
329
+ }
330
+ }
331
+
332
+ for (const blacklist in blacklistPackageJson) {
333
+ // console.log(`checking blacklist ${blacklist}`);
334
+ let tmp = context.packageJson;
335
+ let log = '';
336
+ for (const element of blacklist.split('.')) {
337
+ log = `${log}.${element}`;
338
+ //console.log(` check ${log}`);
339
+ tmp = tmp[element];
340
+ if (!tmp) {
341
+ //console.log(` ${log} does not exist`);
342
+ break;
343
+ }
344
+ }
345
+ if (tmp) {
346
+ if (blacklistPackageJson[blacklist].err) {
347
+ context.errors.push(`[E038] ${blacklistPackageJson[blacklist].msg}`);
348
+ } else {
349
+ context.warnings.push(`[W038] ${blacklistPackageJson[blacklist].msg}`);
350
+ }
351
+ }
352
+ // else {
353
+ // console.log(`blacklist ${blacklist} no match`);
354
+ // }
355
+ }
356
+ context.checks.push('"blacklist (package)" checked.');
357
+
358
+ if (!context.packageJson.keywords || !Array.isArray(context.packageJson.keywords)) {
359
+ context.errors.push('[E039] "keywords" must be an array within package.json and contain some useful keywords');
360
+ } else {
361
+ const forbiddenKeywords = [];
362
+ const ignoredKeywords = ['iobroker', 'smart home', 'smarthome', 'home automation', 'template'];
363
+ const recommendedKeywords = ['ioBroker'];
364
+ common.debug(`package.keywords: "${context.packageJson.keywords.join(', ')}"`);
365
+ common.debug(`filtered: "${context.packageJson.keywords.filter(keyword => !ignoredKeywords.includes(keyword.toLowerCase()))}"`);
366
+ if (context.packageJson.keywords.filter(keyword => !ignoredKeywords.includes(keyword.toLowerCase())).length === 0 ) {
367
+ context.errors.push(`[E049] "keywords" within package.json must contain some keywords besides "${context.packageJson.keywords.join(', ')}" related to adapter`);
368
+ }
369
+ if (! recommendedKeywords.filter(keyword => context.packageJson.keywords.includes(keyword)).length > 0) {
370
+ context.warnings.push(`[W040] "keywords" within package.json should contain "${recommendedKeywords.join(', ')}"`);
371
+ }
372
+ if (forbiddenKeywords.filter(keyword => context.packageJson.keywords.map(k => k.toLowerCase()).includes(keyword)).length > 0) {
373
+ context.warnings.push(`[W041] "keywords" within package.json should not contain "${forbiddenKeywords.join(', ')}"`);
374
+ }
375
+
376
+ context.checks.push('"keywords" found in package.json and refers to an array');
377
+ }
378
+
379
+ if (context.packageJson.globalDependencies) {
380
+ context.errors.push('[E042] "globalDependencies" is misplaced at package.json. Did you mean "common.globalDependencies" at io-package.json?');
381
+ } else {
382
+ context.checks.push('"globalDependencies" not found in package.json');
383
+ }
384
+
385
+ // single free 008, 011
386
+ // first free 050
387
+
388
+ return context;
389
+ }
390
+
391
+ exports.getPackageJson = getPackageJson;
392
+ exports.checkPackageJson = checkPackageJson;
393
+
394
+ // List of error and warnings used at this module
395
+ // ----------------------------------------------
396
+
397
+ // [001] Cannot parse package.json: ${e}
398
+ // [002] No "ioBroker." found in the name of repository
399
+ // [003] Repository must have name ioBroker.adaptername, but now io"b"roker is in lowercase
400
+ // [004] No adapter name found in URL: ${context.githubUrlOriginal}
401
+ // [005] Adapter name must be lowercase
402
+ // [006] Invalid characters found in adapter name "${adapterName}". Only lowercase chars, digits, "-" and "_" are allowed
403
+ // [007] Cannot find author repo in the URL
404
+ // [008] - free -
405
+ // [009] No version found in the package.json
406
+ // [010] No description found in the package.json
407
+ // [011] - free -
408
+ // [012] Invalid repository object in package.json
409
+ // [013] No author found in the package.json
410
+ // [014] NPM information found in package.json. Please remove all attributes starting with "_"
411
+ // [015] No license found in package.json
412
+ // [016] ${context.packageJson.license} found in package.json is no valid SPDX license. Please use one of listed here: https://spdx.org/licenses/
413
+ // [017] No repository found in the package.json
414
+ // [018] Invalid repository type in package.json: ${context.packageJson.repository.type}. It should be git
415
+ // [019] Invalid repository URL in package.json: ${context.packageJson.repository.url}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}
416
+ // [019] Invalid repository URL in package.json: ${context.packageJson.repository}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}
417
+ // [020] Name of adapter in package.json must be lowercase and be equal to "iobroker.${adapterName.toLowerCase()}". Now is "${packageJson.name}"
418
+ // [021] "licenses" in package.json are deprecated. Please remove and use "license": "NAME" field.
419
+ // [022] Adapter name is reserved. Please rename adapter.
420
+ // [023] Do not include "npm" as dependency!
421
+ // [024] Adapter name "${adapterName}" may not start with '_'
422
+ // [025] Do not include "iobroker.js-controller" as dependency!
423
+ // [026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended
424
+ // [026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended
425
+ // [027] Engines clause at at package.json ({'engines' : { 'node' : '${nodeVal}' } }") is not parseable.
426
+ // [028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.
427
+ // [028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.
428
+ // [029] Node.js ${requiredNodeVersion} is required as minimum, node.js ${recommendedNodeVersion} is recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.
429
+ // [030] No dependencies declared at package.json. Is this really correct?
430
+ // [031] No devDependencies declared at package.json. Please correct package.json
431
+ // [032] No dependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to dependencies at package.json
432
+ // [033] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update dependencies at package.json
433
+ // [034] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating dependencies at package.json
434
+ // [035] No devDependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to devDependencies at package.json
435
+ // [036] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update devDependencies at package.json
436
+ // [037] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating devDependencies at package.json
437
+ // [038] ${blacklistPackageJson[blacklist].msg}
438
+ // [038] ${blacklistPackageJson[blacklist].msg}
439
+ // [039] "keywords" must be an array within package.json and contain some useful keywords
440
+ // [040] "keywords" within package.json should contain "${recommendedKeywords.join(', ')}"
441
+ // [041] "keywords" within package.json should not contain "${forbiddenKeywords.join(', ')}"
442
+ // [042] "globalDependencies" is misplaced at package.json. Did you mean "common.globalDependencies" at io-package.json?
443
+ // [043] dependency should not require a github version. Please change "${dependency}:${context.packageJson.dependencies[dependency]}"
444
+ // [044] dependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"
445
+ // [045] devDependency should not require github versions. Please change "${dependency}:${context.packageJson.devDependencies[dependency]}"
446
+ // [046] devDependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"
447
+ // [047] dependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"
448
+ // [048] devDependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"
449
+ // [049] "keywords" within package.json must contain some keywords besides "${context.packageJson.keywords.join(', ')}" related to adapter