diff --git a/lib/types/AbstractBuilder.js b/lib/types/AbstractBuilder.js index 35615c78b..b7536c003 100644 --- a/lib/types/AbstractBuilder.js +++ b/lib/types/AbstractBuilder.js @@ -97,6 +97,7 @@ class AbstractBuilder { {module:@ui5/fs.AbstractReader} parameters.dependencies Reader or Collection to read dependency files {Object} parameters.options Options {string} parameters.options.projectName Project name + {string} [parameters.options.projectNamespace] Project namespace if available {string} [parameters.options.configuration] Task configuration if given in ui5.yaml Returns: {Promise} Promise resolving with undefined once data has been written @@ -106,6 +107,7 @@ class AbstractBuilder { dependencies: resourceCollections.dependencies, options: { projectName: project.metadata.name, + projectNamespace: project.metadata.namespace, configuration: taskDef.configuration } }); diff --git a/test/lib/types/AbstractBuilder.js b/test/lib/types/AbstractBuilder.js index 3813293fa..971a78b9a 100644 --- a/test/lib/types/AbstractBuilder.js +++ b/test/lib/types/AbstractBuilder.js @@ -29,7 +29,8 @@ const applicationBTree = { specVersion: "0.1", type: "application", metadata: { - name: "application.b" + name: "application.b", + namespace: "application/b" }, resources: { configuration: { @@ -206,6 +207,7 @@ test.serial("Instantiation with custom task defined three times", (t) => { test.serial("Instantiation with custom task: Custom task called correctly", (t) => { const customTask = function({workspace, dependencies, options}) { t.deepEqual(options.projectName, "application.b", "Correct project name passed to custom task"); + t.deepEqual(options.projectNamespace, "application/b", "Correct project namespace passed to custom task"); t.deepEqual(options.configuration, "pony", "Correct configuration passed to custom task"); t.deepEqual(workspace, "myWorkspace", "Correct workspace passed to custom task"); t.deepEqual(dependencies, "myDependencies", "Correct dependency collection passed to custom task");