@iobroker/repochecker 4.2.1-alpha.0 → 5.0.0-alpha.0

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.
@@ -4,7 +4,7 @@
4
4
  This module is a support module for iobroker.repochecker
5
5
 
6
6
  Area checked: package.json
7
- Numbering : 001 - 099
7
+ Numbering : 0001 - 0099
8
8
 
9
9
  */
10
10
 
@@ -234,6 +234,52 @@ const validObjectsPackageJson = [
234
234
  'workspaces',
235
235
  ];
236
236
 
237
+ /**
238
+ * Validates release format according to ioBroker semver subset requirements
239
+ *
240
+ * @param {string} version - Version string to validate
241
+ * @returns {boolean} true if valid, false if invalid
242
+ */
243
+ function validateReleaseFormat(version) {
244
+ if (!version || typeof version !== 'string') {
245
+ return false;
246
+ }
247
+
248
+ // Regex to match the specified format:
249
+ // - version must consist of 3 digits separated by a dot
250
+ // - optionally followed by a Prerelease-Identifier, a dot and a Prerelease version
251
+ // - all numbers must not have leading zeroes (except single zero)
252
+ // - Prerelease-Identifier must only contain characters, numbers and a minus sign ([a-zA-Z0-9-])
253
+ // - Prerelease version must be a number without leading zeroes
254
+ // - empty fields resulting in two or more dots following each other are not valid
255
+
256
+ const regex = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([a-zA-Z0-9-]+)\.(0|[1-9]\d*))?$/;
257
+
258
+ const match = version.match(regex);
259
+ if (!match) {
260
+ return false;
261
+ }
262
+
263
+ const [, , , , prereleaseId, prereleaseVersion] = match;
264
+
265
+ // Additional validation for prerelease identifier
266
+ if (prereleaseId !== undefined) {
267
+ // Ensure prerelease identifier is valid:
268
+ // - cannot be only numbers (RC5 is invalid)
269
+ // - cannot end with numbers (RC5 is invalid, RC is valid)
270
+ if (/^\d+$/.test(prereleaseId) || /\d+$/.test(prereleaseId)) {
271
+ return false;
272
+ }
273
+
274
+ // Ensure prerelease version is provided when prerelease ID is present
275
+ if (prereleaseVersion === undefined) {
276
+ return false;
277
+ }
278
+ }
279
+
280
+ return true;
281
+ }
282
+
237
283
  async function getPackageJson(context) {
238
284
  console.log('[init] getting package.json');
239
285
 
@@ -243,26 +289,26 @@ async function getPackageJson(context) {
243
289
  try {
244
290
  context.packageJson = JSON.parse(context.packageJson);
245
291
  } catch (e) {
246
- context.errors.push(`[E001] Cannot parse package.json: ${e}`);
292
+ context.errors.push(`[E0001] Cannot parse package.json: ${e}`);
247
293
  }
248
294
  }
249
295
  return context;
250
296
  }
251
297
 
