@iobroker/repochecker 4.3.0-alpha.0 → 5.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/doc/issues.json +0 -6
- package/index.js +37 -37
- package/lib/{M000_PackageJson.js → M0000_PackageJson.js} +184 -162
- package/lib/{M100_IOPackageJson.js → M1000_IOPackageJson.js} +246 -242
- package/lib/{M250_Npm.js → M2000_Npm.js} +36 -20
- package/lib/{M300_Testing.js → M3000_Testing.js} +8 -8
- package/lib/{M400_Repository.js → M4000_Repository.js} +117 -110
- package/lib/{M500_Code.js → M5000_Code.js} +89 -85
- package/lib/{M500__JsonConfig.js → M5500__JsonConfig.js} +30 -30
- package/lib/{M600_Readme.js → M6000_Readme.js} +28 -21
- package/lib/{M700_License.js → M7000_License.js} +12 -12
- package/lib/{M800_Github.js → M8000_Github.js} +12 -12
- package/lib/{M900_GitNpmIgnore.js → M9000_GitNpmIgnore.js} +25 -25
- package/lib/common.js +9 -1
- package/package.json +1 -1
|
@@ -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 :
|
|
7
|
+
Numbering : 0001 - 0099
|
|
8
8
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -58,7 +58,7 @@ const devDependenciesPackageJson = {
|
|
|
58
58
|
},
|
|
59
59
|
'@iobroker/testing': {
|
|
60
60
|
required: '4.1.3',
|
|
61
|
-
recommended: '5.1.
|
|
61
|
+
recommended: '5.1.1',
|
|
62
62
|
onlyWWW: false,
|
|
63
63
|
alternatives: ['@iobroker/legacy-testing'],
|
|
64
64
|
},
|
|
@@ -289,65 +289,73 @@ async function getPackageJson(context) {
|
|
|
289
289
|
try {
|
|
290
290
|
context.packageJson = JSON.parse(context.packageJson);
|
|
291
291
|
} catch (e) {
|
|
292
|
-
context.errors.push(`[
|
|
292
|
+
context.errors.push(`[E0001] Cannot parse package.json: ${e}`);
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
return context;
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
async function checkPackageJson(context) {
|
|
299
|
-
console.log('\n[
|
|
299
|
+
console.log('\n[E0001 - E0999] checking package.json');
|
|
300
300
|
|
|
301
301
|
let passed;
|
|
302
302
|
|
|
303
|
-
if (!context.githubUrlOriginal.match(/\/iobroker\./i)) {
|
|
304
|
-
|
|
303
|
+
//if (!context.githubUrlOriginal.match(/\/iobroker\./i)) {
|
|
304
|
+
//console.log(`DEBUG: ${context.githubApiData.name}`)
|
|
305
|
+
if (!context.githubApiData.name.match(/^iobroker\./i)) {
|
|
306
|
+
context.errors.push('[E0002] No "ioBroker." found in the name of repository');
|
|
305
307
|
} else {
|
|
306
308
|
context.checks.push('"ioBroker" was found in the name of repository');
|
|
307
309
|
}
|
|
308
310
|
|
|
309
|
-
if (context.githubUrlOriginal.includes('/iobroker.')) {
|
|
311
|
+
//if (context.githubUrlOriginal.includes('/iobroker.')) {
|
|
312
|
+
if (context.githubApiData.name.match(/^iobroker\./)) {
|
|
310
313
|
context.errors.push(
|
|
311
|
-
'[
|
|
314
|
+
'[E0003] Repository must have name ioBroker.adaptername, but now io"b"roker is in lowercase',
|
|
312
315
|
);
|
|
313
316
|
} else {
|
|
314
317
|
context.checks.push('Repository has name ioBroker.adaptername (not iobroker.adaptername)');
|
|
315
318
|
}
|
|
316
319
|
|
|
317
|
-
const m = context.githubUrlOriginal.match(/\/ioBroker\.(.*)$/);
|
|
320
|
+
//const m = context.githubUrlOriginal.match(/\/ioBroker\.(.*)$/);
|
|
321
|
+
let m;
|
|
322
|
+
m = context.githubApiData.name.match(/^ioBroker\.(.*)$/);
|
|
323
|
+
if (!m || !m[1]) {
|
|
324
|
+
m = context.githubApiData.name.match(/^iobroker\.(.*)$/);
|
|
325
|
+
}
|
|
318
326
|
let adapterName = '';
|
|
319
327
|
if (!m || !m[1]) {
|
|
320
|
-
context.errors.push(`[
|
|
328
|
+
context.errors.push(`[E0004] No valid adapter name found in URL: ${context.githubUrlOriginal}`);
|
|
321
329
|
} else {
|
|
322
330
|
context.checks.push('Adapter name found in the URL');
|
|
323
331
|
adapterName = m[1].replace(/\/master$/, '').replace(/\/main$/, '');
|
|
324
332
|
}
|
|
325
333
|
|
|
326
|
-
context.adapterName = adapterName;
|
|
334
|
+
context.adapterName = adapterName !== '' ? adapterName : 'unknown';
|
|
327
335
|
|
|
328
336
|
if (adapterName.match(/[A-Z]/)) {
|
|
329
|
-
context.errors.push('[
|
|
337
|
+
context.errors.push('[E0005] Adapter name must be lowercase');
|
|
330
338
|
} else {
|
|
331
339
|
context.checks.push('Adapter name is lowercase');
|
|
332
340
|
}
|
|
333
341
|
|
|
334
342
|
if (adapterName.match(/[^-_a-z\d]/)) {
|
|
335
343
|
context.errors.push(
|
|
336
|
-
`[
|
|
344
|
+
`[E0006] Invalid characters found in adapter name "${adapterName}". Only lowercase chars, digits, "-" and "_" are allowed`,
|
|
337
345
|
);
|
|
338
346
|
} else {
|
|
339
347
|
context.checks.push(`No invalid characters found in "${adapterName}"`);
|
|
340
348
|
}
|
|
341
349
|
|
|
342
350
|
if (adapterName.startsWith('_')) {
|
|
343
|
-
context.errors.push(`[
|
|
351
|
+
context.errors.push(`[E0024] Adapter name "${adapterName}" may not start with '_'`);
|
|
344
352
|
} else {
|
|
345
353
|
context.checks.push(`Adapter name "${adapterName}" does not start with '_'`);
|
|
346
354
|
}
|
|
347
355
|
|
|
348
356
|
const n = context.githubUrlOriginal.match(/\/([^/]+)\/iobroker\./i);
|
|
349
357
|
if (!n || !n[1]) {
|
|
350
|
-
context.errors.push('[
|
|
358
|
+
context.errors.push('[E0007] Cannot find author repo in the URL');
|
|
351
359
|
} else {
|
|
352
360
|
context.authorName = n[1];
|
|
353
361
|
}
|
|
@@ -357,11 +365,11 @@ async function checkPackageJson(context) {
|
|
|
357
365
|
for (const objectName in context.packageJson) {
|
|
358
366
|
if (objectName.startsWith('_')) {
|
|
359
367
|
context.errors.push(
|
|
360
|
-
`[
|
|
368
|
+
`[E0014] NPM information (attribute "${objectName}") found in package.json. Please remove all attributes starting with "_"`,
|
|
361
369
|
);
|
|
362
370
|
passed = false;
|
|
363
371
|
} else if (!validObjectsPackageJson.includes(objectName)) {
|
|
364
|
-
context.errors.push(`[
|
|
372
|
+
context.errors.push(`[E0058] Attribute "${objectName}" at package.json is not supported. Please remove.`);
|
|
365
373
|
passed = false;
|
|
366
374
|
}
|
|
367
375
|
}
|
|
@@ -384,19 +392,19 @@ async function checkPackageJson(context) {
|
|
|
384
392
|
}
|
|
385
393
|
if (tmp) {
|
|
386
394
|
if (blacklistPackageJson[blacklist].err) {
|
|
387
|
-
context.errors.push(`[
|
|
395
|
+
context.errors.push(`[E0038] ${blacklistPackageJson[blacklist].msg}`);
|
|
388
396
|
} else {
|
|
389
|
-
context.warnings.push(`[
|
|
397
|
+
context.warnings.push(`[W0038] ${blacklistPackageJson[blacklist].msg}`);
|
|
390
398
|
}
|
|
391
399
|
}
|
|
392
400
|
}
|
|
393
401
|
context.checks.push('blacklist for package.json checked.');
|
|
394
402
|
|
|
395
403
|
if (context.packageJson.name === undefined) {
|
|
396
|
-
context.errors.push(`[
|
|
404
|
+
context.errors.push(`[E0008] No "name" key found in package.json.`);
|
|
397
405
|
} else if (context.packageJson.name !== `iobroker.${adapterName.toLowerCase()}`) {
|
|
398
406
|
context.errors.push(
|
|
399
|
-
`[
|
|
407
|
+
`[E0020] Name of adapter in package.json must be lowercase and be equal to "iobroker.${adapterName.toLowerCase()}". Now is "${context.packageJson.name}"`,
|
|
400
408
|
);
|
|
401
409
|
} else {
|
|
402
410
|
context.checks.push(
|
|
@@ -405,14 +413,14 @@ async function checkPackageJson(context) {
|
|
|
405
413
|
}
|
|
406
414
|
|
|
407
415
|
if (!context.packageJson.version) {
|
|
408
|
-
context.errors.push('[
|
|
416
|
+
context.errors.push('[E0009] No "version" key found in the package.json');
|
|
409
417
|
} else {
|
|
410
418
|
context.checks.push('Version found in package.json');
|
|
411
419
|
|
|
412
420
|
// Validate version format according to ioBroker requirements
|
|
413
421
|
if (!validateReleaseFormat(context.packageJson.version)) {
|
|
414
422
|
context.errors.push(
|
|
415
|
-
`[
|
|
423
|
+
`[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
424
|
);
|
|
417
425
|
} else {
|
|
418
426
|
context.checks.push('Version format is valid');
|
|
@@ -420,34 +428,34 @@ async function checkPackageJson(context) {
|
|
|
420
428
|
}
|
|
421
429
|
|
|
422
430
|
if (!context.packageJson.description) {
|
|
423
|
-
context.errors.push('[
|
|
431
|
+
context.errors.push('[E0010] No "description" key found in the package.json');
|
|
424
432
|
} else {
|
|
425
433
|
context.checks.push('Description found in package.json');
|
|
426
434
|
}
|
|
427
435
|
|
|
428
436
|
if (!context.packageJson.author) {
|
|
429
|
-
context.errors.push('[
|
|
437
|
+
context.errors.push('[E0013] No "author" key found in the package.json');
|
|
430
438
|
} else {
|
|
431
439
|
context.checks.push('Author found in package.json');
|
|
432
440
|
}
|
|
433
441
|
|
|
434
442
|
// if (context.packageJson.licenses) {
|
|
435
443
|
// context.errors.push(
|
|
436
|
-
// '[
|
|
444
|
+
// '[E0021] "licenses" in package.json are deprecated. Please remove and use "license": "NAME" field.',
|
|
437
445
|
// );
|
|
438
446
|
// } else {
|
|
439
447
|
// context.checks.push('"licenses" not found in package.json');
|
|
440
448
|
// }
|
|
441
449
|
|
|
442
450
|
if (!context.packageJson.license) {
|
|
443
|
-
context.errors.push('[
|
|
451
|
+
context.errors.push('[E0015] No license found in package.json');
|
|
444
452
|
} else {
|
|
445
453
|
context.checks.push('"license" found in package.json');
|
|
446
454
|
|
|
447
455
|
// check if license valid
|
|
448
456
|
if (!context.cfg.allowedLicenses.includes(context.packageJson.license)) {
|
|
449
457
|
context.errors.push(
|
|
450
|
-
`[
|
|
458
|
+
`[E0016] ${context.packageJson.license} found in package.json is no valid SPDX license. Please use one of listed here: https://spdx.org/licenses/`,
|
|
451
459
|
);
|
|
452
460
|
} else {
|
|
453
461
|
context.checks.push('"license" is valid in package.json');
|
|
@@ -455,24 +463,24 @@ async function checkPackageJson(context) {
|
|
|
455
463
|
}
|
|
456
464
|
|
|
457
465
|
if (!context.packageJson.repository) {
|
|
458
|
-
context.errors.push('[
|
|
466
|
+
context.errors.push('[E0017] No "repository" key found in the package.json');
|
|
459
467
|
} else {
|
|
460
468
|
context.checks.push('Repository found in package.json');
|
|
461
469
|
|
|
462
470
|
const allowedRepoUrls = [
|
|
463
|
-
context.githubApiData.html_url, // https://github.com/klein0r/ioBroker.luftdaten
|
|
464
|
-
`git+${context.githubApiData.html_url}`, // git+https://github.com/klein0r/ioBroker.luftdaten
|
|
465
|
-
context.githubApiData.git_url, // git://github.com/klein0r/ioBroker.luftdaten.git
|
|
466
|
-
context.githubApiData.ssh_url, // git@github.com:klein0r/ioBroker.luftdaten.git
|
|
467
|
-
context.githubApiData.clone_url, // https://github.com/klein0r/ioBroker.luftdaten.git
|
|
468
|
-
`git+${context.githubApiData.clone_url}`, // git+https://github.com/klein0r/ioBroker.luftdaten.git
|
|
471
|
+
context.githubApiData.html_url.replace('/iobroker.', '/ioBroker.'), // https://github.com/klein0r/ioBroker.luftdaten
|
|
472
|
+
`git+${context.githubApiData.html_url.replace('/iobroker.', '/ioBroker.')}`, // git+https://github.com/klein0r/ioBroker.luftdaten
|
|
473
|
+
context.githubApiData.git_url.replace('/iobroker.', '/ioBroker.'), // git://github.com/klein0r/ioBroker.luftdaten.git
|
|
474
|
+
context.githubApiData.ssh_url.replace('/iobroker.', '/ioBroker.'), // git@github.com:klein0r/ioBroker.luftdaten.git
|
|
475
|
+
context.githubApiData.clone_url.replace('/iobroker.', '/ioBroker.'), // https://github.com/klein0r/ioBroker.luftdaten.git
|
|
476
|
+
`git+${context.githubApiData.clone_url.replace('/iobroker.', '/ioBroker.')}`, // git+https://github.com/klein0r/ioBroker.luftdaten.git
|
|
469
477
|
];
|
|
470
478
|
|
|
471
479
|
// https://docs.npmjs.com/cli/v7/configuring-npm/package-json#repository
|
|
472
480
|
if (context.packageJson.repository && typeof context.packageJson.repository === 'object') {
|
|
473
481
|
if (context.packageJson.repository.type !== 'git') {
|
|
474
482
|
context.errors.push(
|
|
475
|
-
`[
|
|
483
|
+
`[E0018] Invalid repository type in package.json: ${context.packageJson.repository.type}. It should be git`,
|
|
476
484
|
);
|
|
477
485
|
} else {
|
|
478
486
|
context.checks.push('Repository type is valid in package.json: git');
|
|
@@ -480,7 +488,7 @@ async function checkPackageJson(context) {
|
|
|
480
488
|
|
|
481
489
|
if (!allowedRepoUrls.includes(context.packageJson.repository.url)) {
|
|
482
490
|
context.errors.push(
|
|
483
|
-
`[
|
|
491
|
+
`[E0019] Invalid repository URL in package.json: ${context.packageJson.repository.url}. Expected: ${context.githubApiData.clone_url}`,
|
|
484
492
|
);
|
|
485
493
|
} else {
|
|
486
494
|
context.checks.push('Repository URL is valid in package.json');
|
|
@@ -488,25 +496,25 @@ async function checkPackageJson(context) {
|
|
|
488
496
|
} else if (context.packageJson.repository && typeof context.packageJson.repository === 'string') {
|
|
489
497
|
if (!allowedRepoUrls.includes(context.packageJson.repository)) {
|
|
490
498
|
context.errors.push(
|
|
491
|
-
`[
|
|
499
|
+
`[E0019] Invalid repository URL in package.json: ${context.packageJson.repository}. Expected: ${context.githubApiData.clone_url}`,
|
|
492
500
|
);
|
|
493
501
|
} else {
|
|
494
502
|
context.checks.push('Repository URL is valid in package.json');
|
|
495
503
|
}
|
|
496
504
|
} else {
|
|
497
|
-
context.errors.push('[
|
|
505
|
+
context.errors.push('[E0012] Invalid repository object in package.json');
|
|
498
506
|
}
|
|
499
507
|
}
|
|
500
508
|
|
|
501
509
|
if (!context.packageJson.scripts) {
|
|
502
|
-
context.errors.push('[
|
|
510
|
+
context.errors.push('[E0059] No "scripts" key found in the package.json');
|
|
503
511
|
} else {
|
|
504
512
|
context.checks.push('Scripts found in package.json');
|
|
505
513
|
}
|
|
506
514
|
|
|
507
515
|
if (context.packageJson.maintainers) {
|
|
508
516
|
context.warnings.push(
|
|
509
|
-
'[
|
|
517
|
+
'[W0051] "maintainers" attribute at package.json is not documented. Please use "contributors" attribute.',
|
|
510
518
|
);
|
|
511
519
|
} else {
|
|
512
520
|
context.checks.push('maintainers not found in package.json');
|
|
@@ -514,14 +522,14 @@ async function checkPackageJson(context) {
|
|
|
514
522
|
|
|
515
523
|
if (context.packageJson.publishConfig) {
|
|
516
524
|
context.warnings.push(
|
|
517
|
-
'[
|
|
525
|
+
'[S0052] "publishConfig" attribute at package.json is not required in most cases. Please check and eventually remove.',
|
|
518
526
|
);
|
|
519
527
|
if (
|
|
520
528
|
context.packageJson.publishConfig.registry &&
|
|
521
529
|
context.packageJson.publishConfig.registry !== 'https://registry.npmjs.org'
|
|
522
530
|
) {
|
|
523
531
|
context.errors.push(
|
|
524
|
-
'[
|
|
532
|
+
'[E0053] "publishConfig.registry" mut point to "https://registry.npmjs.org" at package.json.',
|
|
525
533
|
);
|
|
526
534
|
} else {
|
|
527
535
|
context.checks.push(
|
|
@@ -533,17 +541,17 @@ async function checkPackageJson(context) {
|
|
|
533
541
|
}
|
|
534
542
|
|
|
535
543
|
if (context.cfg.reservedAdapterNames.includes(adapterName)) {
|
|
536
|
-
context.errors.push('[
|
|
544
|
+
context.errors.push('[E0022] Adapter name is reserved. Please rename adapter.');
|
|
537
545
|
} else {
|
|
538
546
|
context.checks.push('Adapter name is not reserved');
|
|
539
547
|
}
|
|
540
548
|
|
|
541
549
|
if (!context.cfg.onlyWWW && !context.packageJson.dependencies) {
|
|
542
|
-
context.errors.push('[
|
|
550
|
+
context.errors.push('[W0030] No dependencies declared at package.json. Is this really correct?');
|
|
543
551
|
}
|
|
544
552
|
|
|
545
553
|
if (!context.packageJson.devDependencies) {
|
|
546
|
-
context.errors.push('[
|
|
554
|
+
context.errors.push('[E0031] No devDependencies declared at package.json. Please correct package.json');
|
|
547
555
|
}
|
|
548
556
|
|
|
549
557
|
// check for blacklisted dependencies
|
|
@@ -559,9 +567,9 @@ async function checkPackageJson(context) {
|
|
|
559
567
|
|
|
560
568
|
// if (context.packageJson.dependencies[blacklist]) {
|
|
561
569
|
// if (blacklistedDependenciesPackageJson[blacklist].err) {
|
|
562
|
-
// context.errors.push(`[
|
|
570
|
+
// context.errors.push(`[E0050] ${blacklistedDependenciesPackageJson[blacklist].msg}`);
|
|
563
571
|
// } else {
|
|
564
|
-
// context.warnings.push(`[
|
|
572
|
+
// context.warnings.push(`[W0050] ${blacklistedDependenciesPackageJson[blacklist].msg}`);
|
|
565
573
|
// }
|
|
566
574
|
// passed = false;
|
|
567
575
|
// }
|
|
@@ -570,14 +578,14 @@ async function checkPackageJson(context) {
|
|
|
570
578
|
if (regexp.test(dependency)) {
|
|
571
579
|
if (blacklistedDependenciesPackageJson[blacklist].err) {
|
|
572
580
|
context.errors.push(
|
|
573
|
-
`[
|
|
581
|
+
`[E0050] ${blacklistedDependenciesPackageJson[blacklist].msg}`.replace(
|
|
574
582
|
'${dependency}',
|
|
575
583
|
dependency,
|
|
576
584
|
),
|
|
577
585
|
);
|
|
578
586
|
} else {
|
|
579
587
|
context.warnings.push(
|
|
580
|
-
`[
|
|
588
|
+
`[W0050] ${blacklistedDependenciesPackageJson[blacklist].msg}`.replace(
|
|
581
589
|
'${dependency}',
|
|
582
590
|
dependency,
|
|
583
591
|
),
|
|
@@ -605,9 +613,9 @@ async function checkPackageJson(context) {
|
|
|
605
613
|
|
|
606
614
|
// if (context.packageJson.devDependencies[blacklist]) {
|
|
607
615
|
// if (blacklistedDevDependenciesPackageJson[blacklist].err) {
|
|
608
|
-
// context.errors.push(`[
|
|
616
|
+
// context.errors.push(`[E0050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`);
|
|
609
617
|
// } else {
|
|
610
|
-
// context.warnings.push(`[
|
|
618
|
+
// context.warnings.push(`[W0050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`);
|
|
611
619
|
// }
|
|
612
620
|
// passed = false;
|
|
613
621
|
// }
|
|
@@ -616,14 +624,14 @@ async function checkPackageJson(context) {
|
|
|
616
624
|
if (regexp.test(devDependency)) {
|
|
617
625
|
if (blacklistedDevDependenciesPackageJson[blacklist].err) {
|
|
618
626
|
context.errors.push(
|
|
619
|
-
`[
|
|
627
|
+
`[E0050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`.replace(
|
|
620
628
|
'${devDependency}',
|
|
621
629
|
devDependency,
|
|
622
630
|
),
|
|
623
631
|
);
|
|
624
632
|
} else {
|
|
625
633
|
context.warnings.push(
|
|
626
|
-
`[
|
|
634
|
+
`[W0050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`.replace(
|
|
627
635
|
'${devDependency}',
|
|
628
636
|
devDependency,
|
|
629
637
|
),
|
|
@@ -651,9 +659,9 @@ async function checkPackageJson(context) {
|
|
|
651
659
|
|
|
652
660
|
if (context.packageJson.peerDependencies[blacklist]) {
|
|
653
661
|
if (blacklistedPeerDependenciesPackageJson[blacklist].err) {
|
|
654
|
-
context.errors.push(`[
|
|
662
|
+
context.errors.push(`[E0050] ${blacklistedPeerDependenciesPackageJson[blacklist].msg}`);
|
|
655
663
|
} else {
|
|
656
|
-
context.warnings.push(`[
|
|
664
|
+
context.warnings.push(`[W0050] ${blacklistedPeerDependenciesPackageJson[blacklist].msg}`);
|
|
657
665
|
}
|
|
658
666
|
passed = false;
|
|
659
667
|
}
|
|
@@ -676,9 +684,9 @@ async function checkPackageJson(context) {
|
|
|
676
684
|
|
|
677
685
|
if (context.packageJson.optionalDependencies[blacklist]) {
|
|
678
686
|
if (blacklistedOptionalDependenciesPackageJson[blacklist].err) {
|
|
679
|
-
context.errors.push(`[
|
|
687
|
+
context.errors.push(`[E0052] ${blacklistedOptionalDependenciesPackageJson[blacklist].msg}`);
|
|
680
688
|
} else {
|
|
681
|
-
context.warnings.push(`[
|
|
689
|
+
context.warnings.push(`[W0053] ${blacklistedOptionalDependenciesPackageJson[blacklist].msg}`);
|
|
682
690
|
}
|
|
683
691
|
passed = false;
|
|
684
692
|
}
|
|
@@ -693,7 +701,7 @@ async function checkPackageJson(context) {
|
|
|
693
701
|
if (context.packageJson.devDependencies) {
|
|
694
702
|
for (const dependency in context.packageJson.devDependencies) {
|
|
695
703
|
if (context.packageJson.dependencies && context.packageJson.dependencies[dependency]) {
|
|
696
|
-
context.errors.push(`[
|
|
704
|
+
context.errors.push(`[E0060] ${dependency} listed as dependency and as devDependency.`);
|
|
697
705
|
passed = false;
|
|
698
706
|
}
|
|
699
707
|
}
|
|
@@ -701,11 +709,11 @@ async function checkPackageJson(context) {
|
|
|
701
709
|
if (context.packageJson.peerDependencies) {
|
|
702
710
|
for (const dependency in context.packageJson.peerDependencies) {
|
|
703
711
|
if (context.packageJson.dependencies && context.packageJson.dependencies[dependency]) {
|
|
704
|
-
context.errors.push(`[
|
|
712
|
+
context.errors.push(`[E0060] ${dependency} listed as dependency and as peerDependency.`);
|
|
705
713
|
passed = false;
|
|
706
714
|
}
|
|
707
715
|
if (context.packageJson.devDependencies && context.packageJson.devDependencies[dependency]) {
|
|
708
|
-
context.errors.push(`[
|
|
716
|
+
context.errors.push(`[E0060] ${dependency} listed as devDependency and as peerDependency.`);
|
|
709
717
|
passed = false;
|
|
710
718
|
}
|
|
711
719
|
}
|
|
@@ -713,15 +721,15 @@ async function checkPackageJson(context) {
|
|
|
713
721
|
if (context.packageJson.optionalDependencies) {
|
|
714
722
|
for (const dependency in context.packageJson.optionalDependencies) {
|
|
715
723
|
if (context.packageJson.dependencies && context.packageJson.dependencies[dependency]) {
|
|
716
|
-
context.errors.push(`[
|
|
724
|
+
context.errors.push(`[E0060] ${dependency} listed as dependency and as optionalDependency.`);
|
|
717
725
|
passed = false;
|
|
718
726
|
}
|
|
719
727
|
if (context.packageJson.devDependencies && context.packageJson.devDependencies[dependency]) {
|
|
720
|
-
context.errors.push(`[
|
|
728
|
+
context.errors.push(`[E0060] ${dependency} listed as devDependency and as optionalDependency.`);
|
|
721
729
|
passed = false;
|
|
722
730
|
}
|
|
723
731
|
if (context.packageJson.peerDependencies && context.packageJson.peerDependencies[dependency]) {
|
|
724
|
-
context.errors.push(`[
|
|
732
|
+
context.errors.push(`[E0060] ${dependency} listed as peerDependency and as optionalDependency.`);
|
|
725
733
|
passed = false;
|
|
726
734
|
}
|
|
727
735
|
}
|
|
@@ -734,12 +742,12 @@ async function checkPackageJson(context) {
|
|
|
734
742
|
if (!context.cfg.onlyWWW) {
|
|
735
743
|
if (!context.packageJson.engines) {
|
|
736
744
|
context.errors.push(
|
|
737
|
-
`[
|
|
745
|
+
`[E0026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended`,
|
|
738
746
|
);
|
|
739
747
|
} else {
|
|
740
748
|
if (!context.packageJson.engines.node) {
|
|
741
749
|
context.errors.push(
|
|
742
|
-
`[
|
|
750
|
+
`[E0026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended`,
|
|
743
751
|
);
|
|
744
752
|
} else {
|
|
745
753
|
context.checks.push('engines attribute containing node requirements exist.');
|
|
@@ -750,22 +758,22 @@ async function checkPackageJson(context) {
|
|
|
750
758
|
const match = nodeVal.match(/^(?<cmp>[<>=~]+)?\s*(?<vers>\d+(\.\d+(\.\d+)?)?(-\w+\.\d+)?)/m);
|
|
751
759
|
if (!match) {
|
|
752
760
|
context.warnings.push(
|
|
753
|
-
`[
|
|
761
|
+
`[W0027] Engines clause at package.json ({'engines' : { 'node' : '${nodeVal}' } }") is not parseable.`,
|
|
754
762
|
);
|
|
755
763
|
} else {
|
|
756
764
|
common.debug(`node check: ${JSON.stringify(match.groups)}`);
|
|
757
765
|
if (match.groups.cmp !== '>' && match.groups.cmp !== '>=') {
|
|
758
766
|
context.warnings.push(
|
|
759
|
-
`[
|
|
767
|
+
`[W0028] Minimum node.js version ${recommendedNodeVersion} recommended. Please change "{'engines' : { 'node' >= '${match.groups.vers}' } }" to "{'engines' : { 'node' >= '${recommendedNodeVersion}' } }" at package.json.`,
|
|
760
768
|
);
|
|
761
769
|
} else {
|
|
762
770
|
if (!compareVersions.compare(match.groups.vers, requiredNodeVersion, '>=')) {
|
|
763
771
|
context.errors.push(
|
|
764
|
-
`[
|
|
772
|
+
`[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.`,
|
|
765
773
|
);
|
|
766
774
|
} else if (!compareVersions.compare(match.groups.vers, recommendedNodeVersion, '>=')) {
|
|
767
775
|
context.warnings.push(
|
|
768
|
-
`[
|
|
776
|
+
`[W0028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" to "{'engines' : { 'node' >= '${recommendedNodeVersion}' } }" at package.json.`,
|
|
769
777
|
);
|
|
770
778
|
} else {
|
|
771
779
|
context.checks.push(
|
|
@@ -803,11 +811,11 @@ async function checkPackageJson(context) {
|
|
|
803
811
|
// if dependency exists, version requirements must be met
|
|
804
812
|
if (!compareVersions.compare(dependencyVersion, requiredVersion, '>=')) {
|
|
805
813
|
context.errors.push(
|
|
806
|
-
`[
|
|
814
|
+
`[E0033] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} (or newer) is current. Please update dependencies at package.json`,
|
|
807
815
|
);
|
|
808
816
|
} else if (!compareVersions.compare(dependencyVersion, recommendedVersion, '>=')) {
|
|
809
817
|
context.warnings.push(
|
|
810
|
-
`[
|
|
818
|
+
`[W0034] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} (or newer) is current. Please update dependencies at package.json`,
|
|
811
819
|
);
|
|
812
820
|
} else {
|
|
813
821
|
context.checks.push(`dependency ${dependency} ${dependencyVersion} is ok`);
|
|
@@ -825,11 +833,11 @@ async function checkPackageJson(context) {
|
|
|
825
833
|
} else if (optional) {
|
|
826
834
|
context.checks.push(`dependency ${dependency} is optional`);
|
|
827
835
|
if (suggested) {
|
|
828
|
-
context.warnings.push(`[
|
|
836
|
+
context.warnings.push(`[S0061] Consider using "${dependency}".`);
|
|
829
837
|
}
|
|
830
838
|
} else {
|
|
831
839
|
context.errors.push(
|
|
832
|
-
`[
|
|
840
|
+
`[E0032] No dependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to dependencies at package.json`,
|
|
833
841
|
);
|
|
834
842
|
}
|
|
835
843
|
}
|
|
@@ -859,11 +867,11 @@ async function checkPackageJson(context) {
|
|
|
859
867
|
// if dependency exists, version requirements must be met
|
|
860
868
|
if (!compareVersions.compare(dependencyVersion, requiredVersion, '>=')) {
|
|
861
869
|
context.errors.push(
|
|
862
|
-
`[
|
|
870
|
+
`[E0036] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} (or newer) is current. Please update devDependencies at package.json`,
|
|
863
871
|
);
|
|
864
872
|
} else if (!compareVersions.compare(dependencyVersion, recommendedVersion, '>=')) {
|
|
865
873
|
context.warnings.push(
|
|
866
|
-
`[
|
|
874
|
+
`[W0037] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} (or newer) is current. Please update devDependencies at package.json`,
|
|
867
875
|
);
|
|
868
876
|
} else {
|
|
869
877
|
context.checks.push(`devDependency ${dependency} ${dependencyVersion} is ok`);
|
|
@@ -881,11 +889,11 @@ async function checkPackageJson(context) {
|
|
|
881
889
|
} else if (optional) {
|
|
882
890
|
context.checks.push(`devDependency ${dependency} is optional`);
|
|
883
891
|
if (suggested) {
|
|
884
|
-
context.warnings.push(`[
|
|
892
|
+
context.warnings.push(`[S0062] Consider using "${dependency}".`);
|
|
885
893
|
}
|
|
886
894
|
} else {
|
|
887
895
|
context.errors.push(
|
|
888
|
-
`[
|
|
896
|
+
`[E0035] No devDependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to devDependencies at package.json`,
|
|
889
897
|
);
|
|
890
898
|
}
|
|
891
899
|
}
|
|
@@ -901,19 +909,20 @@ async function checkPackageJson(context) {
|
|
|
901
909
|
'@iobroker/adapter-dev',
|
|
902
910
|
'@iobroker/testing',
|
|
903
911
|
];
|
|
912
|
+
let forcedDependencyFlag = false;
|
|
904
913
|
for (const dependency in context.packageJson.dependencies) {
|
|
905
914
|
const dependencyVersion = context.packageJson.dependencies[dependency];
|
|
906
915
|
if (dependencyVersion.toLowerCase().includes('github.com')) {
|
|
907
916
|
context.warnings.push(
|
|
908
|
-
`[
|
|
917
|
+
`[W0043] dependency should not require a github version. Please change "${dependency}:${dependencyVersion}"`,
|
|
909
918
|
);
|
|
910
919
|
} else if (dependencyVersion === '*') {
|
|
911
920
|
context.warnings.push(
|
|
912
|
-
`[
|
|
921
|
+
`[W0056] Wildcard dependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
|
|
913
922
|
);
|
|
914
923
|
} else if (!common.validateSemver(dependencyVersion)) {
|
|
915
924
|
context.errors.push(
|
|
916
|
-
`[
|
|
925
|
+
`[E0054] malformed dependency detected "${dependency}":"${dependencyVersion}". Please fix at package.json.`,
|
|
917
926
|
);
|
|
918
927
|
} else if (
|
|
919
928
|
!context.packageJson.dependencies[dependency].startsWith('^') &&
|
|
@@ -923,29 +932,36 @@ async function checkPackageJson(context) {
|
|
|
923
932
|
) {
|
|
924
933
|
if (enforcedDependencies.includes(dependency)) {
|
|
925
934
|
context.errors.push(
|
|
926
|
-
`[
|
|
935
|
+
`[E0044] dependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"`,
|
|
927
936
|
);
|
|
928
937
|
} else {
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
938
|
+
forcedDependencyFlag = true;
|
|
939
|
+
// context.warnings.push(
|
|
940
|
+
// `[S0047] dependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"`,
|
|
941
|
+
// );
|
|
932
942
|
}
|
|
933
943
|
}
|
|
934
944
|
}
|
|
945
|
+
if (forcedDependencyFlag) {
|
|
946
|
+
context.warnings.push(
|
|
947
|
+
`[S0047] At least one dependency at package.json requires a specific version. Consider using "~1.2.3" or "^1.2.3" syntax unless freezing dependencies is really desired.`,
|
|
948
|
+
);
|
|
949
|
+
}
|
|
935
950
|
|
|
951
|
+
let forcedDevDependencyFlag = false;
|
|
936
952
|
for (const dependency in context.packageJson.devDependencies) {
|
|
937
953
|
const dependencyVersion = context.packageJson.devDependencies[dependency];
|
|
938
954
|
if (dependencyVersion.toLowerCase().includes('github.com')) {
|
|
939
955
|
context.warnings.push(
|
|
940
|
-
`[
|
|
956
|
+
`[W0045] devDependency should not require github versions. Please change "${dependency}":"${dependencyVersion}"`,
|
|
941
957
|
);
|
|
942
958
|
} else if (dependencyVersion === '*') {
|
|
943
959
|
context.warnings.push(
|
|
944
|
-
`[
|
|
960
|
+
`[W0057] Wildcard devDependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
|
|
945
961
|
);
|
|
946
962
|
} else if (!common.validateSemver(dependencyVersion)) {
|
|
947
963
|
context.errors.push(
|
|
948
|
-
`[
|
|
964
|
+
`[E0055] malformed dependency detected "${dependency}":"${dependencyVersion}". Please fix at package.json.`,
|
|
949
965
|
);
|
|
950
966
|
} else if (
|
|
951
967
|
!context.packageJson.devDependencies[dependency].startsWith('^') &&
|
|
@@ -955,18 +971,24 @@ async function checkPackageJson(context) {
|
|
|
955
971
|
) {
|
|
956
972
|
if (enforcedDependencies.includes(dependency)) {
|
|
957
973
|
context.errors.push(
|
|
958
|
-
`[
|
|
974
|
+
`[E0046] devDependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${dependencyVersion}"`,
|
|
959
975
|
);
|
|
960
976
|
} else {
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
977
|
+
forcedDevDependencyFlag = true;
|
|
978
|
+
// context.warnings.push(
|
|
979
|
+
// `[W0048] devDependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"`,
|
|
980
|
+
// );
|
|
964
981
|
}
|
|
965
982
|
}
|
|
966
983
|
}
|
|
984
|
+
if (forcedDevDependencyFlag) {
|
|
985
|
+
context.warnings.push(
|
|
986
|
+
`[S0048] At least one devDpendency at package.json requires a specific version. Consider using "~1.2.3" or "^1.2.3" syntax unless freezing dependencies is really desired.`,
|
|
987
|
+
);
|
|
988
|
+
}
|
|
967
989
|
|
|
968
990
|
if (!context.packageJson.keywords || !Array.isArray(context.packageJson.keywords)) {
|
|
969
|
-
context.errors.push('[
|
|
991
|
+
context.errors.push('[E0039] "keywords" must be an array within package.json and contain some useful keywords');
|
|
970
992
|
} else {
|
|
971
993
|
const forbiddenKeywords = [];
|
|
972
994
|
const ignoredKeywords = ['iobroker', 'smart home', 'smarthome', 'home automation', 'template'];
|
|
@@ -980,12 +1002,12 @@ async function checkPackageJson(context) {
|
|
|
980
1002
|
0
|
|
981
1003
|
) {
|
|
982
1004
|
context.errors.push(
|
|
983
|
-
`[
|
|
1005
|
+
`[E0049] "keywords" within package.json must contain some keywords besides "${context.packageJson.keywords.join(', ')}" related to adapter`,
|
|
984
1006
|
);
|
|
985
1007
|
}
|
|
986
1008
|
if (!(recommendedKeywords.filter(keyword => context.packageJson.keywords.includes(keyword)).length > 0)) {
|
|
987
1009
|
context.warnings.push(
|
|
988
|
-
`[
|
|
1010
|
+
`[W0040] "keywords" within package.json should contain "${recommendedKeywords.join(', ')}"`,
|
|
989
1011
|
);
|
|
990
1012
|
}
|
|
991
1013
|
if (
|
|
@@ -994,7 +1016,7 @@ async function checkPackageJson(context) {
|
|
|
994
1016
|
).length > 0
|
|
995
1017
|
) {
|
|
996
1018
|
context.warnings.push(
|
|
997
|
-
`[
|
|
1019
|
+
`[W0041] "keywords" within package.json should not contain "${forbiddenKeywords.join(', ')}"`,
|
|
998
1020
|
);
|
|
999
1021
|
}
|
|
1000
1022
|
|
|
@@ -1003,7 +1025,7 @@ async function checkPackageJson(context) {
|
|
|
1003
1025
|
|
|
1004
1026
|
if (context.packageJson.globalDependencies) {
|
|
1005
1027
|
context.errors.push(
|
|
1006
|
-
'[
|
|
1028
|
+
'[E0042] "globalDependencies" is misplaced at package.json. Did you mean "common.globalDependencies" at io-package.json?',
|
|
1007
1029
|
);
|
|
1008
1030
|
} else {
|
|
1009
1031
|
context.checks.push('"globalDependencies" not found in package.json');
|
|
@@ -1022,69 +1044,69 @@ exports.validateReleaseFormat = validateReleaseFormat;
|
|
|
1022
1044
|
// List of error and warnings used at this module
|
|
1023
1045
|
// ----------------------------------------------
|
|
1024
1046
|
|
|
1025
|
-
// [
|
|
1026
|
-
// [
|
|
1027
|
-
// [
|
|
1028
|
-
// [
|
|
1029
|
-
// [
|
|
1030
|
-
// [
|
|
1031
|
-
// [
|
|
1047
|
+
// [0001] Cannot parse package.json: ${e}
|
|
1048
|
+
// [0002] No "ioBroker." found in the name of repository
|
|
1049
|
+
// [0003] Repository must have name ioBroker.adaptername, but now io"b"roker is in lowercase
|
|
1050
|
+
// [0004] No adapter name found in URL: ${context.githubUrlOriginal}
|
|
1051
|
+
// [0005] Adapter name must be lowercase
|
|
1052
|
+
// [0006] Invalid characters found in adapter name "${adapterName}". Only lowercase chars, digits, "-" and "_" are allowed
|
|
1053
|
+
// [0007] Cannot find author repo in the URL
|
|
1032
1054
|
// E008] No "name" key found in package.json.
|
|
1033
|
-
// [
|
|
1034
|
-
// [
|
|
1035
|
-
// [
|
|
1036
|
-
// [
|
|
1037
|
-
// [
|
|
1038
|
-
// [
|
|
1039
|
-
// [
|
|
1040
|
-
// [
|
|
1041
|
-
// [
|
|
1042
|
-
// [
|
|
1043
|
-
// [
|
|
1044
|
-
// [
|
|
1045
|
-
// [
|
|
1046
|
-
// [
|
|
1047
|
-
// [
|
|
1048
|
-
// [
|
|
1049
|
-
// [
|
|
1050
|
-
// [
|
|
1051
|
-
// [
|
|
1052
|
-
// [
|
|
1053
|
-
// [
|
|
1054
|
-
// [
|
|
1055
|
-
// [
|
|
1056
|
-
// [
|
|
1057
|
-
// [
|
|
1058
|
-
// [
|
|
1059
|
-
// [
|
|
1060
|
-
// [
|
|
1061
|
-
// [
|
|
1062
|
-
// [
|
|
1063
|
-
// [
|
|
1064
|
-
// [
|
|
1065
|
-
// [
|
|
1066
|
-
// [
|
|
1067
|
-
// [
|
|
1068
|
-
// [
|
|
1069
|
-
// [
|
|
1070
|
-
// [
|
|
1071
|
-
// [
|
|
1072
|
-
// [
|
|
1073
|
-
// [
|
|
1074
|
-
// [
|
|
1075
|
-
// [
|
|
1076
|
-
// [
|
|
1077
|
-
// [
|
|
1078
|
-
// [
|
|
1079
|
-
// [
|
|
1080
|
-
// [
|
|
1081
|
-
// [
|
|
1082
|
-
// [
|
|
1083
|
-
// [
|
|
1084
|
-
// [
|
|
1085
|
-
// [
|
|
1086
|
-
// [
|
|
1087
|
-
// [
|
|
1088
|
-
// [
|
|
1089
|
-
// [
|
|
1090
|
-
// [
|
|
1055
|
+
// [0009] No "version" key found in the package.json
|
|
1056
|
+
// [0010] No description found in the package.json
|
|
1057
|
+
// [0011] ### "@iobroker/dev-server" must not be listed as dependency at package.json'
|
|
1058
|
+
// [0012] Invalid repository object in package.json
|
|
1059
|
+
// [0013] No author found in the package.json
|
|
1060
|
+
// [0014] NPM information found in package.json. Please remove all attributes starting with "_"
|
|
1061
|
+
// [0015] No license found in package.json
|
|
1062
|
+
// [0016] ${context.packageJson.license} found in package.json is no valid SPDX license. Please use one of listed here: https://spdx.org/licenses/
|
|
1063
|
+
// [0017] No repository found in the package.json
|
|
1064
|
+
// [0018] Invalid repository type in package.json: ${context.packageJson.repository.type}. It should be git
|
|
1065
|
+
// [0019] Invalid repository URL in package.json: ${context.packageJson.repository.url}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}
|
|
1066
|
+
// [0019] Invalid repository URL in package.json: ${context.packageJson.repository}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}
|
|
1067
|
+
// [0020] Name of adapter in package.json must be lowercase and be equal to "iobroker.${adapterName.toLowerCase()}". Now is "${packageJson.name}"
|
|
1068
|
+
// [0021] "licenses" in package.json are deprecated. Please remove and use "license": "NAME" field.
|
|
1069
|
+
// [0022] Adapter name is reserved. Please rename adapter.
|
|
1070
|
+
// [0023] ### Do not include "npm" as dependency!
|
|
1071
|
+
// [0024] Adapter name "${adapterName}" may not start with '_'y!
|
|
1072
|
+
// [0025] ### "iobroker.js-controller" must not be listed as dependency at package.json'
|
|
1073
|
+
// [0026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended
|
|
1074
|
+
// [0026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended
|
|
1075
|
+
// [0027] Engines clause at at package.json ({'engines' : { 'node' : '${nodeVal}' } }") is not parseable.
|
|
1076
|
+
// [0028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.
|
|
1077
|
+
// [0028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.
|
|
1078
|
+
// [0029] Node.js ${requiredNodeVersion} is required as minimum, node.js ${recommendedNodeVersion} is recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" at package.json.
|
|
1079
|
+
// [0030] No dependencies declared at package.json. Is this really correct?
|
|
1080
|
+
// [0031] No devDependencies declared at package.json. Please correct package.json
|
|
1081
|
+
// [0032] No dependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to dependencies at package.json
|
|
1082
|
+
// [0033] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update dependencies at package.json
|
|
1083
|
+
// [0034] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating dependencies at package.json
|
|
1084
|
+
// [0035] No devDependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to devDependencies at package.json
|
|
1085
|
+
// [0036] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update devDependencies at package.json
|
|
1086
|
+
// [0037] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating devDependencies at package.json
|
|
1087
|
+
// [0038] ${blacklistPackageJson[blacklist].msg}
|
|
1088
|
+
// [0038] ${blacklistPackageJson[blacklist].msg}
|
|
1089
|
+
// [0039] "keywords" must be an array within package.json and contain some useful keywords
|
|
1090
|
+
// [0040] "keywords" within package.json should contain "${recommendedKeywords.join(', ')}"
|
|
1091
|
+
// [0041] "keywords" within package.json should not contain "${forbiddenKeywords.join(', ')}"
|
|
1092
|
+
// [0042] "globalDependencies" is misplaced at package.json. Did you mean "common.globalDependencies" at io-package.json?
|
|
1093
|
+
// [0043] dependency should not require a github version. Please change "${dependency}:${context.packageJson.dependencies[dependency]}"
|
|
1094
|
+
// [0044] dependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"
|
|
1095
|
+
// [0045] devDependency should not require github versions. Please change "${dependency}:${context.packageJson.devDependencies[dependency]}"
|
|
1096
|
+
// [0046] devDependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"
|
|
1097
|
+
// [0047] dependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.dependencies[dependency]}"
|
|
1098
|
+
// [0048] devDependency should not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${context.packageJson.devDependencies[dependency]}"
|
|
1099
|
+
// [0049] "keywords" within package.json must contain some keywords besides "${context.packageJson.keywords.join(', ')}" related to adapter
|
|
1100
|
+
// [0050] ${blacklistedDependenciesPackageJson[blacklist].msg}
|
|
1101
|
+
// [0051] "maintainers" attribute at package.json is not documented. Please use "contributors" attribute',
|
|
1102
|
+
// [0052] --
|
|
1103
|
+
// [0053] --
|
|
1104
|
+
// [0054] malformed dependency detected "${dependency}":${context.packageJson.dependencies[dependency]}". Please fix at package.json.`
|
|
1105
|
+
// [0055] malformed dependency detected "${dependency}":${context.packageJson.devDependencies[dependency]}". Please fix at package.json.`
|
|
1106
|
+
// [0056] Wildcard dependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
|
|
1107
|
+
// [0057] Wildcard devDependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
|
|
1108
|
+
// [0058] Key ${objectName} at package.json is not supported. Please remove.
|
|
1109
|
+
// [0059] No "scripts" key found in the package.json.
|
|
1110
|
+
// [0060] ${dependency} listed as dependency and as devDependency.
|
|
1111
|
+
// [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.
|
|
1112
|
+
// [0062] No devDependency declared for ${dependency}. Please consider adding "${dependency}":"${recommendedVersion}" to devDependencies at package.json`
|