@ui5/webcomponents-tools 2.0.0-rc.3 → 2.0.0-rc.4

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.0.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-05-29)
7
+
8
+
9
+ ### Features
10
+
11
+ * **ui5-input:** allow custom icon styling ([#8881](https://github.com/SAP/ui5-webcomponents/issues/8881)) ([cf9f1c2](https://github.com/SAP/ui5-webcomponents/commit/cf9f1c28c93b9fa6c8663ce24d3c5e6d1ff4cc4e)), closes [#8182](https://github.com/SAP/ui5-webcomponents/issues/8182) [#6132](https://github.com/SAP/ui5-webcomponents/issues/6132)
12
+
13
+
14
+
15
+
16
+
6
17
  # [2.0.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-05-10)
7
18
 
8
19
 
@@ -1,6 +1,13 @@
1
1
  const path = require("path");
2
2
  const fs = require("fs");
3
3
  const LIB = path.join(__dirname, `../lib/`);
4
+ let websiteBaseUrl = "/";
5
+
6
+ if (process.env.DEPOY) {
7
+ websiteBaseUrl = "/ui5-webcomponents/";
8
+ } else if (process.env.DEPLOY_NIGHTLY) {
9
+ websiteBaseUrl = "/ui5-webcomponents/nightly/";
10
+ }
4
11
 
5
12
  const getScripts = (options) => {
6
13
 
@@ -89,7 +96,7 @@ const getScripts = (options) => {
89
96
  default: "mkdirp src/generated/js-imports && nps build.jsImports.illustrationsLoaders",
90
97
  illustrationsLoaders: createIllustrationsLoadersScript,
91
98
  },
92
- bundle: `vite build ${viteConfig}`,
99
+ bundle: `vite build ${viteConfig} --mode testing --base ${websiteBaseUrl}`,
93
100
  bundle2: ``,
94
101
  illustrations: createIllustrationsJSImportsScript,
95
102
  },
@@ -1,4 +1,5 @@
1
1
  const dns = require("node:dns");
2
+ const assert = require("chai").assert;
2
3
 
3
4
  exports.config = {
4
5
  //
@@ -309,8 +310,17 @@ exports.config = {
309
310
  * Function to be executed after a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
310
311
  * @param {Object} test test details
311
312
  */
312
- // afterTest: function (test) {
313
- // },
313
+ afterTest: async function (test, context) {
314
+ // fetch the browser logs and fail the test if there are `console.error` messages with the `[UI5-FWK]` marker
315
+ const logs = await browser.getLogs('browser');
316
+ const severeLogs = logs
317
+ .filter(l => l.level === "SEVERE" && l.message.includes("[UI5-FWK]"))
318
+ .map(l => l.message);
319
+ assert.equal(severeLogs.length, 0, `[${test.title}]\n\n ${severeLogs.join("\n ")}`)
320
+ if (severeLogs.length) {
321
+ test.callback(new Error('Framework errors detected.'))
322
+ }
323
+ },
314
324
  /**
315
325
  * Hook that gets executed after the suite has ended
316
326
  * @param {Object} suite suite details
@@ -29,6 +29,7 @@ let componentStylesPlugin = {
29
29
  const config = {
30
30
  entryPoints: inputFiles,
31
31
  outdir: 'dist',
32
+ bundle: true,
32
33
  outbase: 'src',
33
34
  loader: {
34
35
  ".module.css": "global-css"
@@ -0,0 +1,37 @@
1
+ import { globby } from "globby";
2
+ import * as esbuild from 'esbuild'
3
+ import * as fs from "fs";
4
+
5
+ let customPlugin = {
6
+ name: 'ui5-tools',
7
+ setup(build) {
8
+ build.onLoad({ filter: /UI5Element.ts$/ }, async (args) => {
9
+ let text = await fs.promises.readFile(args.path, 'utf8');
10
+ text = text.replaceAll(/const DEV_MODE = true/g, "");
11
+ text = text.replaceAll(/if \(DEV_MODE\)/g, "if (false)");
12
+ return {
13
+ contents: text,
14
+ loader: 'ts',
15
+ }
16
+ })
17
+ },
18
+ }
19
+
20
+ const getConfig = async () => {
21
+ const config = {
22
+ entryPoints: await globby("src/**/*.ts"),
23
+ bundle: false,
24
+ minify: true,
25
+ sourcemap: true,
26
+ outdir: 'dist/prod',
27
+ outbase: 'src',
28
+ plugins: [
29
+ customPlugin,
30
+ ]
31
+ };
32
+ return config;
33
+ }
34
+
35
+
36
+ const config = await getConfig();
37
+ const result = await esbuild.build(config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-tools",
3
- "version": "2.0.0-rc.3",
3
+ "version": "2.0.0-rc.4",
4
4
  "description": "UI5 Web Components: webcomponents.tools",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -80,5 +80,5 @@
80
80
  "esbuild": "^0.19.9",
81
81
  "yargs": "^17.5.1"
82
82
  },
83
- "gitHead": "4a5356f64d72a8cbf752bb9f3dee5f57528743aa"
83
+ "gitHead": "328a4aa4a6d81244939ba9201542ec2b1726b97e"
84
84
  }