@ui5/builder 4.0.0 → 4.0.1

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,14 @@
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-builder/compare/v4.0.0...HEAD).
5
+ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v4.0.1...HEAD).
6
+
7
+ <a name="v4.0.1"></a>
8
+ ## [v4.0.1] - 2024-07-26
9
+ ### Bug Fixes
10
+ - **manifestEnhancer:** Improve error handling [`16a4e78`](https://github.com/SAP/ui5-builder/commit/16a4e785ab71f8714b3926aa0bb8573f8da4dd08)
11
+ - **manifestEnhancer:** Fix fallbackLocale handling [`421a375`](https://github.com/SAP/ui5-builder/commit/421a37577c11c50d938bc59f3b8fca371a703cd3)
12
+
6
13
 
7
14
  <a name="v4.0.0"></a>
8
15
  ## [v4.0.0] - 2024-07-23
@@ -919,6 +926,7 @@ to load the custom bundle file instead.
919
926
 
920
927
  ### Features
921
928
  - Add ability to configure component preloads and custom bundles [`2241e5f`](https://github.com/SAP/ui5-builder/commit/2241e5ff98fd95f1f80cc74959655ae7a9c660e7)
929
+ [v4.0.1]: https://github.com/SAP/ui5-builder/compare/v4.0.0...v4.0.1
922
930
  [v4.0.0]: https://github.com/SAP/ui5-builder/compare/v3.3.0...v4.0.0
923
931
  [v3.5.1]: https://github.com/SAP/ui5-builder/compare/v3.5.0...v3.5.1
924
932
  [v3.5.0]: https://github.com/SAP/ui5-builder/compare/v3.4.1...v3.5.0
@@ -212,7 +212,7 @@ class ManifestEnhancer {
212
212
  }
213
213
  const supportedLocales = await this.findSupportedLocales(normalizedBundleUrl);
214
214
  if (!isTerminologyBundle && supportedLocales.length > 0) {
215
- if (fallbackLocale && !supportedLocales.includes(fallbackLocale)) {
215
+ if (typeof fallbackLocale === "string" && !supportedLocales.includes(fallbackLocale)) {
216
216
  log.error(
217
217
  `${this.filePath}: ` +
218
218
  `Generated supported locales ('${supportedLocales.join("', '")}') for ` +
@@ -221,7 +221,7 @@ class ManifestEnhancer {
221
221
  "properties file for defined fallbackLocale or configure another available fallbackLocale"
222
222
  );
223
223
  return [];
224
- } else if (!fallbackLocale && !supportedLocales.includes("en")) {
224
+ } else if (typeof fallbackLocale === "undefined" && !supportedLocales.includes("en")) {
225
225
  log.warn(
226
226
  `${this.filePath}: ` +
227
227
  `Generated supported locales ('${supportedLocales.join("', '")}') for ` +
@@ -359,7 +359,7 @@ class ManifestEnhancer {
359
359
  this.runInvoked = true;
360
360
 
361
361
  if (!this.manifest._version) {
362
- log.verbose(`${this.filePath}: _version is not defined. No supportedLocales are generated`);
362
+ log.verbose(`${this.filePath}: _version is not defined. No supportedLocales can be generated`);
363
363
  return;
364
364
  }
365
365
 
@@ -368,6 +368,11 @@ class ManifestEnhancer {
368
368
  return;
369
369
  }
370
370
 
371
+ if (!this.manifest["sap.app"]?.id) {
372
+ log.verbose(`${this.filePath}: sap.app/id is not defined. No supportedLocales can be generated`);
373
+ return;
374
+ }
375
+
371
376
  if (this.manifest["sap.app"].type === "library") {
372
377
  await this.processSapUi5LibraryI18n();
373
378
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/builder",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "UI5 Tooling - Builder",
5
5
  "author": {
6
6
  "name": "SAP SE",