@eui/tools 6.20.2 → 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.
@@ -1 +1 @@
1
- 6.20.2
1
+ 6.20.4
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
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
+ * * *
10
+ ## 6.20.3 (2024-08-07)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * standalone pkg release - fetch branch as argument to pipeline script - EUI-9788 [EUI-9788](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-9788) ([8ff5847e](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/8ff5847eab1b4981215ce9ae41a933f60e8a2e9a))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.20.2 (2024-08-07)
2
20
 
3
21
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.20.2",
3
+ "version": "6.20.4",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -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
- srcPath = pkg.paths.root;
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
- tools.logInfo('Analyzing package deps for 3rd parties usage');
424
- let deps = installUtils.packages.getLocalPackageDepsAll(pkg);
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
- tools.logInfo('3rd party deps found for package :');
453
- console.log(thirdPartyDeps);
456
+ tools.logInfo('3rd party deps found for package :');
457
+ console.log(thirdPartyDeps);
454
458
 
455
- report.thirdPartyDependencies.count = thirdPartyDeps.length;
456
- report.thirdPartyDependencies.dependencies = thirdPartyDeps;
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
- // getting config options for gates defined
723
- const configOptions = configUtils.global.getConfigOptions();
727
+ let configOptions, euiVersion;
724
728
 
725
- // getting local csdr euiVersion
726
- const euiVersion = configUtils.global.getLocalEuiVersion();
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) {
@@ -50,14 +50,6 @@ const getBranches = module.exports.getBranches = () => {
50
50
  return getBranchDefs(branch);
51
51
  }
52
52
 
53
- const getBranchesFromRepo = module.exports.getBranchesFromRepo = () => {
54
- let branch = utils.git.getBranchName();
55
-
56
- return getBranchDefs(branch);
57
- }
58
-
59
-
60
-
61
53
 
62
54
 
63
55
  module.exports.getEnvTarget = () => {
@@ -342,13 +334,7 @@ module.exports.updateVersion = (pkg, pkgMetadata, envTarget) => {
342
334
  utils.tools.logBanner('UPDATE VERSION');
343
335
 
344
336
  // getting branch flags
345
- let branches;
346
-
347
- if (pkg.standalone) {
348
- branches = this.getBranchesFromRepo();
349
- } else {
350
- branches = this.getBranches();
351
- }
337
+ const branches = this.getBranches();
352
338
 
353
339
  // local vars
354
340
  let newVersion;
@@ -530,12 +516,8 @@ const tagAndMerge = (pkg, version, branches) => {
530
516
  module.exports.runGitOperations = (pkg, version) => {
531
517
  utils.tools.logBanner('RUN GIT OPERATIONS');
532
518
 
533
- let branches;
534
- if (pkg.standalone) {
535
- branches = this.getBranchesFromRepo();
536
- } else {
537
- branches = this.getBranches();
538
- }
519
+ const branches = this.getBranches();
520
+
539
521
  console.log(branches);
540
522
 
541
523
  if (pkg.remote && pkg.build && pkg.build.envTargetActive) {
@@ -16,7 +16,7 @@ const innerCommon = require('./common');
16
16
  // LOCAL TEST :
17
17
  // - symlink eUI tools sources to node_modules of standalone pkg folder node_modules to test
18
18
  // - execute this command on the standalone pkg folder :
19
- // npx @eui/tools release-package-standalone --dryRun --debug --debugNotification --skipCommitsCheck --skipAudit --skipPublish --skipGitUpdates
19
+ // npx @eui/tools release-package-standalone --dryRun --branch develop --debug --debugNotification --skipCommitsCheck --skipAudit --skipPublish --skipGitUpdates --skipLint --skipTest
20
20
 
21
21
 
22
22
  module.exports.run = () => {
@@ -34,7 +34,7 @@ module.exports.run = () => {
34
34
  const pkg = configUtils.packages.getStandalonePackage();
35
35
 
36
36
  // get branches config
37
- const branches = innerCommon.getBranchesFromRepo();
37
+ const branches = innerCommon.getBranches();
38
38
 
39
39
  return (
40
40
  Promise.resolve()
@@ -30,11 +30,6 @@ const getLastTag = (folder) => {
30
30
  });
31
31
  }
32
32
 
33
- const getBranchName = (folder = process.cwd()) => {
34
- const branchName = execa.sync('git', ['symbolic-ref','--short', 'HEAD'], { cwd: folder }).stdout;
35
- return branchName;
36
- }
37
-
38
33
  const getRepoUrl = (folder) => {
39
34
  return Promise.resolve()
40
35
  .then(() => {
@@ -428,7 +423,6 @@ module.exports.getGitHost = getGitHost;
428
423
  module.exports.getLastTag = getLastTag;
429
424
  module.exports.getTags = getTags;
430
425
  module.exports.hasCommitsSinceLastTag = hasCommitsSinceLastTag;
431
- module.exports.getBranchName = getBranchName;
432
426
  module.exports.commitAndPush = commitAndPush;
433
427
  module.exports.tagVersion = tagVersion;
434
428
  module.exports.mergeMasterToDevelop = mergeMasterToDevelop;