@ui5/webcomponents-tools 2.17.0-rc.1 → 2.17.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,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.17.0-rc.2](https://github.com/UI5/webcomponents/compare/v2.17.0-rc.1...v2.17.0-rc.2) (2025-11-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **tools:** fix wc-dev test command ([#12662](https://github.com/UI5/webcomponents/issues/12662)) ([7dd11fb](https://github.com/UI5/webcomponents/commit/7dd11fbb88711a74d3602328a492a923552fd4ef))
12
+
13
+
14
+
15
+
16
+
6
17
  # [2.17.0-rc.1](https://github.com/UI5/webcomponents/compare/v2.17.0-rc.0...v2.17.0-rc.1) (2025-11-07)
7
18
 
8
19
 
@@ -3,69 +3,77 @@ const { readFileSync } = require("fs");
3
3
  const path = require("path");
4
4
  const fs = require("fs");
5
5
 
6
- // search for dev-server port
6
+ function testFn() {
7
+ // search for dev-server port
7
8
  // start in current folder
8
9
  // traversing upwards in case of mono repo tests and dev-server running in root folder of repository
9
- let devServerFolder = process.cwd();
10
- let devServerPort;
11
- while (true) {
12
- try {
13
- devServerPort = readFileSync(path.join(devServerFolder, ".dev-server-port")).toString();
14
- break; // found
15
- } catch (e) {
16
- // file not found
17
- if (devServerFolder === path.dirname(devServerFolder)) {
18
- break; // reached root folder "/"
19
- }
20
- devServerFolder = path.dirname(devServerFolder);
21
- }
22
- }
10
+ let devServerFolder = process.cwd();
11
+ let devServerPort;
12
+ while (true) {
13
+ try {
14
+ devServerPort = readFileSync(path.join(devServerFolder, ".dev-server-port")).toString();
15
+ break; // found
16
+ } catch (e) {
17
+ // file not found
18
+ if (devServerFolder === path.dirname(devServerFolder)) {
19
+ break; // reached root folder "/"
20
+ }
21
+ devServerFolder = path.dirname(devServerFolder);
22
+ }
23
+ }
23
24
 
24
25
  // check if we are in a monorepo and extract path from package.json
25
- let packageRepositoryPath = "";
26
- const pkg = require(path.join(process.cwd(), "package.json"));
27
- packageRepositoryPath = pkg.repository ? pkg.repository.directory : "";
26
+ let packageRepositoryPath = "";
27
+ const pkg = require(path.join(process.cwd(), "package.json"));
28
+ packageRepositoryPath = pkg.repository ? pkg.repository.directory : "";
28
29
 
29
30
  // construct base url
30
31
  // use devServerPort if a dev server is running, otherwise let the baseUrl in the wdio config be used
31
32
  // if a dev server is running in the root of a mono repo, append tha package path like this
32
33
  // http://localhost:${devServerPort}/packages/main/
33
- let baseUrl = "";
34
- if (devServerPort) {
35
- console.log(`Found port ${devServerPort} from '${path.join(devServerFolder, ".dev-server-port")}'`);
36
- const devServerInRoot = !devServerFolder.includes(packageRepositoryPath);
37
- if (devServerInRoot) {
38
- baseUrl = `--base-url http://localhost:${devServerPort}/${packageRepositoryPath}/`;
39
- } else {
40
- baseUrl = `--base-url http://localhost:${devServerPort}/`;
41
- }
42
- }
34
+ let baseUrl = "";
35
+ if (devServerPort) {
36
+ console.log(`Found port ${devServerPort} from '${path.join(devServerFolder, ".dev-server-port")}'`);
37
+ const devServerInRoot = !devServerFolder.includes(packageRepositoryPath);
38
+ if (devServerInRoot) {
39
+ baseUrl = `--base-url http://localhost:${devServerPort}/${packageRepositoryPath}/`;
40
+ } else {
41
+ baseUrl = `--base-url http://localhost:${devServerPort}/`;
42
+ }
43
+ }
43
44
 
44
- if (!baseUrl) {
45
- console.log("No dev server running, running tests served from `dist`, make sure it is up to date");
46
- }
45
+ if (!baseUrl) {
46
+ console.log("No dev server running, running tests served from `dist`, make sure it is up to date");
47
+ }
47
48
 
48
49
  // add single spec parameter if passed
49
- let spec = "";
50
- if (process.argv.length === 3) {
51
- const specFile = process.argv[2];
52
- spec = `--spec ${specFile}`;
53
- }
50
+ let spec = "";
51
+ if (process.argv.length === 3) {
52
+ const specFile = process.argv[2];
53
+ spec = `--spec ${specFile}`;
54
+ }
54
55
 
55
56
  // more parameters - pass them to wdio
56
- let restParams = "";
57
- if (process.argv.length > 3) {
58
- restParams = process.argv.slice(2).join(" ");
57
+ let restParams = "";
58
+ if (process.argv.length > 3) {
59
+ restParams = process.argv.slice(2).join(" ");
60
+ }
61
+
62
+ let wdioConfig = "";
63
+ if (fs.existsSync("config/wdio.conf.cjs")) {
64
+ wdioConfig = "config/wdio.conf.cjs";
65
+ } else if (fs.existsSync("config/wdio.conf.js")) {
66
+ wdioConfig = "config/wdio.conf.js";
67
+ }
68
+
69
+ // run wdio with calculated parameters
70
+ const cmd = `yarn cross-env WDIO_LOG_LEVEL=error wdio ${wdioConfig} ${spec} ${baseUrl} ${restParams}`;
71
+ console.log(`executing: ${cmd}`);
72
+ child_process.execSync(cmd, {stdio: 'inherit'});
59
73
  }
60
74
 
61
- let wdioConfig = "";
62
- if (fs.existsSync("config/wdio.conf.cjs")) {
63
- wdioConfig = "config/wdio.conf.cjs";
64
- } else if (fs.existsSync("config/wdio.conf.js")) {
65
- wdioConfig = "config/wdio.conf.js";
75
+ if (require.main === module) {
76
+ testFn(process.argv)
66
77
  }
67
78
 
68
- // run wdio with calculated parameters
69
- const cmd = `yarn cross-env WDIO_LOG_LEVEL=error wdio ${wdioConfig} ${spec} ${baseUrl} ${restParams}`;
70
- console.log(`executing: ${cmd}`);
71
- child_process.execSync(cmd, {stdio: 'inherit'});
79
+ exports._ui5mainFn = testFn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-tools",
3
- "version": "2.17.0-rc.1",
3
+ "version": "2.17.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",
@@ -84,5 +84,5 @@
84
84
  "esbuild": "^0.25.0",
85
85
  "yargs": "^17.5.1"
86
86
  },
87
- "gitHead": "5419a5cbb330b94cd8263ef4ee77575ad72c728a"
87
+ "gitHead": "b6ba0f01d66da67393412deff59417ac94deb098"
88
88
  }