@eui/tools 6.13.3 → 6.13.5

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.13.3
1
+ 6.13.5
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.13.5 (2023-10-23)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * add support for sub-entries testing - EUI-6743 [EUI-6743](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-6743) ([e659aaea](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/e659aaeab02321155e361d99f13be74466321f3a))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.13.4 (2023-10-21)
11
+
12
+ ##### Chores
13
+
14
+ * **other:**
15
+ * add config param for preventing esbuild output to alternate sub dist folder - EUI-7843 [EUI-7843](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7843) ([5e48dddf](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/5e48dddf65307a465cf844780d69f861ffd4bcb0))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.13.3 (2023-10-20)
2
20
 
3
21
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.13.3",
3
+ "version": "6.13.5",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -253,6 +253,12 @@ module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) =>
253
253
  }
254
254
  })
255
255
 
256
+ .then(() => {
257
+ if (currentProject.build && currentProject.build.esbuild && currentProject.build.skipBrowserOutputPath) {
258
+ tools.copydir(path.join(currentProject.paths.rootPath, 'dist', 'browser'), path.join(currentProject.paths.rootPath, 'dist'));
259
+ tools.remove(path.join(currentProject.paths.rootPath, 'dist', 'browser'));
260
+ }
261
+ })
256
262
 
257
263
  .catch((e) => {
258
264
  throw e;
@@ -14,19 +14,56 @@ const { watch, skipCoverage, timeout, build } = tools.getArgs();
14
14
 
15
15
 
16
16
  module.exports.run = () => {
17
- let pkg;
17
+ let pkg, sub;
18
18
 
19
19
  return Promise.resolve()
20
20
  .then(() => {
21
21
  pkg = configUtils.packages.getPackage();
22
22
  })
23
-
23
+ .then(() => {
24
+ return new Promise((resolve, reject) => {
25
+ const { subEntry } = tools.getArgs();
26
+ sub = subEntry;
27
+ if(subEntry) {
28
+ tools.getFilesGlob(`${pkg.paths.fromRoot}/${subEntry}`, `**/package.json`)
29
+ .then((files) => {
30
+ if (files.length === 0) {
31
+ tools.logWarning(`no sub-entries found within package ${pkg.name}`);
32
+ return;
33
+
34
+ } else {
35
+ let subEntryPath = files.filter((f) => {
36
+ return f.indexOf(subEntry) > -1;
37
+ })[0];
38
+
39
+ if (!subEntryPath) {
40
+ tools.logWarning(`${subEntry} can't be found in sub-folders of package (must contains package.json file for sub-entry definition)`);
41
+ tools.logWarning(`Try to run : yarn run pkg:build eui-components --sub-entry ${subEntry}`);
42
+ throw new Error('sub-entry not found');
43
+ return;
44
+
45
+ } else {
46
+ subEntryPath = subEntryPath.replace('/ng-package.json', '');
47
+ tools.logInfo(`${subEntryPath} found... injecting angular.json for sub entry`);
48
+
49
+ return configUtils.angular.registerAngularPackageSubEntry(subEntry, subEntryPath, pkg);
50
+ }
51
+ ;
52
+ }
53
+ })
54
+ .then(() => resolve())
55
+ .catch((e) => reject(e));
56
+ } else {
57
+ resolve();
58
+ }
59
+ });
60
+ })
24
61
  .then(() => {
25
62
  tools.logInfo(`Testing package : ${pkg.name}...`);
26
63
 
27
64
  const ng = path.resolve(process.cwd(), 'node_modules', '@angular', 'cli', 'bin', 'ng');
28
65
 
29
- let args = ['--max_old_space_size=8096', ng, 'test', pkg.name];
66
+ let args = ['--max_old_space_size=8096', ng, 'test', sub ? sub : pkg.name];
30
67
 
31
68
  args.push('--code-coverage');
32
69