@eui/tools 6.3.40 → 6.3.42
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.42
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 6.3.42 (2023-02-21)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* add filtered list of jira issues exported to gitlab based on configuration for remote - MWP-9325 [MWP-9325](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9325) ([695ac86d](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/695ac86d4580c15c7c078c6f1bbfc04fe688f0b5))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 6.3.41 (2023-02-20)
|
|
11
|
+
|
|
12
|
+
##### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* remotes injection issue when no options set - add skipReset not regenerating remote locally for debugging - MWP-9204 [MWP-9204](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9204) ([b15687c9](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/b15687c9bd33c8e6762ca77eefecd40f9f734bbb))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
1
19
|
## 6.3.40 (2023-02-20)
|
|
2
20
|
|
|
3
21
|
##### Chores
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"imports": "import { DynamicFormsModule } from '@eui/dynamic-forms';",
|
|
3
|
-
"definitions": "DynamicFormsModule.forRoot(
|
|
2
|
+
"imports": "import { DynamicFormsModule } from '@eui/dynamic-forms'; import { dynMapConfig } from '@root.npm.pkg@'; ",
|
|
3
|
+
"definitions": "DynamicFormsModule.forRoot(dynMapConfig)"
|
|
4
4
|
}
|
|
@@ -8,6 +8,9 @@ const tools = require('../../utils/tools');
|
|
|
8
8
|
const configUtils = require('../config/config-utils');
|
|
9
9
|
const gitUtils = require('../../utils/git-utils');
|
|
10
10
|
|
|
11
|
+
// ARGS
|
|
12
|
+
const { skipReset } = tools.getArgs();
|
|
13
|
+
|
|
11
14
|
|
|
12
15
|
|
|
13
16
|
const cloneRemotesConfig = module.exports.cloneRemotesConfig = () => {
|
|
@@ -41,6 +44,11 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
|
|
|
41
44
|
|
|
42
45
|
let remote, remotePath, remoteSrcPath, remoteSkeletonRootPath, remoteSkeletonPath;
|
|
43
46
|
|
|
47
|
+
// checking if reset has to bypassed, in that case no-regeneration occurs
|
|
48
|
+
if (skipReset) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
44
52
|
return Promise.resolve()
|
|
45
53
|
// clone remotes config if first init
|
|
46
54
|
.then(() => {
|
|
@@ -151,14 +159,23 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
|
|
|
151
159
|
tools.logInfo(`copying full sources skeleton : ${fullCommonPath} ==> ${remoteSrcPath}`);
|
|
152
160
|
tools.copy(fullCommonPath, remoteSrcPath);
|
|
153
161
|
|
|
162
|
+
// initializing dynamic contents, filled based on options provided in config metadata
|
|
163
|
+
let importsContent = [];
|
|
164
|
+
let definitionsContent = [];
|
|
165
|
+
let declarationsContent = [];
|
|
166
|
+
let providersContent = [];
|
|
167
|
+
let constructorDeclarationsContent = [];
|
|
168
|
+
|
|
154
169
|
// checking options
|
|
155
|
-
if (remote.skeletonConfig.options) {
|
|
156
|
-
let importsContent = [];
|
|
157
|
-
let definitionsContent = [];
|
|
158
|
-
let declarationsContent = [];
|
|
159
|
-
let providersContent = [];
|
|
160
|
-
let constructorDeclarationsContent = [];
|
|
161
170
|
|
|
171
|
+
// if no options found, we inject default modules defs
|
|
172
|
+
if (!remote.skeletonConfig.options) {
|
|
173
|
+
definitionsContent.push('StoreModule.forRoot(TOKEN, { metaReducers })');
|
|
174
|
+
definitionsContent.push(`StoreRouterConnectingModule.forRoot({ stateKey: 'router', serializer: CustomSerializer })`);
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
// if options, all options are checked and default modules defs are injected following certain conditions
|
|
178
|
+
} else {
|
|
162
179
|
const pushContent = (obj) => {
|
|
163
180
|
if (obj.imports) importsContent.push(obj.imports);
|
|
164
181
|
if (obj.definitions) definitionsContent.push(obj.definitions);
|
|
@@ -199,19 +216,19 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
|
|
|
199
216
|
definitionsContent.push(`StoreRouterConnectingModule.forRoot({ stateKey: 'router', serializer: CustomSerializer })`);
|
|
200
217
|
}
|
|
201
218
|
|
|
202
|
-
// replace option in module.ts placeholders
|
|
203
|
-
const moduleTsPath = path.join(remoteSrcPath, 'app', 'module.ts');
|
|
204
|
-
tools.replaceInFileSync(moduleTsPath, '// IMPORTS', importsContent.join('\n'));
|
|
205
|
-
tools.replaceInFileSync(moduleTsPath, '// DEFINITIONS', definitionsContent.join(',\n'));
|
|
206
|
-
tools.replaceInFileSync(moduleTsPath, '// DECLARATIONS', declarationsContent.join('\n'));
|
|
207
|
-
tools.replaceInFileSync(moduleTsPath, '// PROVIDERS', providersContent.join(',\n'));
|
|
208
|
-
tools.replaceInFileSync(moduleTsPath, '// CONSTRUCTOR DECLARATIONS', constructorDeclarationsContent.join('\n'));
|
|
209
|
-
|
|
210
219
|
if (remote.skeletonConfig.options.participant) {
|
|
211
220
|
tools.replaceInPath(remoteSrcPath, '@block.container.name@', remote.skeletonConfig.blockContainerName);
|
|
212
221
|
}
|
|
213
222
|
}
|
|
214
223
|
|
|
224
|
+
// replace option in module.ts placeholders
|
|
225
|
+
const moduleTsPath = path.join(remoteSrcPath, 'app', 'module.ts');
|
|
226
|
+
tools.replaceInFileSync(moduleTsPath, '// IMPORTS', importsContent.join('\n'));
|
|
227
|
+
tools.replaceInFileSync(moduleTsPath, '// DEFINITIONS', definitionsContent.join(',\n'));
|
|
228
|
+
tools.replaceInFileSync(moduleTsPath, '// DECLARATIONS', declarationsContent.join('\n'));
|
|
229
|
+
tools.replaceInFileSync(moduleTsPath, '// PROVIDERS', providersContent.join(',\n'));
|
|
230
|
+
tools.replaceInFileSync(moduleTsPath, '// CONSTRUCTOR DECLARATIONS', constructorDeclarationsContent.join('\n'));
|
|
231
|
+
|
|
215
232
|
tools.logInfo('Replacing skeleton config tokens');
|
|
216
233
|
tools.replaceInPath(remoteSrcPath, '@remote.name@', remote.name);
|
|
217
234
|
tools.replaceInPath(remoteSrcPath, '@base.url@', remote.skeletonConfig.baseUrl);
|
|
@@ -41,17 +41,19 @@ const getMetadata = (pkg) => {
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
const storeMetadata = (pkg, diffMetadata, newVersion) => {
|
|
44
|
-
tools.
|
|
44
|
+
tools.logTitle('Storing pkg history metadata');
|
|
45
45
|
|
|
46
46
|
const DEVOPS_METADATA_PATH = configUtils.global.getConfigOptions().DEVOPS_METADATA_PATH;
|
|
47
47
|
|
|
48
|
-
let flatJiraList = [];
|
|
48
|
+
let flatJiraList = [], filteredFlatJiraList = [];
|
|
49
49
|
let historyMetadata = {};
|
|
50
50
|
|
|
51
51
|
return Promise.resolve()
|
|
52
52
|
|
|
53
53
|
// flatten jira key list from diffMetadata extracted
|
|
54
54
|
.then(() => {
|
|
55
|
+
|
|
56
|
+
// full jira issues list
|
|
55
57
|
diffMetadata.forEach((pkg) => {
|
|
56
58
|
pkg.gitMetadata.forEach((gitMetadata) => {
|
|
57
59
|
gitMetadata.forEach((v) => {
|
|
@@ -61,6 +63,20 @@ const storeMetadata = (pkg, diffMetadata, newVersion) => {
|
|
|
61
63
|
})
|
|
62
64
|
|
|
63
65
|
flatJiraList = tools.removeArrayDuplicates(flatJiraList);
|
|
66
|
+
|
|
67
|
+
// filtered only issues where package is considered "linkedPackage" defined in the configuration, to not push all the issues list
|
|
68
|
+
// coming from dependencies of a particular remote to the release note generated after CI
|
|
69
|
+
diffMetadata.forEach((pkg) => {
|
|
70
|
+
if (pkg.packageLinked) {
|
|
71
|
+
pkg.gitMetadata.forEach((gitMetadata) => {
|
|
72
|
+
gitMetadata.forEach((v) => {
|
|
73
|
+
if (v.issue) filteredFlatJiraList.push(v.issue);
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
filteredFlatJiraList = tools.removeArrayDuplicates(filteredFlatJiraList);
|
|
64
80
|
})
|
|
65
81
|
|
|
66
82
|
// store the history file
|
|
@@ -77,7 +93,8 @@ const storeMetadata = (pkg, diffMetadata, newVersion) => {
|
|
|
77
93
|
versions.push({
|
|
78
94
|
name: newVersion,
|
|
79
95
|
diffs: diffMetadata,
|
|
80
|
-
issues: flatJiraList
|
|
96
|
+
issues: flatJiraList,
|
|
97
|
+
filteredIssues: filteredFlatJiraList
|
|
81
98
|
});
|
|
82
99
|
|
|
83
100
|
historyMetadata.versions = versions;
|
|
@@ -87,11 +104,20 @@ const storeMetadata = (pkg, diffMetadata, newVersion) => {
|
|
|
87
104
|
|
|
88
105
|
// storing issuesList gathered into gitlab variables for post CI processing
|
|
89
106
|
.then(() => {
|
|
107
|
+
tools.logInfo('Extracting Jira issues list to gitlab variables');
|
|
108
|
+
|
|
90
109
|
if (!flatJiraList) {
|
|
91
110
|
tools.logWarning('No issues found for this release');
|
|
92
111
|
|
|
93
112
|
} else {
|
|
94
|
-
|
|
113
|
+
let issuesList;
|
|
114
|
+
if (filteredFlatJiraList.length > 0) {
|
|
115
|
+
tools.logInfo('Taking into account filter issues list from allowed packages in configuration');
|
|
116
|
+
issuesList = filteredFlatJiraList.join(',');
|
|
117
|
+
} else {
|
|
118
|
+
tools.logInfo('Taking into account full Jira issues list extracted');
|
|
119
|
+
issuesList = flatJiraList.join(',');
|
|
120
|
+
}
|
|
95
121
|
tools.logInfo(`Unique issues found for this version : ${issuesList}`);
|
|
96
122
|
|
|
97
123
|
if (!dryRun) {
|
|
@@ -152,18 +178,31 @@ const getDiffBetweenBuildVersions = (pkg, fromBuildMetadata, toBuildMetadata) =>
|
|
|
152
178
|
|
|
153
179
|
tools.logInfo(`parsing item : ${item.package}`);
|
|
154
180
|
|
|
155
|
-
const
|
|
181
|
+
const pkgItem = configUtils.packages.getPackageByNpmPkg(item.package, true);
|
|
156
182
|
let pkgName;
|
|
157
|
-
if (
|
|
158
|
-
pkgName =
|
|
183
|
+
if (pkgItem) {
|
|
184
|
+
pkgName = pkgItem.name;
|
|
159
185
|
|
|
160
|
-
if (
|
|
161
|
-
pkgName =
|
|
186
|
+
if (pkgItem.child) {
|
|
187
|
+
pkgName = pkgItem.parentPkg;
|
|
162
188
|
}
|
|
163
189
|
}
|
|
164
190
|
|
|
165
191
|
tools.logInfo('checking package : ' + pkgName);
|
|
166
192
|
|
|
193
|
+
let isPackageLinked = true;
|
|
194
|
+
|
|
195
|
+
// checking if package is part of the known linkedPackage of the remote to parse
|
|
196
|
+
if (pkg.linkedPackages && pkg.linkedPackages.filter(p => p === item.package).length === 0) {
|
|
197
|
+
tools.logInfo(`package ${pkgName} is not part of "linkedPackages" defined for ${pkg.name}`)
|
|
198
|
+
tools.logInfo('It will be excluded from Jira issues list generation for release note');
|
|
199
|
+
isPackageLinked = false;
|
|
200
|
+
|
|
201
|
+
} else {
|
|
202
|
+
tools.logInfo(`${pkg.name} has no linkedPackages defined OR linkedPackage is present in the allowed package list`);
|
|
203
|
+
tools.logInfo('Gathering package metadata history information');
|
|
204
|
+
}
|
|
205
|
+
|
|
167
206
|
// getting package file metadata
|
|
168
207
|
const packageMetadataFile = path.join(DEVOPS_METADATA_PATH, pkgName + '-build-metadata.json');
|
|
169
208
|
|
|
@@ -187,7 +226,7 @@ const getDiffBetweenBuildVersions = (pkg, fromBuildMetadata, toBuildMetadata) =>
|
|
|
187
226
|
return acc;
|
|
188
227
|
}, []);
|
|
189
228
|
|
|
190
|
-
return { name: pkgName, old: item.old, new: item.new, gitMetadata: accGitMetadata };
|
|
229
|
+
return { name: pkgName, old: item.old, new: item.new, gitMetadata: accGitMetadata, packageLinked: isPackageLinked };
|
|
191
230
|
}
|
|
192
231
|
})
|
|
193
232
|
|