@ui5/webcomponents-tools 1.23.1 → 1.24.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 +16 -0
- package/lib/cem/custom-elements-manifest.config.mjs +24 -2
- package/lib/cem/utils.mjs +5 -0
- package/package.json +4 -2
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
|
+
# [1.24.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.24.0-rc.0...v1.24.0-rc.1) (2024-03-15)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
# [1.24.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.23.1...v1.24.0-rc.0) (2024-03-14)
|
15
|
+
|
16
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
6
22
|
## [1.23.1](https://github.com/SAP/ui5-webcomponents/compare/v1.23.1-rc.0...v1.23.1) (2024-03-08)
|
7
23
|
|
8
24
|
**Note:** Version bump only for package @ui5/webcomponents-tools
|
@@ -19,8 +19,11 @@ import {
|
|
19
19
|
isClass,
|
20
20
|
normalizeTagType,
|
21
21
|
logDocumentationError,
|
22
|
-
displayDocumentationErrors
|
22
|
+
displayDocumentationErrors,
|
23
|
+
toKebabCase
|
23
24
|
} from "./utils.mjs";
|
25
|
+
import { generateCustomData } from "cem-plugin-vs-code-custom-data-generator";
|
26
|
+
import { customElementJetBrainsPlugin } from "custom-element-jet-brains-integration";
|
24
27
|
|
25
28
|
const packageJSON = JSON.parse(fs.readFileSync("./package.json"));
|
26
29
|
|
@@ -169,6 +172,23 @@ function processClass(ts, classNode, moduleDoc) {
|
|
169
172
|
member._ui5noAttribute = propertyDecorator?.expression?.arguments[0]?.properties?.find(property => property.name.text === "noAttribute")?.initializer?.kind === ts.SyntaxKind.TrueKeyword || undefined;
|
170
173
|
}
|
171
174
|
|
175
|
+
if (currClass.customElement && member.privacy === "public" && !propertyDecorator?.expression?.arguments[0]?.properties?.find(property => property.name.text === "multiple") && !["object"].includes(member._ui5validator?.toLowerCase())) {
|
176
|
+
const filename = classNode.getSourceFile().fileName;
|
177
|
+
const sourceFile = typeProgram.getSourceFile(filename);
|
178
|
+
const tsProgramClassNode = sourceFile.statements.find(statement => ts.isClassDeclaration(statement) && statement.name?.text === classNode.name?.text);
|
179
|
+
const tsProgramMember = tsProgramClassNode.members.find(m => ts.isPropertyDeclaration(m) && m.name?.text === member.name);
|
180
|
+
const attributeValue = typeChecker.typeToString(typeChecker.getTypeAtLocation(tsProgramMember), tsProgramMember);
|
181
|
+
|
182
|
+
currClass.attributes.push({
|
183
|
+
description: member.description,
|
184
|
+
name: toKebabCase(member.name),
|
185
|
+
default: member.default,
|
186
|
+
fieldName: member.name,
|
187
|
+
type: { text: attributeValue },
|
188
|
+
deprecated: member.deprecated
|
189
|
+
})
|
190
|
+
}
|
191
|
+
|
172
192
|
if (hasTag(memberParsedJsDoc, "formProperty")) {
|
173
193
|
member._ui5formProperty = true;
|
174
194
|
}
|
@@ -334,7 +354,7 @@ const processPublicAPI = object => {
|
|
334
354
|
if ((key === "privacy" && object[key] !== "public") || (key === "_ui5privacy" && object[key] !== "public")) {
|
335
355
|
return true;
|
336
356
|
} else if (typeof object[key] === "object") {
|
337
|
-
if (key === "cssParts" || key === "_ui5implements") {
|
357
|
+
if (key === "cssParts" || key === "attributes" || key === "_ui5implements") {
|
338
358
|
continue;
|
339
359
|
}
|
340
360
|
|
@@ -475,5 +495,7 @@ export default {
|
|
475
495
|
}
|
476
496
|
}
|
477
497
|
},
|
498
|
+
generateCustomData({ outdir: "dist", cssFileName: null, cssPropertiesDocs: false }),
|
499
|
+
customElementJetBrainsPlugin({ outdir: "dist", cssFileName: null, cssPropertiesDocs: false })
|
478
500
|
],
|
479
501
|
};
|
package/lib/cem/utils.mjs
CHANGED
@@ -14,6 +14,10 @@ const getDeprecatedStatus = (jsdocComment) => {
|
|
14
14
|
: undefined;
|
15
15
|
};
|
16
16
|
|
17
|
+
const toKebabCase = str => {
|
18
|
+
return str.replaceAll(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? "-" : "") + $.toLowerCase())
|
19
|
+
}
|
20
|
+
|
17
21
|
const normalizeDescription = (description) => {
|
18
22
|
return typeof description === 'string' ? description.replaceAll(/^-\s+|^(\n)+|(\n)+$/g, ""): description;
|
19
23
|
}
|
@@ -376,4 +380,5 @@ export {
|
|
376
380
|
normalizeTagType,
|
377
381
|
displayDocumentationErrors,
|
378
382
|
logDocumentationError,
|
383
|
+
toKebabCase
|
379
384
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ui5/webcomponents-tools",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.24.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",
|
@@ -31,6 +31,7 @@
|
|
31
31
|
"@wdio/spec-reporter": "^7.19.7",
|
32
32
|
"@wdio/static-server-service": "^7.19.5",
|
33
33
|
"ajv": "^8.12.0",
|
34
|
+
"cem-plugin-vs-code-custom-data-generator": "^1.4.2",
|
34
35
|
"chai": "^4.3.4",
|
35
36
|
"child_process": "^1.0.2",
|
36
37
|
"chokidar": "^3.5.1",
|
@@ -39,6 +40,7 @@
|
|
39
40
|
"comment-parser": "^1.4.0",
|
40
41
|
"concurrently": "^6.0.0",
|
41
42
|
"cross-env": "^7.0.3",
|
43
|
+
"custom-element-jet-brains-integration": "^1.4.4",
|
42
44
|
"escodegen": "^2.0.0",
|
43
45
|
"eslint": "^7.22.0",
|
44
46
|
"eslint-config-airbnb-base": "^14.2.1",
|
@@ -79,5 +81,5 @@
|
|
79
81
|
"esbuild": "^0.19.9",
|
80
82
|
"yargs": "^17.5.1"
|
81
83
|
},
|
82
|
-
"gitHead": "
|
84
|
+
"gitHead": "7020e89f544abd4484848dc40d38a7550399cb6a"
|
83
85
|
}
|