@eui/tools 6.11.20 → 6.11.22
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 +22 -0
- package/package.json +1 -1
- package/scripts/csdr/audit/styles.js +62 -13
- package/scripts/csdr/config/global.js +14 -0
- package/scripts/csdr/init/remotes/16.x/full/common/app/module.ts +0 -4
- package/scripts/csdr/metadata/package.js +4 -0
- package/scripts/csdr/release/package/release-ui.js +0 -6
- package/scripts/utils/build/package/angular.js +8 -1
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.11.
|
|
1
|
+
6.11.22
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## 6.11.22 (2023-05-15)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* prevent hotfix for dev/tst releases of remotes - added gates for styles audit (v16+) - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([4e85e2a5](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/4e85e2a50b88ff889e15eedcb22276a7ef7c6a5e))
|
|
7
|
+
##### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **other:**
|
|
10
|
+
* styles gates values comparison - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([3fb7a751](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/3fb7a751ab2f15b395de30f9a24102902f1b9cb2))
|
|
11
|
+
|
|
12
|
+
* * *
|
|
13
|
+
* * *
|
|
14
|
+
## 6.11.21 (2023-05-11)
|
|
15
|
+
|
|
16
|
+
##### Chores
|
|
17
|
+
|
|
18
|
+
* **other:**
|
|
19
|
+
* adapted v16 remote sources - MWP-9608 [MWP-9608](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9608) ([f325715e](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/f325715e3eedf8df17b2911e439e8131b8e4b418))
|
|
20
|
+
|
|
21
|
+
* * *
|
|
22
|
+
* * *
|
|
1
23
|
## 6.11.20 (2023-05-11)
|
|
2
24
|
|
|
3
25
|
##### Chores
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ const glob = require('glob');
|
|
|
7
7
|
// LOCAL
|
|
8
8
|
const tools = require('../../utils/tools');
|
|
9
9
|
const notificationUtils = require('../../utils/notification/notification-utils');
|
|
10
|
+
const configUtils = require('../config/config-utils');
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
const runStylesAudit = module.exports.runStylesAudit = (pkg, customPath) => {
|
|
@@ -371,13 +372,13 @@ const runStylesAudit = module.exports.runStylesAudit = (pkg, customPath) => {
|
|
|
371
372
|
description: 'material component usage found in HTML',
|
|
372
373
|
value: report.material.count,
|
|
373
374
|
status: (report.material.count !== 0) ? 'CRITICAL' : 'OK',
|
|
374
|
-
comment: (report.material.count !== 0) ? 'Usage of material should be avoided' : null
|
|
375
|
+
comment: (report.material.count !== 0) ? 'Usage of material should be avoided - this will be blocking as of eUI 16' : null
|
|
375
376
|
}
|
|
376
377
|
report.finalReport['primeng'] = {
|
|
377
378
|
description: 'PrimeNG components usage found in HTML',
|
|
378
379
|
value: report.primeng.count,
|
|
379
380
|
status: (report.primeng.count !== 0) ? 'CRITICAL' : 'OK',
|
|
380
|
-
comment: (report.primeng.count !== 0) ? 'Remove any PrimeNG usage, deprecated in eUI' : null
|
|
381
|
+
comment: (report.primeng.count !== 0) ? 'Remove any PrimeNG usage, deprecated in eUI - this will be blocking as of eUI 16' : null
|
|
381
382
|
}
|
|
382
383
|
|
|
383
384
|
// IMPROVE ONLY
|
|
@@ -445,16 +446,14 @@ module.exports.audit = (pkg) => {
|
|
|
445
446
|
|
|
446
447
|
tools.logTitle('Audit package styles');
|
|
447
448
|
|
|
448
|
-
|
|
449
|
-
.then(() => {
|
|
450
|
-
|
|
451
|
-
const report = runStylesAudit(pkg);
|
|
452
|
-
|
|
453
|
-
if (!report) {
|
|
454
|
-
return;
|
|
455
|
-
}
|
|
449
|
+
const report = runStylesAudit(pkg);
|
|
456
450
|
|
|
451
|
+
if (!report) {
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
457
454
|
|
|
455
|
+
return Promise.resolve()
|
|
456
|
+
.then(() => {
|
|
458
457
|
// FINAL REPORT
|
|
459
458
|
|
|
460
459
|
let finalReportMessage = `*STYLES AUDIT REPORT for ${pkg.name}:*\n\n`;
|
|
@@ -482,10 +481,60 @@ module.exports.audit = (pkg) => {
|
|
|
482
481
|
package: pkg,
|
|
483
482
|
text: finalReportMessage
|
|
484
483
|
});
|
|
484
|
+
})
|
|
485
485
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
486
|
+
.then(() => {
|
|
487
|
+
// getting config options for gates defined
|
|
488
|
+
const configOptions = configUtils.global.getConfigOptions();
|
|
489
|
+
|
|
490
|
+
// getting local csdr euiVersion
|
|
491
|
+
const euiVersion = configUtils.global.getLocalEuiVersion();
|
|
492
|
+
|
|
493
|
+
// if eUI version not found, no action
|
|
494
|
+
if (!euiVersion) {
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
// getting gates for euiVersion found
|
|
499
|
+
const gates = configOptions.AUDIT_STYLES_GATES[euiVersion];
|
|
500
|
+
|
|
501
|
+
tools.logTitle(`Checking audit styles gates for local euiVersion : ${euiVersion}`);
|
|
502
|
+
|
|
503
|
+
// if no gates found for corresponding version, no action
|
|
504
|
+
if (!gates) {
|
|
505
|
+
tools.logInfo('No gates found for local eUI version...skipping');
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
tools.logInfo(`Gates found : ${JSON.stringify(gates)}`);
|
|
510
|
+
|
|
511
|
+
// checking gates level if any
|
|
512
|
+
let gatesPassed = true;
|
|
513
|
+
|
|
514
|
+
Object.keys(report.finalReport).forEach((styleCategory) => {
|
|
515
|
+
tools.logInfo(`Checking audit styles category : ${styleCategory} - item found ${report.finalReport[styleCategory].value}`);
|
|
516
|
+
|
|
517
|
+
if (gates[styleCategory] === undefined) {
|
|
518
|
+
tools.logInfo(`No gates found for category`);
|
|
519
|
+
tools.logInfo(`===> PASSED`);
|
|
520
|
+
} else {
|
|
521
|
+
tools.logInfo(`Gates found for category maxium allowed : ${gates[styleCategory]}`);
|
|
522
|
+
if (report.finalReport[styleCategory].value > gates[styleCategory]) {
|
|
523
|
+
tools.logError(`===> FAILED`);
|
|
524
|
+
gatesPassed = false;
|
|
525
|
+
} else {
|
|
526
|
+
tools.logInfo(`===> PASSED`);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
})
|
|
530
|
+
|
|
531
|
+
if (!gatesPassed) {
|
|
532
|
+
throw new Error('AUDIT_STYLES_GATES_FAILED');
|
|
533
|
+
}
|
|
534
|
+
})
|
|
535
|
+
|
|
536
|
+
.catch((e) => {
|
|
537
|
+
throw e;
|
|
489
538
|
})
|
|
490
539
|
|
|
491
540
|
}
|
|
@@ -236,6 +236,7 @@ module.exports.getConfigOptions = () => {
|
|
|
236
236
|
MSTEAMS_CHANNELS_EMAILS: null,
|
|
237
237
|
API_HOST: null,
|
|
238
238
|
AUDIT_DEPENDENCIES_GATES: null,
|
|
239
|
+
AUDIT_STYLES_GATES: null
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
// getting devops metadata options
|
|
@@ -374,6 +375,19 @@ module.exports.getConfigOptions = () => {
|
|
|
374
375
|
})
|
|
375
376
|
}
|
|
376
377
|
}
|
|
378
|
+
|
|
379
|
+
if (audit.styles) {
|
|
380
|
+
if (audit.styles.gates) {
|
|
381
|
+
configOptions.AUDIT_STYLES_GATES = [];
|
|
382
|
+
Object.keys(audit.styles.gates).forEach((v) => {
|
|
383
|
+
const gatesForVersion = audit.styles.gates[v];
|
|
384
|
+
configOptions.AUDIT_STYLES_GATES[v] = {
|
|
385
|
+
"material": gatesForVersion.material,
|
|
386
|
+
"primeng": gatesForVersion.primeng
|
|
387
|
+
};
|
|
388
|
+
})
|
|
389
|
+
}
|
|
390
|
+
}
|
|
377
391
|
}
|
|
378
392
|
|
|
379
393
|
|
|
@@ -262,6 +262,10 @@ module.exports.getPackageVersionsByMajor = (pkg, major, isMaster) => {
|
|
|
262
262
|
tools.logInfo(`----> ${versions.length} metadata versions non-master release for major`);
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
+
tools.logInfo('----> exluding hotfix package versions type');
|
|
266
|
+
versions = versions.filter(v => !v.hotfix);
|
|
267
|
+
tools.logInfo(`----> ${versions.length} metadata versions excluding hotfix version type`);
|
|
268
|
+
|
|
265
269
|
return versions;
|
|
266
270
|
}
|
|
267
271
|
}
|
|
@@ -103,12 +103,6 @@ module.exports.run = () => {
|
|
|
103
103
|
.then(() => {
|
|
104
104
|
return innerUi.install(pkg, branches.isMaster);
|
|
105
105
|
})
|
|
106
|
-
// CHECK STYLES USAGE
|
|
107
|
-
.then(() => {
|
|
108
|
-
if (!pkg.build || (pkg.build && !pkg.build.skipAudit)) {
|
|
109
|
-
return auditUtils.styles.audit(pkg);
|
|
110
|
-
}
|
|
111
|
-
})
|
|
112
106
|
|
|
113
107
|
// AUDIT DEPENDENCIES
|
|
114
108
|
.then(() => {
|
|
@@ -8,6 +8,7 @@ const execa = require('execa');
|
|
|
8
8
|
const tools = require('../../tools');
|
|
9
9
|
const notificationUtils = require('../../notification/notification-utils');
|
|
10
10
|
const cleanUtils = require('../../clean/clean-utils');
|
|
11
|
+
const auditUtils = require('../../../csdr/audit/audit-utils');
|
|
11
12
|
|
|
12
13
|
module.exports.build = (pkg, isMaster) => {
|
|
13
14
|
|
|
@@ -16,7 +17,7 @@ module.exports.build = (pkg, isMaster) => {
|
|
|
16
17
|
const ng = path.resolve(process.cwd(), 'node_modules', '@angular', 'cli', 'bin', 'ng');
|
|
17
18
|
|
|
18
19
|
// FETCH ARGS
|
|
19
|
-
let { deps, skipClean, skipLint, skipTest, skipCompile, skipDoc, build } = pkg.build? {...pkg.build, ...tools.getArgs()} : tools.getArgs();
|
|
20
|
+
let { deps, skipClean, skipLint, skipTest, skipCompile, skipDoc, build, skipAudit } = pkg.build? {...pkg.build, ...tools.getArgs()} : tools.getArgs();
|
|
20
21
|
|
|
21
22
|
return Promise.resolve()
|
|
22
23
|
.then(() => {
|
|
@@ -86,6 +87,12 @@ module.exports.build = (pkg, isMaster) => {
|
|
|
86
87
|
if (!skipTest) {
|
|
87
88
|
tools.logSuccess();
|
|
88
89
|
}
|
|
90
|
+
|
|
91
|
+
if (!skipAudit) {
|
|
92
|
+
return auditUtils.styles.audit(pkg);
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
.then(() => {
|
|
89
96
|
if (!skipCompile) {
|
|
90
97
|
tools.logInfo('Bundling package...');
|
|
91
98
|
let args = ['--max_old_space_size=8096', ng, 'build', pkg.name];
|