@eui/tools 6.20.3 → 6.20.4
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/.version.properties +1 -1
- package/CHANGELOG.md +9 -0
- package/package.json +1 -1
- package/scripts/csdr/audit/styles.js +46 -35
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.20.
|
|
1
|
+
6.20.4
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 6.20.4 (2024-08-07)
|
|
2
|
+
|
|
3
|
+
##### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* audit-styles for standalone pkg release - EUI-9788 [EUI-9788](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-9788) ([fafdcc2a](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/fafdcc2a9a32da15aeab49faec46da7d79b749c8))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
1
10
|
## 6.20.3 (2024-08-07)
|
|
2
11
|
|
|
3
12
|
##### Bug Fixes
|
package/package.json
CHANGED
|
@@ -76,7 +76,11 @@ const runStylesAudit = (module.exports.runStylesAudit = (pkg, customPath) => {
|
|
|
76
76
|
if (pkg.srcRootDefault) {
|
|
77
77
|
srcPath = pkg.paths.src;
|
|
78
78
|
} else {
|
|
79
|
-
|
|
79
|
+
if (pkg.standalone) {
|
|
80
|
+
srcPath = pkg.paths.src;
|
|
81
|
+
} else {
|
|
82
|
+
srcPath = pkg.paths.root;
|
|
83
|
+
}
|
|
80
84
|
}
|
|
81
85
|
tools.logTitle(`Auditing : ${pkg.name}`);
|
|
82
86
|
}
|
|
@@ -419,41 +423,42 @@ const runStylesAudit = (module.exports.runStylesAudit = (pkg, customPath) => {
|
|
|
419
423
|
|
|
420
424
|
|
|
421
425
|
// Analyzing 3rd party dependencies usage
|
|
426
|
+
if (!pkg.standalone) {
|
|
427
|
+
tools.logInfo('Analyzing package deps for 3rd parties usage');
|
|
428
|
+
let deps = installUtils.packages.getLocalPackageDepsAll(pkg);
|
|
429
|
+
tools.logInfo('Deps found for package :');
|
|
430
|
+
deps = Object.keys(deps);
|
|
431
|
+
console.log(deps);
|
|
432
|
+
|
|
433
|
+
const allowedScopes = configUtils.packages.getPackageScopes();
|
|
434
|
+
const exclusions = ['ag-grid', 'file-saver'];
|
|
435
|
+
|
|
436
|
+
let thirdPartyDeps = [];
|
|
437
|
+
deps.forEach((d) => {
|
|
438
|
+
const scope = d.split('/')[0];
|
|
439
|
+
|
|
440
|
+
// checking against allowed CSDR known package scopes
|
|
441
|
+
if (!allowedScopes.includes(scope)) {
|
|
442
|
+
// exclusions known
|
|
443
|
+
let exclusionFound = false;
|
|
444
|
+
exclusions.forEach((exc) => {
|
|
445
|
+
if (scope.indexOf(exc) > -1) {
|
|
446
|
+
exclusionFound = true;
|
|
447
|
+
}
|
|
448
|
+
});
|
|
422
449
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
tools.logInfo('Deps found for package :');
|
|
426
|
-
deps = Object.keys(deps);
|
|
427
|
-
console.log(deps);
|
|
428
|
-
|
|
429
|
-
const allowedScopes = configUtils.packages.getPackageScopes();
|
|
430
|
-
const exclusions = ['ag-grid', 'file-saver'];
|
|
431
|
-
|
|
432
|
-
let thirdPartyDeps = [];
|
|
433
|
-
deps.forEach((d) => {
|
|
434
|
-
const scope = d.split('/')[0];
|
|
435
|
-
|
|
436
|
-
// checking against allowed CSDR known package scopes
|
|
437
|
-
if (!allowedScopes.includes(scope)) {
|
|
438
|
-
// exclusions known
|
|
439
|
-
let exclusionFound = false;
|
|
440
|
-
exclusions.forEach((exc) => {
|
|
441
|
-
if (scope.indexOf(exc) > -1) {
|
|
442
|
-
exclusionFound = true;
|
|
450
|
+
if (!exclusionFound) {
|
|
451
|
+
thirdPartyDeps.push(d);
|
|
443
452
|
}
|
|
444
|
-
});
|
|
445
|
-
|
|
446
|
-
if (!exclusionFound) {
|
|
447
|
-
thirdPartyDeps.push(d);
|
|
448
453
|
}
|
|
449
|
-
}
|
|
450
|
-
});
|
|
454
|
+
});
|
|
451
455
|
|
|
452
|
-
|
|
453
|
-
|
|
456
|
+
tools.logInfo('3rd party deps found for package :');
|
|
457
|
+
console.log(thirdPartyDeps);
|
|
454
458
|
|
|
455
|
-
|
|
456
|
-
|
|
459
|
+
report.thirdPartyDependencies.count = thirdPartyDeps.length;
|
|
460
|
+
report.thirdPartyDependencies.dependencies = thirdPartyDeps;
|
|
461
|
+
}
|
|
457
462
|
|
|
458
463
|
// GLOBAL STATS - ANALYZING DATA / SET STATUS
|
|
459
464
|
|
|
@@ -719,11 +724,17 @@ module.exports.audit = (pkg) => {
|
|
|
719
724
|
})
|
|
720
725
|
|
|
721
726
|
.then(() => {
|
|
722
|
-
|
|
723
|
-
const configOptions = configUtils.global.getConfigOptions();
|
|
727
|
+
let configOptions, euiVersion;
|
|
724
728
|
|
|
725
|
-
// getting
|
|
726
|
-
|
|
729
|
+
// getting config options for gates defined and euiVersion
|
|
730
|
+
if (pkg.standalone) {
|
|
731
|
+
configOptions = configUtils.global.getConfigOptionsStandalone();
|
|
732
|
+
euiVersion = configUtils.packages.getPackageEuiVersion(pkg);
|
|
733
|
+
|
|
734
|
+
} else {
|
|
735
|
+
configOptions = configUtils.global.getConfigOptions();
|
|
736
|
+
euiVersion = configUtils.global.getLocalEuiVersion();
|
|
737
|
+
}
|
|
727
738
|
|
|
728
739
|
// if eUI version not found, no action
|
|
729
740
|
if (!euiVersion) {
|