@eui/tools 6.15.12 → 6.15.14

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.15.12
1
+ 6.15.14
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.15.14 (2024-02-06)
2
+
3
+ ##### Refactors
4
+
5
+ * **other:**
6
+ * Update package dependencies based on package name prefix - EUI-8840 [EUI-8840](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-8840) ([5a2d62ed](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/5a2d62ed13762cdd4cb6c1081aa3f7936ddb5848))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.15.13 (2024-02-02)
11
+
12
+ ##### Chores
13
+
14
+ * **other:**
15
+ * addition of title management at route level MWP-10441 [MWP-10441](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-10441) ([9a3f7f85](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/9a3f7f85669c8037dbc2e9c903b1f31a4f2c58df))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.15.12 (2024-02-02)
2
20
 
3
21
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.15.12",
3
+ "version": "6.15.14",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -39,6 +39,23 @@ const writePackageJsonCore = (newVersion, folder, isSnapshot, isNextBranch, isSu
39
39
  pkgJson.version = newVersion;
40
40
  pkgJson.tag = tag;
41
41
 
42
+ // This code snippet checks if the package name starts with '@eui' and updates the version of dependencies
43
+ // and peerDependencies accordingly, excluding dependencies that start with '@eui/tools'.
44
+ if(pkgJson.name.startsWith('@eui') && pkgJson.dependencies) {
45
+ Object.keys(pkgJson.dependencies)
46
+ .filter(dep => dep.startsWith('@eui') && !dep.startsWith('@eui/tools'))
47
+ .forEach((dep) => {
48
+ pkgJson.dependencies[dep] = newVersion;
49
+ });
50
+ }
51
+ if(pkgJson.name.startsWith('@eui') && pkgJson.peerDependencies) {
52
+ Object.keys(pkgJson.peerDependencies)
53
+ .filter(dep => dep.startsWith('@eui') && !dep.startsWith('@eui/tools'))
54
+ .forEach((dep) => {
55
+ pkgJson.peerDependencies[dep] = newVersion;
56
+ });
57
+ }
58
+
42
59
  tools.logInfo(`Updating package version : ${newVersion} / tag: ${tag} for ${pkgJsonFile}`);
43
60
  tools.writeJsonFileSync(pkgJsonFile, pkgJson);
44
61
  }
@@ -48,6 +65,13 @@ const writePackageJsonCore = (newVersion, folder, isSnapshot, isNextBranch, isSu
48
65
  })
49
66
  }
50
67
 
68
+ const processDependency = (dep) => {
69
+ if(dep.startsWith('@eui')) {
70
+ pkgJson.dependencies[dep] = newVersion;
71
+ }
72
+ return dep;
73
+ }
74
+
51
75
  const writePackageJson = (pkg, newVersion, isSnapshot, isNextBranch, isSupportBranch, isHotfixBranch, envTarget) => {
52
76
  return Promise.resolve()
53
77
  .then(() => {
@@ -346,13 +346,18 @@ const getProjectRoutes = (project, routesDefs) => {
346
346
  remoteDef: null,
347
347
  };
348
348
 
349
- // in the case the route is auth guarded, we attach the defition of the auth parameters
349
+ // in the case the route is auth guarded, we attach the definition of the auth parameters
350
350
  if (defRoute.authMetadata) {
351
351
  newAppRoute.angularRouteDef.data.id = defRoute.authMetadata.id;
352
352
  newAppRoute.angularRouteDef.data.ids = defRoute.authMetadata.ids;
353
353
  newAppRoute.angularRouteDef.canActivate = defRoute.authMetadata.canActivate;
354
354
  }
355
355
 
356
+ // in the case there's a title for the route, we attach it
357
+ if (defRoute.title) {
358
+ newAppRoute.angularRouteDef.title = defRoute.title;
359
+ }
360
+
356
361
  // in case of a remote, the "remoteDefs" data entry are processed
357
362
  // in case no remote corresponds to a remote path defined in the definitions, we throw an error and we stop the
358
363
  // script to avoid bad route data / or partial routes data generated
@@ -405,6 +410,9 @@ const generateAngularRoutes = (project, routes) => {
405
410
  let routeContent = '{\n';
406
411
 
407
412
  routeContent += ` path: '${route.path}',\n`;
413
+ if (route.title) {
414
+ routeContent += ` title: '${route.title}',\n`;
415
+ }
408
416
  if (Object.keys(route.data).length > 0) {
409
417
  routeContent += ' data: {\n';
410
418