@eui/tools 6.3.28 → 6.3.29
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.3.
|
|
1
|
+
6.3.29
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 6.3.29 (2023-02-12)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* adapted v15 resolutions for detected vulnerabilities check - adapted styles audit for css files - MWP-9204 [MWP-9204](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9204) ([d61eeedd](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/d61eeedd51e64306ad94495e6716cb7d221994c9))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
1
10
|
## 6.3.28 (2023-02-10)
|
|
2
11
|
|
|
3
12
|
##### Bug Fixes
|
package/package.json
CHANGED
|
@@ -128,7 +128,11 @@ const runStylesAudit = module.exports.runStylesAudit = (pkg, customPath) => {
|
|
|
128
128
|
report.package = pkg.name;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
let files
|
|
131
|
+
let files;
|
|
132
|
+
const scssFiles = glob.sync('**/*.scss', { cwd: srcPath, nodir: true, follow: true, dot: true });
|
|
133
|
+
const cssFiles = glob.sync('**/*.css', { cwd: srcPath, nodir: true, follow: true, dot: true });
|
|
134
|
+
|
|
135
|
+
files = [...scssFiles, ...cssFiles];
|
|
132
136
|
|
|
133
137
|
report.scssFilesCount += files.length;
|
|
134
138
|
|
|
@@ -272,20 +276,20 @@ const runStylesAudit = module.exports.runStylesAudit = (pkg, customPath) => {
|
|
|
272
276
|
if (report.htmlFilesCount !== 0) {
|
|
273
277
|
const scssHtmlRatio = Math.floor(100 * report.scssFilesCount / report.htmlFilesCount);
|
|
274
278
|
report.finalReport['scssHtmlRatio'] = {
|
|
275
|
-
description: 'scss files VS html files',
|
|
279
|
+
description: 'scss/css files VS html files',
|
|
276
280
|
value: `${report.scssFilesCount} out of ${report.htmlFilesCount} (${scssHtmlRatio}%)`,
|
|
277
281
|
status: (scssHtmlRatio >= 25) ? 'CRITICAL' : (scssHtmlRatio >= 10 && scssHtmlRatio <= 25) ? 'IMPROVE' : 'OK',
|
|
278
282
|
comment: null,
|
|
279
283
|
}
|
|
280
284
|
if (report.finalReport['scssHtmlRatio'].status === 'CRITICAL') {
|
|
281
|
-
report.finalReport['scssHtmlRatio'].comment = 'The percentage of html files having
|
|
285
|
+
report.finalReport['scssHtmlRatio'].comment = 'The percentage of html files having styles declaration is too high';
|
|
282
286
|
}
|
|
283
287
|
}
|
|
284
288
|
|
|
285
289
|
if (report.htmlLinesCount !== 0) {
|
|
286
290
|
const scssHtmlLinesRatio = Math.floor(100 * report.scssLinescount / report.htmlLinesCount);
|
|
287
291
|
report.finalReport['scssHtmlLinesRatio'] = {
|
|
288
|
-
description: '
|
|
292
|
+
description: 'css lines count VS html lines count',
|
|
289
293
|
value: `${report.scssLinescount} / ${report.htmlLinesCount} (${scssHtmlLinesRatio}%)`,
|
|
290
294
|
status: (scssHtmlLinesRatio >= 25) ? 'CRITICAL' : (scssHtmlLinesRatio >= 10 && scssHtmlLinesRatio <= 25) ? 'IMPROVE' : 'OK',
|
|
291
295
|
comment: null,
|
|
@@ -297,7 +301,7 @@ const runStylesAudit = module.exports.runStylesAudit = (pkg, customPath) => {
|
|
|
297
301
|
|
|
298
302
|
if (report.scssFilesCount !== 0) {
|
|
299
303
|
report.finalReport['scssEmptyFiles'] = {
|
|
300
|
-
description: 'scss empty files',
|
|
304
|
+
description: 'scss/css empty files',
|
|
301
305
|
value: `${report.scssEmptyFiles} out of ${report.scssFilesCount} (${Math.floor(100 * report.scssEmptyFiles / report.scssFilesCount)}%)`,
|
|
302
306
|
status: (report.scssEmptyFiles !== 0) ? 'IMPROVE' : 'OK',
|
|
303
307
|
comment: (report.scssEmptyFiles !== 0) ? 'Scss files without content should be cleaned up' : null
|
|
@@ -108,7 +108,7 @@ module.exports.audit = (pkg) => {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
} else {
|
|
111
|
-
tools.logWarning(JSON.stringify(vulnerabilityReport));
|
|
111
|
+
tools.logWarning(JSON.stringify(vulnerabilityReport, null, 2));
|
|
112
112
|
|
|
113
113
|
let message = '';
|
|
114
114
|
Object.entries(vulnerabilityReport.auditSummary).forEach((v) => {
|