@ui5/webcomponents-tools 2.26.0-rc.1 → 2.27.0-rc.0
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 +22 -0
- package/lib/cem/custom-elements-manifest.config.mjs +2 -2
- package/lib/copy-and-watch/index.js +9 -3
- package/lib/scoping/get-all-tags.js +2 -2
- package/lib/scoping/lint-src.js +3 -3
- package/lib/scoping/missing-dependencies.js +4 -4
- package/lib/scoping/report-tags-usage.js +2 -2
- package/lib/scoping/scope-test-pages.js +3 -3
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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.27.0-rc.0](https://github.com/UI5/webcomponents/compare/v2.26.0-rc.1...v2.27.0-rc.0) (2026-08-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **tools:** normalize path separators in copy-and-watch for Windows ([#13976](https://github.com/UI5/webcomponents/issues/13976)) ([1823576](https://github.com/UI5/webcomponents/commit/1823576b12feed8560e26bb7f4b4fa70e6f2ee8c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [2.26.0](https://github.com/UI5/webcomponents/compare/v2.26.0-rc.1...v2.26.0) (2026-08-26)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **tools:** normalize path separators in copy-and-watch for Windows ([#13976](https://github.com/UI5/webcomponents/issues/13976)) ([1823576](https://github.com/UI5/webcomponents/commit/1823576b12feed8560e26bb7f4b4fa70e6f2ee8c))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [2.26.0-rc.1](https://github.com/UI5/webcomponents/compare/v2.26.0-rc.0...v2.26.0-rc.1) (2026-08-24)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @ui5/webcomponents-tools
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
displayDocumentationErrors,
|
|
25
25
|
toKebabCase
|
|
26
26
|
} from "./utils.mjs";
|
|
27
|
-
import {
|
|
27
|
+
import { customElementVsCodePlugin } from "custom-element-vs-code-integration";
|
|
28
28
|
import { customElementJetBrainsPlugin } from "custom-element-jet-brains-integration";
|
|
29
29
|
|
|
30
30
|
const packageJSON = JSON.parse(fs.readFileSync("./package.json"));
|
|
@@ -628,7 +628,7 @@ export default {
|
|
|
628
628
|
});
|
|
629
629
|
}
|
|
630
630
|
},
|
|
631
|
-
wrapPluginForQuietMode(
|
|
631
|
+
wrapPluginForQuietMode(customElementVsCodePlugin({ outdir: "dist", cssFileName: null, cssPropertiesDocs: false })),
|
|
632
632
|
wrapPluginForQuietMode(customElementJetBrainsPlugin({ outdir: "dist", cssFileName: null, cssPropertiesDocs: false }))
|
|
633
633
|
],
|
|
634
634
|
};
|
|
@@ -25,7 +25,7 @@ SOFTWARE.
|
|
|
25
25
|
const fs = require('fs');
|
|
26
26
|
const path = require('path');
|
|
27
27
|
const chokidar = require('chokidar');
|
|
28
|
-
const
|
|
28
|
+
const { globSync } = require('glob');
|
|
29
29
|
const globParent = require('glob-parent');
|
|
30
30
|
|
|
31
31
|
/* CODE */
|
|
@@ -61,9 +61,15 @@ const copyAndWatchFn = async (argv) => {
|
|
|
61
61
|
const sources = args;
|
|
62
62
|
const parents = [...new Set(sources.map(globParent))];
|
|
63
63
|
|
|
64
|
+
// glob-parent yields POSIX-style paths (forward slashes) while globSync/chokidar
|
|
65
|
+
// return native paths (backslashes on Windows). Compare on normalized paths so the
|
|
66
|
+
// parent lookup works cross-platform, otherwise `parent` becomes undefined and
|
|
67
|
+
// path.relative() throws ERR_INVALID_ARG_TYPE on Windows.
|
|
68
|
+
const toPosix = p => p.split(path.sep).join("/");
|
|
64
69
|
const findTarget = from => {
|
|
70
|
+
const fromPosix = toPosix(from);
|
|
65
71
|
const parent = parents
|
|
66
|
-
.filter(p =>
|
|
72
|
+
.filter(p => fromPosix.indexOf(toPosix(p)) >= 0)
|
|
67
73
|
.sort()
|
|
68
74
|
.reverse()[0];
|
|
69
75
|
return path.join(target, path.relative(parent, from));
|
|
@@ -121,7 +127,7 @@ const copyAndWatchFn = async (argv) => {
|
|
|
121
127
|
|
|
122
128
|
// initial copy
|
|
123
129
|
if (!options['skip-initial-copy']) {
|
|
124
|
-
sources.forEach(s =>
|
|
130
|
+
sources.forEach(s => globSync(s).forEach(copy));
|
|
125
131
|
}
|
|
126
132
|
|
|
127
133
|
// watch
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const fs = require("fs");
|
|
2
2
|
const path = require("path");
|
|
3
|
-
const
|
|
3
|
+
const { globSync } = require("glob");
|
|
4
4
|
|
|
5
5
|
const getTag = file => {
|
|
6
6
|
const fileContent = String(fs.readFileSync(file)).replace(/\n/g, "");
|
|
@@ -17,7 +17,7 @@ const getTag = file => {
|
|
|
17
17
|
|
|
18
18
|
const getPackageTags = (packageDir) => {
|
|
19
19
|
const srcDir = path.join(packageDir, "src/");
|
|
20
|
-
return
|
|
20
|
+
return globSync(path.join(srcDir, "/**/*.ts")).flatMap(file => {
|
|
21
21
|
const tag = getTag(file);
|
|
22
22
|
return [tag];
|
|
23
23
|
}).filter(item => !!item);
|
package/lib/scoping/lint-src.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const fs = require("fs");
|
|
2
2
|
const path = require("path");
|
|
3
|
-
const
|
|
3
|
+
const { globSync } = require("glob");
|
|
4
4
|
const getAllTags = require("./get-all-tags.js");
|
|
5
5
|
|
|
6
6
|
const tags = getAllTags(process.cwd());
|
|
@@ -9,7 +9,7 @@ const errors = [];
|
|
|
9
9
|
|
|
10
10
|
const removeComments = str => str.replaceAll(/\/\*[\s\S]*?\*\/|([^:]|^)\/\/.*$/gm, "");
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
globSync(path.join(process.cwd(), "src/**/*.css")).forEach(file => {
|
|
13
13
|
let content = removeComments(String(fs.readFileSync(file)));
|
|
14
14
|
tags.forEach(tag => {
|
|
15
15
|
if (content.match(new RegExp(`(^|[^\.\-_A-Za-z0-9"\[])(${tag})([^\-_A-Za-z0-9]|$)`, "g"))) {
|
|
@@ -18,7 +18,7 @@ glob.sync(path.join(process.cwd(), "src/**/*.css")).forEach(file => {
|
|
|
18
18
|
});
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
globSync(path.join(process.cwd(), "src/**/*.ts")).forEach(file => {
|
|
22
22
|
let content = removeComments(String(fs.readFileSync(file)));
|
|
23
23
|
tags.forEach(tag => {
|
|
24
24
|
if (content.match(new RegExp(`querySelector[A-Za-z]*..${tag}`, "g"))) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const fs = require("fs");
|
|
2
|
-
const
|
|
2
|
+
const { globSync } = require("glob");
|
|
3
3
|
const path = require("path");
|
|
4
4
|
const process = require("process");
|
|
5
5
|
|
|
@@ -10,8 +10,8 @@ const tagsToFiles = new Map();
|
|
|
10
10
|
const filesToTags = new Map();
|
|
11
11
|
|
|
12
12
|
let files = [
|
|
13
|
-
...
|
|
14
|
-
...
|
|
13
|
+
...globSync(path.join("packages/main/src/**/*.js")),
|
|
14
|
+
...globSync(path.join("packages/fiori/src/**/*.js")),
|
|
15
15
|
];
|
|
16
16
|
files.forEach(file => {
|
|
17
17
|
let matches = file.match(/([a-zA-Z0-9_]+)\.js$/);
|
|
@@ -27,7 +27,7 @@ files.forEach(file => {
|
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
// Process the package
|
|
30
|
-
files =
|
|
30
|
+
files = globSync(path.join(projectPath, "src/**/*.js"));
|
|
31
31
|
tagsToFiles.forEach((file, tag) => {
|
|
32
32
|
const sourcePath = path.join(projectPath, "src/", `${file}.js`);
|
|
33
33
|
if (!fs.existsSync(sourcePath)) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const fs = require("fs");
|
|
2
|
-
const
|
|
2
|
+
const { globSync } = require("glob");
|
|
3
3
|
const path = require("path");
|
|
4
4
|
const process = require("process");
|
|
5
5
|
|
|
6
6
|
// gather all tags from all files
|
|
7
7
|
const tags = new Set();
|
|
8
|
-
const files =
|
|
8
|
+
const files = globSync(path.join(process.argv[2], "src/**/*.js"));
|
|
9
9
|
files.forEach(file => {
|
|
10
10
|
const content = `${fs.readFileSync(file)}`;
|
|
11
11
|
const matches = content.match(/tag: "(.*?)",/);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const fs = require("fs");
|
|
2
2
|
const path = require("path");
|
|
3
|
-
const
|
|
3
|
+
const { globSync } = require("glob");
|
|
4
4
|
const getAllTags = require("./get-all-tags.js");
|
|
5
5
|
|
|
6
6
|
const root = process.argv[2];
|
|
@@ -26,7 +26,7 @@ const replaceTagsAny = content => {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
// Replace bundle names and HTML tag names in test pages
|
|
29
|
-
|
|
29
|
+
globSync(path.join(root, "/**/*.html")).forEach(file => {
|
|
30
30
|
let content = String(fs.readFileSync(file));
|
|
31
31
|
content = content.replace("%VITE_BUNDLE_PATH%", "%VITE_BUNDLE_PATH_SCOPED%");
|
|
32
32
|
content = replaceTagsHTML(content);
|
|
@@ -34,7 +34,7 @@ glob.sync(path.join(root, "/**/*.html")).forEach(file => {
|
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
// Replace tag names everywhere
|
|
37
|
-
|
|
37
|
+
globSync(path.join(root, "/**/*.{html,css,js}")).forEach(file => {
|
|
38
38
|
let content = String(fs.readFileSync(file));
|
|
39
39
|
content = replaceTagsAny(content);
|
|
40
40
|
fs.writeFileSync(file, content);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-tools",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.27.0-rc.0",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.tools",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"@wdio/spec-reporter": "^7.40.0",
|
|
31
31
|
"@wdio/static-server-service": "^7.40.0",
|
|
32
32
|
"ajv": "^8.12.0",
|
|
33
|
-
"cem-plugin-vs-code-custom-data-generator": "^1.4.2",
|
|
34
33
|
"chai": "^4.3.4",
|
|
35
34
|
"child_process": "^1.0.2",
|
|
36
35
|
"chokidar": "^3.6.0",
|
|
@@ -38,6 +37,7 @@
|
|
|
38
37
|
"comment-parser": "^1.4.0",
|
|
39
38
|
"cross-env": "^7.0.3",
|
|
40
39
|
"custom-element-jet-brains-integration": "^1.4.4",
|
|
40
|
+
"custom-element-vs-code-integration": "^1.5.0",
|
|
41
41
|
"dotenv": "^16.5.0",
|
|
42
42
|
"escodegen": "^2.0.0",
|
|
43
43
|
"eslint": "^7.22.0",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"eslint-plugin-jsx-no-leaked-values": "^0.1.24",
|
|
47
47
|
"esprima": "^4.0.1",
|
|
48
48
|
"getopts": "^2.3.0",
|
|
49
|
-
"glob": "^
|
|
49
|
+
"glob": "^13.0.6",
|
|
50
50
|
"glob-parent": "^6.0.2",
|
|
51
51
|
"globby": "^13.1.1",
|
|
52
|
-
"handlebars": "^4.7.
|
|
52
|
+
"handlebars": "^4.7.9",
|
|
53
53
|
"ignore": "^7.0.5",
|
|
54
54
|
"is-port-reachable": "^3.1.0",
|
|
55
55
|
"json-beautify": "^1.1.1",
|
|
56
|
-
"postcss": "^8.
|
|
56
|
+
"postcss": "^8.5.26",
|
|
57
57
|
"postcss-cli": "^9.1.0",
|
|
58
58
|
"postcss-selector-parser": "^6.0.10",
|
|
59
59
|
"prompts": "^2.4.2",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"esbuild": "^0.25.0",
|
|
83
83
|
"yargs": "^17.5.1"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "053bb4316b0b85cc05bce4335d910122a279dcd7"
|
|
86
86
|
}
|