@eui/tools 6.12.24 → 6.12.26

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.
@@ -1 +1 @@
1
- 6.12.24
1
+ 6.12.26
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.12.26 (2023-07-12)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * add exclusions for ux-dyn-forms component to styles audit for v16 pkgs - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([de7e6e10](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/de7e6e104b5327a48b50f43510d2a8d68d1ed21b))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.12.25 (2023-06-27)
11
+
12
+ ##### Chores
13
+
14
+ * **other:**
15
+ * add exclusions to styles audit 3rd party deps scan - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([d82c9aa5](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/d82c9aa54e976f3ca7a5a01b3551d552e248b590))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.12.24 (2023-06-27)
2
20
 
3
21
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.12.24",
3
+ "version": "6.12.26",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -1259,7 +1259,7 @@ const versionUtils = require('./scripts/csdr/version/version-utils');
1259
1259
  Promise.resolve()
1260
1260
  .then(() => {
1261
1261
  // old package without gates forced
1262
- const pkg = configUtils.packages.getPackage('cc-echecklist-admin-ui', true);
1262
+ const pkg = configUtils.packages.getPackage('cc-flex-ui', true);
1263
1263
  console.log(pkg);
1264
1264
 
1265
1265
  return auditUtils.styles.audit(pkg);
@@ -151,7 +151,7 @@ const runStylesAudit = (module.exports.runStylesAudit = (pkg, customPath) => {
151
151
  },
152
152
  uxCmp: {
153
153
  count: 0,
154
- // indices: []
154
+ indices: []
155
155
  },
156
156
  finalReport: {},
157
157
  };
@@ -271,8 +271,12 @@ const runStylesAudit = (module.exports.runStylesAudit = (pkg, customPath) => {
271
271
  while ((result = regex.exec(fileContent))) {
272
272
  uxCmpIndices.push(result.index);
273
273
  }
274
- report.uxCmp.count += uxCmpIndices.length;
275
- // report.uxCmp.indices = [...report.uxCmp.indices, ...generateIndicesContent(uxCmpIndices, file, fileContent)];
274
+ const indicesContent = generateIndicesContent(uxCmpIndices, file, fileContent, [
275
+ 'ux-dyn-forms',
276
+ ]);
277
+
278
+ report.uxCmp.count += recalculateIndicesCount(indicesContent);
279
+ report.uxCmp.indices = [...report.uxCmp.indices, ...indicesContent];
276
280
  });
277
281
 
278
282
  files = glob.sync('**/*.ts', { cwd: srcPath, nodir: true, follow: true, dot: true });
@@ -331,11 +335,26 @@ const runStylesAudit = (module.exports.runStylesAudit = (pkg, customPath) => {
331
335
  console.log(deps);
332
336
 
333
337
  const allowedScopes = configUtils.packages.getPackageScopes();
338
+ const exclusions = ['ag-grid', 'file-saver'];
339
+
334
340
  let thirdPartyDeps = [];
335
341
  deps.forEach((d) => {
336
342
  const scope = d.split('/')[0];
343
+
344
+ // checking against allowed CSDR known package scopes
337
345
  if (!allowedScopes.includes(scope)) {
338
- thirdPartyDeps.push(d);
346
+
347
+ // exclusions known
348
+ let exclusionFound = false;
349
+ exclusions.forEach((exc) => {
350
+ if (scope.indexOf(exc) > -1) {
351
+ exclusionFound = true;
352
+ }
353
+ })
354
+
355
+ if (!exclusionFound) {
356
+ thirdPartyDeps.push(d);
357
+ }
339
358
  }
340
359
  });
341
360
 
@@ -494,7 +513,7 @@ const runStylesAudit = (module.exports.runStylesAudit = (pkg, customPath) => {
494
513
  report.finalReport['thirdPartyDependencies'] = {
495
514
  description: 'Third party dependencies usage',
496
515
  value: report.thirdPartyDependencies.count,
497
- status: report.thirdPartyDependencies.count !== 0 ? 'CRITICAL' : 'OK',
516
+ status: report.thirdPartyDependencies.count !== 0 ? 'IMPROVE' : 'OK',
498
517
  comment: report.thirdPartyDependencies.count !== 0 ? 'Use 3rd party dependencies only if really necessary (bundle size increase) - contact eUI team for more info' : null,
499
518
  };
500
519