From 692d93b4dc6ed19b13f9cb0922136f6b998ef335 Mon Sep 17 00:00:00 2001 From: Lars Kissel Date: Fri, 23 Jul 2021 12:01:51 +0200 Subject: [PATCH] [INTERNAL] Improve JSDoc param types --- lib/utils/buildHelper.js | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/lib/utils/buildHelper.js b/lib/utils/buildHelper.js index 443098bf..b3200ebb 100644 --- a/lib/utils/buildHelper.js +++ b/lib/utils/buildHelper.js @@ -5,7 +5,7 @@ const log = require("@ui5/logger").getLogger("cli:utils:buildHelper"); * its value is an array of all of its transitive dependencies. * * @param {object} tree Project tree as generated by the [@ui5/project.normalizer]{@link module:@ui5/project.normalizer} - * @returns {object} An object with dependency names as key and each with an array of its transitive + * @returns {Object} An object with dependency names as key and each with an array of its transitive * dependencies as value */ function getFlattenedDependencyTree(tree) { @@ -40,7 +40,8 @@ function getFlattenedDependencyTree(tree) { * transitive dependencies are handled with a lower priority than explicitly mentioned dependencies. The default * dependencies set in the build settings are appended in the end. * - * The priority of the various dependency lists is applied in the following order: + * The priority of the various dependency lists is applied in the following order, but note that a later list can't + * overrule earlier ones: *
    *
  1. includeDependency, includeDependencyRegExp
  2. *
  3. excludeDependency, excludeDependencyRegExp
  4. @@ -52,24 +53,24 @@ function getFlattenedDependencyTree(tree) { * @param {object} parameters Parameters * @param {object} parameters.tree Project tree as generated by the * [@ui5/project.normalizer]{@link module:@ui5/project.normalizer} - * @param {Array.} parameters.includeDependency The dependencies to be considered in 'includedDependencies'; the + * @param {string[]} parameters.includeDependency The dependencies to be considered in 'includedDependencies'; the * "*" character can be used as wildcard for all dependencies and is an alias for the CLI option "--all" - * @param {Array.} parameters.includeDependencyRegExp Strings which are interpreted as regular expressions + * @param {string[]} parameters.includeDependencyRegExp Strings which are interpreted as regular expressions * to describe the selection of dependencies to be considered in 'includedDependencies' - * @param {Array.} parameters.includeDependencyTree The dependencies to be considered in 'includedDependencies'; + * @param {string[]} parameters.includeDependencyTree The dependencies to be considered in 'includedDependencies'; * transitive dependencies are also appended - * @param {Array.} parameters.excludeDependency The dependencies to be considered in 'excludedDependencies' - * @param {Array.} parameters.excludeDependencyRegExp Strings which are interpreted as regular expressions + * @param {string[]} parameters.excludeDependency The dependencies to be considered in 'excludedDependencies' + * @param {string[]} parameters.excludeDependencyRegExp Strings which are interpreted as regular expressions * to describe the selection of dependencies to be considered in 'excludedDependencies' - * @param {Array.} parameters.excludeDependencyTree The dependencies to be considered in 'excludedDependencies'; + * @param {string[]} parameters.excludeDependencyTree The dependencies to be considered in 'excludedDependencies'; * transitive dependencies are also appended - * @param {Array.} parameters.defaultIncludeDependency Same as 'includeDependency' parameter; used for build + * @param {string[]} parameters.defaultIncludeDependency Same as 'includeDependency' parameter; used for build * settings - * @param {Array.} parameters.defaultIncludeDependencyRegExp Same as 'includeDependencyRegExp' parameter; used + * @param {string[]} parameters.defaultIncludeDependencyRegExp Same as 'includeDependencyRegExp' parameter; used * for build settings - * @param {Array.} parameters.defaultIncludeDependencyTree Same as 'includeDependencyTree' parameter; used for + * @param {string[]} parameters.defaultIncludeDependencyTree Same as 'includeDependencyTree' parameter; used for * build settings - * @returns {object} An object containing the 'includedDependencies' and 'excludedDependencies' + * @returns {Object} An object containing the 'includedDependencies' and 'excludedDependencies' */ function createDependencyLists({ tree, @@ -189,8 +190,8 @@ function createDependencyLists({ * * @param {boolean} buildAll The value of the all command line parameter to decide if project * dependencies have to be built - * @param {Array.} includedDependencies The list of included dependencies - * @param {Array.} excludedDependencies The list of excluded dependencies + * @param {string[]} includedDependencies The list of included dependencies + * @param {string[]} excludedDependencies The list of excluded dependencies * @returns {boolean} Whether it is required to build project dependencies */ function alignWithBuilderApi(buildAll, includedDependencies, excludedDependencies) {