252
298
  async function checkPackageJson(context) {
253
- console.log('\n[E001 - E099] checking package.json');
299
+ console.log('\n[E0001 - E0999] checking package.json');
254
300
 
255
301
  let passed;
256
302
 
257
303
  if (!context.githubUrlOriginal.match(/\/iobroker\./i)) {
258
- context.errors.push('[E002] No "ioBroker." found in the name of repository');
304
+ context.errors.push('[E0002] No "ioBroker." found in the name of repository');
259
305
  } else {
260
306
  context.checks.push('"ioBroker" was found in the name of repository');
261
307
  }
262
308
 
263
309
  if (context.githubUrlOriginal.includes('/iobroker.')) {
264
310
  context.errors.push(
265
- '[E003] Repository must have name ioBroker.adaptername, but now io"b"roker is in lowercase',
311
+ '[E0003] Repository must have name ioBroker.adaptername, but now io"b"roker is in lowercase',
266
312
  );
267
313
  } else {
268
314
  context.checks.push('Repository has name ioBroker.adaptername (not iobroker.adaptername)');
@@ -271,7 +317,7 @@ async function checkPackageJson(context) {
271
317
  const m = context.githubUrlOriginal.match(/\/ioBroker\.(.*)$/);
272
318
  let adapterName = '';
273
319
  if (!m || !m[1]) {
274
- context.errors.push(`[E004] No adapter name found in URL: ${context.githubUrlOriginal}`);
320
+ context.errors.push(`[E0004] No adapter name found in URL: ${context.githubUrlOriginal}`);
275
321
  } else {
276
322
  context.checks.push('Adapter name found in the URL');
277
323
  adapterName = m[1].replace(/\/master$/, '').replace(/\/main$/, '');
@@ -280,28 +326,28 @@ async function checkPackageJson(context) {
280
326
  context.adapterName = adapterName;
281
327
 
282
328
  if (adapterName.match(/[A-Z]/)) {
283
- context.errors.push('[E005] Adapter name must be lowercase');
329
+ context.errors.push('[E0005] Adapter name must be lowercase');
284
330
  } else {
285
331
  context.checks.push('Adapter name is lowercase');
286
332
  }
287
333
 
288
334
  if (adapterName.match(/[^-_a-z\d]/)) {
289
335
  context.errors.push(
290
- `[E006] Invalid characters found in adapter name "${adapterName}". Only lowercase chars, digits, "-" and "_" are allowed`,
336
+ `[E0006] Invalid characters found in adapter name "${adapterName}". Only lowercase chars, digits, "-" and "_" are allowed`,
291
337
  );
292
338
  } else {
293
339
  context.checks.push(`No invalid characters found in "${adapterName}"`);
294
340
  }
295
341
 
296
342
  if (adapterName.startsWith('_')) {
297
- context.errors.push(`[E024] Adapter name "${adapterName}" may not start with '_'`);
343
+ context.errors.push(`[E0024] Adapter name "${adapterName}" may not start with '_'`);
298
344
  } else {
299
345
  context.checks.push(`Adapter name "${adapterName}" does not start with '_'`);
300
346
  }
301
347
 
302
348
  const n = context.githubUrlOriginal.match(/\/([^/]+)\/iobroker\./i);
303
349
  if (!n || !n[1]) {
304
- context.errors.push('[E007] Cannot find author repo in the URL');
350
+ context.errors.push('[E0007] Cannot find author repo in the URL');
305
351
  } else {
306
352
  context.authorName = n[1];
307
353
  }
@@ -311,11 +357,11 @@ async function checkPackageJson(context) {
311
357
  for (const objectName in context.packageJson) {
312
358
  if (objectName.startsWith('_')) {
313
359
  context.errors.push(
314
- `[E014] NPM information (attribute "${objectName}") found in package.json. Please remove all attributes starting with "_"`,
360
+ `[E0014] NPM information (attribute "${objectName}") found in package.json. Please remove all attributes starting with "_"`,
315
361
  );
316
362
  passed = false;
317
363
  } else if (!validObjectsPackageJson.includes(objectName)) {
318
- context.errors.push(`[E058] Attribute "${objectName}" at package.json is not supported. Please remove.`);
364
+ context.errors.push(`[E0058] Attribute "${objectName}" at package.json is not supported. Please remove.`);
319
365
  passed = false;
320
366
  }
321
367
  }
@@ -338,19 +384,19 @@ async function checkPackageJson(context) {
338
384
  }
339
385
  if (tmp) {
340
386
  if (blacklistPackageJson[blacklist].err) {
341
- context.errors.push(`[E038] ${blacklistPackageJson[blacklist].msg}`);
387
+ context.errors.push(`[E0038] ${blacklistPackageJson[blacklist].msg}`);
342
388
  } else {
343
- context.warnings.push(`[W038] ${blacklistPackageJson[blacklist].msg}`);
389
+ context.warnings.push(`[W0038] ${blacklistPackageJson[blacklist].msg}`);
344
390
  }
345
391
  }
346
392
  }
347
393
  context.checks.push('blacklist for package.json checked.');
348
394
 
349
395
  if (context.packageJson.name === undefined) {
350
- context.errors.push(`[E008] No "name" key found in package.json.`);
396
+ context.errors.push(`[E0008] No "name" key found in package.json.`);
351
397
  } else if (context.packageJson.name !== `iobroker.${adapterName.toLowerCase()}`) {
352
398
  context.errors.push(
353
- `[E020] Name of adapter in package.json must be lowercase and be equal to "iobroker.${adapterName.toLowerCase()}". Now is "${context.packageJson.name}"`,
399
+ `[E0020] Name of adapter in package.json must be lowercase and be equal to "iobroker.${adapterName.toLowerCase()}". Now is "${context.packageJson.name}"`,
354
400
  );
355
401
  } else {
356
402
  context.checks.push(
@@ -359,40 +405,49 @@ async function checkPackageJson(context) {
359
405
  }
360
406
 
361
407
  if (!context.packageJson.version) {
362
- context.errors.push('[E009] No "version" key found in the package.json');
408
+ context.errors.push('[E0009] No "version" key found in the package.json');
363
409
  } else {
364
410
  context.checks.push('Version found in package.json');
411
+
412
+ // Validate version format according to ioBroker requirements
413
+ if (!validateReleaseFormat(context.packageJson.version)) {
414
+ context.errors.push(
415
+ `[E0061] Invalid version format "${context.packageJson.version}". Version must follow semver format: MAJOR.MINOR.PATCH or MAJOR.MINOR.PATCH-PRERELEASE.NUMBER (e.g., "1.2.3" or "1.2.3-alpha.4").`,
416
+ );
417
+ } else {
418
+ context.checks.push('Version format is valid');
419
+ }
365
420
  }
366
421
 
367
422
  if (!context.packageJson.description) {
368
- context.errors.push('[E010] No "description" key found in the package.json');
423
+ context.errors.push('[E0010] No "description" key found in the package.json');
369
424
  } else {
370
425
  context.checks.push('Description found in package.json');
371
426
  }
372
427
 
373
428
  if (!context.packageJson.author) {
374
- context.errors.push('[E013] No "author" key found in the package.json');
429
+ context.errors.push('[E0013] No "author" key found in the package.json');
375
430
  } else {
376
431
  context.checks.push('Author found in package.json');
377
432
  }
378
433
 
379
434
  // if (context.packageJson.licenses) {
380
435
  // context.errors.push(
381
- // '[E021] "licenses" in package.json are deprecated. Please remove and use "license": "NAME" field.',
436
+ // '[E0021] "licenses" in package.json are deprecated. Please remove and use "license": "NAME" field.',
382
437
  // );
383
438
  // } else {
384
439
  // context.checks.push('"licenses" not found in package.json');
385
440
  // }
386
441
 
387
442
  if (!context.packageJson.license) {
388
- context.errors.push('[E015] No license found in package.json');
443
+ context.errors.push('[E0015] No license found in package.json');
389
444
  } else {
390
445
  context.checks.push('"license" found in package.json');
391
446
 
392
447
  // check if license valid
393
448
  if (!context.cfg.allowedLicenses.includes(context.packageJson.license)) {
394
449
  context.errors.push(
395
- `[E016] ${context.packageJson.license} found in package.json is no valid SPDX license. Please use one of listed here: https://spdx.org/licenses/`,
450
+ `[E0016] ${context.packageJson.license} found in package.json is no valid SPDX license. Please use one of listed here: https://spdx.org/licenses/`,
396
451
  );
397
452
  } else {
398
453
  context.checks.push('"license" is valid in package.json');
@@ -400,7 +455,7 @@ async function checkPackageJson(context) {
400
455
  }
401
456
 
402
457
  if (!context.packageJson.repository) {
403
- context.errors.push('[E017] No "repository" key found in the package.json');
458
+ context.errors.push('[E0017] No "repository" key found in the package.json');
404
459
  } else {
405
460
  context.checks.push('Repository found in package.json');
406
461
 
@@ -417,7 +472,7 @@ async function checkPackageJson(context) {
417
472
  if (context.packageJson.repository && typeof context.packageJson.repository === 'object') {
418
473
  if (context.packageJson.repository.type !== 'git') {
419
474
  context.errors.push(
420
- `[E018] Invalid repository type in package.json: ${context.packageJson.repository.type}. It should be git`,
475
+ `[E0018] Invalid repository type in package.json: ${context.packageJson.repository.type}. It should be git`,
421
476
  );
422
477
  } else {
423
478
  context.checks.push('Repository type is valid in package.json: git');
@@ -425,7 +480,7 @@ async function checkPackageJson(context) {
425
480
 
426
481
  if (!allowedRepoUrls.includes(context.packageJson.repository.url)) {
427
482
  context.errors.push(
428
- `[E019] Invalid repository URL in package.json: ${context.packageJson.repository.url}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}`,
483
+ `[E0019] Invalid repository URL in package.json: ${context.packageJson.repository.url}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}`,
429
484
  );
430
485
  } else {
431
486
  context.checks.push('Repository URL is valid in package.json');
@@ -433,25 +488,25 @@ async function checkPackageJson(context) {
433
488
  } else if (context.packageJson.repository && typeof context.packageJson.repository === 'string') {
434
489
  if (!allowedRepoUrls.includes(context.packageJson.repository)) {
435
490
  context.errors.push(
436
- `[E019] Invalid repository URL in package.json: ${context.packageJson.repository}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}`,
491
+ `[E0019] Invalid repository URL in package.json: ${context.packageJson.repository}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}`,
437
492
  );
438
493
  } else {
439
494
  context.checks.push('Repository URL is valid in package.json');
440
495
  }
441
496
  } else {
442
- context.errors.push('[E012] Invalid repository object in package.json');
497
+ context.errors.push('[E0012] Invalid repository object in package.json');
443
498
  }
444
499
  }
445
500
 
446
501
  if (!context.packageJson.scripts) {
447
- context.errors.push('[E059] No "scripts" key found in the package.json');
502
+ context.errors.push('[E0059] No "scripts" key found in the package.json');
448
503
  } else {
449
504
  context.checks.push('Scripts found in package.json');
450
505
  }
451
506
 
452
507
  if (context.packageJson.maintainers) {
453
508
  context.warnings.push(
454
- '[W051] "maintainers" attribute at package.json is not documented. Please use "contributors" attribute.',
509
+ '[W0051] "maintainers" attribute at package.json is not documented. Please use "contributors" attribute.',
455
510
  );
456
511
  } else {
457
512
  context.checks.push('maintainers not found in package.json');
@@ -459,14 +514,14 @@ async function checkPackageJson(context) {
459
514
 
460
515
  if (context.packageJson.publishConfig) {
461
516
  context.warnings.push(
462
- '[S052] "publishConfig" attribute at package.json is not required in most cases. Please check and eventually remove.',
517
+ '[S0052] "publishConfig" attribute at package.json is not required in most cases. Please check and eventually remove.',
463
518
  );
464
519
  if (
465
520
  context.packageJson.publishConfig.registry &&
466
521
  context.packageJson.publishConfig.registry !== 'https://registry.npmjs.org'
467
522
  ) {
468
523
  context.errors.push(
469
- '[E053] "publishConfig.registry" mut point to "https://registry.npmjs.org" at package.json.',
524
+ '[E0053] "publishConfig.registry" mut point to "https://registry.npmjs.org" at package.json.',
470
525
  );
471
526
  } else {
472
527
  context.checks.push(
@@ -478,17 +533,17 @@ async function checkPackageJson(context) {
478
533
  }
479
534
 
480
535
  if (context.cfg.reservedAdapterNames.includes(adapterName)) {
481
- context.errors.push('[E022] Adapter name is reserved. Please rename adapter.');
536
+ context.errors.push('[E0022] Adapter name is reserved. Please rename adapter.');
482
537
  } else {
483
538
  context.checks.push('Adapter name is not reserved');
484
539
  }
485
540
 
486
541
  if (!context.cfg.onlyWWW && !context.packageJson.dependencies) {
487
- context.errors.push('[W030] No dependencies declared at package.json. Is this really correct?');
542
+ context.errors.push('[W0030] No dependencies declared at package.json. Is this really correct?');
488
543
  }
489
544
 
490
545
  if (!context.packageJson.devDependencies) {
491
- context.errors.push('[E031] No devDependencies declared at package.json. Please correct package.json');
546
+ context.errors.push('[E0031] No devDependencies declared at package.json. Please correct package.json');
492
547
  }
493
548
 
494
549
  // check for blacklisted dependencies
@@ -504,9 +559,9 @@ async function checkPackageJson(context) {
504
559
 
505
560
  // if (context.packageJson.dependencies[blacklist]) {
506
561
  // if (blacklistedDependenciesPackageJson[blacklist].err) {
507
- // context.errors.push(`[E050] ${blacklistedDependenciesPackageJson[blacklist].msg}`);
562
+ // context.errors.push(`[E0050] ${blacklistedDependenciesPackageJson[blacklist].msg}`);
508
563
  // } else {
509
- // context.warnings.push(`[W050] ${blacklistedDependenciesPackageJson[blacklist].msg}`);
564
+ // context.warnings.push(`[W0050] ${blacklistedDependenciesPackageJson[blacklist].msg}`);
510
565
  // }
511
566
  // passed = false;
512
567
  // }
@@ -515,14 +570,14 @@ async function checkPackageJson(context) {
515
570
  if (regexp.test(dependency)) {
516
571
  if (blacklistedDependenciesPackageJson[blacklist].err) {
517
572
  context.errors.push(
518
- `[E050] ${blacklistedDependenciesPackageJson[blacklist].msg}`.replace(
573
+ `[E0050] ${blacklistedDependenciesPackageJson[blacklist].msg}`.replace(
519
574
  '${dependency}',
520
575
  dependency,
521
576
  ),
522
577
  );
523
578
  } else {
524
579
  context.warnings.push(
525
- `[W050] ${blacklistedDependenciesPackageJson[blacklist].msg}`.replace(
580
+ `[W0050] ${blacklistedDependenciesPackageJson[blacklist].msg}`.replace(
526
581
  '${dependency}',
527
582
  dependency,
528
583
  ),
@@ -550,9 +605,9 @@ async function checkPackageJson(context) {
550
605
 
551
606
  // if (context.packageJson.devDependencies[blacklist]) {
552
607
  // if (blacklistedDevDependenciesPackageJson[blacklist].err) {
553
- // context.errors.push(`[E050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`);
608
+ // context.errors.push(`[E0050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`);
554
609
  // } else {
555
- // context.warnings.push(`[W050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`);
610
+ // context.warnings.push(`[W0050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`);
556
611
  // }
557
612
  // passed = false;
558
613
  // }
@@ -561,14 +616,14 @@ async function checkPackageJson(context) {
561
616
  if (regexp.test(devDependency)) {
562
617
  if (blacklistedDevDependenciesPackageJson[blacklist].err) {
563
618
  context.errors.push(
564
- `[E050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`.replace(
619
+ `[E0050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`.replace(
565
620
  '${devDependency}',
566
621
  devDependency,
567
622
  ),
568
623
  );
569
624
  } else {
570
625
  context.warnings.push(
571
- `[W050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`.replace(
626
+ `[W0050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`.replace(
572
627
  '${devDependency}',
573
628
  devDependency,
574
629
  ),
@@ -596,9 +651,9 @@ async function checkPackageJson(context) {
596
651
 
597
652
  if (context.packageJson.peerDependencies[blacklist]) {
598
653
  if (blacklistedPeerDependenciesPackageJson[blacklist].err) {
599
- context.errors.push(`[E050] ${blacklistedPeerDependenciesPackageJson[blacklist].msg}`);
654
+ context.errors.push(`[E0050] ${blacklistedPeerDependenciesPackageJson[blacklist].msg}`);
600
655
  } else {
601
- context.warnings.push(`[W050] ${blacklistedPeerDependenciesPackageJson[blacklist].msg}`);
656
+ context.warnings.push(`[W0050] ${blacklistedPeerDependenciesPackageJson[blacklist].msg}`);
602
657
  }
603
658
  passed = false;
604
659
  }
@@ -621,9 +676,9 @@ async function checkPackageJson(context) {
621
676
 
622
677
  if (context.packageJson.optionalDependencies[blacklist]) {
623
678
  if (blacklistedOptionalDependenciesPackageJson[blacklist].err) {
624
- context.errors.push(`[E052] ${blacklistedOptionalDependenciesPackageJson[blacklist].msg}`);
679
+ context.errors.push(`[E0052] ${blacklistedOptionalDependenciesPackageJson[blacklist].msg}`);
625
680
  } else {
626
- context.warnings.push(`[W053] ${blacklistedOptionalDependenciesPackageJson[blacklist].msg}`);
681
+ context.warnings.push(`[W0053] ${blacklistedOptionalDependenciesPackageJson[blacklist].msg}`);
627
682
  }
628
683
  passed = false;
629
684
  }
@@ -638,7 +693,7 @@ async function checkPackageJson(context) {
638
693
  if (context.packageJson.devDependencies) {
639
694
  for (const dependency in context.packageJson.devDependencies) {
640
695
  if (context.packageJson.dependencies && context.packageJson.dependencies[dependency]) {
641
- context.errors.push(`[E060] ${dependency} listed as dependency and as devDependency.`);
696
+ context.errors.push(`[E0060] ${dependency} listed as dependency and as devDependency.`);
642
697
  passed = false;
643
698
  }
644
699
  }
@@ -646,11 +701,11 @@ async function checkPackageJson(context) {
646
701
  if (context.packageJson.peerDependencies) {
647
702
  for (const dependency in context.packageJson.peerDependencies) {
648
703
  if (context.packageJson.dependencies && context.packageJson.dependencies[dependency]) {
649
- context.errors.push(`[E060] ${dependency} listed as dependency and as peerDependency.`);
704
+ context.errors.push(`[E0060] ${dependency} listed as dependency and as peerDependency.`);
650
705
  passed = false;
651
706
  }
652
707
  if (context.packageJson.devDependencies && context.packageJson.devDependencies[dependency]) {
653
- context.errors.push(`[E060] ${dependency} listed as devDependency and as peerDependency.`);
708
+ context.errors.push(`[E0060] ${dependency} listed as devDependency and as peerDependency.`);
654
709
  passed = false;
655
710
  }
656
711
  }
@@ -658,15 +713,15 @@ async function checkPackageJson(context) {
658
713
  if (context.packageJson.optionalDependencies) {
659
714
  for (const dependency in context.packageJson.optionalDependencies) {
660
715
  if (context.packageJson.dependencies && context.packageJson.dependencies[dependency]) {
661
- context.errors.push(`[E060] ${dependency} listed as dependency and as optionalDependency.`);
716
+ context.errors.push(`[E0060] ${dependency} listed as dependency and as optionalDependency.`);
662
717
  passed = false;
663
718
  }
664
719
  if (context.packageJson.devDependencies && context.packageJson.devDependencies[dependency]) {
665
- context.errors.push(`[E060] ${dependency} listed as devDependency and as optionalDependency.`);
720
+ context.errors.push(`[E0060] ${dependency} listed as devDependency and as optionalDependency.`);
666
721
  passed = false;
667
722
  }
668
723
  if (context.packageJson.peerDependencies && context.packageJson.peerDependencies[dependency]) {
669
- context.errors.push(`[E060] ${dependency} listed as peerDependency and as optionalDependency.`);
724
+ context.errors.push(`[E0060] ${dependency} listed as peerDependency and as optionalDependency.`);
670
725
  passed = false;
671
726
  }
672
727
  }
@@ -679,12 +734,12 @@ async function checkPackageJson(context) {
679
734
  if (!context.cfg.onlyWWW) {
680
735
  if (!context.packageJson.engines) {
681
736
  context.errors.push(
682
- `[E026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended`,
737
+ `[E0026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended`,
683
738
  );
684
739
  } else {
685
740
  if (!context.packageJson.engines.node) {
686
741
  context.errors.push(
687
- `[E026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended`,
742
+ `[E0026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended`,
688
743
  );
689
744
  } else {
690
745
  context.checks.push('engines attribute containing node requirements exist.');
@@ -695,22 +750,22 @@ async function checkPackageJson(context) {
695
750
  const match = nodeVal.match(/^(?<cmp>[<>=~]+)?\s*(?<vers>\d+(\.\d+(\.\d+)?)?(-\w+\.\d+)?)/m);
696
751
  if (!match) {
697
752
  context.warnings.push(
698
- `[W027] Engines clause at package.json ({'engines' : { 'node' : '${nodeVal}' } }") is not parseable.`,
753
+ `[W0027] Engines clause at package.json ({'engines' : { 'node' : '${nodeVal}' } }") is not parseable.`,
699
754
  );
700
755
  } else {
701
756
  common.debug(`node check: ${JSON.stringify(match.groups)}`);
702
757
  if (match.groups.cmp !== '>' && match.groups.cmp !== '>=') {
703
758
  context.warnings.push(
704
- `[W028] Minimum node.js version ${recommendedNodeVersion} recommended. Please change "{'engines' : { 'node' >= '${match.groups.vers}' } }" to "{'engines' : { 'node' >= '${recommendedNodeVersion}' } }" at package.json.`,
759
+ `[W0028] Minimum node.js version ${recommendedNodeVersion} recommended. Please change "{'engines' : { 'node' >= '${match.groups.vers}' } }" to "{'engines' : { 'node' >= '${recommendedNodeVersion}' } }" at package.json.`,
705
760
  );
706
761
  } else {
707
762
  if (!compareVersions.compare(match.groups.vers, requiredNodeVersion, '>=')) {
708
763
  context.errors.push(
709
- `[E029] Node.js ${requiredNodeVersion} is required as minimum, node.js ${recommendedNodeVersion} is recommended. Please change "{'engines' : { 'node' >= '${match.groups.vers}' } }" to "{'engines' : { 'node' >= '${requiredNodeVersion}' } }" at package.json.`,
764
+ `[E0029] Node.js ${requiredNodeVersion} is required as minimum, node.js ${recommendedNodeVersion} is recommended. Please change "{'engines' : { 'node' >= '${match.groups.vers}' } }" to "{'engines' : { 'node' >= '${requiredNodeVersion}' } }" at package.json.`,
710
765
  );
711
766
  } else if (!compareVersions.compare(match.groups.vers, recommendedNodeVersion, '>=')) {
712
767
  context.warnings.push(
713
- `[W028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" to "{'engines' : { 'node' >= '${recommendedNodeVersion}' } }" at package.json.`,
768
+ `[W0028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" to "{'engines' : { 'node' >= '${recommendedNodeVersion}' } }" at package.json.`,
714
769
  );
715
770
  } else {
716
771
  context.checks.push(
@@ -748,11 +803,11 @@ async function checkPackageJson(context) {
748
803
  // if dependency exists, version requirements must be met
749
804
  if (!compareVersions.compare(dependencyVersion, requiredVersion, '>=')) {
750
805
  context.errors.push(
751
- `[E033] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update dependencies at package.json`,
806
+ `[E0033] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update dependencies at package.json`,
752
807
  );
753
808
  } else if (!compareVersions.compare(dependencyVersion, recommendedVersion, '>=')) {
754
809
  context.warnings.push(
755
- `[W034] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating dependencies at package.json`,
810
+ `[W0034] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating dependencies at package.json`,
756
811
  );
757
812
  } else {
758
813
  context.checks.push(`dependency ${dependency} ${dependencyVersion} is ok`);
@@ -770,11 +825,11 @@ async function checkPackageJson(context) {
770
825
  } else if (optional) {
771
826
  context.checks.push(`dependency ${dependency} is optional`);
772
827
  if (suggested) {
773
- context.warnings.push(`[S061] Consider using "${dependency}".`);
828
+ context.warnings.push(`[S0061] Consider using "${dependency}".`);
774
829
  }
775
830
  } else {
776
831
  context.errors.push(
777
- `[E032] No dependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to dependencies at package.json`,
832
+ `[E0032] No dependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to dependencies at package.json`,
778
833
  );
779
834
  }
780
835
  }
@@ -804,11 +859,11 @@ async function checkPackageJson(context) {
804
859
  // if dependency exists, version requirements must be met
805
860
  if (!compareVersions.compare(dependencyVersion, requiredVersion, '>=')) {
806
861
  context.errors.push(
807
- `[E036] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update devDependencies at package.json`,
862
+ `[E0036] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update devDependencies at package.json`,
808
863
  );
809
864
  } else if (!compareVersions.compare(dependencyVersion, recommendedVersion, '>=')) {
810
865
  context.warnings.push(
811
- `[W037] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating devDependencies at package.json`,
866
+ `[W0037] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating devDependencies at package.json`,
812
867
  );
813
868
  } else {
814
869
  context.checks.push(`devDependency ${dependency} ${dependencyVersion} is ok`);
@@ -826,11 +881,11 @@ async function checkPackageJson(context) {
826
881
  } else if (optional) {
827
882
  context.checks.push(`devDependency ${dependency} is optional`);
828
883
  if (suggested) {
829
- context.warnings.push(`[S062] Consider using "${dependency}".`);
884
+ context.warnings.push(`[S0062] Consider using "${dependency}".`);
830
885
  }
831
886
  } else {
832
887
  context.errors.push(
833
- `[E035] No devDependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to devDependencies at package.json`,
888
+ `[E0035] No devDependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to devDependencies at package.json`,
834
889
  );
835
890
  }
836
891
  }
@@ -850,15 +905,15 @@ async function checkPackageJson(context) {
850
905
  const dependencyVersion = context.packageJson.dependencies[dependency];
851
906
  if (dependencyVersion.toLowerCase().includes('github.com')) {
852
907
  context.warnings.push(
853
- `[W043] dependency should not require a github version. Please change "${dependency}:${dependencyVersion}"`,
908
+ `[W0043] dependency should not require a github version. Please change "${dependency}:${dependencyVersion}"`,
854
909
  );
855
910
  } else if (dependencyVersion === '*') {
856
911
  context.warnings.push(
857
- `[W056] Wildcard dependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
912
+ `[W0056] Wildcard dependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
858
913
  );
859
914
  } else if (!common.validateSemver(dependencyVersion)) {
860
915
  context.errors.push(
861
- `[E054] malformed dependency detected "${dependency}":"${dependencyVersion}". Please fix at package.json.`,
916
+ `[E0054] malformed dependency detected "${dependency}":"${dependencyVersion}". Please fix at package.json.`,
862
917
  );
863
918
  } else if (
864
919
  !context.packageJson.dependencies[dependency].startsWith('^') &&
@@ -868,11 +923,11 @@ async function checkPackageJson(context) {
868
923
  ) {
869
924
  if (enforcedDependencies.includes(dependency)) {
870
925
  context.errors.push(
871
- `[E044] dependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"`,
926
+ `[E0044] dependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"`,
872
927
  );
873
928
  } else {
874
929
  context.warnings.push(
875
- `[S047] dependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"`,
930
+ `[S0047] dependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"`,
876
931
  );
877
932
  }
878
933
  }
@@ -882,15 +937,15 @@ async function checkPackageJson(context) {
882
937
  const dependencyVersion = context.packageJson.devDependencies[dependency];
883
938
  if (dependencyVersion.toLowerCase().includes('github.com')) {
884
939
  context.warnings.push(
885
- `[W045] devDependency should not require github versions. Please change "${dependency}":"${dependencyVersion}"`,
940
+ `[W0045] devDependency should not require github versions. Please change "${dependency}":"${dependencyVersion}"`,
886
941
  );
887
942
  } else if (dependencyVersion === '*') {
888
943
  context.warnings.push(
889
- `[W057] Wildcard devDependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
944
+ `[W0057] Wildcard devDependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
890
945
  );
891
946
  } else if (!common.validateSemver(dependencyVersion)) {
892
947
  context.errors.push(
893
- `[E055] malformed dependency detected "${dependency}":"${dependencyVersion}". Please fix at package.json.`,
948
+ `[E0055] malformed dependency detected "${dependency}":"${dependencyVersion}". Please fix at package.json.`,
894
949
  );
895
950
  } else if (
896
951
  !context.packageJson.devDependencies[dependency].startsWith('^') &&
@@ -900,18 +955,18 @@ async function checkPackageJson(context) {
900
955
  ) {
901
956
  if (enforcedDependencies.includes(dependency)) {
902
957
  context.errors.push(
903
- `[E046] devDependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${dependencyVersion}"`,
958
+ `[E0046] devDependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${dependencyVersion}"`,
904
959
  );
905
960
  } else {
906
961
  context.warnings.push(
907
- `[W048] devDependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"`,
962
+ `[W0048] devDependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"`,
908
963
  );
909
964
  }
910
965
  }
911
966
  }
912
967
 
913
968
  if (!context.packageJson.keywords || !Array.isArray(context.packageJson.keywords)) {
914
- context.errors.push('[E039] "keywords" must be an array within package.json and contain some useful keywords');
969
+ context.errors.push('[E0039] "keywords" must be an array within package.json and contain some useful keywords');
915
970
  } else {
916
971
  const forbiddenKeywords = [];
917
972
  const ignoredKeywords = ['iobroker', 'smart home', 'smarthome', 'home automation', 'template'];
@@ -925,12 +980,12 @@ async function checkPackageJson(context) {
925
980
  0
926
981
  ) {
927
982
  context.errors.push(
928
- `[E049] "keywords" within package.json must contain some keywords besides "${context.packageJson.keywords.join(', ')}" related to adapter`,
983
+ `[E0049] "keywords" within package.json must contain some keywords besides "${context.packageJson.keywords.join(', ')}" related to adapter`,
929
984
  );
930
985
  }
931
986
  if (!(recommendedKeywords.filter(keyword => context.packageJson.keywords.includes(keyword)).length > 0)) {
932
987
  context.warnings.push(
933
- `[W040] "keywords" within package.json should contain "${recommendedKeywords.join(', ')}"`,
988
+ `[W0040] "keywords" within package.json should contain "${recommendedKeywords.join(', ')}"`,
934
989
  );
935
990
  }
936
991
  if (
@@ -939,7 +994,7 @@ async function checkPackageJson(context) {
939
994
  ).length > 0
940
995
  ) {
941
996
  context.warnings.push(
942
- `[W041] "keywords" within package.json should not contain "${forbiddenKeywords.join(', ')}"`,
997
+ `[W0041] "keywords" within package.json should not contain "${forbiddenKeywords.join(', ')}"`,
943
998
  );
944
999
  }
945
1000
 
@@ -948,7 +1003,7 @@ async function checkPackageJson(context) {
948
1003
 
949
1004
  if (context.packageJson.globalDependencies) {
950
1005
  context.errors.push(
951
- '[E042] "globalDependencies" is misplaced at package.json. Did you mean "common.globalDependencies" at io-package.json?',
1006
+ '[E0042] "globalDependencies" is misplaced at package.json. Did you mean "common.globalDependencies" at io-package.json?',
952
1007
  );
953
1008
  } else {
954
1009
  context.checks.push('"globalDependencies" not found in package.json');
@@ -962,73 +1017,74 @@ async function checkPackageJson(context) {
962
1017
 
963
1018
  exports.getPackageJson = getPackageJson;
964
1019
  exports.checkPackageJson = checkPackageJson;
1020
+ exports.validateReleaseFormat = validateReleaseFormat;
965
1021
 
966
1022
  // List of error and warnings used at this module
967
1023
  // ----------------------------------------------
968
1024
 
969
- // [001] Cannot parse package.json: ${e}
970
- // [002] No "ioBroker." found in the name of repository
971
- // [003] Repository must have name ioBroker.adaptername, but now io"b"roker is in lowercase
972
- // [004] No adapter name found in URL: ${context.githubUrlOriginal}
973
- // [005] Adapter name must be lowercase
974
- // [006] Invalid characters found in adapter name "${adapterName}". Only lowercase chars, digits, "-" and "_" are allowed
975
- // [007] Cannot find author repo in the URL
1025
+ // [0001] Cannot parse package.json: ${e}
1026
+ // [0002] No "ioBroker." found in the name of repository
1027
+ // [0003] Repository must have name ioBroker.adaptername, but now io"b"roker is in lowercase
1028
+ // [0004] No adapter name found in URL: ${context.githubUrlOriginal}
1029
+ // [0005] Adapter name must be lowercase
1030
+ // [0006] Invalid characters found in adapter name "${adapterName}". Only lowercase chars, digits, "-" and "_" are allowed
1031
+ // [0007] Cannot find author repo in the URL
976
1032
  // E008] No "name" key found in package.json.
977
- // [009] No "version" key found in the package.json
978
- // [010] No description found in the package.json
979
- // [011] ### "@iobroker/dev-server" must not be listed as dependency at package.json'
980
- // [012] Invalid repository object in package.json
981
- // [013] No author found in the package.json
982
- // [014] NPM information found in package.json. Please remove all attributes starting with "_"
983
- // [015] No license found in package.json
984
- // [016] ${context.packageJson.license} found in package.json is no valid SPDX license. Please use one of listed here: https://spdx.org/licenses/
985
- // [017] No repository found in the package.json
986
- // [018] Invalid repository type in package.json: ${context.packageJson.repository.type}. It should be git
987
- // [019] Invalid repository URL in package.json: ${context.packageJson.repository.url}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}
988
- // [019] Invalid repository URL in package.json: ${context.packageJson.repository}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}
989
- // [020] Name of adapter in package.json must be lowercase and be equal to "iobroker.${adapterName.toLowerCase()}". Now is "${packageJson.name}"
990
- // [021] "licenses" in package.json are deprecated. Please remove and use "license": "NAME" field.
991
- // [022] Adapter name is reserved. Please rename adapter.
992
- // [023] ### Do not include "npm" as dependency!
993
- // [024] Adapter name "${adapterName}" may not start with '_'y!
994
- // [025] ### "iobroker.js-controller" must not be listed as dependency at package.json'
995
- // [026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended
996
- // [026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended
997
- // [027] Engines clause at at package.json ({'engines' : { 'node' : '${nodeVal}' } }") is not parseable.
998
- // [028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.
999
- // [028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.
1000
- // [029] Node.js ${requiredNodeVersion} is required as minimum, node.js ${recommendedNodeVersion} is recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.
1001
- // [030] No dependencies declared at package.json. Is this really correct?
1002
- // [031] No devDependencies declared at package.json. Please correct package.json
1003
- // [032] No dependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to dependencies at package.json
1004
- // [033] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update dependencies at package.json
1005
- // [034] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating dependencies at package.json
1006
- // [035] No devDependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to devDependencies at package.json
1007
- // [036] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update devDependencies at package.json
1008
- // [037] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating devDependencies at package.json
1009
- // [038] ${blacklistPackageJson[blacklist].msg}
1010
- // [038] ${blacklistPackageJson[blacklist].msg}
1011
- // [039] "keywords" must be an array within package.json and contain some useful keywords
1012
- // [040] "keywords" within package.json should contain "${recommendedKeywords.join(', ')}"
1013
- // [041] "keywords" within package.json should not contain "${forbiddenKeywords.join(', ')}"
1014
- // [042] "globalDependencies" is misplaced at package.json. Did you mean "common.globalDependencies" at io-package.json?
1015
- // [043] dependency should not require a github version. Please change "${dependency}:${context.packageJson.dependencies[dependency]}"
1016
- // [044] dependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"
1017
- // [045] devDependency should not require github versions. Please change "${dependency}:${context.packageJson.devDependencies[dependency]}"
1018
- // [046] devDependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"
1019
- // [047] dependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"
1020
- // [048] devDependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"
1021
- // [049] "keywords" within package.json must contain some keywords besides "${context.packageJson.keywords.join(', ')}" related to adapter
1022
- // [050] ${blacklistedDependenciesPackageJson[blacklist].msg}
1023
- // [051] "maintainers" attribute at package.json is not documented. Please use "contributors" attribute',
1024
- // [052] --
1025
- // [053] --
1026
- // [054] malformed dependency detected "${dependency}":${context.packageJson.dependencies[dependency]}". Please fix at package.json.`
1027
- // [055] malformed dependency detected "${dependency}":${context.packageJson.devDependencies[dependency]}". Please fix at package.json.`
1028
- // [056] Wildcard dependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
1029
- // [057] Wildcard devDependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
1030
- // [058] Key ${objectName} at package.json is not supported. Please remove.
1031
- // [059] No "scripts" key found in the package.json.
1032
- // [060] ${dependency} listed as dependency and as devDependency.
1033
- // [061] Consider using "${dependency}".
1034
- // [062] No devDependency declared for ${dependency}. Please consider adding "${dependency}":"${recommendedVersion}" to devDependencies at package.json`
1033
+ // [0009] No "version" key found in the package.json
1034
+ // [0010] No description found in the package.json
1035
+ // [0011] ### "@iobroker/dev-server" must not be listed as dependency at package.json'
1036
+ // [0012] Invalid repository object in package.json
1037
+ // [0013] No author found in the package.json
1038
+ // [0014] NPM information found in package.json. Please remove all attributes starting with "_"
1039
+ // [0015] No license found in package.json
1040
+ // [0016] ${context.packageJson.license} found in package.json is no valid SPDX license. Please use one of listed here: https://spdx.org/licenses/
1041
+ // [0017] No repository found in the package.json
1042
+ // [0018] Invalid repository type in package.json: ${context.packageJson.repository.type}. It should be git
1043
+ // [0019] Invalid repository URL in package.json: ${context.packageJson.repository.url}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}
1044
+ // [0019] Invalid repository URL in package.json: ${context.packageJson.repository}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}
1045
+ // [0020] Name of adapter in package.json must be lowercase and be equal to "iobroker.${adapterName.toLowerCase()}". Now is "${packageJson.name}"
1046
+ // [0021] "licenses" in package.json are deprecated. Please remove and use "license": "NAME" field.
1047
+ // [0022] Adapter name is reserved. Please rename adapter.
1048
+ // [0023] ### Do not include "npm" as dependency!
1049
+ // [0024] Adapter name "${adapterName}" may not start with '_'y!
1050
+ // [0025] ### "iobroker.js-controller" must not be listed as dependency at package.json'
1051
+ // [0026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended
1052
+ // [0026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended
1053
+ // [0027] Engines clause at at package.json ({'engines' : { 'node' : '${nodeVal}' } }") is not parseable.
1054
+ // [0028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.
1055
+ // [0028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.
1056
+ // [0029] Node.js ${requiredNodeVersion} is required as minimum, node.js ${recommendedNodeVersion} is recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.
1057
+ // [0030] No dependencies declared at package.json. Is this really correct?
1058
+ // [0031] No devDependencies declared at package.json. Please correct package.json
1059
+ // [0032] No dependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to dependencies at package.json
1060
+ // [0033] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update dependencies at package.json
1061
+ // [0034] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating dependencies at package.json
1062
+ // [0035] No devDependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to devDependencies at package.json
1063
+ // [0036] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update devDependencies at package.json
1064
+ // [0037] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating devDependencies at package.json
1065
+ // [0038] ${blacklistPackageJson[blacklist].msg}
1066
+ // [0038] ${blacklistPackageJson[blacklist].msg}
1067
+ // [0039] "keywords" must be an array within package.json and contain some useful keywords
1068
+ // [0040] "keywords" within package.json should contain "${recommendedKeywords.join(', ')}"
1069
+ // [0041] "keywords" within package.json should not contain "${forbiddenKeywords.join(', ')}"
1070
+ // [0042] "globalDependencies" is misplaced at package.json. Did you mean "common.globalDependencies" at io-package.json?
1071
+ // [0043] dependency should not require a github version. Please change "${dependency}:${context.packageJson.dependencies[dependency]}"
1072
+ // [0044] dependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"
1073
+ // [0045] devDependency should not require github versions. Please change "${dependency}:${context.packageJson.devDependencies[dependency]}"
1074
+ // [0046] devDependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"
1075
+ // [0047] dependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"
1076
+ // [0048] devDependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"
1077
+ // [0049] "keywords" within package.json must contain some keywords besides "${context.packageJson.keywords.join(', ')}" related to adapter
1078
+ // [0050] ${blacklistedDependenciesPackageJson[blacklist].msg}
1079
+ // [0051] "maintainers" attribute at package.json is not documented. Please use "contributors" attribute',
1080
+ // [0052] --
1081
+ // [0053] --
1082
+ // [0054] malformed dependency detected "${dependency}":${context.packageJson.dependencies[dependency]}". Please fix at package.json.`
1083
+ // [0055] malformed dependency detected "${dependency}":${context.packageJson.devDependencies[dependency]}". Please fix at package.json.`
1084
+ // [0056] Wildcard dependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
1085
+ // [0057] Wildcard devDependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
1086
+ // [0058] Key ${objectName} at package.json is not supported. Please remove.
1087
+ // [0059] No "scripts" key found in the package.json.
1088
+ // [0060] ${dependency} listed as dependency and as devDependency.
1089
+ // [0061] Invalid version format "${context.packageJson.version}". Version must follow semver format: MAJOR.MINOR.PATCH or MAJOR.MINOR.PATCH-PRERELEASE.NUMBER (e.g., "1.2.3" or "1.2.3-alpha.4"). No leading zeros allowed, prerelease identifiers must contain only letters, numbers, and hyphens.
1090
+ // [0062] No devDependency declared for ${dependency}. Please consider adding "${dependency}":"${recommendedVersion}" to devDependencies at package.json`