🚀 @ui5/cli
version 3 is a major release with many new features and improvements
Please also refer to the v3 Migration Guide.
Overview
UI5 Tooling v3 provides general support for ES2022 ECMAScript language features. See ECMAScript Support for details.
Breaking Changes
@ui5/cli
:@ui5/project
:- Implement Project Graph, build execution
161f462
- Implement Project Graph, build execution
@ui5/builder
:- generateJsDoc: Remove internal 'buildContext' parameter
4ec80c8
- Removal of manifestBundler and generateManifestBundle (#838)
07a5be2
- JSDoc: Fail build when jsdoc command failed (#845)
c2916b4
- Remove build execution (#740)
af2e956
- Enable modern preload bundles without dependencies (#739)
97cfa6c
- generateResourcesJson: Make 'dependencies' parameter mandatory
268dd16
- moduleBundler: Always default to
optimize: true
(#685)de5837c
- generateJsDoc: Remove internal 'buildContext' parameter
@ui5/server
:@ui5/fs
:- Throw an error on write of a resource when path does not starts with virBasePath of the respective adapter (#453)
d76575f
- Clone resources when writing in and reading from the Memory (#448)
3454bc1
- AbstractAdapter: Virtual base path must end with slash
6d1f411
- resourceFactory: Remove #createCollectionsForTree
a4d15f6
- Throw an error on write of a resource when path does not starts with virBasePath of the respective adapter (#453)
@ui5/logger
:- Deprecate advanced APIs in preparation of refactoring
3aea5e7
- Deprecate advanced APIs in preparation of refactoring
Features
@ui5/cli
:@ui5/project
:- npm/Installer: Do not wrap promise provided by rimraf v4 (#550)
2d1ccda
- specVersion 3.0 (#522)
c5070e5
- Introduce SpecificationVersion class (#431)
e57842b
- TaskRunner: Provide taskName and logger instance to custom tasks
36cd2d8
- TaskUtil: Add resourceFactory API to v3 interface
2e863cf
- TaskUtil: Add getProject/getDependencies API to interface
51f2949
- npm/Installer: Do not wrap promise provided by rimraf v4 (#550)
@ui5/builder
:- Support ES2022 language features (#848)
f9b8457
- jsdoc: Support destructuring of enums for defaultValue (#775)
523f365
- builder: Improve support for ES6+ syntax (#774)
90385fe
- jsdoc: Improve support for ES6+ syntax (#785)
187a6a3
- generateThemeDesignerResources task: Create css_variables.less (#730)
34e69be
- builder: Add cssVariables option (#728)
30d58e1
- Generate source maps for bundles (#695)
8a20c42
- replaceVersion/Copyright: Also process test-resources (#693)
a0d4bc2
- Support ES2022 language features
e749b6a
- Add minify task and processor (#666)
a3af604
- Support ES2022 language features (#848)
@ui5/server
:@ui5/fs
:@ui5/logger
:- Add new log level "perf"
acf0c71
- Add new log level "perf"
Bug Fixes
@ui5/project
:@ui5/builder
:- Avoid redundant bundle creation (#741)
13c8405
- JSModuleAnalyzer: Fix detection of bundle name (#705)
aaeafd4
- generateResourcesJson: Add raw-module info for debug bundles (#736)
3b918e8
- LibraryBuilder: Align task order of "generateComponentPreload"
aea061d
- LocatorResourcePool: Wait for resources in prepare step (#719)
1b7f93f
- XMLTemplateAnalyzer: Analyze core:require of FragmentDefinition
af075ed
- Bundler: Ensure reproducibility for bundles with multiple parts (#689)
6f4588b
- generateResourcesJson: Don't list resources omitted from build result
9608c51
- generateResourcesJson: Analyze debug bundles (#669)
f27513a
- Bundler: Sort raw modules by default
0e11b69
- Avoid redundant bundle creation (#741)
@ui5/fs
:
Details
Breaking Changes
Support for older Node.js and npm releases has been dropped for all UI5 Tooling modules.
Only Node.js v16.18.0, v18.12.0 or higher as well as npm v8 or higher are supported.
All packages have been transformed to ES Modules. Therefore modules are no longer provides a CommonJS exports.
If your project uses CommonJS, it needs to be converted to ES Modules or use a dynamic import for consuming UI5 Tooling modules.
For more information see also:
- https://sap.github.io/ui5-tooling/updates/migrate-v3/
- https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
@ui5/cli
- Removed CLI option
--translator
. Use new option--dependency-definition
to provide a file with
static dependency information - Removed
ui5 build dev
command - Refactored
ui5 tree
: Removed--full
,--json
and--dedupe
options
@ui5/project
- normalizer and projectTree APIs have been removed. Use generateProjectGraph instead
- Going forward only specification versions 2.0 and higher are supported
- In case a legacy specification version is detected, an automatic, transparent migration is attempted.
- Build:
- The "dev" build mode has been removed
- The task "generateVersionInfo" is no longer executed for application projects by default. You may enable it again using the includedTasks parameter
@ui5/builder
The jsdocGenerator
processor and the corresponding generateJsdoc
task will now throw an error when JSDoc reports an error (exit code != 0). This will also fail the build when running ui5 build jsdoc
.
The manifestBundler processor and generateManifestBundle task has been removed because it is no longer required for the HTML5 repository in Cloud Foundry.
- builder.js has been removed. Use ui5-project builder instead
- Tasks now rely on Project instances being available on Resources (see SAP/ui5-fs#381)
- TaskRepository#addTask has been removed. Custom tasks need to be added to the project graph instead
- TaskUtil#get/set/clearTag now requires a Project instance to be provided. Path strings are no longer sufficient and will cause an exception to be thrown
For library projects, the task "generateComponentPreload" is now executed after tasks "generateLibraryManifest" and "generateManifestBundle" instead of before them.
The following tasks have been removed:
- createDebugFiles
- uglify
The following processors have been removed:
- debugFileCreator
- resourceCopier
- uglifier
As a replacement, the new 'minify' task and 'minifier' processor can be used.
Note: The minify task is executed earlier, before the bundling process takes place. Existing 'beforeTask' and 'afterTask' configuration of custom tasks might need to be adapted to cater for this change.
@ui5/server
This removes the "/proxy" endpoint and the corresponding "connectUi5Proxy" middleware from the standard ui5-server. Internally, this middleware made use of the connect-openui5 proxy implementation (https://github.com/SAP/connect-openui5#proxy).
More sophisticated proxy solutions for ui5-server are already available in the form of custom middleware extensions from the UI5-community.
The UI5 Team might provide a dedicated custom middleware extension, with similar functionality, in the future.
- Server now requires a Project Graph instance instead.
- Standard middleware now rely on Project instances being available on Resources (see SAP/ui5-fs#381)
- MiddlewareRepository#addMiddleware has been removed. Custom middleware need to be added to the project graph instead
@ui5/fs
An error is thrown when a resource shall be written to an adapter where the path of the resource does not starts with the virtual base path defined in the adapter.
Resources stored in the adapters can not be modified by reference anymore. All modifications need to be persisted by using the #write method in order to be reflected in the adapter.1d908bbc7ff3ecc99d99c
@ui5/logger
The @ui5/logger got refactored and as a result its API went public. Remove the usage of npmlog and refactor @ui5/logger modules to emit log events which are then caught in dedicated handlers. This is somewhat inspired by npm's proc-log module.
This breaking change removes capabilities that are likely to change and should not be part of a public API.
This will ensure that later changes to the module can be done in a compatible manner.
Relevant changes:
- Restrict log-methods to two argument only. The use of placeholders like '%s' is no longer supported.
A warning will be logged if more than two argument is supplied. Placeholders will be replaced with a deprecation message. We suggest the use of template literals. - Deprecate #getGroupLogger method. Calling it throws an error.
It will be removed in one of the next patch releases - Deprecate #setShowProgress method. Calling it throws an error.
It will be removed in one of the next patch releases - Remove GroupLogger and TaskLogger classes. Similar functionality might be re-added in a later release.