@eui/tools 6.11.10 → 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.
@@ -1 +1 @@
1
- 6.11.10
1
+ 6.11.12
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
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
+ * * *
10
+ ## 6.11.11 (2023-04-20)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * translation scopes on eUI libs not having i18n-eui set - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([dd132fcf](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/dd132fcfa2f8d0fc051746b42196919f0096982e))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.11.10 (2023-04-19)
2
20
 
3
21
  ##### Chores
@@ -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.10",
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.4.23",
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
  }
@@ -5,6 +5,5 @@
5
5
  "isbinaryfile": "4.0.8",
6
6
  "postcss-preset-env": "7.6.0",
7
7
  "klaw": "3.0.0",
8
- "eslint-plugin-jsdoc": "38.1.6",
9
- "caniuse-lite" : "1.0.30001450"
8
+ "eslint-plugin-jsdoc": "38.1.6"
10
9
  }
@@ -3,6 +3,5 @@
3
3
  "https-proxy-agent": ">=2.2.3",
4
4
  "mem": ">=4.3.0 <=8.1.1",
5
5
  "zone.js": ">=0.11.5",
6
- "nth-check": ">=2.0.1",
7
- "caniuse-lite" : "1.0.30001450"
6
+ "nth-check": ">=2.0.1"
8
7
  }
@@ -1,4 +1,3 @@
1
1
  {
2
- "cacheable-request": ">=10.2.7",
3
- "caniuse-lite" : "1.0.30001450"
2
+ "cacheable-request": ">=10.2.7"
4
3
  }
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports.remote = require('./remote');
@@ -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
+ }
@@ -100,7 +100,13 @@ module.exports.generate = (inputScopes = '', inputPkg) => {
100
100
  tools.logInfo(`${file} found...adding`);
101
101
  addTranslation(file, lang)
102
102
  } else {
103
- tools.logInfo(`${file} not found...skipping`);
103
+ file = path.join(pkg.folder, `assets/i18n/${lang}.json`);
104
+ if (tools.isFileExists(file)) {
105
+ tools.logInfo(`${file} found...adding`);
106
+ addTranslation(file, lang)
107
+ } else {
108
+ tools.logInfo(`${file} not found...skipping`);
109
+ }
104
110
  }
105
111
  });
106
112