@ui5/webcomponents-tools 2.0.1 → 2.1.0-rc.1
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
CHANGED
@@ -3,6 +3,22 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
# [2.1.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.1.0-rc.0...v2.1.0-rc.1) (2024-07-18)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
# [2.1.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.0.1...v2.1.0-rc.0) (2024-07-11)
|
15
|
+
|
16
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
6
22
|
## [2.0.1](https://github.com/SAP/ui5-webcomponents/compare/v2.0.0...v2.0.1) (2024-07-05)
|
7
23
|
|
8
24
|
**Note:** Version bump only for package @ui5/webcomponents-tools
|
@@ -130,6 +130,10 @@ function processClass(ts, classNode, moduleDoc) {
|
|
130
130
|
currClass.events = findAllDecorators(classNode, "event")
|
131
131
|
?.map(event => processEvent(ts, event, classNode, moduleDoc));
|
132
132
|
|
133
|
+
const filename = classNode.getSourceFile().fileName;
|
134
|
+
const sourceFile = typeProgram.getSourceFile(filename);
|
135
|
+
const tsProgramClassNode = sourceFile.statements.find(statement => ts.isClassDeclaration(statement) && statement.name?.text === classNode.name?.text);
|
136
|
+
|
133
137
|
// Slots (with accessor), methods and fields
|
134
138
|
for (let i = 0; i < (currClass.members?.length || 0); i++) {
|
135
139
|
const member = currClass.members[i];
|
@@ -184,20 +188,21 @@ function processClass(ts, classNode, moduleDoc) {
|
|
184
188
|
const propertyDecorator = findDecorator(classNodeMember, "property");
|
185
189
|
|
186
190
|
if (propertyDecorator) {
|
187
|
-
member._ui5validator = propertyDecorator?.expression?.arguments[0]?.properties?.find(property => ["validator", "type"].includes(property.name.text))?.initializer?.text || "String";
|
188
191
|
member._ui5noAttribute = propertyDecorator?.expression?.arguments[0]?.properties?.find(property => property.name.text === "noAttribute")?.initializer?.kind === ts.SyntaxKind.TrueKeyword || undefined;
|
189
192
|
}
|
190
193
|
|
191
|
-
if (currClass.customElement && member.privacy === "public"
|
192
|
-
const filename = classNode.getSourceFile().fileName;
|
193
|
-
const sourceFile = typeProgram.getSourceFile(filename);
|
194
|
-
const tsProgramClassNode = sourceFile.statements.find(statement => ts.isClassDeclaration(statement) && statement.name?.text === classNode.name?.text);
|
194
|
+
if (currClass.customElement && member.privacy === "public") {
|
195
195
|
const tsProgramMember = tsProgramClassNode.members.find(m => ts.isPropertyDeclaration(m) && m.name?.text === member.name);
|
196
196
|
const attributeValue = typeChecker.typeToString(typeChecker.getTypeAtLocation(tsProgramMember), tsProgramMember);
|
197
197
|
|
198
198
|
if (attributeValue === "boolean" && member.default === "true") {
|
199
199
|
logDocumentationError(moduleDoc.path, `Boolean properties must be initialzed to false. [${member.name}] property of class [${className}] is intialized to \`true\``)
|
200
200
|
}
|
201
|
+
|
202
|
+
if (!member.type) {
|
203
|
+
logDocumentationError(moduleDoc.path, `Public properties must have type. The type of [${member.name}] property is not determinated automatically. Please check it.`)
|
204
|
+
}
|
205
|
+
|
201
206
|
currClass.attributes.push({
|
202
207
|
description: member.description,
|
203
208
|
name: toKebabCase(member.name),
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ui5/webcomponents-tools",
|
3
|
-
"version": "2.0.1",
|
3
|
+
"version": "2.1.0-rc.1",
|
4
4
|
"description": "UI5 Web Components: webcomponents.tools",
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
6
6
|
"license": "Apache-2.0",
|
@@ -84,5 +84,5 @@
|
|
84
84
|
"esbuild": "^0.19.9",
|
85
85
|
"yargs": "^17.5.1"
|
86
86
|
},
|
87
|
-
"gitHead": "
|
87
|
+
"gitHead": "87939ef793d60480ba9571b194223cf5ac8ba031"
|
88
88
|
}
|