@ui5/webcomponents-tools 2.20.0-rc.1 → 2.20.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.20.0-rc.2](https://github.com/UI5/webcomponents/compare/v2.20.0-rc.1...v2.20.0-rc.2) (2026-02-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* CSS variables scoping to depend VersionInfo ([#13091](https://github.com/UI5/webcomponents/issues/13091)) ([d2e43ed](https://github.com/UI5/webcomponents/commit/d2e43ed692c63a0a36a9b14da59de354e2e7d0b0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [2.20.0-rc.1](https://github.com/UI5/webcomponents/compare/v2.20.0-rc.0...v2.20.0-rc.1) (2026-02-19)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @ui5/webcomponents-tools
|
|
@@ -14,7 +14,9 @@ const generate = async (argv) => {
|
|
|
14
14
|
const tsMode = process.env.UI5_TS === "true";
|
|
15
15
|
const extension = tsMode ? ".css.ts" : ".css.js";
|
|
16
16
|
|
|
17
|
-
const packageJSON = JSON.parse(fs.readFileSync("./package.json"))
|
|
17
|
+
const packageJSON = JSON.parse(fs.readFileSync("./package.json"));
|
|
18
|
+
const basePackageJSON = (await import("@ui5/webcomponents-base/package.json", { with: { type: "json" } })).default;
|
|
19
|
+
|
|
18
20
|
const inputFilesGlob = "src/themes/*.css";
|
|
19
21
|
const restArgs = argv.slice(2);
|
|
20
22
|
|
|
@@ -31,7 +33,7 @@ const generate = async (argv) => {
|
|
|
31
33
|
newText = f.text;
|
|
32
34
|
} else {
|
|
33
35
|
// scoping
|
|
34
|
-
newText = scopeVariables(f.text,
|
|
36
|
+
newText = scopeVariables(f.text, basePackageJSON);
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
newText = newText.replaceAll(/\\/g, "\\\\"); // Escape backslashes as they might appear in css rules
|
|
@@ -15,7 +15,8 @@ const generate = async (argv) => {
|
|
|
15
15
|
const tsMode = process.env.UI5_TS === "true";
|
|
16
16
|
const extension = tsMode ? ".css.ts" : ".css.js";
|
|
17
17
|
|
|
18
|
-
const packageJSON = JSON.parse(fs.readFileSync("./package.json"))
|
|
18
|
+
const packageJSON = JSON.parse(fs.readFileSync("./package.json"));
|
|
19
|
+
const basePackageJSON = (await import("@ui5/webcomponents-base/package.json", { with: { type: "json" } })).default;
|
|
19
20
|
|
|
20
21
|
const inputFiles = await globby([
|
|
21
22
|
"src/**/parameters-bundle.css",
|
|
@@ -69,7 +70,7 @@ const generate = async (argv) => {
|
|
|
69
70
|
combineDuplicatedSelectors,
|
|
70
71
|
]).process(f.text, { from: undefined });
|
|
71
72
|
|
|
72
|
-
return { css: scopeVariables(combined.css,
|
|
73
|
+
return { css: scopeVariables(combined.css, basePackageJSON, f.path) };
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
let scopingPlugin = {
|
|
@@ -38,6 +38,29 @@ const getOverrideVersion = filePath => {
|
|
|
38
38
|
return overrideVersion;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* `packageJSON` should reference the `package.json` of the base package,
|
|
43
|
+
* as it serves as the starting point for every runtime and carries a unique version.
|
|
44
|
+
* The `getScopedVarName` function is also defined in the base package
|
|
45
|
+
* and is consumed by all other packages.
|
|
46
|
+
*
|
|
47
|
+
* Runtime (2.19.0)
|
|
48
|
+
* - base (2.19.0)
|
|
49
|
+
* - At least one of the following packages: ai / main / fiori / compat (2.19.0)
|
|
50
|
+
* - Custom package (x.x.x)
|
|
51
|
+
*
|
|
52
|
+
* It is not possible to have a runtime with the main package at version 2.19.0
|
|
53
|
+
* and the base package at a different version (e.g., 2.18.0),
|
|
54
|
+
* because the main package depends on the base package.
|
|
55
|
+
* Such a mismatch would create a new runtime.
|
|
56
|
+
*
|
|
57
|
+
* Therefore, we can safely assume that the base package version
|
|
58
|
+
* matches the runtime version and can be reliably used for scoping.
|
|
59
|
+
*
|
|
60
|
+
* It is still needed for third-party packages that have not yet migrated to the
|
|
61
|
+
* component-level variable approach.
|
|
62
|
+
*/
|
|
63
|
+
|
|
41
64
|
const scopeVariables = (cssText, packageJSON, inputFile) => {
|
|
42
65
|
const escapeVersion = version => "v" + version?.replaceAll(/[^0-9A-Za-z\-_]/g, "-");
|
|
43
66
|
const versionStr = escapeVersion(getOverrideVersion(inputFile) || packageJSON.version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-tools",
|
|
3
|
-
"version": "2.20.0-rc.
|
|
3
|
+
"version": "2.20.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",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"esbuild": "^0.25.0",
|
|
83
83
|
"yargs": "^17.5.1"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "98b851b62424d1b81b69d58768924dc4a7a17096"
|
|
86
86
|
}
|