@eui/tools 6.3.39 → 6.3.40

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.3.39
1
+ 6.3.40
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 6.3.40 (2023-02-20)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * add resolution injection at remote level - EUI-6448 [EUI-6448](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-6448) ([f38c1e67](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/f38c1e67de447a3dc76972959ad1c9fecd415d7e))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 6.3.39 (2023-02-20)
2
11
 
3
12
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.3.39",
3
+ "version": "6.3.40",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -11,6 +11,29 @@ const configUtils = require('../config/config-utils');
11
11
  const { registry } = tools.getArgs();
12
12
 
13
13
 
14
+ const processResolutionsInjection = module.exports.processResolutionsInjection = (packageJsonPath, euiVersion) => {
15
+ tools.logInfo(`Processing resolutions replacement for eUI version found : ${euiVersion}`);
16
+
17
+ const packageJsonFile = path.join(packageJsonPath, 'package.json');
18
+ const packageJson = require(packageJsonFile);
19
+ const resolutionsJsonFile = path.join(__dirname, 'resources', euiVersion, 'resolutions.json');
20
+
21
+ if (tools.isFileExists(resolutionsJsonFile)) {
22
+ const resolutionsJson = require(resolutionsJsonFile);
23
+
24
+ tools.logInfo('Injecting resolutions content');
25
+ console.log(resolutionsJson);
26
+ packageJson.resolutions = resolutionsJson;
27
+
28
+ tools.logInfo('Updating root package.json');
29
+ tools.writeJsonFileSync(packageJsonFile, packageJson);
30
+
31
+ } else {
32
+ tools.logInfo('Not found...skipping');
33
+ }
34
+ }
35
+
36
+
14
37
 
15
38
  module.exports.processLocalEuiVersions = () => {
16
39
  tools.logTitle('Processing injections for local installed eUI versions if needed');
@@ -23,25 +46,7 @@ module.exports.processLocalEuiVersions = () => {
23
46
  tools.logInfo('Default eUI version found or empty...skipping');
24
47
 
25
48
  } else {
26
- tools.logInfo(`Processing resolutions replacement for eUI version found : ${euiVersion}`);
27
-
28
- const rootPackageJsonFile = path.join(process.cwd(), 'package.json');
29
- const rootPackageJson = require(rootPackageJsonFile);
30
-
31
- const resolutionsJsonFile = path.join(__dirname, 'resources', euiVersion, 'resolutions.json');
32
-
33
- if (tools.isFileExists(resolutionsJsonFile)) {
34
- const resolutionsJson = require(resolutionsJsonFile);
35
-
36
- tools.logInfo('Injecting resolutions content');
37
- console.log(resolutionsJson);
38
- rootPackageJson.resolutions = resolutionsJson;
39
-
40
- tools.logInfo('Updating root package.json');
41
- tools.writeJsonFileSync(rootPackageJsonFile, rootPackageJson);
42
- } else {
43
- tools.logInfo('Not found...skipping');
44
- }
49
+ processResolutionsInjection(process.cwd(), euiVersion);
45
50
 
46
51
  tools.logInfo(`Processing .browserlistrc replacement for eUI version found : ${euiVersion}`);
47
52
 
@@ -7,6 +7,7 @@ const path = require('path');
7
7
  const tools = require('../../utils/tools');
8
8
  const configUtils = require('../config/config-utils');
9
9
  const metadataUtils = require('../metadata/metadata-utils');
10
+ const initUtils = require('../init/init-utils');
10
11
 
11
12
  // INNER MODULES
12
13
  const innerCommon = require('./common');
@@ -82,6 +83,14 @@ const pkgInstall = (pkg, envTarget, compositeType) => {
82
83
 
83
84
  pkgJson.dependencies = deps;
84
85
 
86
+
87
+ // getting package eUI version
88
+ const euiVersion = configUtils.packages.getPackageEuiVersion(pkg);
89
+
90
+ // checking for resolution updates according to eUI version used
91
+ initUtils.global.processResolutionsInjection(pkg.paths.root, euiVersion);
92
+
93
+
85
94
  if (dryRun) {
86
95
  tools.logInfo('DRY-RUN - skipping install');
87
96