@ui5/task-adaptation 1.1.2 → 1.1.3

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.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,10 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4
4
 
5
- A list of unreleased changes can be found [here](https://github.com/SAP/ui5-task-adaptation/compare/v1.1.2...HEAD).
5
+ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-task-adaptation/compare/v1.1.3...HEAD).
6
+
7
+ <a name="v1.1.3"></a>
8
+ ## [v1.1.3] - 2024-02-26
6
9
 
7
10
  <a name="v1.1.2"></a>
8
11
  ## [v1.1.2] - 2024-02-23
@@ -79,6 +82,7 @@ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-task
79
82
  <a name="v1.0.0"></a>
80
83
  ## v1.0.0 - 2020-12-09
81
84
 
85
+ [v1.1.3]: https://github.com/SAP/ui5-task-adaptation/compare/v1.1.2...v1.1.3
82
86
  [v1.1.2]: https://github.com/SAP/ui5-task-adaptation/compare/v1.1.1...v1.1.2
83
87
  [v1.1.1]: https://github.com/SAP/ui5-task-adaptation/compare/v1.1.0...v1.1.1
84
88
  [v1.1.0]: https://github.com/SAP/ui5-task-adaptation/compare/v1.0.23...v1.1.0
@@ -114,8 +114,11 @@ class Comparator {
114
114
  const includer_a = new Includer(a, property);
115
115
  const includer_b = new Includer(b, property);
116
116
  for (let i = 0; i < Math.max(a.length, b.length); i++) {
117
- const id_a = a[i]?._attributes[idProperty];
118
- const id_b = b[i]?._attributes[idProperty];
117
+ // There might be an exceptional case, when the object doesn't
118
+ // contain attributes. In this case we continue traversing, like
119
+ // UI5 does.
120
+ const id_a = a[i]?._attributes?.[idProperty];
121
+ const id_b = b[i]?._attributes?.[idProperty];
119
122
  if (id_a !== id_b) {
120
123
  // We go down the array and if suddenly the ids for comparing
121
124
  // items are not the same, we need to find the item with the
@@ -63,11 +63,14 @@ class AppVariantManager {
63
63
  }
64
64
  }
65
65
  this.validateManifest(manifest);
66
+ // Order is important: apply manifest.json changes first, then *.change
67
+ // files. UI5 does the same.
68
+ const changes = (manifest.content ?? []).concat(manifestChanges);
66
69
  return {
67
70
  id: manifest.id,
68
71
  reference: manifest.reference,
69
72
  layer: manifest.layer,
70
- changes: manifestChanges.concat(manifest.content)
73
+ changes
71
74
  };
72
75
  }
73
76
  static validateManifest(manifest) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/task-adaptation",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Custom task for ui5-builder which allows building UI5 Flexibility Adaptation Projects for SAP BTP, Cloud Foundry environment",
5
5
  "main": "index.js",
6
6
  "scripts": {