@eui/tools 6.10.3 → 6.10.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.
- package/.version.properties +1 -1
- package/CHANGELOG.md +9 -0
- package/package.json +1 -1
- package/scripts/csdr/init/global.js +50 -49
- package/scripts/csdr/init/init-package.js +1 -6
- package/scripts/csdr/init/init-project.js +1 -6
- package/scripts/csdr/sync/sync-utils.js +1 -4
- package/scripts/utils/notification/config.js +1 -1
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.10.
|
|
1
|
+
6.10.4
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 6.10.4 (2023-04-15)
|
|
2
|
+
|
|
3
|
+
##### Refactors
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* nodejs and resolution injection for local eUI version of project - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([597aaa41](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/597aaa412f4ecb2a3bf017acbd4b5236bf8a7f94))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
1
10
|
## 6.10.3 (2023-03-28)
|
|
2
11
|
|
|
3
12
|
##### Bug Fixes
|
package/package.json
CHANGED
|
@@ -12,42 +12,77 @@ const { registry } = tools.getArgs();
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
const processResolutionsInjection = module.exports.processResolutionsInjection = (packageJsonPath, euiVersion) => {
|
|
15
|
-
|
|
15
|
+
let euiResolutionsInjected = false;
|
|
16
|
+
let resolutionsJsonFile;
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
if (!euiVersion || euiVersion === 'DEFAULT') {
|
|
19
|
+
tools.logInfo('Default eUI version found or empty...skipping');
|
|
20
|
+
|
|
21
|
+
} else {
|
|
22
|
+
tools.logInfo(`Processing resolutions replacement for eUI version found : ${euiVersion}`);
|
|
23
|
+
const packageJsonFile = path.join(packageJsonPath, 'package.json');
|
|
24
|
+
const packageJson = require(packageJsonFile);
|
|
25
|
+
resolutionsJsonFile = path.join(__dirname, 'resources', euiVersion, 'resolutions.json');
|
|
26
|
+
|
|
27
|
+
if (tools.isFileExists(resolutionsJsonFile)) {
|
|
28
|
+
const resolutionsJson = require(resolutionsJsonFile);
|
|
29
|
+
|
|
30
|
+
tools.logInfo('Injecting resolutions content');
|
|
31
|
+
console.log(resolutionsJson);
|
|
32
|
+
packageJson.resolutions = resolutionsJson;
|
|
33
|
+
|
|
34
|
+
tools.logInfo('Updating root package.json');
|
|
35
|
+
tools.writeJsonFileSync(packageJsonFile, packageJson);
|
|
36
|
+
|
|
37
|
+
euiResolutionsInjected = true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
tools.logTitle('Processing injections for detected nodeJS version');
|
|
42
|
+
|
|
43
|
+
let nodeVersion = process.versions.node;
|
|
44
|
+
nodeVersion = `${nodeVersion.split('.')[0]}.x`;
|
|
45
|
+
|
|
46
|
+
const rootPackageJsonFile = path.join(process.cwd(), 'package.json');
|
|
47
|
+
const rootPackageJson = require(rootPackageJsonFile);
|
|
48
|
+
const nodeVersionResource = `nodejs-${nodeVersion}`;
|
|
49
|
+
resolutionsJsonFile = path.join(__dirname, 'resources', nodeVersionResource, 'resolutions.json');
|
|
50
|
+
|
|
51
|
+
tools.logInfo(`Checking nodejsResolution resource for path: ${resolutionsJsonFile}`);
|
|
20
52
|
|
|
21
53
|
if (tools.isFileExists(resolutionsJsonFile)) {
|
|
22
54
|
const resolutionsJson = require(resolutionsJsonFile);
|
|
23
55
|
|
|
24
56
|
tools.logInfo('Injecting resolutions content');
|
|
25
57
|
console.log(resolutionsJson);
|
|
26
|
-
|
|
27
|
-
|
|
58
|
+
rootPackageJson.resolutions = resolutionsJson;
|
|
28
59
|
tools.logInfo('Updating root package.json');
|
|
29
|
-
tools.writeJsonFileSync(
|
|
60
|
+
tools.writeJsonFileSync(rootPackageJsonFile, rootPackageJson);
|
|
30
61
|
|
|
31
62
|
} else {
|
|
32
|
-
|
|
63
|
+
if (!euiResolutionsInjected) {
|
|
64
|
+
tools.logInfo('Resetting resolutions...');
|
|
65
|
+
tools.logInfo('Updating root package.json');
|
|
66
|
+
rootPackageJson.resolutions = {};
|
|
67
|
+
tools.writeJsonFileSync(rootPackageJsonFile, rootPackageJson);
|
|
68
|
+
}
|
|
33
69
|
}
|
|
34
70
|
}
|
|
35
71
|
|
|
36
72
|
|
|
37
|
-
|
|
38
|
-
module.exports.processLocalEuiVersions = () => {
|
|
73
|
+
module.exports.initRootFilesAndResolutions = () => {
|
|
39
74
|
tools.logTitle('Processing injections for local installed eUI versions if needed');
|
|
40
75
|
|
|
41
76
|
return Promise.resolve()
|
|
42
77
|
.then(() => {
|
|
43
78
|
const euiVersion = configUtils.global.getLocalEuiVersion();
|
|
44
79
|
|
|
80
|
+
processResolutionsInjection(process.cwd(), euiVersion);
|
|
81
|
+
|
|
45
82
|
if (!euiVersion || euiVersion === 'DEFAULT') {
|
|
46
|
-
tools.logInfo('
|
|
83
|
+
tools.logInfo('euiVersion not found skippint yarn.lock replacement');
|
|
47
84
|
|
|
48
85
|
} else {
|
|
49
|
-
processResolutionsInjection(process.cwd(), euiVersion);
|
|
50
|
-
|
|
51
86
|
tools.logInfo(`Processing .browserlistrc replacement for eUI version found : ${euiVersion}`);
|
|
52
87
|
|
|
53
88
|
const blResourcesFile = path.join(__dirname, 'resources', euiVersion, 'browserslistrc');
|
|
@@ -62,8 +97,8 @@ module.exports.processLocalEuiVersions = () => {
|
|
|
62
97
|
tools.logInfo(`Processing yarn.lock replacement for eUI version found : ${euiVersion}`);
|
|
63
98
|
|
|
64
99
|
if (registry) {
|
|
65
|
-
|
|
66
|
-
|
|
100
|
+
tools.logInfo('Alternate registry found...skipping yarn.lock remplacement');
|
|
101
|
+
return;
|
|
67
102
|
}
|
|
68
103
|
|
|
69
104
|
const yResourcesFile = path.join(__dirname, 'resources', euiVersion, 'yarn.lock');
|
|
@@ -76,41 +111,7 @@ module.exports.processLocalEuiVersions = () => {
|
|
|
76
111
|
}
|
|
77
112
|
}
|
|
78
113
|
})
|
|
79
|
-
.catch((e) => {
|
|
80
|
-
throw e;
|
|
81
|
-
})
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
module.exports.processResolutionsForNodeVersion = () => {
|
|
86
|
-
return Promise.resolve()
|
|
87
|
-
.then(() => {
|
|
88
|
-
tools.logTitle('Processing injections for detected nodeJS version');
|
|
89
|
-
|
|
90
|
-
let nodeVersion = process.versions.node;
|
|
91
|
-
nodeVersion = `${nodeVersion.split('.')[0]}.x`;
|
|
92
114
|
|
|
93
|
-
const rootPackageJsonFile = path.join(process.cwd(), 'package.json');
|
|
94
|
-
const rootPackageJson = require(rootPackageJsonFile);
|
|
95
|
-
const nodeVersionResource = `nodejs-${nodeVersion}`;
|
|
96
|
-
const resolutionsJsonFile = path.join(__dirname, 'resources', nodeVersionResource, 'resolutions.json');
|
|
97
|
-
|
|
98
|
-
tools.logInfo(`Checking nodejsResolution resource for path: ${resolutionsJsonFile}`);
|
|
99
|
-
|
|
100
|
-
if (tools.isFileExists(resolutionsJsonFile)) {
|
|
101
|
-
const resolutionsJson = require(resolutionsJsonFile);
|
|
102
|
-
|
|
103
|
-
tools.logInfo('Injecting resolutions content');
|
|
104
|
-
console.log(resolutionsJson);
|
|
105
|
-
rootPackageJson.resolutions = resolutionsJson;
|
|
106
|
-
|
|
107
|
-
tools.logInfo('Updating root package.json');
|
|
108
|
-
tools.writeJsonFileSync(rootPackageJsonFile, rootPackageJson);
|
|
109
|
-
|
|
110
|
-
} else {
|
|
111
|
-
tools.logInfo('Not found...skipping');
|
|
112
|
-
}
|
|
113
|
-
})
|
|
114
115
|
.catch((e) => {
|
|
115
116
|
throw e;
|
|
116
117
|
})
|
|
@@ -36,12 +36,7 @@ module.exports.init = (finalResponse) => {
|
|
|
36
36
|
// adapt and inject particular root data/config for eUI version detected on project
|
|
37
37
|
// if multiple versions of eUI are detected on the same project, an exception is thrown
|
|
38
38
|
.then(() => {
|
|
39
|
-
return initUtils.global.
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
// specific resolution injection based on NodeJS (recent failure of nodejs10.x for MWP v7)
|
|
43
|
-
.then(() => {
|
|
44
|
-
return initUtils.global.processResolutionsForNodeVersion();
|
|
39
|
+
return initUtils.global.initRootFilesAndResolutions();
|
|
45
40
|
})
|
|
46
41
|
|
|
47
42
|
// Install deps based on current config generated => take last know snapshots
|
|
@@ -49,12 +49,7 @@ module.exports.init = (finalResponse) => {
|
|
|
49
49
|
// adapt and inject particular root data/config for eUI version detected on project
|
|
50
50
|
// if multiple versions of eUI are detected on the same project, an exception is thrown
|
|
51
51
|
.then(() => {
|
|
52
|
-
return initUtils.global.
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
// specific resolution injection based on NodeJS (recent failure of nodejs10.x for MWP v7)
|
|
56
|
-
.then(() => {
|
|
57
|
-
return initUtils.global.processResolutionsForNodeVersion();
|
|
52
|
+
return initUtils.global.initRootFilesAndResolutions();
|
|
58
53
|
})
|
|
59
54
|
|
|
60
55
|
// Install deps based on current config generated => take last know snapshots
|
|
@@ -63,10 +63,7 @@ module.exports.sync = () => {
|
|
|
63
63
|
return initUtils.meta.init();
|
|
64
64
|
})
|
|
65
65
|
.then(() => {
|
|
66
|
-
return initUtils.global.
|
|
67
|
-
})
|
|
68
|
-
.then(() => {
|
|
69
|
-
return initUtils.global.processResolutionsForNodeVersion();
|
|
66
|
+
return initUtils.global.initRootFilesAndResolutions();
|
|
70
67
|
})
|
|
71
68
|
.then(() => {
|
|
72
69
|
if (!skipInstall) {
|
|
@@ -31,7 +31,7 @@ module.exports.getPackageConfig = (pkg) => {
|
|
|
31
31
|
SLACK_HOOK: globalConfig.SLACK_HOOK,
|
|
32
32
|
SLACK_CHANNEL: slackChannel
|
|
33
33
|
}
|
|
34
|
-
} else if (globalConfig.NOTIFICATION_CLIENT === '
|
|
34
|
+
} else if (globalConfig.NOTIFICATION_CLIENT === 'MSTEAMS') {
|
|
35
35
|
return {
|
|
36
36
|
CLIENT: globalConfig.NOTIFICATION_CLIENT,
|
|
37
37
|
MSTEAMS_CHANNEL: msTeamsChannel,
|