@ui5/builder 4.1.1 → 4.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,16 @@
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.1.1...HEAD).
5
+ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v4.1.3...HEAD).
6
+
7
+ <a name="v4.1.3"></a>
8
+ ## [v4.1.3] - 2025-11-26
9
+ ### Bug Fixes
10
+ - **Bundling:** generateFlexChangesBundle should not rely on existing manifest.json ([#1178](https://github.com/SAP/ui5-builder/issues/1178)) [`f61705b`](https://github.com/SAP/ui5-builder/commit/f61705bcd03b1033afed7d4243647eee60f2faa1)
11
+
12
+
13
+ <a name="v4.1.2"></a>
14
+ ## [v4.1.2] - 2025-11-14
6
15
 
7
16
  <a name="v4.1.1"></a>
8
17
  ## [v4.1.1] - 2025-10-30
@@ -1001,6 +1010,8 @@ to load the custom bundle file instead.
1001
1010
 
1002
1011
  ### Features
1003
1012
  - Add ability to configure component preloads and custom bundles [`2241e5f`](https://github.com/SAP/ui5-builder/commit/2241e5ff98fd95f1f80cc74959655ae7a9c660e7)
1013
+ [v4.1.3]: https://github.com/SAP/ui5-builder/compare/v4.1.2...v4.1.3
1014
+ [v4.1.2]: https://github.com/SAP/ui5-builder/compare/v4.1.1...v4.1.2
1004
1015
  [v4.1.1]: https://github.com/SAP/ui5-builder/compare/v4.1.0...v4.1.1
1005
1016
  [v4.1.0]: https://github.com/SAP/ui5-builder/compare/v4.0.13...v4.1.0
1006
1017
  [v4.0.13]: https://github.com/SAP/ui5-builder/compare/v4.0.11...v4.0.13
@@ -491,11 +491,18 @@ async function createManifest(
491
491
  }
492
492
  }
493
493
 
494
- return {
494
+ const libraryMetadata = {
495
495
  i18n: i18n(),
496
496
  css: css(),
497
497
  content: content()
498
498
  };
499
+
500
+ if (process.env.UI5_CLI_EXPERIMENTAL_BUNDLE_INFO_PRELOAD) {
501
+ // Add flag indicating that the (currently experimental) bundleVersion 2 preload bundling is used
502
+ libraryMetadata.bundleVersion = 2;
503
+ }
504
+
505
+ return libraryMetadata;
499
506
  }
500
507
 
501
508
  const sapUI5 = {
@@ -441,6 +441,12 @@ class ManifestEnhancer {
441
441
 
442
442
  if (this.manifest["sap.app"].type === "library") {
443
443
  await this.processSapUi5LibraryI18n();
444
+
445
+ if (process.env.UI5_CLI_EXPERIMENTAL_BUNDLE_INFO_PRELOAD) {
446
+ // Add flag indicating that the (currently experimental) bundleVersion 2 preload bundling is used
447
+ this.manifest["sap.ui5"].library ??= {};
448
+ this.manifest["sap.ui5"].library.bundleVersion = 2;
449
+ }
444
450
  } else {
445
451
  await Promise.all([
446
452
  this.processSapAppI18n(),
@@ -63,6 +63,10 @@ export default async function({workspace, taskUtil, options = {}}) {
63
63
 
64
64
  async function updateManifestWithFlDependencyAndFlexBundleFlag(bBundleCreated) {
65
65
  const manifestResource = await workspace.byPath(`${pathPrefix}/manifest.json`);
66
+ if (!manifestResource) {
67
+ log.verbose("No manifest.json found, skipping update of sap.ui.fl dependency and flexBundle flag");
68
+ return;
69
+ }
66
70
  const manifestContent = JSON.parse(await manifestResource.getString());
67
71
 
68
72
  updateJson(manifestContent, bBundleCreated);
@@ -73,6 +77,10 @@ export default async function({workspace, taskUtil, options = {}}) {
73
77
 
74
78
  async function readManifestMinUI5Version() {
75
79
  const manifestResource = await workspace.byPath(`${pathPrefix}/manifest.json`);
80
+ if (!manifestResource) {
81
+ log.verbose("No manifest.json found, cannot read minUI5Version");
82
+ return [];
83
+ }
76
84
  const manifestContent = JSON.parse(await manifestResource.getString());
77
85
 
78
86
  manifestContent["sap.ui5"] = manifestContent["sap.ui5"] || {};
@@ -141,7 +141,7 @@ function getBundleInfoPreloadDefinition(namespace, excludes, coreVersion) {
141
141
  },
142
142
  {
143
143
  mode: "bundleInfo",
144
- name: `${namespace}/library-content.js`,
144
+ name: `${namespace}/_library-content.js`,
145
145
  filters: getDefaultLibraryPreloadFilters(namespace, excludes),
146
146
  resolve: false,
147
147
  resolveConditional: false,
@@ -181,7 +181,7 @@ function getBundleInfoPreloadDefinition(namespace, excludes, coreVersion) {
181
181
 
182
182
  function getContentBundleDefinition(namespace, excludes) {
183
183
  return {
184
- name: `${namespace}/library-content.js`,
184
+ name: `${namespace}/_library-content.js`,
185
185
  sections: [{
186
186
  mode: "provided",
187
187
  filters: getExperimentalDefaultLibraryPreloadFilters(namespace, excludes),
@@ -525,6 +525,24 @@ export default async function({workspace, taskUtil, options: {skipBundles = [],
525
525
  `Using experimental bundling with bundle info preload ` +
526
526
  `for library ${libraryNamespace} in project ${projectName}`);
527
527
  log.info(`Detected sap.ui.core version is ${coreVersion || "unknown"}`);
528
+
529
+
530
+ if (skipBundles.includes(`${libraryNamespace}/library-preload.js`) &&
531
+ !skipBundles.includes(`${libraryNamespace}/_library-content.js`)) {
532
+ // If the standard preload bundle is skipped, ensure to also skip the content bundle,
533
+ // since they depend on each other
534
+ skipBundles.push(`${libraryNamespace}/_library-content.js`);
535
+ }
536
+
537
+ if (skipBundles.includes(`${libraryNamespace}/_library-content.js`) &&
538
+ !skipBundles.includes(`${libraryNamespace}/library-preload.js`)) {
539
+ // If the content bundle is skipped, the default preload bundle must be skipped as well
540
+ throw new Error(
541
+ `A custom bundle '${libraryNamespace}/_library-content.js' has been defined, ` +
542
+ `but it also requires a corresponding custom bundle definition for ` +
543
+ `'${libraryNamespace}/library-preload.js'`);
544
+ }
545
+
528
546
  // Experimental bundling with bundle info preload
529
547
  results = await Promise.all([
530
548
  execModuleBundlerIfNeeded({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/builder",
3
- "version": "4.1.1",
3
+ "version": "4.1.3",
4
4
  "description": "UI5 CLI - Builder",
5
5
  "author": {
6
6
  "name": "SAP SE",
@@ -133,7 +133,7 @@
133
133
  "less-openui5": "^0.11.6",
134
134
  "pretty-data": "^0.40.0",
135
135
  "semver": "^7.7.3",
136
- "terser": "^5.44.0",
136
+ "terser": "^5.44.1",
137
137
  "workerpool": "^9.3.4",
138
138
  "xml2js": "^0.6.2"
139
139
  },
@@ -147,16 +147,16 @@
147
147
  "cross-env": "^7.0.3",
148
148
  "depcheck": "^1.4.7",
149
149
  "docdash": "^2.0.2",
150
- "eslint": "^9.38.0",
150
+ "eslint": "^9.39.1",
151
151
  "eslint-config-google": "^0.14.0",
152
152
  "eslint-plugin-ava": "^15.1.0",
153
153
  "eslint-plugin-jsdoc": "^52.0.4",
154
154
  "esmock": "^2.7.3",
155
- "globals": "^16.4.0",
155
+ "globals": "^16.5.0",
156
156
  "line-column": "^1.0.2",
157
157
  "nyc": "^17.1.0",
158
158
  "open-cli": "^8.0.0",
159
- "rimraf": "^6.0.1",
159
+ "rimraf": "^6.1.2",
160
160
  "sinon": "^21.0.0",
161
161
  "tap-xunit": "^2.4.1"
162
162
  }