@eui/tools 4.18.3 → 4.18.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
- 4.18.3
1
+ 4.18.4
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 4.18.4 (2021-12-15)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * fix dependencies resolution for support snapshot - enabled prevSnapshot deps fetch from metadata option - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([1e270e30](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/1e270e305eacca555fce441366de86a9dc2fa722))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 4.18.3 (2021-12-15)
2
11
 
3
12
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "4.18.3",
3
+ "version": "4.18.4",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -633,8 +633,8 @@ const notificationUtils = require('./scripts/utils/notification/notification-uti
633
633
 
634
634
  return Promise.resolve()
635
635
  .then(() => {
636
- const prjName = 'my-workplace';
636
+ const prjName = 'eui-showcase-ux';
637
637
  const prj = configUtils.projects.getCsdrProject(prjName);
638
638
 
639
- return injectionUtils.externals.remapRoutesByEnvConfig(prj, 'TRN', true);
639
+ return compositeUtils.getDeps(prj, 'TST');
640
640
  })
@@ -130,6 +130,9 @@ const getRemappedDeps = (pkgDeps, pkgDefaultDeps) => {
130
130
  const getResolvedCarretDeps = (deps) => {
131
131
  tools.logTitle('Resolving carret for next version packages');
132
132
 
133
+ tools.logInfo('processing dependencies : ');
134
+ console.log(deps);
135
+
133
136
  return Promise.resolve()
134
137
  .then(() => {
135
138
 
@@ -148,6 +151,7 @@ const getResolvedCarretDeps = (deps) => {
148
151
  const lastMajorVersion = metadataUtils.package.getLastMajorVersion(pkg, version.substr(1).split('.')[0]);
149
152
 
150
153
  if (lastMajorVersion) {
154
+ tools.logInfo(`--version found : ${lastMajorVersion}`);
151
155
  acc[k] = lastMajorVersion;
152
156
 
153
157
  } else {
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const { deepStrictEqual } = require('assert');
4
+ const { toInteger } = require('lodash');
4
5
  // global
5
6
  const path = require('path');
6
7
 
@@ -60,10 +61,10 @@ const getPackagesDepsByEnv = (prj, envTarget, compositeType) => {
60
61
  })
61
62
  .then((prjDeps) => {
62
63
  if (envTarget === 'DEV') {
63
- return getDeps_DEV(prjDeps);
64
+ return getDeps_DEV(prj, prjDeps);
64
65
  }
65
66
  if (envTarget === 'TST') {
66
- return getDeps_TST(prjDeps);
67
+ return getDeps_TST(prj, prjDeps);
67
68
  }
68
69
  if (envTarget === 'INT') {
69
70
  return getDeps_INT(prj, compositeType);
@@ -91,10 +92,16 @@ const getPackagesDepsByEnv = (prj, envTarget, compositeType) => {
91
92
  * For DEV target, we take the outermost known versions of the packages,
92
93
  * including : SNAPSHOTS & LATEST
93
94
  */
94
- const getDeps_DEV = (prjDeps) => {
95
+ const getDeps_DEV = (prj, prjDeps) => {
95
96
  return Promise.resolve()
96
97
  .then(() => {
97
- return metadataUtils.package.getPackagesDeps('packages');
98
+ if (prj.build && prj.build.prevSnapshotEnabled) {
99
+ tools.logInfo('project has prevSnapshot enabled, getting deps list from prevSnapshotsTag');
100
+ return metadataUtils.package.getPackagesDeps('packagesPrevSnapshotsTag');
101
+ } else {
102
+ tools.logInfo('getting project deps from snapshots metadata list');
103
+ return metadataUtils.package.getPackagesDeps('packages');
104
+ }
98
105
  })
99
106
 
100
107
  // Re-mapping the dependencies found against their max "carret" versions found in the base dependencies defs in the project
@@ -105,18 +112,24 @@ const getDeps_DEV = (prjDeps) => {
105
112
  .catch((e) => {
106
113
  throw e;
107
114
  })
108
- }
115
+ }
109
116
 
110
117
 
111
- /**
112
- * For TST target, we take only the LATEST know versions of the packages,
113
- * including : LATEST
118
+ /**
119
+ * For TST target, we take only the LATEST know versions of the packages,
120
+ * including : LATEST
114
121
  */
115
- const getDeps_TST = (prjDeps) => {
122
+ const getDeps_TST = (prj, prjDeps) => {
116
123
  return Promise.resolve()
117
- .then(() => {
124
+ .then(() => {
125
+ if (prj.build && prj.build.prevSnapshotEnabled) {
126
+ tools.logInfo('project has prevSnapshot enabled, getting deps list from prevTag');
127
+ return metadataUtils.package.getPackagesDeps('packagesPrevTag');
128
+ } else {
129
+ tools.logInfo('getting project deps from packagesLatest metadata list');
118
130
  return metadataUtils.package.getPackagesDeps('packagesLatestTag');
119
- })
131
+ }
132
+ })
120
133
 
121
134
  // Re-mapping the dependencies found against their max "carret" versions found in the base dependencies defs in the project
122
135
  .then((pkgDeps) => {