@ui5/webcomponents-tools 2.8.0-rc.0 → 2.8.0-rc.2

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.8.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.8.0-rc.1...v2.8.0-rc.2) (2025-02-20)
7
+
8
+ **Note:** Version bump only for package @ui5/webcomponents-tools
9
+
10
+
11
+
12
+
13
+
14
+ # [2.8.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.8.0-rc.0...v2.8.0-rc.1) (2025-02-13)
15
+
16
+ **Note:** Version bump only for package @ui5/webcomponents-tools
17
+
18
+
19
+
20
+
21
+
6
22
  # [2.8.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.7.0...v2.8.0-rc.0) (2025-02-06)
7
23
 
8
24
  **Note:** Version bump only for package @ui5/webcomponents-tools
@@ -19,7 +19,7 @@ const getScripts = (options) => {
19
19
  // The script creates the "src/generated/js-imports/Illustration.js" file that registers loaders (dynamic JS imports) for each illustration
20
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(" && ");
21
21
 
22
- const tsOption = !options.legacy;
22
+ const tsOption = !options.legacy || options.jsx;
23
23
  const tsCommandOld = tsOption ? "tsc" : "";
24
24
  let tsWatchCommandStandalone = tsOption ? "tsc --watch" : "";
25
25
  // this command is only used for standalone projects. monorepo projects get their watch from vite, so opt-out here
@@ -1,13 +1,9 @@
1
1
  // vite.config.js
2
- import { defineConfig } from 'vite';
3
- import virtualIndex from '../lib/dev-server/virtual-index-html-plugin.js';
2
+ const virtualIndex = require('../lib/dev-server/virtual-index-html-plugin.js');
4
3
 
5
- export default defineConfig(async () => {
6
- const data = await virtualIndex();
7
- return {
8
- build: {
9
- emptyOutDir: false,
10
- },
11
- plugins: [data],
12
- }
13
- })
4
+ module.exports = {
5
+ build: {
6
+ emptyOutDir: false,
7
+ },
8
+ plugins: [virtualIndex()],
9
+ };
@@ -127,7 +127,7 @@ function processClass(ts, classNode, moduleDoc) {
127
127
  }
128
128
 
129
129
  // Events
130
- currClass.events = findAllDecorators(classNode, "event")
130
+ currClass.events = findAllDecorators(classNode, ["event", "eventStrict"])
131
131
  ?.map(event => processEvent(ts, event, classNode, moduleDoc));
132
132
 
133
133
  // TODO: remove after changing Button's click to custom event.
package/lib/cem/utils.mjs CHANGED
@@ -241,7 +241,7 @@ const allowedTags = {
241
241
  eventParam: [...commonTags],
242
242
  method: [...commonTags, "param", "returns", "override"],
243
243
  class: [...commonTags, "constructor", "class", "abstract", "experimental", "implements", "extends", "slot", "csspart"],
244
- enum: [...commonTags],
244
+ enum: [...commonTags, "experimental",],
245
245
  enumMember: [...commonTags, "experimental",],
246
246
  interface: [...commonTags, "experimental",],
247
247
  };
@@ -263,12 +263,22 @@ const findDecorator = (node, decoratorName) => {
263
263
  };
264
264
 
265
265
  const findAllDecorators = (node, decoratorName) => {
266
- return (
267
- node?.decorators?.filter(
268
- (decorator) =>
269
- decorator?.expression?.expression?.text === decoratorName
270
- ) || []
271
- );
266
+ if (typeof decoratorName === "string") {
267
+ return node?.decorators?.filter(decorator => decorator?.expression?.expression?.text === decoratorName) || [];
268
+ }
269
+
270
+ if (Array.isArray(decoratorName)) {
271
+ return node?.decorators?.filter(decorator => {
272
+ if (decorator?.expression?.expression?.text) {
273
+ return decoratorName.includes(decorator.expression.expression.text);
274
+ }
275
+
276
+ return false;
277
+ }
278
+ ) || [];
279
+ }
280
+
281
+ return [];
272
282
  };
273
283
 
274
284
  const hasTag = (jsDoc, tagName) => {
@@ -1,23 +1,17 @@
1
- const virtualIndexPlugin = async () => {
2
- const path = await import("path");
3
- const { globby } = await import("globby");
4
- const files = await globby(["test/pages/**/*.html", "packages/*/test/pages/**/*.html"]);
5
-
6
- const pagesPerFolder = {};
7
- files.forEach(file => {
8
- let folder = pagesPerFolder[path.dirname(file)] = pagesPerFolder[path.dirname(file)] || [];
9
- folder.push(path.basename(file));
10
- });
1
+ const virtualIndexPlugin = () => {
2
+ return {
3
+ name: 'virtual-index-html',
4
+ async config() {
5
+ const path = (await import("path")).default;
6
+ const globby = (await import("globby")).globby;
7
+ const files = await globby(["test/pages/**/*.html", "packages/*/test/pages/**/*.html"]);
11
8
 
12
- const rollupInput = {};
9
+ const rollupInput = {};
13
10
 
14
- files.forEach(file => {
15
- rollupInput[file] = path.resolve(process.cwd(), file);
16
- })
11
+ files.forEach(file => {
12
+ rollupInput[file] = path.resolve(process.cwd(), file);
13
+ });
17
14
 
18
- return {
19
- name: 'virtual-index-html',
20
- config() {
21
15
  return {
22
16
  build: {
23
17
  rollupOptions: {
@@ -26,7 +20,17 @@ const virtualIndexPlugin = async () => {
26
20
  }
27
21
  }
28
22
  },
29
- configureServer(server) {
23
+ async configureServer(server) {
24
+ const path = (await import("path")).default;
25
+ const globby = (await import("globby")).globby;
26
+ const files = await globby(["test/pages/**/*.html", "packages/*/test/pages/**/*.html"]);
27
+
28
+ const pagesPerFolder = {};
29
+ files.forEach(file => {
30
+ let folder = pagesPerFolder[path.dirname(file)] = pagesPerFolder[path.dirname(file)] || [];
31
+ folder.push(path.basename(file));
32
+ });
33
+
30
34
  server.middlewares.use((req, res, next) => {
31
35
  if (req.url === "/") {
32
36
  const folders = Object.keys(pagesPerFolder);
@@ -37,8 +41,8 @@ const virtualIndexPlugin = async () => {
37
41
  const pages = pagesPerFolder[folder];
38
42
  return `<h1>${folder}</h1>
39
43
  ${pages.map(page => {
40
- return `<li><a href='${folder}/${page}'>${page}</a></li>`
41
- }).join("")}
44
+ return `<li><a href='${folder}/${page}'>${page}</a></li>`
45
+ }).join("")}
42
46
  `
43
47
  }).join("")}`);
44
48
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-tools",
3
- "version": "2.8.0-rc.0",
3
+ "version": "2.8.0-rc.2",
4
4
  "description": "UI5 Web Components: webcomponents.tools",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -87,8 +87,8 @@
87
87
  "devDependencies": {
88
88
  "@cypress/mount-utils": "^4.1.2",
89
89
  "cypress-real-events": "^1.12.0",
90
- "esbuild": "^0.19.9",
90
+ "esbuild": "^0.25.0",
91
91
  "yargs": "^17.5.1"
92
92
  },
93
- "gitHead": "8ec6a8928a1f691e8ca272f0f2c32f49e46c6992"
93
+ "gitHead": "3f2bb39755164a9074948fca90a65818ac89af7c"
94
94
  }