From b2b9bb7d2ae3b8ec1a040287ed646655088ff367 Mon Sep 17 00:00:00 2001 From: Max Reichmann Date: Thu, 16 Jul 2026 16:11:32 +0200 Subject: [PATCH 1/7] refactor(builder): Remove default exclusion of "generateVersionInfo" `+` Fix some related tests --- .../dest/resources/sap-ui-version.json | 7 +++++++ .../dest/resources/sap-ui-version.json | 7 +++++++ packages/builder/test/lib/builder/builder.js | 18 ++++++++++++------ .../lib/build/helpers/composeTaskList.js | 3 +-- packages/project/test/lib/build/TaskRunner.js | 1 + .../test/lib/build/helpers/composeTaskList.js | 8 +++++++- packages/server/test/lib/server/main.js | 4 ++-- 7 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 packages/builder/test/expected/build/application.m/dest/resources/sap-ui-version.json create mode 100644 packages/builder/test/expected/build/application.o/dest/resources/sap-ui-version.json diff --git a/packages/builder/test/expected/build/application.m/dest/resources/sap-ui-version.json b/packages/builder/test/expected/build/application.m/dest/resources/sap-ui-version.json new file mode 100644 index 00000000000..a109feea58d --- /dev/null +++ b/packages/builder/test/expected/build/application.m/dest/resources/sap-ui-version.json @@ -0,0 +1,7 @@ +{ + "name": "application.m", + "version": "1.0.0", + "buildTimestamp": "WILL_BE_IGNORED_BY_TESTS", + "scmRevision": "", + "libraries": [] +} diff --git a/packages/builder/test/expected/build/application.o/dest/resources/sap-ui-version.json b/packages/builder/test/expected/build/application.o/dest/resources/sap-ui-version.json new file mode 100644 index 00000000000..b6212fb25e3 --- /dev/null +++ b/packages/builder/test/expected/build/application.o/dest/resources/sap-ui-version.json @@ -0,0 +1,7 @@ +{ + "name": "application.o", + "version": "1.0.0", + "buildTimestamp": "WILL_BE_IGNORED_BY_TESTS", + "scmRevision": "", + "libraries": [] +} diff --git a/packages/builder/test/lib/builder/builder.js b/packages/builder/test/lib/builder/builder.js index cf0f0c0c46b..8772cbda0a6 100644 --- a/packages/builder/test/lib/builder/builder.js +++ b/packages/builder/test/lib/builder/builder.js @@ -71,14 +71,20 @@ async function checkFileContentsIgnoreLineFeeds(t, expectedFiles, expectedPath, currentContent = JSON.parse(currentContent.replace(/(:\s+)(\d+)/g, ": 0")); expectedContent = JSON.parse(expectedContent.replace(/(:\s+)(\d+)/g, ": 0")); t.deepEqual(currentContent, expectedContent); - } else { - if (expectedFile.endsWith(".json")) { - try { - t.deepEqual(JSON.parse(currentContent), JSON.parse(expectedContent), expectedFile); - } catch (e) { - t.falsy(e, expectedFile); + } else if (expectedFile.endsWith(".json")) { + try { + const currentJson = JSON.parse(currentContent); + const expectedJson = JSON.parse(expectedContent); + // Check if file is "sap-ui-version.json" and ignore the buildTimestamp property for comparison: + if (expectedFile.endsWith("sap-ui-version.json")) { + delete currentJson.buildTimestamp; + delete expectedJson.buildTimestamp; } + t.deepEqual(currentJson, expectedJson, expectedFile); + } catch (e) { + t.falsy(e, expectedFile); } + } else { t.is(currentContent.replace(newLineRegexp, "\n"), expectedContent.replace(newLineRegexp, "\n"), relativeFile); diff --git a/packages/project/lib/build/helpers/composeTaskList.js b/packages/project/lib/build/helpers/composeTaskList.js index 11a23d39dcb..d769df97e25 100644 --- a/packages/project/lib/build/helpers/composeTaskList.js +++ b/packages/project/lib/build/helpers/composeTaskList.js @@ -25,7 +25,7 @@ export default function composeTaskList(allTasks, {selfContained, jsdoc, include selectedTasks.generateCachebusterInfo = false; selectedTasks.generateApiIndex = false; selectedTasks.generateThemeDesignerResources = false; - selectedTasks.generateVersionInfo = false; + // selectedTasks.generateVersionInfo = false; //TODO: remove properly // Disable generateResourcesJson due to performance. // When executed it analyzes each module's AST and therefore @@ -45,7 +45,6 @@ export default function composeTaskList(allTasks, {selfContained, jsdoc, include selectedTasks.generateJsdoc = true; selectedTasks.executeJsdocSdkTransformation = true; selectedTasks.generateApiIndex = true; - selectedTasks.generateVersionInfo = true; // Include theme build as required for SDK selectedTasks.buildThemes = true; diff --git a/packages/project/test/lib/build/TaskRunner.js b/packages/project/test/lib/build/TaskRunner.js index c4451c556c3..5ef34c92389 100644 --- a/packages/project/test/lib/build/TaskRunner.js +++ b/packages/project/test/lib/build/TaskRunner.js @@ -1295,6 +1295,7 @@ test("Custom task attached to a disabled task", async (t) => { "generateFlexChangesBundle", "generateComponentPreload", "myTask", + "generateVersionInfo", ], "Correct tasks execution"); }); diff --git a/packages/project/test/lib/build/helpers/composeTaskList.js b/packages/project/test/lib/build/helpers/composeTaskList.js index 910994aabec..f1fb5f905c4 100644 --- a/packages/project/test/lib/build/helpers/composeTaskList.js +++ b/packages/project/test/lib/build/helpers/composeTaskList.js @@ -55,6 +55,7 @@ const allTasks = [ "minify", "buildThemes", "generateLibraryManifest", + "generateVersionInfo", "generateFlexChangesBundle", "generateComponentPreload", "generateBundle", @@ -76,6 +77,7 @@ const allTasks = [ "minify", "buildThemes", "generateLibraryManifest", + "generateVersionInfo", "generateFlexChangesBundle", "generateComponentPreload", "generateBundle", @@ -98,9 +100,10 @@ const allTasks = [ "buildThemes", "transformBootstrapHtml", "generateLibraryManifest", + "generateVersionInfo", "generateFlexChangesBundle", "generateStandaloneAppBundle", - "generateBundle" + "generateBundle", ] ], [ @@ -134,6 +137,7 @@ const allTasks = [ "minify", "buildThemes", "generateLibraryManifest", + "generateVersionInfo", "generateFlexChangesBundle", "generateComponentPreload", "generateResourcesJson", @@ -195,6 +199,7 @@ const allTasks = [ "minify", "buildThemes", "generateLibraryManifest", + "generateVersionInfo", "generateFlexChangesBundle", "generateComponentPreload", "generateBundle", @@ -219,6 +224,7 @@ const allTasks = [ "minify", "buildThemes", "generateLibraryManifest", + "generateVersionInfo", "generateFlexChangesBundle", "generateComponentPreload", "generateBundle", diff --git a/packages/server/test/lib/server/main.js b/packages/server/test/lib/server/main.js index 8e2e0849f0c..b535178673a 100644 --- a/packages/server/test/lib/server/main.js +++ b/packages/server/test/lib/server/main.js @@ -731,13 +731,13 @@ test("Get index of resources", async (t) => { t.is(res.statusCode, 200, "Correct HTTP status code"); t.is(res.headers["content-type"], "text/html; charset=utf-8", "Correct content type"); t.is(/(.*)<\/title>/i.exec(res.text)[1], "Index of /resources", "Found correct title"); - t.is(res.text.match(/<li/g).length, 2, "Found correct amount of <li> elements"); + t.is(res.text.match(/<li/g).length, 3, "Found correct amount of <li> elements"); }), request.get("/resources/").then((res) => { t.is(res.statusCode, 200, "Correct HTTP status code"); t.is(res.headers["content-type"], "text/html; charset=utf-8", "Correct content type"); t.is(/<title>(.*)<\/title>/i.exec(res.text)[1], "Index of /resources/", "Found correct title"); - t.is(res.text.match(/<li/g).length, 2, "Found correct amount of <li> elements"); + t.is(res.text.match(/<li/g).length, 3, "Found correct amount of <li> elements"); }), request.get("/not-existing-folder").then((res) => { t.is(res.statusCode, 404, "Correct HTTP status code"); From 74b76df79490bac84527b98c9b1d9e290c776dea Mon Sep 17 00:00:00 2001 From: Max Reichmann <max.reichmann@sap.com> Date: Fri, 17 Jul 2026 17:19:03 +0200 Subject: [PATCH 2/7] test(project): Adjust ProjectBuilder tests --- .../lib/build/helpers/composeTaskList.js | 1 - .../lib/build/ProjectBuilder.integration.js | 115 +++++++++++++++--- packages/project/test/lib/build/TaskRunner.js | 10 +- 3 files changed, 103 insertions(+), 23 deletions(-) diff --git a/packages/project/lib/build/helpers/composeTaskList.js b/packages/project/lib/build/helpers/composeTaskList.js index d769df97e25..dca89a180e3 100644 --- a/packages/project/lib/build/helpers/composeTaskList.js +++ b/packages/project/lib/build/helpers/composeTaskList.js @@ -25,7 +25,6 @@ export default function composeTaskList(allTasks, {selfContained, jsdoc, include selectedTasks.generateCachebusterInfo = false; selectedTasks.generateApiIndex = false; selectedTasks.generateThemeDesignerResources = false; - // selectedTasks.generateVersionInfo = false; //TODO: remove properly // Disable generateResourcesJson due to performance. // When executed it analyzes each module's AST and therefore diff --git a/packages/project/test/lib/build/ProjectBuilder.integration.js b/packages/project/test/lib/build/ProjectBuilder.integration.js index c754b7213f1..7537a4e7e41 100644 --- a/packages/project/test/lib/build/ProjectBuilder.integration.js +++ b/packages/project/test/lib/build/ProjectBuilder.integration.js @@ -44,6 +44,13 @@ test.serial("Build application.a project multiple times", async (t) => { config: {destPath, cleanDest: false}, assertions: { projects: { + // Default builds of project type "application" include the "generateVersionInfo" + // task which requires dependencies to be built, so all dependencies are expected to be built here. + // Subsequent builds can reuse the cached results of these dependencies. + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, "application.a": {} } } @@ -75,6 +82,7 @@ test.serial("Build application.a project multiple times", async (t) => { "replaceCopyright", "enhanceManifest", "generateFlexChangesBundle", + "generateVersionInfo", ] } } @@ -90,12 +98,10 @@ test.serial("Build application.a project multiple times", async (t) => { await fixtureTester.buildProject({ config: {destPath, cleanDest: true, dependencyIncludes: {includeAllDependencies: true}}, assertions: { - projects: { - "library.d": {}, - "library.a": {}, - "library.b": {}, - "library.c": {}, - } + // Dependencies are NOT rebuilt because + // they were already built in build #1 and can be reused from cache. + // Thus, empty assertion for built projects. + projects: {} } }); @@ -180,6 +186,7 @@ test.serial("Build application.a project multiple times", async (t) => { "enhanceManifest", "escapeNonAsciiCharacters", "generateFlexChangesBundle", + "generateVersionInfo", "replaceCopyright" ] } @@ -204,6 +211,7 @@ test.serial("Build application.a project multiple times", async (t) => { "escapeNonAsciiCharacters", "generateFlexChangesBundle", "replaceCopyright", + "generateVersionInfo", ] }} } @@ -264,6 +272,7 @@ test.serial("Build application.a (with various dependencies)", async (t) => { "escapeNonAsciiCharacters", "generateFlexChangesBundle", "replaceCopyright", + "generateVersionInfo", ] } } @@ -308,6 +317,7 @@ test.serial("Build application.a (with various dependencies)", async (t) => { "escapeNonAsciiCharacters", "generateFlexChangesBundle", "replaceCopyright", + "generateVersionInfo", ] } } @@ -330,6 +340,7 @@ test.serial("Build application.a (with various dependencies)", async (t) => { "escapeNonAsciiCharacters", "generateFlexChangesBundle", "replaceCopyright", + "generateVersionInfo", ] } } @@ -342,18 +353,25 @@ test.serial("Build application.a (including only some dependencies)", async (t) const destPath = fixtureTester.destPath; // In this test, we're testing the "dependencyIncludes" build option - // which allows to include only a subset of the dependencies of a project in the build. + // which allows to include only a subset of the dependencies of a project in the build result. // "application.a" has 4 dependencies defined: library.a, library.b, library.c and library.d. // #1 build // Only include library.a and library.b as dependencies, but not library.c and library.d: + + // Note: For the initial build, ALL dependencies are built, + // due to the execution of the "generateVersionInfo" task in application.a which requires dependencies to be built. + // In subsequent builds, the cached results of the dependencies can be reused, + // so "includeDependency" can come to effect. await fixtureTester.buildProject({ config: {destPath, cleanDest: false, dependencyIncludes: {includeDependency: ["library.a", "library.b"]}}, assertions: { projects: { + "library.d": {}, "library.a": {}, "library.b": {}, + "library.c": {}, "application.a": {} } } @@ -364,6 +382,10 @@ test.serial("Build application.a (including only some dependencies)", async (t) {encoding: "utf8"})); await t.notThrowsAsync(fs.readFile(`${destPath}/resources/library/b/library-preload.js`, {encoding: "utf8"})); + + // Check that the remaining dependencies are NOT in the destPath: + // (Note: although library.c and library.d were built, + // they are not included in the build result because of the flag) await t.throwsAsync(fs.readFile(`${destPath}/resources/library/c/library-preload.js`, {encoding: "utf8"})); await t.throwsAsync(fs.readFile(`${destPath}/resources/library/d/library-preload.js`, @@ -372,14 +394,12 @@ test.serial("Build application.a (including only some dependencies)", async (t) // #2 build // Exclude library.d as dependency, but include all other dependencies - // (builds of library.a and library.b can be reused from cache): + // (builds of library.a, library.b and library.c can be reused from cache): await fixtureTester.buildProject({ config: {destPath, cleanDest: true, dependencyIncludes: {includeAllDependencies: true, excludeDependency: ["library.d"]}}, assertions: { - projects: { - "library.c": {}, - } + projects: {} } }); @@ -390,20 +410,20 @@ test.serial("Build application.a (including only some dependencies)", async (t) {encoding: "utf8"})); await t.notThrowsAsync(fs.readFile(`${destPath}/resources/library/c/library-preload.js`, {encoding: "utf8"})); + + // Check that the excluded dependency is NOT in the destPath: await t.throwsAsync(fs.readFile(`${destPath}/resources/library/d/library-preload.js`, {encoding: "utf8"})); // #3 build - // Include all dependencies (only library.d is built) - // (builds of library.a, library.b, and library.c can be reused from cache): + // Include all dependencies + // (builds of ALL libraries can be reused from cache): await fixtureTester.buildProject({ config: {destPath, cleanDest: true, dependencyIncludes: {includeAllDependencies: true}}, assertions: { - projects: { - "library.d": {}, - } + projects: {} } }); @@ -448,6 +468,10 @@ test.serial("Build application.a (custom task and tag handling)", async (t) => { config: {destPath, cleanDest: true}, assertions: { projects: { + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, "application.a": {} } } @@ -471,6 +495,7 @@ test.serial("Build application.a (custom task and tag handling)", async (t) => { "replaceCopyright", "enhanceManifest", "generateFlexChangesBundle", + "generateVersionInfo", ] } } @@ -523,6 +548,10 @@ test.serial("Build application.a (multiple custom tasks)", async (t) => { config: {destPath, cleanDest: true}, assertions: { projects: { + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, "application.a": {} } } @@ -561,6 +590,7 @@ test.serial("Build application.a (multiple custom tasks)", async (t) => { "escapeNonAsciiCharacters", "generateFlexChangesBundle", "replaceCopyright", + "generateVersionInfo", ] } } @@ -582,6 +612,10 @@ test.serial("Build application.a (multiple custom tasks 2)", async (t) => { config: {destPath, cleanDest: true}, assertions: { projects: { + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, "application.a": {} } } @@ -606,6 +640,7 @@ test.serial("Build application.a (multiple custom tasks 2)", async (t) => { "replaceCopyright", "enhanceManifest", "generateFlexChangesBundle", + "generateVersionInfo", ] } } @@ -635,6 +670,7 @@ test.serial("Build application.a (multiple custom tasks 2)", async (t) => { "escapeNonAsciiCharacters", "generateFlexChangesBundle", "replaceCopyright", + "generateVersionInfo", ] } } @@ -834,6 +870,7 @@ builder: "generateFlexChangesBundle", "replaceCopyright", "replaceVersion", + "generateVersionInfo", ] }, } @@ -985,6 +1022,10 @@ test.serial("Build application.a (Custom Component preload configuration)", asyn config: {destPath, cleanDest: true}, assertions: { projects: { + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, "application.a": {} } } @@ -1064,6 +1105,7 @@ test.serial("Build application.a (self-contained build)", async (t) => { "generateFlexChangesBundle", "replaceCopyright", "transformBootstrapHtml", + "generateVersionInfo", ] } } @@ -1181,6 +1223,7 @@ test.serial("Build application.a (Custom bundling)", async (t) => { "escapeNonAsciiCharacters", "generateFlexChangesBundle", "replaceCopyright", + "generateVersionInfo", ] } } @@ -1217,6 +1260,7 @@ test.serial("Build application.a (Custom bundling)", async (t) => { "escapeNonAsciiCharacters", "generateFlexChangesBundle", "replaceCopyright", + "generateVersionInfo", ] } } @@ -2465,6 +2509,10 @@ test.serial("Build application.a with --cache=Default", async (t) => { config: {destPath, cleanDest: false, cache: Cache.Default}, assertions: { projects: { + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, "application.a": {} } } @@ -2493,6 +2541,7 @@ test.serial("Build application.a with --cache=Default", async (t) => { "replaceCopyright", "enhanceManifest", "generateFlexChangesBundle", + "generateVersionInfo", ] } } @@ -2514,7 +2563,11 @@ test.serial("Build application.a with --cache=Off", async (t) => { config: {destPath, cleanDest: false, cache: Cache.Off}, assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -2524,7 +2577,11 @@ test.serial("Build application.a with --cache=Off", async (t) => { config: {destPath, cleanDest: true, cache: Cache.Off}, assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -2534,7 +2591,11 @@ test.serial("Build application.a with --cache=Off", async (t) => { config: {destPath, cleanDest: true, cache: Cache.Default}, assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -2552,7 +2613,11 @@ test.serial("Build application.a with --cache=Off", async (t) => { config: {destPath, cleanDest: true, cache: Cache.Off}, assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -2567,6 +2632,10 @@ test.serial("Build application.a with --cache=ReadOnly", async (t) => { config: {destPath, cleanDest: false, cache: Cache.Default}, assertions: { projects: { + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, "application.a": {} } } @@ -2595,6 +2664,7 @@ test.serial("Build application.a with --cache=ReadOnly", async (t) => { "replaceCopyright", "enhanceManifest", "generateFlexChangesBundle", + "generateVersionInfo", ] } } @@ -2618,6 +2688,7 @@ test.serial("Build application.a with --cache=ReadOnly", async (t) => { "replaceCopyright", "enhanceManifest", "generateFlexChangesBundle", + "generateVersionInfo", ] } } @@ -2634,6 +2705,10 @@ test.serial("Build application.a with --cache=Force (1)", async (t) => { config: {destPath, cleanDest: false, cache: Cache.Default}, assertions: { projects: { + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, "application.a": {} } } diff --git a/packages/project/test/lib/build/TaskRunner.js b/packages/project/test/lib/build/TaskRunner.js index 5ef34c92389..2dd78996b34 100644 --- a/packages/project/test/lib/build/TaskRunner.js +++ b/packages/project/test/lib/build/TaskRunner.js @@ -1424,11 +1424,17 @@ test("getRequiredDependencies: Custom Task", async (t) => { }); test("getRequiredDependencies: Default application", async (t) => { + // This test includes a mock project of type "application". + // By default, builds of this project type always contain the "generateVersionInfo" task, + // which requires dependencies to be built. + const project = getMockProject("application"); project.getBundles = () => []; const taskRunner = createTaskRunner(t, project); - t.deepEqual(await taskRunner.getRequiredDependencies(), new Set([]), - "Default application project does not require dependencies"); + t.deepEqual(await taskRunner.getRequiredDependencies(), new Set([ + "dep.a", + "dep.b", + ]), "Default application project DOES require dependencies"); }); test("getRequiredDependencies: Default component", async (t) => { From 710152094812be27343fc911de3fddfd67c3d434 Mon Sep 17 00:00:00 2001 From: Max Reichmann <max.reichmann@sap.com> Date: Fri, 17 Jul 2026 18:12:46 +0200 Subject: [PATCH 3/7] test(project): Adjust BuildServer tests --- .../test/lib/build/BuildServer.integration.js | 80 ++++++++++++++----- 1 file changed, 58 insertions(+), 22 deletions(-) diff --git a/packages/project/test/lib/build/BuildServer.integration.js b/packages/project/test/lib/build/BuildServer.integration.js index 0abcf7765a9..5d9c1df055a 100644 --- a/packages/project/test/lib/build/BuildServer.integration.js +++ b/packages/project/test/lib/build/BuildServer.integration.js @@ -163,7 +163,11 @@ test.serial("Serve application.a, request application resource", async (t) => { resource: "/test.js", assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -193,6 +197,7 @@ test.serial("Serve application.a, request application resource", async (t) => { "replaceCopyright", "enhanceManifest", "generateFlexChangesBundle", + "generateVersionInfo", ] } } @@ -219,7 +224,11 @@ test.serial("Serve application.a, create and delete a source file", async (t) => resource: "/created.js", assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -251,6 +260,7 @@ test.serial("Serve application.a, create and delete a source file", async (t) => "replaceCopyright", "enhanceManifest", "generateFlexChangesBundle", + "generateVersionInfo", ] } } @@ -272,22 +282,13 @@ test.serial("Serve application.a, create and delete a source file", async (t) => } }); - // #5 the second file is no longer served, but requesting it triggers a build of the dependencies - // because the file is not known anymore and might come from a different project. - // Note: This is special for applications, which are served at root level. For libraries, the server - // can determine whether a resources is inside a project namespace and only trigger a build for the affected - // project. The logic could be improved, especially like in this case where the requested resource is outside - // of /resources or /test-resources. + // #5 the second file is no longer served, thus requesting it shouldn't trigger a rebuild + // (all projects are still cached from the previous builds) await fixtureTester.requestResource({ resource: "/another.js", notFound: true, assertions: { - projects: { - "library.d": {}, - "library.a": {}, - "library.b": {}, - "library.c": {}, - } + projects: {} } }); @@ -308,6 +309,7 @@ test.serial("Serve application.a, create and delete a source file", async (t) => "replaceCopyright", "enhanceManifest", "generateFlexChangesBundle", + "generateVersionInfo", ] } } @@ -486,8 +488,11 @@ test.serial("Serve application.a, request application resource AND library resou resources: ["/test.js", "/resources/library/a/.library"], assertions: { projects: { + "library.d": {}, "library.a": {}, - "application.a": {} + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -558,7 +563,11 @@ test.serial("Serve application.a with --cache=Default", async (t) => { resource: "/test.js", assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -587,6 +596,7 @@ test.serial("Serve application.a with --cache=Default", async (t) => { "replaceCopyright", "enhanceManifest", "generateFlexChangesBundle", + "generateVersionInfo", ] } } @@ -609,7 +619,11 @@ test.serial("Serve application.a with --cache=Off", async (t) => { resource: "/test.js", assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -631,7 +645,11 @@ test.serial("Serve application.a with --cache=Off", async (t) => { resource: "/test.js", assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -651,7 +669,11 @@ test.serial("Serve application.a with --cache=Off", async (t) => { resource: "/test.js", assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -673,7 +695,11 @@ test.serial("Serve application.a with --cache=Off", async (t) => { resource: "/test.js", assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -688,7 +714,11 @@ test.serial("Serve application.a with --cache=ReadOnly", async (t) => { resource: "/test.js", assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); @@ -721,6 +751,7 @@ test.serial("Serve application.a with --cache=ReadOnly", async (t) => { "replaceCopyright", "enhanceManifest", "generateFlexChangesBundle", + "generateVersionInfo", ] } } @@ -749,6 +780,7 @@ test.serial("Serve application.a with --cache=ReadOnly", async (t) => { "replaceCopyright", "enhanceManifest", "generateFlexChangesBundle", + "generateVersionInfo", ] } } @@ -765,7 +797,11 @@ test.serial("Serve application.a with --cache=Force (1)", async (t) => { resource: "/test.js", assertions: { projects: { - "application.a": {} + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {}, } } }); From 104de3ec43a449c2a9dad7c303805af0890f82c0 Mon Sep 17 00:00:00 2001 From: Max Reichmann <max.reichmann@sap.com> Date: Fri, 17 Jul 2026 19:25:40 +0200 Subject: [PATCH 4/7] docs: Add section to migrate-v5 `+` Adjust Standard Tasks table (TODO: check `transformBootstrapHTML` link!!) --- internal/documentation/docs/pages/Builder.md | 45 ++++++++++--------- .../documentation/docs/updates/migrate-v5.md | 6 +++ 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/internal/documentation/docs/pages/Builder.md b/internal/documentation/docs/pages/Builder.md index d36be96ec98..598a1655370 100644 --- a/internal/documentation/docs/pages/Builder.md +++ b/internal/documentation/docs/pages/Builder.md @@ -23,31 +23,32 @@ A project can add custom tasks to the build by using the [Custom Tasks Extensibi ### Standard Tasks -All available standard tasks are documented [in the API reference](https://ui5.github.io/cli/v5/api/index.html). Search for `@ui5/builder/tasks/` to filter the API reference for all available tasks. The list below offers the actual order of their execution: +All available standard tasks are documented in the **@ui5/builder API reference**. Use the sidebar menu to access the respective pages. The list below offers the actual order of their execution: +[TODO: Cleanup formatting]: # | Task | Type `application` | Type `component` | Type `library` | Type `theme-library` | |--------------------------------|:-----------------------:|:-----------------------:|:-----------------------:|:-----------------------:| -| escapeNonAsciiCharacters | enabled | enabled | enabled | | -| replaceCopyright | enabled | enabled | enabled | enabled | -| replaceVersion | enabled | enabled | enabled | enabled | -| replaceBuildtime | | | enabled | | -| generateJsdoc | | | *disabled* <sup>1</sup> | | -| executeJsdocSdkTransformation | | | *disabled* <sup>1</sup> | | -| minify | enabled | enabled | enabled | | -| generateFlexChangesBundle | enabled | enabled | enabled | | -| generateLibraryManifest | | | enabled | | -| enhanceManifest | enabled | enabled | enabled | | -| generateComponentPreload | enabled | enabled | *disabled* <sup>2</sup> | | -| generateLibraryPreload | | | enabled | | -| generateStandaloneAppBundle | *disabled* <sup>3</sup> | | | | -| transformBootstrapHtml | *disabled* <sup>3</sup> | | | | -| generateBundle | *disabled* <sup>4</sup> | *disabled* <sup>4</sup> | *disabled* <sup>4</sup> | | -| buildThemes | | | enabled | enabled | -| generateThemeDesignerResources | | | *disabled* <sup>5</sup> | *disabled* <sup>5</sup> | -| generateVersionInfo | *disabled* <sup>1</sup> | | | | -| generateCachebusterInfo | *disabled* | *disabled* | | | -| generateApiIndex | *disabled* <sup>1</sup> | | | | -| generateResourcesJson | *disabled* | *disabled* | *disabled* | *disabled* | +| [escapeNonAsciiCharacters](../api/module-@ui5_builder_tasks_escapeNonAsciiCharacters) | enabled | enabled | enabled | | +| [replaceCopyright](../api/module-@ui5_builder_tasks_replaceCopyright) | enabled | enabled | enabled | enabled | +| [replaceVersion](../api/module-@ui5_builder_tasks_replaceVersion) | enabled | enabled | enabled | enabled | +| [replaceBuildtime](../api/module-@ui5_builder_tasks_replaceBuildtime) | | | enabled | | +| [generateJsdoc](../api/module-@ui5_builder_tasks_jsdoc_generateJsdoc) | | | *disabled* <sup>1</sup> | | +| [executeJsdocSdkTransformation](../api/module-@ui5_builder_tasks_jsdoc_executeJsdocSdkTransformation) | | | *disabled* <sup>1</sup> | | +| [minify](../api/module-@ui5_builder_tasks_minify) | enabled | enabled | enabled | | +| [generateFlexChangesBundle](../api/module-@ui5_builder_tasks_bundlers_generateFlexChangesBundle) | enabled | enabled | enabled | | +| [generateLibraryManifest](../api/module-@ui5_builder_tasks_generateLibraryManifest) | | | enabled | | +| [enhanceManifest](../api/module-@ui5_builder_tasks_enhanceManifest) | enabled | enabled | enabled | | +| [generateComponentPreload](../api/module-@ui5_builder_tasks_bundlers_generateComponentPreload) | enabled | enabled | *disabled* <sup>2</sup> | | +| [generateLibraryPreload](../api/module-@ui5_builder_tasks_bundlers_generateLibraryPreload) | | | enabled | | +| [generateStandaloneAppBundle](../api/module-@ui5_builder_tasks_bundlers_generateStandaloneAppBundle) | *disabled* <sup>3</sup> | | | | +| transformBootstrapHtml TODO: Link missing??? | *disabled* <sup>3</sup> | | | | +| [generateBundle](../api/module-@ui5_builder_tasks_bundlers_generateBundle) | *disabled* <sup>4</sup> | *disabled* <sup>4</sup> | *disabled* <sup>4</sup> | | +| [buildThemes](../api/module-@ui5_builder_tasks_buildThemes) | | | enabled | enabled | +| [generateThemeDesignerResources](../api/module-@ui5_builder_tasks_generateThemeDesignerResources) | | | *disabled* <sup>5</sup> | *disabled* <sup>5</sup> | +| [generateVersionInfo](../api/module-@ui5_builder_tasks_generateVersionInfo) | enabled | *disabled* | *disabled* | *disabled* | +| [generateCachebusterInfo](../api/module-@ui5_builder_tasks_generateCachebusterInfo) | *disabled* | *disabled* | | | +| [generateApiIndex](../api/module-@ui5_builder_tasks_jsdoc_generateApiIndex) | *disabled* <sup>1</sup> | | | | +| [generateResourcesJson](../api/module-@ui5_builder_tasks_generateResourcesJson) | *disabled* | *disabled* | *disabled* | *disabled* | *Disabled tasks can be activated by certain build modes, the project configuration, or by using the `--include-task` [CLI parameter](./CLI.md#ui5-build). See footnotes where given* diff --git a/internal/documentation/docs/updates/migrate-v5.md b/internal/documentation/docs/updates/migrate-v5.md index c9db7b58dac..5a2db732b53 100644 --- a/internal/documentation/docs/updates/migrate-v5.md +++ b/internal/documentation/docs/updates/migrate-v5.md @@ -320,6 +320,12 @@ Update your `ui5.yaml` configuration to reference an existing middleware instead | `serveThemes` | CSS files pre-built by `buildThemes` task and served via `serveResources` | `serveResources` | | `testRunner` | TestRunner resources served via `serveResources` from the UI5 framework | `serveResources` | +## `sap-ui-version.json` + +When running `ui5 build` for projects of type `application`, the standard task [`generateVersionInfo`](../api/module-@ui5_builder_tasks_generateVersionInfo) (producing a `sap-ui-version.json` file under `resources/`) is now **executed by default**. This applies to every build type (default, jsdoc, and self-contained). For projects of other types (e.g. `library`), the behavior remains the same and [`generateVersionInfo`](../api/module-@ui5_builder_tasks_generateVersionInfo) is not executed. + +To see which standard tasks are executed by default, check out the [Standard Tasks](../pages/Builder#standard-tasks) table in the UI5 Builder page. + ## Learn More - [Project: Type `component`](../pages/Project#component) From 26105a408ce8b96fa58c9a8f01cabd5f83d7e057 Mon Sep 17 00:00:00 2001 From: Max Reichmann <max.reichmann@sap.com> Date: Mon, 20 Jul 2026 07:07:41 +0200 Subject: [PATCH 5/7] docs: Refactor migration text --- .../documentation/docs/updates/migrate-v5.md | 4 +- package-lock.json | 129 ------------------ 2 files changed, 2 insertions(+), 131 deletions(-) diff --git a/internal/documentation/docs/updates/migrate-v5.md b/internal/documentation/docs/updates/migrate-v5.md index 5a2db732b53..b3c930ba0bc 100644 --- a/internal/documentation/docs/updates/migrate-v5.md +++ b/internal/documentation/docs/updates/migrate-v5.md @@ -322,9 +322,9 @@ Update your `ui5.yaml` configuration to reference an existing middleware instead ## `sap-ui-version.json` -When running `ui5 build` for projects of type `application`, the standard task [`generateVersionInfo`](../api/module-@ui5_builder_tasks_generateVersionInfo) (producing a `sap-ui-version.json` file under `resources/`) is now **executed by default**. This applies to every build type (default, jsdoc, and self-contained). For projects of other types (e.g. `library`), the behavior remains the same and [`generateVersionInfo`](../api/module-@ui5_builder_tasks_generateVersionInfo) is not executed. +When running `ui5 build`, the standard task [`generateVersionInfo`](../api/module-@ui5_builder_tasks_generateVersionInfo) (producing a `sap-ui-version.json` file under `resources/`) is now **executed by default**. This applies to every build type (default, jsdoc, and self-contained) for projects of type `application`. For projects of other types (e.g. `library`), the behavior remains the same and [`generateVersionInfo`](../api/module-@ui5_builder_tasks_generateVersionInfo) is not executed. -To see which standard tasks are executed by default, check out the [Standard Tasks](../pages/Builder#standard-tasks) table in the UI5 Builder page. +To see which standard tasks are executed for each project type, check out the [Standard Tasks](../pages/Builder#standard-tasks) table in the UI5 Builder page. ## Learn More diff --git a/package-lock.json b/package-lock.json index 67d2a28a0e1..4c778c8dfa3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2631,9 +2631,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2651,9 +2648,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2671,9 +2665,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2691,9 +2682,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2711,9 +2699,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2731,9 +2716,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2751,9 +2733,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2771,9 +2750,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2986,9 +2962,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3003,9 +2976,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3020,9 +2990,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3037,9 +3004,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3054,9 +3018,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3071,9 +3032,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3088,9 +3046,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3105,9 +3060,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3330,9 +3282,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3353,9 +3302,6 @@ "cpu": [ "arm" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3376,9 +3322,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3399,9 +3342,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3422,9 +3362,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3445,9 +3382,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3680,9 +3614,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3696,9 +3627,6 @@ "cpu": [ "arm" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3712,9 +3640,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3728,9 +3653,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3744,9 +3666,6 @@ "cpu": [ "loong64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3760,9 +3679,6 @@ "cpu": [ "loong64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3776,9 +3692,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3792,9 +3705,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3808,9 +3718,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3824,9 +3731,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3840,9 +3744,6 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3856,9 +3757,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3872,9 +3770,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4338,9 +4233,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4357,9 +4249,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4376,9 +4265,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4395,9 +4281,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -11769,9 +11652,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -11792,9 +11672,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -11815,9 +11692,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -11838,9 +11712,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ From 0d3d9db2ab61534ed749d8dda08303d3260987c0 Mon Sep 17 00:00:00 2001 From: Max Reichmann <max.reichmann@sap.com> Date: Tue, 21 Jul 2026 12:59:26 +0200 Subject: [PATCH 6/7] docs: Replace dead "API ref" links with sidebar menu guide `+` docs: Replace hardcoded URLs (ui5.github.io/..) with dynamic links `+` docs: Add links to all Builder tasks in Standard Tasks table `+` refactor: Remove "jsdoc" npm script (+remove unused dep `open-cli`) --- internal/documentation/.vitepress/config.ts | 2 +- internal/documentation/README.md | 1 - internal/documentation/docs/index.md | 2 +- internal/documentation/docs/pages/Builder.md | 51 ++-- .../documentation/docs/pages/Configuration.md | 2 +- .../documentation/docs/pages/FileSystem.md | 20 +- internal/documentation/docs/pages/Overview.md | 4 +- internal/documentation/docs/pages/Project.md | 7 +- internal/documentation/docs/pages/Server.md | 6 +- .../extensibility/CustomServerMiddleware.md | 2 +- .../docs/pages/extensibility/CustomTasks.md | 8 +- internal/documentation/package.json | 2 - package-lock.json | 251 ------------------ 13 files changed, 51 insertions(+), 307 deletions(-) diff --git a/internal/documentation/.vitepress/config.ts b/internal/documentation/.vitepress/config.ts index 4af2da04ce8..bf7e7e4cd22 100644 --- a/internal/documentation/.vitepress/config.ts +++ b/internal/documentation/.vitepress/config.ts @@ -285,7 +285,7 @@ function guide() { (() => { // This function builds the tree for the api docs const tree = { - text: "API", + text: "📚 API", collapsed: false, items: [{ text: "@ui5", diff --git a/internal/documentation/README.md b/internal/documentation/README.md index 1d6b40da1ec..f9db20264cd 100644 --- a/internal/documentation/README.md +++ b/internal/documentation/README.md @@ -41,7 +41,6 @@ The development server starts at `http://localhost:5173` with hot-reload for liv | `download-packages` | Downloads the latest published versions of all UI5 CLI packages (`@ui5/builder`, `@ui5/cli`, etc.) via `npm pack` and extracts them to `tmp/packages/`. This enables gh-pages builds to use published npm packages instead of local workspace code. | | `jsdoc-generate` | Generates API documentation from local workspace package sources (`../../packages/*/lib/**/*.js`). Uses the workspace JSDoc config targeting the current development version (v5). | | `jsdoc-generate-gh-pages` | Generates API documentation from downloaded packages in `tmp/packages/`. Uses the gh-pages JSDoc config targeting the published version (v4). Requires `download-packages` to run first. | -| `jsdoc` | Generates JSDoc API documentation from the local workspace and opens the result in the browser. Convenience wrapper for local development. | ## Dual-Version Documentation diff --git a/internal/documentation/docs/index.md b/internal/documentation/docs/index.md index 12497504b55..c87ec024b8b 100644 --- a/internal/documentation/docs/index.md +++ b/internal/documentation/docs/index.md @@ -107,7 +107,7 @@ info ProjectBuilder Executing cleanup tasks... Most UI5 CLI modules provide JavaScript APIs for direct consumption in other Node.js projects. This allows you to rely on UI5 CLI for UI5-specific build functionality and project handling, while creating your own tools to perfectly match the needs of your project. -All available APIs are documented in the [UI5 CLI API Reference](https://ui5.github.io/cli/v5/api/index.html). +All available APIs are documented directly within this documentation. Use the sidebar menu and navigate to **📚 API** to browse the API reference for each package. ::: code-group ```js [ESM] diff --git a/internal/documentation/docs/pages/Builder.md b/internal/documentation/docs/pages/Builder.md index 598a1655370..ef73c37c1b4 100644 --- a/internal/documentation/docs/pages/Builder.md +++ b/internal/documentation/docs/pages/Builder.md @@ -10,9 +10,9 @@ Based on a project's type, the UI5 Builder defines a series of build steps to ex For every type there is a set of default tasks. You can disable single tasks using the `--exclude-task` [CLI parameter](./CLI.md#ui5-build), and you can include tasks using the `--include-task` parameter. -<div style="margin: 1rem 0;"> - <VPButton class="no-decoration" text="📚 API Reference" href="https://ui5.github.io/cli/v5/api/index.html"/> -</div> +::: tip +Browse the API reference for each Builder API by navigating in the sidebar menu to **📚 API -> @ui5/builder**. +::: ## Tasks Tasks are specific build steps to be executed during build phase. @@ -23,32 +23,31 @@ A project can add custom tasks to the build by using the [Custom Tasks Extensibi ### Standard Tasks -All available standard tasks are documented in the **@ui5/builder API reference**. Use the sidebar menu to access the respective pages. The list below offers the actual order of their execution: +All available standard tasks are documented under **📚 API -> @ui5/builder -> tasks**. Use the sidebar menu to access the respective pages. The list below offers the actual order of their execution: -[TODO: Cleanup formatting]: # | Task | Type `application` | Type `component` | Type `library` | Type `theme-library` | |--------------------------------|:-----------------------:|:-----------------------:|:-----------------------:|:-----------------------:| -| [escapeNonAsciiCharacters](../api/module-@ui5_builder_tasks_escapeNonAsciiCharacters) | enabled | enabled | enabled | | -| [replaceCopyright](../api/module-@ui5_builder_tasks_replaceCopyright) | enabled | enabled | enabled | enabled | -| [replaceVersion](../api/module-@ui5_builder_tasks_replaceVersion) | enabled | enabled | enabled | enabled | -| [replaceBuildtime](../api/module-@ui5_builder_tasks_replaceBuildtime) | | | enabled | | -| [generateJsdoc](../api/module-@ui5_builder_tasks_jsdoc_generateJsdoc) | | | *disabled* <sup>1</sup> | | +| [escapeNonAsciiCharacters](../api/module-@ui5_builder_tasks_escapeNonAsciiCharacters) | enabled | enabled | enabled | | +| [replaceCopyright](../api/module-@ui5_builder_tasks_replaceCopyright) | enabled | enabled | enabled | enabled | +| [replaceVersion](../api/module-@ui5_builder_tasks_replaceVersion) | enabled | enabled | enabled | enabled | +| [replaceBuildtime](../api/module-@ui5_builder_tasks_replaceBuildtime) | | | enabled | | +| [generateJsdoc](../api/module-@ui5_builder_tasks_jsdoc_generateJsdoc) | | | *disabled* <sup>1</sup> | | | [executeJsdocSdkTransformation](../api/module-@ui5_builder_tasks_jsdoc_executeJsdocSdkTransformation) | | | *disabled* <sup>1</sup> | | -| [minify](../api/module-@ui5_builder_tasks_minify) | enabled | enabled | enabled | | -| [generateFlexChangesBundle](../api/module-@ui5_builder_tasks_bundlers_generateFlexChangesBundle) | enabled | enabled | enabled | | -| [generateLibraryManifest](../api/module-@ui5_builder_tasks_generateLibraryManifest) | | | enabled | | -| [enhanceManifest](../api/module-@ui5_builder_tasks_enhanceManifest) | enabled | enabled | enabled | | -| [generateComponentPreload](../api/module-@ui5_builder_tasks_bundlers_generateComponentPreload) | enabled | enabled | *disabled* <sup>2</sup> | | -| [generateLibraryPreload](../api/module-@ui5_builder_tasks_bundlers_generateLibraryPreload) | | | enabled | | -| [generateStandaloneAppBundle](../api/module-@ui5_builder_tasks_bundlers_generateStandaloneAppBundle) | *disabled* <sup>3</sup> | | | | -| transformBootstrapHtml TODO: Link missing??? | *disabled* <sup>3</sup> | | | | -| [generateBundle](../api/module-@ui5_builder_tasks_bundlers_generateBundle) | *disabled* <sup>4</sup> | *disabled* <sup>4</sup> | *disabled* <sup>4</sup> | | -| [buildThemes](../api/module-@ui5_builder_tasks_buildThemes) | | | enabled | enabled | -| [generateThemeDesignerResources](../api/module-@ui5_builder_tasks_generateThemeDesignerResources) | | | *disabled* <sup>5</sup> | *disabled* <sup>5</sup> | -| [generateVersionInfo](../api/module-@ui5_builder_tasks_generateVersionInfo) | enabled | *disabled* | *disabled* | *disabled* | -| [generateCachebusterInfo](../api/module-@ui5_builder_tasks_generateCachebusterInfo) | *disabled* | *disabled* | | | -| [generateApiIndex](../api/module-@ui5_builder_tasks_jsdoc_generateApiIndex) | *disabled* <sup>1</sup> | | | | -| [generateResourcesJson](../api/module-@ui5_builder_tasks_generateResourcesJson) | *disabled* | *disabled* | *disabled* | *disabled* | +| [minify](../api/module-@ui5_builder_tasks_minify) | enabled | enabled | enabled | | +| [generateFlexChangesBundle](../api/module-@ui5_builder_tasks_bundlers_generateFlexChangesBundle) | enabled | enabled | enabled | | +| [generateLibraryManifest](../api/module-@ui5_builder_tasks_generateLibraryManifest) | | | enabled | | +| [enhanceManifest](../api/module-@ui5_builder_tasks_enhanceManifest) | enabled | enabled | enabled | | +| [generateComponentPreload](../api/module-@ui5_builder_tasks_bundlers_generateComponentPreload) | enabled | enabled | *disabled* <sup>2</sup> | | +| [generateLibraryPreload](../api/module-@ui5_builder_tasks_bundlers_generateLibraryPreload) | | | enabled | | +| [generateStandaloneAppBundle](../api/module-@ui5_builder_tasks_bundlers_generateStandaloneAppBundle) | *disabled* <sup>3</sup> | | | | +| transformBootstrapHtml | *disabled* <sup>3</sup> | | | | +| [generateBundle](../api/module-@ui5_builder_tasks_bundlers_generateBundle) | *disabled* <sup>4</sup> | *disabled* <sup>4</sup> | *disabled* <sup>4</sup> | | +| [buildThemes](../api/module-@ui5_builder_tasks_buildThemes) | | | enabled | enabled | +| [generateThemeDesignerResources](../api/module-@ui5_builder_tasks_generateThemeDesignerResources) | | | *disabled* <sup>5</sup> | *disabled* <sup>5</sup> | +| [generateVersionInfo](../api/module-@ui5_builder_tasks_generateVersionInfo) | enabled | *disabled* | *disabled* | *disabled* | +| [generateCachebusterInfo](../api/module-@ui5_builder_tasks_generateCachebusterInfo) | *disabled* | *disabled* | | | +| [generateApiIndex](../api/module-@ui5_builder_tasks_jsdoc_generateApiIndex) | *disabled* <sup>1</sup> | | | | +| [generateResourcesJson](../api/module-@ui5_builder_tasks_generateResourcesJson) | *disabled* | *disabled* | *disabled* | *disabled* | *Disabled tasks can be activated by certain build modes, the project configuration, or by using the `--include-task` [CLI parameter](./CLI.md#ui5-build). See footnotes where given* @@ -158,7 +157,7 @@ Processors work with provided resources. They contain the actual build step logi Processors can be implemented generically. The string replacer is an example for that. Since string replacement is a common build step, it can be useful in different contexts, e.g. code, version, date, and copyright replacement. A concrete replacement operation could be achieved by passing a custom configuration to the processor. This way, multiple tasks can make use of the same processor to achieve their build step. -To get a list of all available processors, please visit [the API reference](https://ui5.github.io/cli/v5/api/index.html) and search for `@ui5/builder/processors/`. +To get a list of all available processors, use the sidebar menu and navigate to **📚 API -> @ui5/builder -> processors**. ## Legacy Bundle Tooling (lbt) JavaScript port of the "legacy" Maven/Java based bundle tooling. diff --git a/internal/documentation/docs/pages/Configuration.md b/internal/documentation/docs/pages/Configuration.md index 5e993a7c811..bb621b77e69 100644 --- a/internal/documentation/docs/pages/Configuration.md +++ b/internal/documentation/docs/pages/Configuration.md @@ -749,7 +749,7 @@ A list of bundle definitions. A `bundleDefinition` contains of the following opt - `name`: The module bundle name - `defaultFileTypes`: List of default file types which should be included in the bundle. Defaults to: `.js`, `.control.xml`, `.fragment.html`, `.fragment.json`, `.fragment.xml`, `.view.html`, `.view.json` and `.view.xml` -- `sections`: A list of module bundle definition sections. Each section specifies an embedding technology (see [API-Reference](https://ui5.github.io/cli/v5/api/module-@ui5_builder_processors_bundlers_moduleBundler.html#~ModuleBundleDefinition)) and lists the resources that should be in- or excluded from the section. +- `sections`: A list of module bundle definition sections. Each section specifies an embedding technology (see [📚 API-Reference](../api/module-@ui5_builder_processors_bundlers_moduleBundler.html#~ModuleBundleDefinition)) and lists the resources that should be in- or excluded from the section. - `mode`: The embedding technology (e.g. provided, raw, preload, bundleInfo, depCache, require) - `filters`: List of modules declared as glob patterns (resource name patterns) that are in- or excluded. Similarly to the use of a single `*` or double `**` asterisk, a pattern ending with a slash `/` denotes an arbitrary number of characters or folder names. Excludes have to be marked with a leading exclamation mark `!`. The order of filters is relevant; a later inclusion overrides an earlier exclusion, and vice versa. - `resolve`: Setting resolve to `true` will also include all (transitive) dependencies of the files diff --git a/internal/documentation/docs/pages/FileSystem.md b/internal/documentation/docs/pages/FileSystem.md index 371425e3a12..274d923643c 100644 --- a/internal/documentation/docs/pages/FileSystem.md +++ b/internal/documentation/docs/pages/FileSystem.md @@ -6,9 +6,9 @@ The [UI5 FS](https://github.com/SAP/ui5-fs) provides a UI5-specific file system import VPButton from "vitepress/dist/client/theme-default/components/VPButton.vue" </script> -<div style="margin: 1rem 0;"> - <VPButton class="no-decoration" text="📚 API Reference" href="https://ui5.github.io/cli/v5/api/"/> -</div> +::: tip +Browse the API reference for each FS API by navigating in the sidebar menu to **📚 API -> @ui5/fs**. +::: ## Overview @@ -16,7 +16,7 @@ The virtual file system "UI5 FS" offers an abstraction layer from the physical f ### Resource -A [Resource](https://ui5.github.io/cli/v5/api/@ui5_fs_Resource.html) basically represents a file. Besides providing access to the file content, it also carries metadata like the **virtual path** of the Resource. +A [Resource](../api/@ui5_fs_Resource.html) basically represents a file. Besides providing access to the file content, it also carries metadata like the **virtual path** of the Resource. Resources are typically created and stored in [Adapters](#adapters). Once read from a physical file system, they are typically kept in memory for further processing in other modules. @@ -26,9 +26,9 @@ This ensures a high build performance, as physical read and write access for a h Adapters abstract access to different resource locations. -The [Memory Adapter](https://ui5.github.io/cli/v5/api/@ui5_fs_adapters_Memory.html) represents a virtual file system which maintains respective [Resources](#resource) inside a virtual data structure. +The [Memory Adapter](../api/@ui5_fs_adapters_Memory.html) represents a virtual file system which maintains respective [Resources](#resource) inside a virtual data structure. -The [File System Adapter](https://ui5.github.io/cli/v5/api/@ui5_fs_adapters_FileSystem.html), on the other hand, has direct access to the physical file system. It maps a "virtual base path" to a given physical path. +The [File System Adapter](../api/@ui5_fs_adapters_FileSystem.html), on the other hand, has direct access to the physical file system. It maps a "virtual base path" to a given physical path. Both adapters provide APIs to retrieve and persist [Resources](#resource), namely @@ -43,10 +43,10 @@ Reader collections allow grouped access to multiple adapters, which might even b They implement the same API for **retrieving** resources as adapters (`byPath` and `byGlob`). Multiple flavors exist: -* [ReaderCollection](https://ui5.github.io/cli/v5/api/@ui5_fs_ReaderCollection.html): The most basic collection. Allows parallel read access to multiple readers (i.e. adapters or collections) -* [ReaderCollectionPrioritized](https://ui5.github.io/cli/v5/api/@ui5_fs_ReaderCollectionPrioritized.html): Contains a list of readers which are searched in-order. This allows one reader to "overlay" resources of another -* [DuplexCollection](https://ui5.github.io/cli/v5/api/@ui5_fs_DuplexCollection.html): Contains a single reader and a single "writer". It therefore also implements the Adapter API for **persisting** resources (`write()`). When retrieving resources, the writer is prioritized over the reader -* [WriterCollection](https://ui5.github.io/cli/v5/api/@ui5_fs_WriterCollection.html): Contains a set of writers and a mapping for each of them. When writing a resource, the writer is chosen based on the resource's virtual path. +* [ReaderCollection](../api/@ui5_fs_ReaderCollection.html): The most basic collection. Allows parallel read access to multiple readers (i.e. adapters or collections) +* [ReaderCollectionPrioritized](../api/@ui5_fs_ReaderCollectionPrioritized.html): Contains a list of readers which are searched in-order. This allows one reader to "overlay" resources of another +* [DuplexCollection](../api/@ui5_fs_DuplexCollection.html): Contains a single reader and a single "writer". It therefore also implements the Adapter API for **persisting** resources (`write()`). When retrieving resources, the writer is prioritized over the reader +* [WriterCollection](../api/@ui5_fs_WriterCollection.html): Contains a set of writers and a mapping for each of them. When writing a resource, the writer is chosen based on the resource's virtual path. <style> .no-decoration { diff --git a/internal/documentation/docs/pages/Overview.md b/internal/documentation/docs/pages/Overview.md index 5d0b510bf81..f8870ea8276 100644 --- a/internal/documentation/docs/pages/Overview.md +++ b/internal/documentation/docs/pages/Overview.md @@ -110,7 +110,7 @@ dependencies: By placing this file in the root directory of the `my.app` application project, you can start a server with a local copy of the `my.lib` dependency, located in the same parent directory, using the command `ui5 serve --dependency-definition ./projectDependencies.yaml`. -The structure of the dependency definition file follows that of the [`@ui5/project/graph/providers/DependencyTree~TreeNode`](https://ui5.github.io/cli/v5/api/@ui5_project_graph_providers_DependencyTree.html#~TreeNode) type. +The structure of the dependency definition file follows that of the [`@ui5/project/graph/providers/DependencyTree~TreeNode`](../api/@ui5_project_graph_providers_DependencyTree.html#~TreeNode) type. ## HTTP/2 Development Webserver The UI5 CLI contains a web server to serve the project via HTTP/2 protocol. @@ -124,4 +124,4 @@ This requires an SSL certificate. You are guided through the automatic generatio ## Integration in Other Tools One of the key features of the UI5 CLI is its modularization. Single parts of UI5 CLI can easily be integrated in other `Node.js`-based tools and frameworks like [Grunt](https://gruntjs.com/) or [Gulp](https://gulpjs.com/). -All JavaScript APIs available for direct consumption are listed [here](https://ui5.github.io/cli/v5/api/index.html). However, for standard UI5 development, the [UI5 CLI](./CLI.md) should always be the first choice. +All JavaScript APIs available for direct consumption are listed in the sidebar menu under **📚 API**. However, for standard UI5 development, the [UI5 CLI](./CLI.md) should always be the first choice. diff --git a/internal/documentation/docs/pages/Project.md b/internal/documentation/docs/pages/Project.md index e4fe1843eb6..312a6b87560 100644 --- a/internal/documentation/docs/pages/Project.md +++ b/internal/documentation/docs/pages/Project.md @@ -91,10 +91,9 @@ In the table below you can find the available combinations of project type & out ² Theme libraries in most cases have more than one namespace. ³ Modules have explicit path mappings configured and no namespace concept. - -<div style="margin: 1rem 0;"> - <VPButton class="no-decoration" text="📚 API Reference" href="https://ui5.github.io/cli/v5/api/@ui5_project_build_ProjectBuilder.html"/> -</div> +::: tip +Browse the API reference for each Project API by navigating in the sidebar menu to **📚 API -> @ui5/project**. +::: <style> .no-decoration { diff --git a/internal/documentation/docs/pages/Server.md b/internal/documentation/docs/pages/Server.md index 64d6ae46155..e6c65aa6001 100644 --- a/internal/documentation/docs/pages/Server.md +++ b/internal/documentation/docs/pages/Server.md @@ -6,9 +6,9 @@ The [UI5 Server](https://github.com/SAP/ui5-server) module provides server capab import VPButton from "vitepress/dist/client/theme-default/components/VPButton.vue" </script> -<div style="margin: 1rem 0;"> - <VPButton class="no-decoration" text="📚 API Reference" href="https://ui5.github.io/cli/v5/api/module-@ui5_server.html"/> -</div> +::: tip +Browse the API reference for each Server API by navigating in the sidebar menu to **📚 API -> @ui5/server**. +::: ::: warning Development Use Only The UI5 Server is intended for **local development purposes only**. It must not be exposed to untrusted parties or used as a public-facing web server. diff --git a/internal/documentation/docs/pages/extensibility/CustomServerMiddleware.md b/internal/documentation/docs/pages/extensibility/CustomServerMiddleware.md index 1b5f22cb0aa..c58cf4bd047 100644 --- a/internal/documentation/docs/pages/extensibility/CustomServerMiddleware.md +++ b/internal/documentation/docs/pages/extensibility/CustomServerMiddleware.md @@ -237,7 +237,7 @@ Live demo of the above example: [openui5-sample-app with custom middleware](http Custom middleware defining [Specification Version](../Configuration.md#specification-versions) 2.0 or higher have access to an interface of a [MiddlewareUtil](https://ui5.github.io/cli/v5/api/@ui5_server_middleware_MiddlewareUtil.html) instance. -In this case, a `middlewareUtil` object is provided as a part of the custom middleware's [parameters](#custom-middleware-implementation). Depending on the specification version of the custom middleware, a set of helper functions is available to the implementation. The lowest required specification version for every function is listed in the [MiddlewareUtil API reference](https://ui5.github.io/cli/v5/api/@ui5_server_middleware_MiddlewareUtil.html). +In this case, a `middlewareUtil` object is provided as a part of the custom middleware's [parameters](#custom-middleware-implementation). Depending on the specification version of the custom middleware, a set of helper functions is available to the implementation. The lowest required specification version for every function is listed in the [MiddlewareUtil API reference](../../api/@ui5_server_middleware_MiddlewareUtil.html). ## Integration with `karma-ui5` diff --git a/internal/documentation/docs/pages/extensibility/CustomTasks.md b/internal/documentation/docs/pages/extensibility/CustomTasks.md index be10565bf20..2fe7db198ed 100644 --- a/internal/documentation/docs/pages/extensibility/CustomTasks.md +++ b/internal/documentation/docs/pages/extensibility/CustomTasks.md @@ -352,7 +352,7 @@ The following code snippets show examples for custom task implementations. #### Example: lib/tasks/renderMarkdownFiles.js -This example is making use of the `resourceFactory` [TaskUtil](https://ui5.github.io/cli/v5/api/@ui5_project_build_helpers_TaskUtil.html) +This example is making use of the `resourceFactory` [TaskUtil](../../api/@ui5_project_build_helpers_TaskUtil.html) API to create new resources based on the output of a third-party module for rendering Markdown files. The created resources are added to the build result by writing them into the provided `workspace`. In addition, this task supports differential builds, which re-process only changed resources. @@ -449,7 +449,7 @@ Tasks should ideally use the reader/writer APIs provided by UI5 CLI for working #### Example: lib/tasks/compileLicenseSummary.js -This example is making use of multiple [TaskUtil](https://ui5.github.io/cli/v5/api/@ui5_project_build_helpers_TaskUtil.html) +This example is making use of multiple [TaskUtil](../../api/@ui5_project_build_helpers_TaskUtil.html) APIs to retrieve additional information about the project currently being built (`taskUtil.getProject()`) and its direct dependencies (`taskUtil.getDependencies()`). Project configuration files like `package.json` can be accessed directly using `project.getRootReader()`. @@ -554,6 +554,6 @@ module.exports = async function({dependencies, log, options, taskUtil, workspace ## Helper Class `TaskUtil` -Custom tasks defining [Specification Version](../Configuration.md#specification-versions) 2.2 or higher have access to an interface of a [TaskUtil](https://ui5.github.io/cli/v5/api/@ui5_project_build_helpers_TaskUtil.html) instance. +Custom tasks defining [Specification Version](../Configuration.md#specification-versions) 2.2 or higher have access to an interface of a [TaskUtil](../../api/@ui5_project_build_helpers_TaskUtil.html) instance. -In this case, a `taskUtil` object is provided as a part of the custom task's [parameters](#task-implementation). Depending on the specification version of the custom task, a set of helper functions is available to the implementation. The lowest required specification version for every function is listed in the [TaskUtil API reference](https://ui5.github.io/cli/v5/api/@ui5_project_build_helpers_TaskUtil.html). +In this case, a `taskUtil` object is provided as a part of the custom task's [parameters](#task-implementation). Depending on the specification version of the custom task, a set of helper functions is available to the implementation. The lowest required specification version for every function is listed in the [TaskUtil API reference](../../api/@ui5_project_build_helpers_TaskUtil.html). diff --git a/internal/documentation/package.json b/internal/documentation/package.json index 2eeb3efaf2f..b96473ef5b9 100644 --- a/internal/documentation/package.json +++ b/internal/documentation/package.json @@ -28,7 +28,6 @@ "build:vitepress": "vitepress build", "build:assets": "sh -c 'DEST_DIR=${1:-./dist}; cp -r ./docs/images \"$DEST_DIR/images\"' --", "preview": "vitepress preview --port 8080", - "jsdoc": "npm run jsdoc-generate && open-cli dist/api/index.html", "jsdoc-generate": "jsdoc -c jsdoc/jsdoc-workspace.json -t jsdoc/docdash ./ || (echo 'Error during JSDoc generation! Check log.' && exit 1)", "jsdoc-generate-gh-pages": "jsdoc -c jsdoc/jsdoc.json -t jsdoc/docdash ./ || (echo 'Error during JSDoc generation! Check log.' && exit 1)", "generate-cli-doc": "node ./scripts/generateCliDoc.js", @@ -51,7 +50,6 @@ "@apidevtools/json-schema-ref-parser": "^14.2.1", "handlebars": "^4.7.9", "jsdoc": "^4.0.5", - "open-cli": "^9.0.0", "traverse": "^0.6.11" } } diff --git a/package-lock.json b/package-lock.json index 4c778c8dfa3..66486249c14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,7 +68,6 @@ "@apidevtools/json-schema-ref-parser": "^14.2.1", "handlebars": "^4.7.9", "jsdoc": "^4.0.5", - "open-cli": "^9.0.0", "traverse": "^0.6.11" }, "engines": { @@ -863,17 +862,6 @@ "dev": true, "license": "CC0-1.0" }, - "node_modules/@borewit/text-codec": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.2.2.tgz", - "integrity": "sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, "node_modules/@colordx/core": { "version": "5.4.3", "resolved": "https://registry.npmjs.org/@colordx/core/-/core-5.4.3.tgz", @@ -4365,31 +4353,6 @@ "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, - "node_modules/@tokenizer/inflate": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@tokenizer/inflate/-/inflate-0.4.1.tgz", - "integrity": "sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.4.3", - "token-types": "^6.1.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/@tokenizer/token": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", - "dev": true, - "license": "MIT" - }, "node_modules/@tufjs/canonical-json": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", @@ -7000,35 +6963,6 @@ "node": ">= 8" } }, - "node_modules/crypto-random-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", - "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^1.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/crypto-random-string/node_modules/type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/css-declaration-sorter": { "version": "7.4.0", "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.4.0.tgz", @@ -8876,25 +8810,6 @@ "node": ">=16.0.0" } }, - "node_modules/file-type": { - "version": "21.3.4", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.4.tgz", - "integrity": "sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@tokenizer/inflate": "^0.4.1", - "strtok3": "^10.3.4", - "token-types": "^6.1.1", - "uint8array-extras": "^1.4.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sindresorhus/file-type?sponsor=1" - } - }, "node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -9964,27 +9879,6 @@ "url": "https://opencollective.com/express" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -13325,41 +13219,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/open-cli": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/open-cli/-/open-cli-9.0.0.tgz", - "integrity": "sha512-4UHkLVm4tUM/ardg66uY3x1icgfCnunks5eFVFBzASO3b13Ow2Md3xs9YT7yXWFjXOBpauIeh/N9fvbziU1wkg==", - "dev": true, - "license": "MIT", - "dependencies": { - "file-type": "^21.3.4", - "meow": "^14.1.0", - "open": "^11.0.0", - "tempy": "^3.2.0" - }, - "bin": { - "open-cli": "cli.js" - }, - "engines": { - "node": ">=22" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/open-cli/node_modules/meow": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-14.1.0.tgz", - "integrity": "sha512-EDYo6VlmtnumlcBCbh1gLJ//9jvM/ndXHfVXIFrZVr6fGcwTUyCTFNTLCKuY3ffbK8L/+3Mzqnd58RojiZqHVw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -16286,23 +16145,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strtok3": { - "version": "10.3.5", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.3.5.tgz", - "integrity": "sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@tokenizer/token": "^0.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, "node_modules/stubborn-fs": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/stubborn-fs/-/stubborn-fs-2.0.0.tgz", @@ -16576,51 +16418,6 @@ "node": ">=14.16" } }, - "node_modules/tempy": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/tempy/-/tempy-3.2.0.tgz", - "integrity": "sha512-d79HhZya5Djd7am0q+W4RTsSU+D/aJzM+4Y4AGJGuGlgM2L6sx5ZvOYTmZjqPhrDrV6xJTtRSm1JCLj6V6LHLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-stream": "^3.0.0", - "temp-dir": "^3.0.0", - "type-fest": "^2.12.2", - "unique-string": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/tempy/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/tempy/node_modules/type-fest": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", - "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/terser": { "version": "5.48.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.48.0.tgz", @@ -16827,25 +16624,6 @@ "node": ">=0.6" } }, - "node_modules/token-types": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.1.2.tgz", - "integrity": "sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==", - "dev": true, - "license": "MIT", - "dependencies": { - "@borewit/text-codec": "^0.2.1", - "@tokenizer/token": "^0.3.0", - "ieee754": "^1.2.1" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -17123,19 +16901,6 @@ "node": ">=0.8.0" } }, - "node_modules/uint8array-extras": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.5.0.tgz", - "integrity": "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/unbash": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/unbash/-/unbash-4.0.1.tgz", @@ -17198,22 +16963,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unique-string": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", - "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "crypto-random-string": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/unist-util-is": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz", From 9aa185da6875c48c0d06f858cf065c35844199a0 Mon Sep 17 00:00:00 2001 From: Max Reichmann <max.reichmann@sap.com> Date: Tue, 21 Jul 2026 13:55:57 +0200 Subject: [PATCH 7/7] test(project): Add test with exclusion of `generateVersionInfo` --- .../lib/build/ProjectBuilder.integration.js | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/packages/project/test/lib/build/ProjectBuilder.integration.js b/packages/project/test/lib/build/ProjectBuilder.integration.js index 7537a4e7e41..1cbd535860f 100644 --- a/packages/project/test/lib/build/ProjectBuilder.integration.js +++ b/packages/project/test/lib/build/ProjectBuilder.integration.js @@ -2755,6 +2755,51 @@ test.serial("Build application.a with --cache=Force (2)", async (t) => { `Use "Default", "ReadOnly" or "Off" to rebuild.`)); }); +test.serial("Build application.a with --exclude-task=generateVersionInfo", async (t) => { + // This test verifies that when task generateVersionInfo is excluded, + // the sap-ui-version.json file is NOT generated in the output + // AND the dependencies are not automatically built. + + const fixtureTester = new FixtureTester(t, "application.a"); + const destPath = fixtureTester.destPath; + + // #1 Build with empty cache and exclude generateVersionInfo task + await fixtureTester.buildProject({ + config: {destPath, cleanDest: false, excludedTasks: ["generateVersionInfo"]}, + assertions: { + projects: { + // Only application.a is built, dependencies are skipped + "application.a": {} + } + } + }); + + // Verify that sap-ui-version.json does NOT exist in the output + const versionInfoPath = `${destPath}/resources/sap-ui-version.json`; + await t.throwsAsync(fs.readFile(versionInfoPath, {encoding: "utf8"}), undefined, + "sap-ui-version.json should NOT exist when generateVersionInfo task is excluded"); + + + // #2 Build with empty cache and include all default tasks now + await fixtureTester.buildProject({ + config: {destPath, cleanDest: false}, + assertions: { + projects: { + // All dependencies are built now + "library.d": {}, + "library.a": {}, + "library.b": {}, + "library.c": {}, + "application.a": {} + } + } + }); + + // Verify that sap-ui-version.json DOES exist in the output now + await t.notThrowsAsync(fs.readFile(versionInfoPath, {encoding: "utf8"}), undefined, + "sap-ui-version.json should exist when generateVersionInfo task is included"); +}); + function getFixturePath(fixtureName) { return fileURLToPath(new URL(`../../fixtures/${fixtureName}`, import.meta.url)); }