@eui/tools 4.21.11 → 4.21.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
- 4.21.11
1
+ 4.21.12
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 4.21.12 (2022-04-08)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * adapted resolutions based on nodejs version detected as v7 is stuck building packages - EUI-4106 [EUI-4106](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4106) ([a3e55041](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/a3e550416b16d543cebd09e96d18be1834d317d4))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 4.21.11 (2022-04-07)
2
11
 
3
12
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "4.21.11",
3
+ "version": "4.21.12",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -694,10 +694,9 @@ const translationUtils = require('./scripts/utils/pre-build/translations/transla
694
694
  // console.log(configOptions);
695
695
  // })
696
696
 
697
- return Promise.resolve()
697
+ Promise.resolve()
698
698
  .then(() => {
699
- const versions = configUtils.packages.getLocalPackagesEuiVersion();
700
- console.log(versions);
699
+ return initUtils.processResolutionsForNodeVersion();
701
700
  })
702
701
 
703
702
  // return Promise.resolve()
@@ -243,3 +243,39 @@ module.exports.processLocalEuiVersions = () => {
243
243
  throw e;
244
244
  })
245
245
  }
246
+
247
+
248
+ module.exports.processResolutionsForNodeVersion = () => {
249
+ return Promise.resolve()
250
+ .then(() => {
251
+ tools.logTitle('Processing injections for detected nodeJS version');
252
+
253
+ let nodeVersion = process.versions.node;
254
+ nodeVersion = `${nodeVersion.split('.')[0]}.x`;
255
+
256
+ const rootPackageJsonFile = path.join(process.cwd(), 'package.json');
257
+ const rootPackageJson = require(rootPackageJsonFile);
258
+
259
+ const nodeVersionResource = `nodejs-${nodeVersion}`;
260
+
261
+ const resolutionsJsonFile = path.join(__dirname, 'resources', nodeVersionResource, 'resolutions.json');
262
+
263
+ tools.logInfo(`Checking nodejsResolution resource for path: ${resolutionsJsonFile}`);
264
+
265
+ if (tools.isFileExists(resolutionsJsonFile)) {
266
+ const resolutionsJson = require(resolutionsJsonFile);
267
+
268
+ tools.logInfo('Injecting resolutions content');
269
+ console.log(resolutionsJson);
270
+ rootPackageJson.resolutions = resolutionsJson;
271
+
272
+ tools.logInfo('Updating root package.json');
273
+ tools.writeJsonFileSync(rootPackageJsonFile, rootPackageJson);
274
+ } else {
275
+ tools.logWarning('Not found...skipping');
276
+ }
277
+ })
278
+ .catch((e) => {
279
+ throw e;
280
+ })
281
+ }
@@ -83,6 +83,11 @@ module.exports.init = () => {
83
83
  return initUtils.processLocalEuiVersions();
84
84
  })
85
85
 
86
+ // specific resolution injection based on NodeJS (recent failure of nodejs10.x for MWP v7)
87
+ .then(() => {
88
+ return initUtils.processResolutionsForNodeVersion();
89
+ })
90
+
86
91
  // Install deps based on current config generated => take last know snapshots
87
92
  .then(() => {
88
93
  // this is only executed for local dev installation,
@@ -0,0 +1,7 @@
1
+ {
2
+ "sockjs-client":"1.5.2",
3
+ "https-proxy-agent": ">=2.2.3",
4
+ "@types/node": "14.14.10",
5
+ "mem": ">=4.3.0 <=8.1.1",
6
+ "lru-cache": "5.1.1"
7
+ }
@@ -56,6 +56,9 @@ module.exports.sync = () => {
56
56
  .then(() => {
57
57
  return initUtils.processLocalEuiVersions();
58
58
  })
59
+ .then(() => {
60
+ return initUtils.processResolutionsForNodeVersion();
61
+ })
59
62
  .catch((e) => {
60
63
  throw e;
61
64
  })
@@ -1,6 +0,0 @@
1
- {
2
- "sockjs-client": "1.5.2",
3
- "https-proxy-agent": ">=2.2.3",
4
- "@types/node": "14.14.10",
5
- "mem": ">=4.3.0 <=8.1.1"
6
- }