@eui/tools 6.11.11 → 6.11.12
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/bin/eui-scripts.js +4 -2
- package/bin/scripts/bundle-analyze-remote.js +12 -0
- package/package.json +4 -3
- package/scripts/csdr/init/resources/13.x/resolutions.json +1 -2
- package/scripts/csdr/init/resources/14.x/resolutions.json +1 -2
- package/scripts/csdr/init/resources/15.x/resolutions.json +1 -2
- package/scripts/utils/bundle-analyzer/bundle-analyzer-utils.js +3 -0
- package/scripts/utils/bundle-analyzer/remote.js +38 -0
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.11.
|
|
1
|
+
6.11.12
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 6.11.12 (2023-04-21)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* remote temporary caniuse-lite resolutions on all eUI versions init phase - added webpack-bundle-analyzer command for remotes - upgraded xml2js to 0.5.0 - EUI-7121 EUI-7416 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([9106adee](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/9106adeed9381fd8daebfc63cef26fd149b6a64f))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
1
10
|
## 6.11.11 (2023-04-20)
|
|
2
11
|
|
|
3
12
|
##### Bug Fixes
|
package/bin/eui-scripts.js
CHANGED
|
@@ -46,7 +46,8 @@ const scriptIndex = args.findIndex(
|
|
|
46
46
|
x === 'help' ||
|
|
47
47
|
x === 'i18n-translate' ||
|
|
48
48
|
x === 'inject-config-app' ||
|
|
49
|
-
x === 'version'
|
|
49
|
+
x === 'version' ||
|
|
50
|
+
x === 'bundle-analyze-remote'
|
|
50
51
|
);
|
|
51
52
|
const script = scriptIndex === -1 ? args[0] : args[scriptIndex];
|
|
52
53
|
const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];
|
|
@@ -91,7 +92,8 @@ switch (script) {
|
|
|
91
92
|
case 'help':
|
|
92
93
|
case 'i18n-translate':
|
|
93
94
|
case 'inject-config-app':
|
|
94
|
-
case 'version':
|
|
95
|
+
case 'version':
|
|
96
|
+
case 'bundle-analyze-remote': {
|
|
95
97
|
const result = spawn.sync(
|
|
96
98
|
'node',
|
|
97
99
|
nodeArgs
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const bundleAnalyzerUtils = require('../../scripts/utils/bundle-analyzer/bundle-analyzer-utils');
|
|
4
|
+
|
|
5
|
+
Promise.resolve()
|
|
6
|
+
.then(() => {
|
|
7
|
+
return bundleAnalyzerUtils.remote.run();
|
|
8
|
+
})
|
|
9
|
+
.catch((e) => {
|
|
10
|
+
console.error(e);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eui/tools",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.12",
|
|
4
4
|
"tag": "latest",
|
|
5
5
|
"license": "EUPL-1.1",
|
|
6
6
|
"description": "eUI common tools and scripts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"moment-timezone": "0.5.43",
|
|
26
26
|
"npm-run-all": "4.1.5",
|
|
27
27
|
"figures": "3.2.0",
|
|
28
|
-
"xml2js": "0.
|
|
28
|
+
"xml2js": "0.5.0",
|
|
29
29
|
"https-proxy-agent": "5.0.1",
|
|
30
30
|
"json-server": "0.17.3",
|
|
31
31
|
"faker": "5.5.3",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"morgan": "1.10.0",
|
|
51
51
|
"open": "8.4.2",
|
|
52
52
|
"body-parser": "1.20.2",
|
|
53
|
-
"express": "4.18.2"
|
|
53
|
+
"express": "4.18.2",
|
|
54
|
+
"webpack-bundle-analyzer": "4.8.0"
|
|
54
55
|
}
|
|
55
56
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
const tools = require('../tools');
|
|
6
|
+
const configUtils = require('../../csdr/config/config-utils');
|
|
7
|
+
|
|
8
|
+
module.exports.run = () => {
|
|
9
|
+
return Promise.resolve()
|
|
10
|
+
.then(() => {
|
|
11
|
+
tools.logTitle('Bundle analyzer remote');
|
|
12
|
+
|
|
13
|
+
const remoteName = tools.getArgs().root;
|
|
14
|
+
|
|
15
|
+
if (!remoteName) {
|
|
16
|
+
tools.logError('ERROR!! Remote not provided as argument');
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const remote = configUtils.remotes.getRemote(remoteName);
|
|
21
|
+
|
|
22
|
+
if (!tools.isDirExists(remote.paths.dist)) {
|
|
23
|
+
tools.logError('ERROR!! Remote has not been built, unable to analyze -- build your remote using the remote:build REMOTE_NAME script');
|
|
24
|
+
return
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (!tools.isFileExists(path.join(remote.paths.dist, 'stats.json'))) {
|
|
28
|
+
tools.logError(`ERROR!! Unable to find stats.json file in ${remote.paths.dist} -- build your remote using the --statsJson parameter`);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return tools.runScript(`webpack-bundle-analyzer ${remote.paths.dist}/stats.json`);
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
.catch((e) => {
|
|
36
|
+
throw e;
|
|
37
|
+
})
|
|
38
|
+
}
|