@ui5/webcomponents-tools 2.9.0-rc.2 → 2.9.0-rc.3

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,17 @@
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.9.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v2.9.0-rc.2...v2.9.0-rc.3) (2025-04-03)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **framework:** fix fetching "id" (indonesian) language ([#11251](https://github.com/SAP/ui5-webcomponents/issues/11251)) ([9a36df5](https://github.com/SAP/ui5-webcomponents/commit/9a36df5dc2191758abd665d6fb1014d645e322f7)), closes [#11233](https://github.com/SAP/ui5-webcomponents/issues/11233)
12
+
13
+
14
+
15
+
16
+
6
17
  # [2.9.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.9.0-rc.1...v2.9.0-rc.2) (2025-03-27)
7
18
 
8
19
  **Note:** Version bump only for package @ui5/webcomponents-tools
package/assets-meta.js CHANGED
@@ -38,7 +38,7 @@ const assetsMeta = {
38
38
  "hi",
39
39
  "hr",
40
40
  "hu",
41
- "in",
41
+ "id",
42
42
  "it",
43
43
  "iw",
44
44
  "ja",
@@ -9,6 +9,25 @@ if (process.env.DEPLOY) {
9
9
  websiteBaseUrl = "/ui5-webcomponents/nightly/";
10
10
  }
11
11
 
12
+ const cypressEnvVariables = (options, predefinedVars) => {
13
+ let variables = [];
14
+ const { cypress_code_coverage, cypress_acc_tests } = options.internal ?? {};
15
+
16
+ // Handle environment variables like TEST_SUITE
17
+ if (predefinedVars) {
18
+ variables = [...predefinedVars];
19
+ }
20
+
21
+ // The coverage task is always registered and requires an explicit variable whether to generate a report or not
22
+ variables.push(`CYPRESS_COVERAGE=${!!cypress_code_coverage}`);
23
+
24
+ if (cypress_acc_tests) {
25
+ variables.push("CYPRESS_UI5_ACC=true");
26
+ }
27
+
28
+ return variables.length ? `cross-env ${variables.join(" ")}` : "";
29
+ }
30
+
12
31
  const getScripts = (options) => {
13
32
 
14
33
  // The script creates all JS modules (dist/illustrations/{illustrationName}.js) out of the existing SVGs
@@ -17,7 +36,7 @@ const getScripts = (options) => {
17
36
  const createIllustrationsJSImportsScript = illustrations.join(" && ");
18
37
 
19
38
  // The script creates the "src/generated/js-imports/Illustration.js" file that registers loaders (dynamic JS imports) for each illustration
20
- const createIllustrationsLoadersScript = illustrationsData.map(illustrations => `node ${LIB}/generate-js-imports/illustrations.js ${illustrations.destinationPath} ${illustrations.dynamicImports.outputFile} ${illustrations.set} ${illustrations.collection} ${illustrations.dynamicImports.location} ${illustrations.dynamicImports.filterOut.join(" ")}`).join(" && ");
39
+ const createIllustrationsLoadersScript = illustrationsData.map(illustrations => `node ${LIB}/generate-js-imports/illustrations.js ${illustrations.destinationPath} ${illustrations.dynamicImports.outputFile} ${illustrations.set} ${illustrations.collection} ${illustrations.dynamicImports.location} ${illustrations.dynamicImports.filterOut.join(" ")}`).join(" && ");
21
40
 
22
41
  const tsOption = !options.legacy || options.jsx;
23
42
  const tsCommandOld = tsOption ? "tsc" : "";
@@ -31,7 +50,7 @@ const getScripts = (options) => {
31
50
  if (tsOption) {
32
51
  try {
33
52
  require("typescript");
34
- } catch(e) {
53
+ } catch (e) {
35
54
  console.error(`TypeScript is not found. Try to install it by running \`npm install --save-dev typescript\` if you are using npm or by running \`yarn add --dev typescript\` if you are using yarn.`);
36
55
  process.exit(e.code);
37
56
  }
@@ -122,10 +141,10 @@ const getScripts = (options) => {
122
141
  },
123
142
  start: "nps prepare watch.devServer",
124
143
  test: `node "${LIB}/test-runner/test-runner.js"`,
125
- "test-cy-ci": `cross-env CYPRESS_COVERAGE=true yarn cypress run --component --browser chrome`,
126
- "test-cy-ci-suite-1": `cross-env CYPRESS_COVERAGE=true TEST_SUITE=SUITE1 yarn cypress run --component --browser chrome`,
127
- "test-cy-ci-suite-2": `cross-env CYPRESS_COVERAGE=true TEST_SUITE=SUITE2 yarn cypress run --component --browser chrome`,
128
- "test-cy-open": `cross-env CYPRESS_COVERAGE=true yarn cypress open --component --browser chrome`,
144
+ "test-cy-ci": `${cypressEnvVariables(options)} yarn cypress run --component --browser chrome`,
145
+ "test-cy-ci-suite-1": `${cypressEnvVariables(options, ["TEST_SUITE=SUITE1"])} yarn cypress run --component --browser chrome`,
146
+ "test-cy-ci-suite-2": `${cypressEnvVariables(options, ["TEST_SUITE=SUITE2"])} yarn cypress run --component --browser chrome`,
147
+ "test-cy-open": `${cypressEnvVariables(options)} yarn cypress open --component --browser chrome`,
129
148
  "test-suite-1": `node "${LIB}/test-runner/test-runner.js" --suite suite1`,
130
149
  "test-suite-2": `node "${LIB}/test-runner/test-runner.js" --suite suite2`,
131
150
  startWithScope: "nps scope.prepare scope.watchWithBundle",
@@ -469,14 +469,6 @@ export default {
469
469
  }
470
470
  },
471
471
  moduleLinkPhase({ moduleDoc }) {
472
- for (let i = 0; i < moduleDoc.declarations.length; i++) {
473
- const shouldRemove = processPublicAPI(moduleDoc.declarations[i]) || ["function", "variable"].includes(moduleDoc.declarations[i].kind)
474
- if (shouldRemove) {
475
- moduleDoc.declarations.splice(i, 1);
476
- i--;
477
- }
478
- }
479
-
480
472
  moduleDoc.path = moduleDoc.path?.replace(/^src/, "dist").replace(/\.ts$/, ".js");
481
473
 
482
474
  moduleDoc.exports = moduleDoc.exports.
@@ -500,40 +492,50 @@ export default {
500
492
  })
501
493
  }
502
494
  })
495
+ },
496
+ packageLinkPhase({ customElementsManifest }) {
497
+ customElementsManifest.modules.forEach(moduleDoc => {
498
+ for (let i = 0; i < moduleDoc.declarations.length; i++) {
499
+ const shouldRemove = processPublicAPI(moduleDoc.declarations[i]) || ["function", "variable"].includes(moduleDoc.declarations[i].kind)
500
+ if (shouldRemove) {
501
+ moduleDoc.declarations.splice(i, 1);
502
+ i--;
503
+ }
504
+ }
503
505
 
504
- const typeReferences = new Set();
505
- const registerTypeReference = reference => typeReferences.add(JSON.stringify(reference))
506
-
507
- moduleDoc.declarations.forEach(declaration => {
508
- ["events", "slots", "members"].forEach(memberType => {
509
- declaration[memberType]?.forEach(member => {
510
- if (member.type?.references) {
511
- member.type.references.forEach(registerTypeReference)
512
- } else if (member._ui5type?.references) {
513
- member._ui5type.references.forEach(registerTypeReference)
514
- } else if (member.kind === "method") {
515
- member.return?.type?.references?.forEach(registerTypeReference)
516
-
517
- member.parameters?.forEach(parameter => {
518
- parameter.type?.references?.forEach(registerTypeReference)
519
- })
520
- }
506
+ const typeReferences = new Set();
507
+ const registerTypeReference = reference => typeReferences.add(JSON.stringify(reference))
508
+
509
+ moduleDoc.declarations.forEach(declaration => {
510
+ ["events", "slots", "members"].forEach(memberType => {
511
+ declaration[memberType]?.forEach(member => {
512
+ if (member.type?.references) {
513
+ member.type.references.forEach(registerTypeReference)
514
+ } else if (member._ui5type?.references) {
515
+ member._ui5type.references.forEach(registerTypeReference)
516
+ } else if (member.kind === "method") {
517
+ member.return?.type?.references?.forEach(registerTypeReference)
518
+
519
+ member.parameters?.forEach(parameter => {
520
+ parameter.type?.references?.forEach(registerTypeReference)
521
+ })
522
+ }
523
+ })
521
524
  })
522
- })
523
- });
525
+ });
524
526
 
525
- typeReferences.forEach(reference => {
526
- reference = JSON.parse(reference);
527
- if (reference.package === packageJSON?.name && reference.module === moduleDoc.path) {
528
- const hasExport = moduleDoc.exports.some(e => e.declaration?.name === reference.name && e.declaration?.module === reference.module)
527
+ typeReferences.forEach(reference => {
528
+ reference = JSON.parse(reference);
529
+ if (reference.package === packageJSON?.name && reference.module === moduleDoc.path) {
530
+ const hasExport = moduleDoc.exports.some(e => e.declaration?.name === reference.name && e.declaration?.module === reference.module)
529
531
 
530
- if (!hasExport) {
531
- logDocumentationError(moduleDoc.path?.replace(/^dist/, "src").replace(/\.js$/, ".ts"), `Type '${reference.name}' is used to describe a public API but is not exported.`,)
532
+ if (!hasExport) {
533
+ logDocumentationError(moduleDoc.path?.replace(/^dist/, "src").replace(/\.js$/, ".ts"), `Type '${reference.name}' is used to describe a public API but is not exported.`,)
534
+ }
532
535
  }
533
- }
534
- })
535
- },
536
- packageLinkPhase() {
536
+ })
537
+ });
538
+
537
539
  if (devMode) {
538
540
  displayDocumentationErrors();
539
541
  }
@@ -407,6 +407,9 @@
407
407
  "CssCustomProperty": {
408
408
  "additionalProperties": false,
409
409
  "properties": {
410
+ "inheritedFrom": {
411
+ "$ref": "#/definitions/Reference"
412
+ },
410
413
  "default": {
411
414
  "type": "string"
412
415
  },
@@ -443,6 +446,9 @@
443
446
  "additionalProperties": false,
444
447
  "description": "The description of a CSS Part",
445
448
  "properties": {
449
+ "inheritedFrom": {
450
+ "$ref": "#/definitions/Reference"
451
+ },
446
452
  "deprecated": {
447
453
  "description": "Whether the CSS shadow part is deprecated.\nIf the value is a string, it's the reason for the deprecation.",
448
454
  "type": [
@@ -1222,6 +1228,9 @@
1222
1228
  "Slot": {
1223
1229
  "additionalProperties": false,
1224
1230
  "properties": {
1231
+ "inheritedFrom": {
1232
+ "$ref": "#/definitions/Reference"
1233
+ },
1225
1234
  "_ui5propertyName": {
1226
1235
  "type": "string"
1227
1236
  },
package/lib/cem/utils.mjs CHANGED
@@ -256,7 +256,7 @@ const tagMatchCallback = (tag, tagName) => {
256
256
  };
257
257
 
258
258
  const findDecorator = (node, decoratorName) => {
259
- return node?.decorators?.find(
259
+ return (node?.modifiers || node?.decorators)?.find(
260
260
  (decorator) =>
261
261
  decorator?.expression?.expression?.text === decoratorName
262
262
  );
@@ -264,11 +264,11 @@ const findDecorator = (node, decoratorName) => {
264
264
 
265
265
  const findAllDecorators = (node, decoratorName) => {
266
266
  if (typeof decoratorName === "string") {
267
- return node?.decorators?.filter(decorator => decorator?.expression?.expression?.text === decoratorName) || [];
267
+ return (node?.modifiers || node?.decorators)?.filter(decorator => decorator?.expression?.expression?.text === decoratorName) || [];
268
268
  }
269
269
 
270
270
  if (Array.isArray(decoratorName)) {
271
- return node?.decorators?.filter(decorator => {
271
+ return (node?.modifiers || node?.decorators)?.filter(decorator => {
272
272
  if (decorator?.expression?.expression?.text) {
273
273
  return decoratorName.includes(decorator.expression.expression.text);
274
274
  }
@@ -49,6 +49,7 @@ if (devMode) {
49
49
  if (validate(inputDataInternal)) {
50
50
  console.log('Internal custom element manifest is validated successfully');
51
51
  } else {
52
+ console.log(validate.errors)
52
53
  throw new Error(`Validation of internal custom elements manifest failed: ${validate.errors}`);
53
54
  }
54
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-tools",
3
- "version": "2.9.0-rc.2",
3
+ "version": "2.9.0-rc.3",
4
4
  "description": "UI5 Web Components: webcomponents.tools",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -21,7 +21,7 @@
21
21
  "directory": "packages/tools"
22
22
  },
23
23
  "dependencies": {
24
- "@custom-elements-manifest/analyzer": "^0.8.4",
24
+ "@custom-elements-manifest/analyzer": "^0.10.4",
25
25
  "@typescript-eslint/eslint-plugin": "^6.9.0",
26
26
  "@typescript-eslint/parser": "^6.9.0",
27
27
  "@wdio/cli": "^7.19.7",
@@ -82,5 +82,5 @@
82
82
  "esbuild": "^0.25.0",
83
83
  "yargs": "^17.5.1"
84
84
  },
85
- "gitHead": "17eb194560a6db21bab9da6eb69b599ac504fd78"
85
+ "gitHead": "fb9dd216f139bf86008bf909956471e780c63ba4"
86
86
  }