Skip to content

@ui5/project/graph

Helper module to create a @ui5/project/graph/ProjectGraph from a directory

Description: Helper module to create a @ui5/project/graph/ProjectGraph from a directory

Source: project/lib/graph/graph.js, line 8

Methods

(static) graphFromObject(options) → {Promise<@ui5/project/graph/ProjectGraph>}

Description: Generates a @ui5/project/graph/ProjectGraph from the given dependencyTree following the structure of @ui5/project/graph/providers/DependencyTree~TreeNode

Source: project/lib/graph/graph.js, line 159

Parameters:
NameTypeDescription
optionsobject
Properties:
NameTypeAttributesDefaultDescription
dependencyTree@ui5/project/graph/providers/DependencyTree~TreeNode
cwdstringoptionalprocess.cwd()Directory to resolve relative paths to
rootConfigurationobjectoptionalConfiguration object to use for the root module instead of reading from a configuration file
rootConfigPathstringoptionalConfiguration file to use for the root module instead the default ui5.yaml. Either a path relative to
cwd or an absolute path. In both case, platform-specific path segment separators must be used.
versionOverridestringoptionalFramework version to use instead of the one defined in the root project
cacheModemodule:@ui5/project/ui5Framework/maven/CacheModeoptionalCache mode to use when consuming SNAPSHOT versions of a framework
resolveFrameworkDependenciesstringoptionaltrueWhether framework dependencies should be added to the graph
Returns:

Promise resolving to a Project Graph instance

Type: Promise<@ui5/project/graph/ProjectGraph>

(static) graphFromPackageDependencies(optionsopt) → {Promise<@ui5/project/graph/ProjectGraph>}

Description: Generates a @ui5/project/graph/ProjectGraph by resolving dependencies from package.json files and configuring projects from ui5.yaml files

Source: project/lib/graph/graph.js, line 43

Parameters:
NameTypeAttributesDescription
optionsobjectoptional
Properties:
NameTypeAttributesDefaultDescription
cwdstringoptionalprocess.cwd()Directory to start searching for the root module
rootConfigurationobjectoptionalConfiguration object to use for the root module instead of reading from a configuration file
rootConfigPathstringoptionalConfiguration file to use for the root module instead the default ui5.yaml. Either a path relative to
cwd or an absolute path. In both case, platform-specific path segment separators must be used.
versionOverridestringoptionalFramework version to use instead of the one defined in the root project
resolveFrameworkDependenciesstringoptionaltrueWhether framework dependencies should be added to the graph
workspaceNamestring | nulloptionaldefaultName of the workspace configuration that should be used. "default" if not provided.
cacheModemodule:@ui5/project/ui5Framework/maven/CacheModeoptionalCache mode to use when consuming SNAPSHOT versions of a framework
workspaceConfigPathstringoptionalui5-workspace.yamlWorkspace configuration file to use if no object has been provided
workspaceConfiguration@ui5/project/graph/Workspace~ConfigurationoptionalWorkspace configuration object to use instead of reading from a configuration file.
Parameter workspaceName can either be omitted or has to match with the given configuration name
Returns:

Promise resolving to a Project Graph instance

Type: Promise<@ui5/project/graph/ProjectGraph>

(static) graphFromStaticFile(options) → {Promise<@ui5/project/graph/ProjectGraph>}

Description: Generates a @ui5/project/graph/ProjectGraph from a YAML file following the structure of @ui5/project/graph/providers/DependencyTree~TreeNode.

Documentation: Static Dependency Definition

Source: project/lib/graph/graph.js, line 107

Parameters:
NameTypeDescription
optionsobject
Properties:
NameTypeAttributesDefaultDescription
filePathobjectoptionalprojectDependencies.yamlPath to the dependency configuration file
cwdstringoptionalprocess.cwd()Directory to resolve relative paths to
rootConfigurationobjectoptionalConfiguration object to use for the root module instead of reading from a configuration file
rootConfigPathstringoptionalConfiguration file to use for the root module instead the default ui5.yaml. Either a path relative to
cwd or an absolute path. In both case, platform-specific path segment separators must be used.
versionOverridestringoptionalFramework version to use instead of the one defined in the root project
cacheModemodule:@ui5/project/ui5Framework/maven/CacheModeoptionalCache mode to use when consuming SNAPSHOT versions of a framework
resolveFrameworkDependenciesstringoptionaltrueWhether framework dependencies should be added to the graph
Returns:

Promise resolving to a Project Graph instance

Type: Promise<@ui5/project/graph/ProjectGraph>