@iobroker/repochecker 4.3.0-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.
- package/README.md +3 -0
- package/doc/issues.json +0 -6
- package/index.js +36 -36
- package/lib/{M000_PackageJson.js → M0000_PackageJson.js} +147 -147
- package/lib/{M100_IOPackageJson.js → M1000_IOPackageJson.js} +241 -239
- package/lib/{M250_Npm.js → M2000_Npm.js} +18 -18
- package/lib/{M300_Testing.js → M3000_Testing.js} +8 -8
- package/lib/{M400_Repository.js → M4000_Repository.js} +104 -104
- 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} +19 -19
- 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/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
|
|
|
@@ -289,26 +289,26 @@ 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
303
|
if (!context.githubUrlOriginal.match(/\/iobroker\./i)) {
|
|
304
|
-
context.errors.push('[
|
|
304
|
+
context.errors.push('[E0002] No "ioBroker." found in the name of repository');
|
|
305
305
|
} else {
|
|
306
306
|
context.checks.push('"ioBroker" was found in the name of repository');
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
if (context.githubUrlOriginal.includes('/iobroker.')) {
|
|
310
310
|
context.errors.push(
|
|
311
|
-
'[
|
|
311
|
+
'[E0003] Repository must have name ioBroker.adaptername, but now io"b"roker is in lowercase',
|
|
312
312
|
);
|
|
313
313
|
} else {
|
|
314
314
|
context.checks.push('Repository has name ioBroker.adaptername (not iobroker.adaptername)');
|
|
@@ -317,7 +317,7 @@ async function checkPackageJson(context) {
|
|
|
317
317
|
const m = context.githubUrlOriginal.match(/\/ioBroker\.(.*)$/);
|
|
318
318
|
let adapterName = '';
|
|
319
319
|
if (!m || !m[1]) {
|
|
320
|
-
context.errors.push(`[
|
|
320
|
+
context.errors.push(`[E0004] No adapter name found in URL: ${context.githubUrlOriginal}`);
|
|
321
321
|
} else {
|
|
322
322
|
context.checks.push('Adapter name found in the URL');
|
|
323
323
|
adapterName = m[1].replace(/\/master$/, '').replace(/\/main$/, '');
|
|
@@ -326,28 +326,28 @@ async function checkPackageJson(context) {
|
|
|
326
326
|
context.adapterName = adapterName;
|
|
327
327
|
|
|
328
328
|
if (adapterName.match(/[A-Z]/)) {
|
|
329
|
-
context.errors.push('[
|
|
329
|
+
context.errors.push('[E0005] Adapter name must be lowercase');
|
|
330
330
|
} else {
|
|
331
331
|
context.checks.push('Adapter name is lowercase');
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
if (adapterName.match(/[^-_a-z\d]/)) {
|
|
335
335
|
context.errors.push(
|
|
336
|
-
`[
|
|
336
|
+
`[E0006] Invalid characters found in adapter name "${adapterName}". Only lowercase chars, digits, "-" and "_" are allowed`,
|
|
337
337
|
);
|
|
338
338
|
} else {
|
|
339
339
|
context.checks.push(`No invalid characters found in "${adapterName}"`);
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
if (adapterName.startsWith('_')) {
|
|
343
|
-
context.errors.push(`[
|
|
343
|
+
context.errors.push(`[E0024] Adapter name "${adapterName}" may not start with '_'`);
|
|
344
344
|
} else {
|
|
345
345
|
context.checks.push(`Adapter name "${adapterName}" does not start with '_'`);
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
const n = context.githubUrlOriginal.match(/\/([^/]+)\/iobroker\./i);
|
|
349
349
|
if (!n || !n[1]) {
|
|
350
|
-
context.errors.push('[
|
|
350
|
+
context.errors.push('[E0007] Cannot find author repo in the URL');
|
|
351
351
|
} else {
|
|
352
352
|
context.authorName = n[1];
|
|
353
353
|
}
|
|
@@ -357,11 +357,11 @@ async function checkPackageJson(context) {
|
|
|
357
357
|
for (const objectName in context.packageJson) {
|
|
358
358
|
if (objectName.startsWith('_')) {
|
|
359
359
|
context.errors.push(
|
|
360
|
-
`[
|
|
360
|
+
`[E0014] NPM information (attribute "${objectName}") found in package.json. Please remove all attributes starting with "_"`,
|
|
361
361
|
);
|
|
362
362
|
passed = false;
|
|
363
363
|
} else if (!validObjectsPackageJson.includes(objectName)) {
|
|
364
|
-
context.errors.push(`[
|
|
364
|
+
context.errors.push(`[E0058] Attribute "${objectName}" at package.json is not supported. Please remove.`);
|
|
365
365
|
passed = false;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
@@ -384,19 +384,19 @@ async function checkPackageJson(context) {
|
|
|
384
384
|
}
|
|
385
385
|
if (tmp) {
|
|
386
386
|
if (blacklistPackageJson[blacklist].err) {
|
|
387
|
-
context.errors.push(`[
|
|
387
|
+
context.errors.push(`[E0038] ${blacklistPackageJson[blacklist].msg}`);
|
|
388
388
|
} else {
|
|
389
|
-
context.warnings.push(`[
|
|
389
|
+
context.warnings.push(`[W0038] ${blacklistPackageJson[blacklist].msg}`);
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
393
|
context.checks.push('blacklist for package.json checked.');
|
|
394
394
|
|
|
395
395
|
if (context.packageJson.name === undefined) {
|
|
396
|
-
context.errors.push(`[
|
|
396
|
+
context.errors.push(`[E0008] No "name" key found in package.json.`);
|
|
397
397
|
} else if (context.packageJson.name !== `iobroker.${adapterName.toLowerCase()}`) {
|
|
398
398
|
context.errors.push(
|
|
399
|
-
`[
|
|
399
|
+
`[E0020] Name of adapter in package.json must be lowercase and be equal to "iobroker.${adapterName.toLowerCase()}". Now is "${context.packageJson.name}"`,
|
|
400
400
|
);
|
|
401
401
|
} else {
|
|
402
402
|
context.checks.push(
|
|
@@ -405,14 +405,14 @@ async function checkPackageJson(context) {
|
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
if (!context.packageJson.version) {
|
|
408
|
-
context.errors.push('[
|
|
408
|
+
context.errors.push('[E0009] No "version" key found in the package.json');
|
|
409
409
|
} else {
|
|
410
410
|
context.checks.push('Version found in package.json');
|
|
411
411
|
|
|
412
412
|
// Validate version format according to ioBroker requirements
|
|
413
413
|
if (!validateReleaseFormat(context.packageJson.version)) {
|
|
414
414
|
context.errors.push(
|
|
415
|
-
`[
|
|
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
416
|
);
|
|
417
417
|
} else {
|
|
418
418
|
context.checks.push('Version format is valid');
|
|
@@ -420,34 +420,34 @@ async function checkPackageJson(context) {
|
|
|
420
420
|
}
|
|
421
421
|
|
|
422
422
|
if (!context.packageJson.description) {
|
|
423
|
-
context.errors.push('[
|
|
423
|
+
context.errors.push('[E0010] No "description" key found in the package.json');
|
|
424
424
|
} else {
|
|
425
425
|
context.checks.push('Description found in package.json');
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
if (!context.packageJson.author) {
|
|
429
|
-
context.errors.push('[
|
|
429
|
+
context.errors.push('[E0013] No "author" key found in the package.json');
|
|
430
430
|
} else {
|
|
431
431
|
context.checks.push('Author found in package.json');
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
// if (context.packageJson.licenses) {
|
|
435
435
|
// context.errors.push(
|
|
436
|
-
// '[
|
|
436
|
+
// '[E0021] "licenses" in package.json are deprecated. Please remove and use "license": "NAME" field.',
|
|
437
437
|
// );
|
|
438
438
|
// } else {
|
|
439
439
|
// context.checks.push('"licenses" not found in package.json');
|
|
440
440
|
// }
|
|
441
441
|
|
|
442
442
|
if (!context.packageJson.license) {
|
|
443
|
-
context.errors.push('[
|
|
443
|
+
context.errors.push('[E0015] No license found in package.json');
|
|
444
444
|
} else {
|
|
445
445
|
context.checks.push('"license" found in package.json');
|
|
446
446
|
|
|
447
447
|
// check if license valid
|
|
448
448
|
if (!context.cfg.allowedLicenses.includes(context.packageJson.license)) {
|
|
449
449
|
context.errors.push(
|
|
450
|
-
`[
|
|
450
|
+
`[E0016] ${context.packageJson.license} found in package.json is no valid SPDX license. Please use one of listed here: https://spdx.org/licenses/`,
|
|
451
451
|
);
|
|
452
452
|
} else {
|
|
453
453
|
context.checks.push('"license" is valid in package.json');
|
|
@@ -455,7 +455,7 @@ async function checkPackageJson(context) {
|
|
|
455
455
|
}
|
|
456
456
|
|
|
457
457
|
if (!context.packageJson.repository) {
|
|
458
|
-
context.errors.push('[
|
|
458
|
+
context.errors.push('[E0017] No "repository" key found in the package.json');
|
|
459
459
|
} else {
|
|
460
460
|
context.checks.push('Repository found in package.json');
|
|
461
461
|
|
|
@@ -472,7 +472,7 @@ async function checkPackageJson(context) {
|
|
|
472
472
|
if (context.packageJson.repository && typeof context.packageJson.repository === 'object') {
|
|
473
473
|
if (context.packageJson.repository.type !== 'git') {
|
|
474
474
|
context.errors.push(
|
|
475
|
-
`[
|
|
475
|
+
`[E0018] Invalid repository type in package.json: ${context.packageJson.repository.type}. It should be git`,
|
|
476
476
|
);
|
|
477
477
|
} else {
|
|
478
478
|
context.checks.push('Repository type is valid in package.json: git');
|
|
@@ -480,7 +480,7 @@ async function checkPackageJson(context) {
|
|
|
480
480
|
|
|
481
481
|
if (!allowedRepoUrls.includes(context.packageJson.repository.url)) {
|
|
482
482
|
context.errors.push(
|
|
483
|
-
`[
|
|
483
|
+
`[E0019] Invalid repository URL in package.json: ${context.packageJson.repository.url}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}`,
|
|
484
484
|
);
|
|
485
485
|
} else {
|
|
486
486
|
context.checks.push('Repository URL is valid in package.json');
|
|
@@ -488,25 +488,25 @@ async function checkPackageJson(context) {
|
|
|
488
488
|
} else if (context.packageJson.repository && typeof context.packageJson.repository === 'string') {
|
|
489
489
|
if (!allowedRepoUrls.includes(context.packageJson.repository)) {
|
|
490
490
|
context.errors.push(
|
|
491
|
-
`[
|
|
491
|
+
`[E0019] Invalid repository URL in package.json: ${context.packageJson.repository}. Expected: ${context.githubApiData.ssh_url} or ${context.githubApiData.clone_url}`,
|
|
492
492
|
);
|
|
493
493
|
} else {
|
|
494
494
|
context.checks.push('Repository URL is valid in package.json');
|
|
495
495
|
}
|
|
496
496
|
} else {
|
|
497
|
-
context.errors.push('[
|
|
497
|
+
context.errors.push('[E0012] Invalid repository object in package.json');
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
if (!context.packageJson.scripts) {
|
|
502
|
-
context.errors.push('[
|
|
502
|
+
context.errors.push('[E0059] No "scripts" key found in the package.json');
|
|
503
503
|
} else {
|
|
504
504
|
context.checks.push('Scripts found in package.json');
|
|
505
505
|
}
|
|
506
506
|
|
|
507
507
|
if (context.packageJson.maintainers) {
|
|
508
508
|
context.warnings.push(
|
|
509
|
-
'[
|
|
509
|
+
'[W0051] "maintainers" attribute at package.json is not documented. Please use "contributors" attribute.',
|
|
510
510
|
);
|
|
511
511
|
} else {
|
|
512
512
|
context.checks.push('maintainers not found in package.json');
|
|
@@ -514,14 +514,14 @@ async function checkPackageJson(context) {
|
|
|
514
514
|
|
|
515
515
|
if (context.packageJson.publishConfig) {
|
|
516
516
|
context.warnings.push(
|
|
517
|
-
'[
|
|
517
|
+
'[S0052] "publishConfig" attribute at package.json is not required in most cases. Please check and eventually remove.',
|
|
518
518
|
);
|
|
519
519
|
if (
|
|
520
520
|
context.packageJson.publishConfig.registry &&
|
|
521
521
|
context.packageJson.publishConfig.registry !== 'https://registry.npmjs.org'
|
|
522
522
|
) {
|
|
523
523
|
context.errors.push(
|
|
524
|
-
'[
|
|
524
|
+
'[E0053] "publishConfig.registry" mut point to "https://registry.npmjs.org" at package.json.',
|
|
525
525
|
);
|
|
526
526
|
} else {
|
|
527
527
|
context.checks.push(
|
|
@@ -533,17 +533,17 @@ async function checkPackageJson(context) {
|
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
if (context.cfg.reservedAdapterNames.includes(adapterName)) {
|
|
536
|
-
context.errors.push('[
|
|
536
|
+
context.errors.push('[E0022] Adapter name is reserved. Please rename adapter.');
|
|
537
537
|
} else {
|
|
538
538
|
context.checks.push('Adapter name is not reserved');
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
if (!context.cfg.onlyWWW && !context.packageJson.dependencies) {
|
|
542
|
-
context.errors.push('[
|
|
542
|
+
context.errors.push('[W0030] No dependencies declared at package.json. Is this really correct?');
|
|
543
543
|
}
|
|
544
544
|
|
|
545
545
|
if (!context.packageJson.devDependencies) {
|
|
546
|
-
context.errors.push('[
|
|
546
|
+
context.errors.push('[E0031] No devDependencies declared at package.json. Please correct package.json');
|
|
547
547
|
}
|
|
548
548
|
|
|
549
549
|
// check for blacklisted dependencies
|
|
@@ -559,9 +559,9 @@ async function checkPackageJson(context) {
|
|
|
559
559
|
|
|
560
560
|
// if (context.packageJson.dependencies[blacklist]) {
|
|
561
561
|
// if (blacklistedDependenciesPackageJson[blacklist].err) {
|
|
562
|
-
// context.errors.push(`[
|
|
562
|
+
// context.errors.push(`[E0050] ${blacklistedDependenciesPackageJson[blacklist].msg}`);
|
|
563
563
|
// } else {
|
|
564
|
-
// context.warnings.push(`[
|
|
564
|
+
// context.warnings.push(`[W0050] ${blacklistedDependenciesPackageJson[blacklist].msg}`);
|
|
565
565
|
// }
|
|
566
566
|
// passed = false;
|
|
567
567
|
// }
|
|
@@ -570,14 +570,14 @@ async function checkPackageJson(context) {
|
|
|
570
570
|
if (regexp.test(dependency)) {
|
|
571
571
|
if (blacklistedDependenciesPackageJson[blacklist].err) {
|
|
572
572
|
context.errors.push(
|
|
573
|
-
`[
|
|
573
|
+
`[E0050] ${blacklistedDependenciesPackageJson[blacklist].msg}`.replace(
|
|
574
574
|
'${dependency}',
|
|
575
575
|
dependency,
|
|
576
576
|
),
|
|
577
577
|
);
|
|
578
578
|
} else {
|
|
579
579
|
context.warnings.push(
|
|
580
|
-
`[
|
|
580
|
+
`[W0050] ${blacklistedDependenciesPackageJson[blacklist].msg}`.replace(
|
|
581
581
|
'${dependency}',
|
|
582
582
|
dependency,
|
|
583
583
|
),
|
|
@@ -605,9 +605,9 @@ async function checkPackageJson(context) {
|
|
|
605
605
|
|
|
606
606
|
// if (context.packageJson.devDependencies[blacklist]) {
|
|
607
607
|
// if (blacklistedDevDependenciesPackageJson[blacklist].err) {
|
|
608
|
-
// context.errors.push(`[
|
|
608
|
+
// context.errors.push(`[E0050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`);
|
|
609
609
|
// } else {
|
|
610
|
-
// context.warnings.push(`[
|
|
610
|
+
// context.warnings.push(`[W0050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`);
|
|
611
611
|
// }
|
|
612
612
|
// passed = false;
|
|
613
613
|
// }
|
|
@@ -616,14 +616,14 @@ async function checkPackageJson(context) {
|
|
|
616
616
|
if (regexp.test(devDependency)) {
|
|
617
617
|
if (blacklistedDevDependenciesPackageJson[blacklist].err) {
|
|
618
618
|
context.errors.push(
|
|
619
|
-
`[
|
|
619
|
+
`[E0050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`.replace(
|
|
620
620
|
'${devDependency}',
|
|
621
621
|
devDependency,
|
|
622
622
|
),
|
|
623
623
|
);
|
|
624
624
|
} else {
|
|
625
625
|
context.warnings.push(
|
|
626
|
-
`[
|
|
626
|
+
`[W0050] ${blacklistedDevDependenciesPackageJson[blacklist].msg}`.replace(
|
|
627
627
|
'${devDependency}',
|
|
628
628
|
devDependency,
|
|
629
629
|
),
|
|
@@ -651,9 +651,9 @@ async function checkPackageJson(context) {
|
|
|
651
651
|
|
|
652
652
|
if (context.packageJson.peerDependencies[blacklist]) {
|
|
653
653
|
if (blacklistedPeerDependenciesPackageJson[blacklist].err) {
|
|
654
|
-
context.errors.push(`[
|
|
654
|
+
context.errors.push(`[E0050] ${blacklistedPeerDependenciesPackageJson[blacklist].msg}`);
|
|
655
655
|
} else {
|
|
656
|
-
context.warnings.push(`[
|
|
656
|
+
context.warnings.push(`[W0050] ${blacklistedPeerDependenciesPackageJson[blacklist].msg}`);
|
|
657
657
|
}
|
|
658
658
|
passed = false;
|
|
659
659
|
}
|
|
@@ -676,9 +676,9 @@ async function checkPackageJson(context) {
|
|
|
676
676
|
|
|
677
677
|
if (context.packageJson.optionalDependencies[blacklist]) {
|
|
678
678
|
if (blacklistedOptionalDependenciesPackageJson[blacklist].err) {
|
|
679
|
-
context.errors.push(`[
|
|
679
|
+
context.errors.push(`[E0052] ${blacklistedOptionalDependenciesPackageJson[blacklist].msg}`);
|
|
680
680
|
} else {
|
|
681
|
-
context.warnings.push(`[
|
|
681
|
+
context.warnings.push(`[W0053] ${blacklistedOptionalDependenciesPackageJson[blacklist].msg}`);
|
|
682
682
|
}
|
|
683
683
|
passed = false;
|
|
684
684
|
}
|
|
@@ -693,7 +693,7 @@ async function checkPackageJson(context) {
|
|
|
693
693
|
if (context.packageJson.devDependencies) {
|
|
694
694
|
for (const dependency in context.packageJson.devDependencies) {
|
|
695
695
|
if (context.packageJson.dependencies && context.packageJson.dependencies[dependency]) {
|
|
696
|
-
context.errors.push(`[
|
|
696
|
+
context.errors.push(`[E0060] ${dependency} listed as dependency and as devDependency.`);
|
|
697
697
|
passed = false;
|
|
698
698
|
}
|
|
699
699
|
}
|
|
@@ -701,11 +701,11 @@ async function checkPackageJson(context) {
|
|
|
701
701
|
if (context.packageJson.peerDependencies) {
|
|
702
702
|
for (const dependency in context.packageJson.peerDependencies) {
|
|
703
703
|
if (context.packageJson.dependencies && context.packageJson.dependencies[dependency]) {
|
|
704
|
-
context.errors.push(`[
|
|
704
|
+
context.errors.push(`[E0060] ${dependency} listed as dependency and as peerDependency.`);
|
|
705
705
|
passed = false;
|
|
706
706
|
}
|
|
707
707
|
if (context.packageJson.devDependencies && context.packageJson.devDependencies[dependency]) {
|
|
708
|
-
context.errors.push(`[
|
|
708
|
+
context.errors.push(`[E0060] ${dependency} listed as devDependency and as peerDependency.`);
|
|
709
709
|
passed = false;
|
|
710
710
|
}
|
|
711
711
|
}
|
|
@@ -713,15 +713,15 @@ async function checkPackageJson(context) {
|
|
|
713
713
|
if (context.packageJson.optionalDependencies) {
|
|
714
714
|
for (const dependency in context.packageJson.optionalDependencies) {
|
|
715
715
|
if (context.packageJson.dependencies && context.packageJson.dependencies[dependency]) {
|
|
716
|
-
context.errors.push(`[
|
|
716
|
+
context.errors.push(`[E0060] ${dependency} listed as dependency and as optionalDependency.`);
|
|
717
717
|
passed = false;
|
|
718
718
|
}
|
|
719
719
|
if (context.packageJson.devDependencies && context.packageJson.devDependencies[dependency]) {
|
|
720
|
-
context.errors.push(`[
|
|
720
|
+
context.errors.push(`[E0060] ${dependency} listed as devDependency and as optionalDependency.`);
|
|
721
721
|
passed = false;
|
|
722
722
|
}
|
|
723
723
|
if (context.packageJson.peerDependencies && context.packageJson.peerDependencies[dependency]) {
|
|
724
|
-
context.errors.push(`[
|
|
724
|
+
context.errors.push(`[E0060] ${dependency} listed as peerDependency and as optionalDependency.`);
|
|
725
725
|
passed = false;
|
|
726
726
|
}
|
|
727
727
|
}
|
|
@@ -734,12 +734,12 @@ async function checkPackageJson(context) {
|
|
|
734
734
|
if (!context.cfg.onlyWWW) {
|
|
735
735
|
if (!context.packageJson.engines) {
|
|
736
736
|
context.errors.push(
|
|
737
|
-
`[
|
|
737
|
+
`[E0026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended`,
|
|
738
738
|
);
|
|
739
739
|
} else {
|
|
740
740
|
if (!context.packageJson.engines.node) {
|
|
741
741
|
context.errors.push(
|
|
742
|
-
`[
|
|
742
|
+
`[E0026] "{'engines': {'node'>='${requiredNodeVersion}'}}" is required at package.json, "{'engines':{'node'>='${recommendedNodeVersion}'}}" is recommended`,
|
|
743
743
|
);
|
|
744
744
|
} else {
|
|
745
745
|
context.checks.push('engines attribute containing node requirements exist.');
|
|
@@ -750,22 +750,22 @@ async function checkPackageJson(context) {
|
|
|
750
750
|
const match = nodeVal.match(/^(?<cmp>[<>=~]+)?\s*(?<vers>\d+(\.\d+(\.\d+)?)?(-\w+\.\d+)?)/m);
|
|
751
751
|
if (!match) {
|
|
752
752
|
context.warnings.push(
|
|
753
|
-
`[
|
|
753
|
+
`[W0027] Engines clause at package.json ({'engines' : { 'node' : '${nodeVal}' } }") is not parseable.`,
|
|
754
754
|
);
|
|
755
755
|
} else {
|
|
756
756
|
common.debug(`node check: ${JSON.stringify(match.groups)}`);
|
|
757
757
|
if (match.groups.cmp !== '>' && match.groups.cmp !== '>=') {
|
|
758
758
|
context.warnings.push(
|
|
759
|
-
`[
|
|
759
|
+
`[W0028] Minimum node.js version ${recommendedNodeVersion} recommended. Please change "{'engines' : { 'node' >= '${match.groups.vers}' } }" to "{'engines' : { 'node' >= '${recommendedNodeVersion}' } }" at package.json.`,
|
|
760
760
|
);
|
|
761
761
|
} else {
|
|
762
762
|
if (!compareVersions.compare(match.groups.vers, requiredNodeVersion, '>=')) {
|
|
763
763
|
context.errors.push(
|
|
764
|
-
`[
|
|
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.`,
|
|
765
765
|
);
|
|
766
766
|
} else if (!compareVersions.compare(match.groups.vers, recommendedNodeVersion, '>=')) {
|
|
767
767
|
context.warnings.push(
|
|
768
|
-
`[
|
|
768
|
+
`[W0028] Minimum node.js version ${recommendedNodeVersion} recommended. Please adapt "{'engines' : { 'node' >= '${match.groups.vers}' } }" to "{'engines' : { 'node' >= '${recommendedNodeVersion}' } }" at package.json.`,
|
|
769
769
|
);
|
|
770
770
|
} else {
|
|
771
771
|
context.checks.push(
|
|
@@ -803,11 +803,11 @@ async function checkPackageJson(context) {
|
|
|
803
803
|
// if dependency exists, version requirements must be met
|
|
804
804
|
if (!compareVersions.compare(dependencyVersion, requiredVersion, '>=')) {
|
|
805
805
|
context.errors.push(
|
|
806
|
-
`[
|
|
806
|
+
`[E0033] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update dependencies at package.json`,
|
|
807
807
|
);
|
|
808
808
|
} else if (!compareVersions.compare(dependencyVersion, recommendedVersion, '>=')) {
|
|
809
809
|
context.warnings.push(
|
|
810
|
-
`[
|
|
810
|
+
`[W0034] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating dependencies at package.json`,
|
|
811
811
|
);
|
|
812
812
|
} else {
|
|
813
813
|
context.checks.push(`dependency ${dependency} ${dependencyVersion} is ok`);
|
|
@@ -825,11 +825,11 @@ async function checkPackageJson(context) {
|
|
|
825
825
|
} else if (optional) {
|
|
826
826
|
context.checks.push(`dependency ${dependency} is optional`);
|
|
827
827
|
if (suggested) {
|
|
828
|
-
context.warnings.push(`[
|
|
828
|
+
context.warnings.push(`[S0061] Consider using "${dependency}".`);
|
|
829
829
|
}
|
|
830
830
|
} else {
|
|
831
831
|
context.errors.push(
|
|
832
|
-
`[
|
|
832
|
+
`[E0032] No dependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to dependencies at package.json`,
|
|
833
833
|
);
|
|
834
834
|
}
|
|
835
835
|
}
|
|
@@ -859,11 +859,11 @@ async function checkPackageJson(context) {
|
|
|
859
859
|
// if dependency exists, version requirements must be met
|
|
860
860
|
if (!compareVersions.compare(dependencyVersion, requiredVersion, '>=')) {
|
|
861
861
|
context.errors.push(
|
|
862
|
-
`[
|
|
862
|
+
`[E0036] ${dependency} ${dependencyVersion} specified. ${requiredVersion} is required as minimum, ${recommendedVersion} is recommended. Please update devDependencies at package.json`,
|
|
863
863
|
);
|
|
864
864
|
} else if (!compareVersions.compare(dependencyVersion, recommendedVersion, '>=')) {
|
|
865
865
|
context.warnings.push(
|
|
866
|
-
`[
|
|
866
|
+
`[W0037] ${dependency} ${dependencyVersion} specified. ${recommendedVersion} is recommended. Please consider updating devDependencies at package.json`,
|
|
867
867
|
);
|
|
868
868
|
} else {
|
|
869
869
|
context.checks.push(`devDependency ${dependency} ${dependencyVersion} is ok`);
|
|
@@ -881,11 +881,11 @@ async function checkPackageJson(context) {
|
|
|
881
881
|
} else if (optional) {
|
|
882
882
|
context.checks.push(`devDependency ${dependency} is optional`);
|
|
883
883
|
if (suggested) {
|
|
884
|
-
context.warnings.push(`[
|
|
884
|
+
context.warnings.push(`[S0062] Consider using "${dependency}".`);
|
|
885
885
|
}
|
|
886
886
|
} else {
|
|
887
887
|
context.errors.push(
|
|
888
|
-
`[
|
|
888
|
+
`[E0035] No devDependency declared for ${dependency}. Please add "${dependency}":"${recommendedVersion}" to devDependencies at package.json`,
|
|
889
889
|
);
|
|
890
890
|
}
|
|
891
891
|
}
|
|
@@ -905,15 +905,15 @@ async function checkPackageJson(context) {
|
|
|
905
905
|
const dependencyVersion = context.packageJson.dependencies[dependency];
|
|
906
906
|
if (dependencyVersion.toLowerCase().includes('github.com')) {
|
|
907
907
|
context.warnings.push(
|
|
908
|
-
`[
|
|
908
|
+
`[W0043] dependency should not require a github version. Please change "${dependency}:${dependencyVersion}"`,
|
|
909
909
|
);
|
|
910
910
|
} else if (dependencyVersion === '*') {
|
|
911
911
|
context.warnings.push(
|
|
912
|
-
`[
|
|
912
|
+
`[W0056] Wildcard dependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
|
|
913
913
|
);
|
|
914
914
|
} else if (!common.validateSemver(dependencyVersion)) {
|
|
915
915
|
context.errors.push(
|
|
916
|
-
`[
|
|
916
|
+
`[E0054] malformed dependency detected "${dependency}":"${dependencyVersion}". Please fix at package.json.`,
|
|
917
917
|
);
|
|
918
918
|
} else if (
|
|
919
919
|
!context.packageJson.dependencies[dependency].startsWith('^') &&
|
|
@@ -923,11 +923,11 @@ async function checkPackageJson(context) {
|
|
|
923
923
|
) {
|
|
924
924
|
if (enforcedDependencies.includes(dependency)) {
|
|
925
925
|
context.errors.push(
|
|
926
|
-
`[
|
|
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]}"`,
|
|
927
927
|
);
|
|
928
928
|
} else {
|
|
929
929
|
context.warnings.push(
|
|
930
|
-
`[
|
|
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]}"`,
|
|
931
931
|
);
|
|
932
932
|
}
|
|
933
933
|
}
|
|
@@ -937,15 +937,15 @@ async function checkPackageJson(context) {
|
|
|
937
937
|
const dependencyVersion = context.packageJson.devDependencies[dependency];
|
|
938
938
|
if (dependencyVersion.toLowerCase().includes('github.com')) {
|
|
939
939
|
context.warnings.push(
|
|
940
|
-
`[
|
|
940
|
+
`[W0045] devDependency should not require github versions. Please change "${dependency}":"${dependencyVersion}"`,
|
|
941
941
|
);
|
|
942
942
|
} else if (dependencyVersion === '*') {
|
|
943
943
|
context.warnings.push(
|
|
944
|
-
`[
|
|
944
|
+
`[W0057] Wildcard devDependencies should be avoided "${dependency}":"${dependencyVersion}". Use "~1.2.3" or "^1.2.3" syntax at package.json.`,
|
|
945
945
|
);
|
|
946
946
|
} else if (!common.validateSemver(dependencyVersion)) {
|
|
947
947
|
context.errors.push(
|
|
948
|
-
`[
|
|
948
|
+
`[E0055] malformed dependency detected "${dependency}":"${dependencyVersion}". Please fix at package.json.`,
|
|
949
949
|
);
|
|
950
950
|
} else if (
|
|
951
951
|
!context.packageJson.devDependencies[dependency].startsWith('^') &&
|
|
@@ -955,18 +955,18 @@ async function checkPackageJson(context) {
|
|
|
955
955
|
) {
|
|
956
956
|
if (enforcedDependencies.includes(dependency)) {
|
|
957
957
|
context.errors.push(
|
|
958
|
-
`[
|
|
958
|
+
`[E0046] devDependency must not require a specific version. Use "~1.2.3" or "^1.2.3" syntax. Please update "${dependency}:${dependencyVersion}"`,
|
|
959
959
|
);
|
|
960
960
|
} else {
|
|
961
961
|
context.warnings.push(
|
|
962
|
-
`[
|
|
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]}"`,
|
|
963
963
|
);
|
|
964
964
|
}
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
967
|
|
|
968
968
|
if (!context.packageJson.keywords || !Array.isArray(context.packageJson.keywords)) {
|
|
969
|
-
context.errors.push('[
|
|
969
|
+
context.errors.push('[E0039] "keywords" must be an array within package.json and contain some useful keywords');
|
|
970
970
|
} else {
|
|
971
971
|
const forbiddenKeywords = [];
|
|
972
972
|
const ignoredKeywords = ['iobroker', 'smart home', 'smarthome', 'home automation', 'template'];
|
|
@@ -980,12 +980,12 @@ async function checkPackageJson(context) {
|
|
|
980
980
|
0
|
|
981
981
|
) {
|
|
982
982
|
context.errors.push(
|
|
983
|
-
`[
|
|
983
|
+
`[E0049] "keywords" within package.json must contain some keywords besides "${context.packageJson.keywords.join(', ')}" related to adapter`,
|
|
984
984
|
);
|
|
985
985
|
}
|
|
986
986
|
if (!(recommendedKeywords.filter(keyword => context.packageJson.keywords.includes(keyword)).length > 0)) {
|
|
987
987
|
context.warnings.push(
|
|
988
|
-
`[
|
|
988
|
+
`[W0040] "keywords" within package.json should contain "${recommendedKeywords.join(', ')}"`,
|
|
989
989
|
);
|
|
990
990
|
}
|
|
991
991
|
if (
|
|
@@ -994,7 +994,7 @@ async function checkPackageJson(context) {
|
|
|
994
994
|
).length > 0
|
|
995
995
|
) {
|
|
996
996
|
context.warnings.push(
|
|
997
|
-
`[
|
|
997
|
+
`[W0041] "keywords" within package.json should not contain "${forbiddenKeywords.join(', ')}"`,
|
|
998
998
|
);
|
|
999
999
|
}
|
|
1000
1000
|
|
|
@@ -1003,7 +1003,7 @@ async function checkPackageJson(context) {
|
|
|
1003
1003
|
|
|
1004
1004
|
if (context.packageJson.globalDependencies) {
|
|
1005
1005
|
context.errors.push(
|
|
1006
|
-
'[
|
|
1006
|
+
'[E0042] "globalDependencies" is misplaced at package.json. Did you mean "common.globalDependencies" at io-package.json?',
|
|
1007
1007
|
);
|
|
1008
1008
|
} else {
|
|
1009
1009
|
context.checks.push('"globalDependencies" not found in package.json');
|
|
@@ -1022,69 +1022,69 @@ exports.validateReleaseFormat = validateReleaseFormat;
|
|
|
1022
1022
|
// List of error and warnings used at this module
|
|
1023
1023
|
// ----------------------------------------------
|
|
1024
1024
|
|
|
1025
|
-
// [
|
|
1026
|
-
// [
|
|
1027
|
-
// [
|
|
1028
|
-
// [
|
|
1029
|
-
// [
|
|
1030
|
-
// [
|
|
1031
|
-
// [
|
|
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
|
|
1032
1032
|
// 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
|
-
// [
|
|
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`
|