@ui5/builder 3.0.7 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -2
- package/lib/lbt/analyzer/JSModuleAnalyzer.js +12 -0
- package/lib/lbt/analyzer/XMLTemplateAnalyzer.js +4 -0
- package/lib/lbt/resources/ModuleInfo.js +17 -1
- package/lib/lbt/resources/ResourceCollector.js +2 -2
- package/lib/processors/jsdoc/lib/ui5/template/publish.cjs +130 -1286
- package/lib/processors/themeBuilderWorker.js +278 -0
- package/lib/tasks/buildThemes.js +83 -14
- package/lib/tasks/jsdoc/generateJsdoc.js +1 -6
- package/package.json +10 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,20 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
-
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v3.0.
|
|
5
|
+
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v3.0.9...HEAD).
|
|
6
|
+
|
|
7
|
+
<a name="v3.0.9"></a>
|
|
8
|
+
## [v3.0.9] - 2023-07-25
|
|
9
|
+
|
|
10
|
+
<a name="v3.0.8"></a>
|
|
11
|
+
## [v3.0.8] - 2023-07-19
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
- Revert "[INTERNAL] Remove implicit dependencies concept ([#913](https://github.com/SAP/ui5-builder/issues/913))" [`1043714`](https://github.com/SAP/ui5-builder/commit/1043714e3b952a8280f1ff7909f79db3b750eb0c)
|
|
14
|
+
- **generateJsdoc:** Also process resources created by preceeding tasks [`04447bd`](https://github.com/SAP/ui5-builder/commit/04447bdec28b8bf18c24bd53e3fe8be9bdeed6c2)
|
|
15
|
+
|
|
6
16
|
|
|
7
17
|
<a name="v3.0.7"></a>
|
|
8
|
-
## [v3.0.7] - 2023-07-
|
|
18
|
+
## [v3.0.7] - 2023-07-13
|
|
9
19
|
### Bug Fixes
|
|
10
20
|
- Don't report a missing module that's contained in another bundle ([#915](https://github.com/SAP/ui5-builder/issues/915)) [`8f23f38`](https://github.com/SAP/ui5-builder/commit/8f23f388f6d64f313ae8a89d0fcaf39ba905a70b)
|
|
11
21
|
|
|
@@ -809,6 +819,8 @@ to load the custom bundle file instead.
|
|
|
809
819
|
|
|
810
820
|
### Features
|
|
811
821
|
- Add ability to configure component preloads and custom bundles [`2241e5f`](https://github.com/SAP/ui5-builder/commit/2241e5ff98fd95f1f80cc74959655ae7a9c660e7)
|
|
822
|
+
[v3.0.9]: https://github.com/SAP/ui5-builder/compare/v3.0.8...v3.0.9
|
|
823
|
+
[v3.0.8]: https://github.com/SAP/ui5-builder/compare/v3.0.7...v3.0.8
|
|
812
824
|
[v3.0.7]: https://github.com/SAP/ui5-builder/compare/v3.0.6...v3.0.7
|
|
813
825
|
[v3.0.6]: https://github.com/SAP/ui5-builder/compare/v3.0.5...v3.0.6
|
|
814
826
|
[v3.0.5]: https://github.com/SAP/ui5-builder/compare/v3.0.4...v3.0.5
|
|
@@ -3,6 +3,7 @@ import escope from "escope";
|
|
|
3
3
|
import {fromUI5LegacyName, fromRequireJSName, resolveRelativeRequireJSName} from "../utils/ModuleName.js";
|
|
4
4
|
import moduleInfo from "../resources/ModuleInfo.js";
|
|
5
5
|
const ModuleFormat = moduleInfo.Format;
|
|
6
|
+
import {MODULE__JQUERY_SAP_GLOBAL, MODULE__UI5LOADER_AUTOCONFIG} from "../UI5ClientConstants.js";
|
|
6
7
|
import {
|
|
7
8
|
findOwnProperty,
|
|
8
9
|
getLocation,
|
|
@@ -334,6 +335,17 @@ class JSModuleAnalyzer {
|
|
|
334
335
|
}
|
|
335
336
|
}
|
|
336
337
|
|
|
338
|
+
// depending on the used module APIs, add an implicit dependency to the loader entry module
|
|
339
|
+
if ( info.format === ModuleFormat.UI5_LEGACY ) {
|
|
340
|
+
info.addImplicitDependency(MODULE__JQUERY_SAP_GLOBAL);
|
|
341
|
+
} else if ( info.format === ModuleFormat.UI5_DEFINE ) {
|
|
342
|
+
// Note: the implicit dependency for sap.ui.define modules points to the standard UI5
|
|
343
|
+
// loader config module. A more general approach would be to add a dependency to the loader
|
|
344
|
+
// only, but then standard configuration would be missed by dependency resolution
|
|
345
|
+
// (to be clarified)
|
|
346
|
+
info.addImplicitDependency(MODULE__UI5LOADER_AUTOCONFIG);
|
|
347
|
+
}
|
|
348
|
+
|
|
337
349
|
if ( !bIsUi5Module ) {
|
|
338
350
|
// when there are no indicators for module APIs, mark the module as 'raw' module
|
|
339
351
|
info.rawModule = true;
|
|
@@ -178,6 +178,8 @@ class XMLTemplateAnalyzer {
|
|
|
178
178
|
// console.log(result);
|
|
179
179
|
// clear();
|
|
180
180
|
if ( isFragment ) {
|
|
181
|
+
// all fragments implicitly depend on the fragment class
|
|
182
|
+
this.info.addImplicitDependency(FRAGMENT_MODULE);
|
|
181
183
|
this._analyzeNode(result);
|
|
182
184
|
} else {
|
|
183
185
|
// views require a special handling of the root node
|
|
@@ -194,6 +196,8 @@ class XMLTemplateAnalyzer {
|
|
|
194
196
|
}
|
|
195
197
|
|
|
196
198
|
_analyzeViewRootNode(node) {
|
|
199
|
+
this.info.addImplicitDependency(XMLVIEW_MODULE);
|
|
200
|
+
|
|
197
201
|
const controllerName = getAttribute(node, XMLVIEW_CONTROLLERNAME_ATTRIBUTE);
|
|
198
202
|
if ( controllerName ) {
|
|
199
203
|
this._addDependency( fromUI5LegacyName(controllerName, ".controller.js"), this.conditional );
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
const STRICT = 0;
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* An implicit dependency is also strict, but has not been declared. E.g. each UI5 module depends on
|
|
11
|
+
* jquery.sap.global.
|
|
12
|
+
*
|
|
13
|
+
* @private
|
|
14
|
+
*/
|
|
15
|
+
const IMPLICIT = 1;
|
|
16
|
+
|
|
9
17
|
/**
|
|
10
18
|
* A conditional dependency has to be resolved only under certain conditions that typically are
|
|
11
19
|
* checked at runtime.
|
|
@@ -104,7 +112,7 @@ class ModuleInfo {
|
|
|
104
112
|
// included already as a submodule.
|
|
105
113
|
// If the dependency was known already, update the kind
|
|
106
114
|
// only when the new kind is stronger than the current one.
|
|
107
|
-
// STRICT is stronger than CONDITIONAL
|
|
115
|
+
// STRICT is stronger than IMPLICIT, IMPLICIT is stronger than CONDITIONAL
|
|
108
116
|
if ( dependency &&
|
|
109
117
|
dependency !== this.name &&
|
|
110
118
|
this.subModules.indexOf(dependency) < 0 &&
|
|
@@ -113,6 +121,10 @@ class ModuleInfo {
|
|
|
113
121
|
}
|
|
114
122
|
}
|
|
115
123
|
|
|
124
|
+
addImplicitDependency(dependency) {
|
|
125
|
+
this._addDependency(dependency, IMPLICIT);
|
|
126
|
+
}
|
|
127
|
+
|
|
116
128
|
addDependency(dependency, conditional) {
|
|
117
129
|
this._addDependency(dependency, conditional ? CONDITIONAL : STRICT);
|
|
118
130
|
}
|
|
@@ -163,6 +175,10 @@ class ModuleInfo {
|
|
|
163
175
|
return this._dependencies[dependency] === CONDITIONAL;
|
|
164
176
|
}
|
|
165
177
|
|
|
178
|
+
isImplicitDependency(dependency) {
|
|
179
|
+
return this._dependencies[dependency] === IMPLICIT;
|
|
180
|
+
}
|
|
181
|
+
|
|
166
182
|
get name() {
|
|
167
183
|
return this._name;
|
|
168
184
|
}
|
|
@@ -124,7 +124,7 @@ class ResourceCollector {
|
|
|
124
124
|
moduleInfo.dependencies.forEach((dep) => {
|
|
125
125
|
if ( moduleInfo.isConditionalDependency(dep) ) {
|
|
126
126
|
resourceInfo.condRequired.add(dep);
|
|
127
|
-
} else {
|
|
127
|
+
} else if ( !moduleInfo.isImplicitDependency(dep) ) {
|
|
128
128
|
resourceInfo.required.add(dep);
|
|
129
129
|
}
|
|
130
130
|
});
|
|
@@ -158,7 +158,7 @@ class ResourceCollector {
|
|
|
158
158
|
if (!resourceInfo.required.has(dep)) {
|
|
159
159
|
resourceInfo.condRequired.add(dep);
|
|
160
160
|
}
|
|
161
|
-
} else {
|
|
161
|
+
} else if ( !subModuleInfo.isImplicitDependency(dep) ) {
|
|
162
162
|
// Move module from condRequired to required
|
|
163
163
|
if (resourceInfo.condRequired.has(dep)) {
|
|
164
164
|
resourceInfo.condRequired.delete(dep);
|