@ui5/webcomponents-tools 2.11.0-rc.1 → 2.11.0-rc.3

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,25 @@
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.11.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v2.11.0-rc.2...v2.11.0-rc.3) (2025-05-29)
7
+
8
+
9
+ ### Features
10
+
11
+ * add `Assets-node` module for node/ssr env ([#11522](https://github.com/SAP/ui5-webcomponents/issues/11522)) ([4a874cc](https://github.com/SAP/ui5-webcomponents/commit/4a874cc1f88e440f8bce4f9f0757df1af2a04314))
12
+
13
+
14
+
15
+
16
+
17
+ # [2.11.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.11.0-rc.1...v2.11.0-rc.2) (2025-05-22)
18
+
19
+ **Note:** Version bump only for package @ui5/webcomponents-tools
20
+
21
+
22
+
23
+
24
+
6
25
  # [2.11.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.11.0-rc.0...v2.11.0-rc.1) (2025-05-15)
7
26
 
8
27
  **Note:** Version bump only for package @ui5/webcomponents-tools
@@ -39,6 +39,7 @@ const generate = async () => {
39
39
  const inputFolder = path.normalize(process.argv[2]);
40
40
  const outputFileDynamic = path.normalize(`${process.argv[3]}/i18n.${ext}`);
41
41
  const outputFileFetchMetaResolve = path.normalize(`${process.argv[3]}/i18n-fetch.${ext}`);
42
+ const outputFileDynamicImportJSONImport = path.normalize(`${process.argv[3]}/i18n-node.${ext}`);
42
43
 
43
44
  // All languages present in the file system
44
45
  const files = await fs.readdir(inputFolder);
@@ -49,11 +50,13 @@ const generate = async () => {
49
50
 
50
51
  let contentDynamic;
51
52
  let contentFetchMetaResolve;
53
+ let contentDynamicImportJSONAttr;
52
54
 
53
55
  // No i18n - just import dependencies, if any
54
56
  if (languages.length === 0) {
55
57
  contentDynamic = "";
56
58
  contentFetchMetaResolve = "";
59
+ contentDynamicImportJSONAttr = "";
57
60
  // There is i18n - generate the full file
58
61
  } else {
59
62
  // Keys for the array
@@ -62,18 +65,20 @@ const generate = async () => {
62
65
  // Actual imports for json assets
63
66
  const dynamicImportsString = languages.map(key => ` case "${key}": return (await import(/* webpackChunkName: "${packageName.replace("@", "").replace("/", "-")}-messagebundle-${key}" */ "../assets/i18n/messagebundle_${key}.json")).default;`).join("\n");
64
67
  const fetchMetaResolveString = languages.map(key => ` case "${key}": return (await fetch(new URL("../assets/i18n/messagebundle_${key}.json", import.meta.url))).json();`).join("\n");
68
+ const dynamicImportJSONAttrString = languages.map(key => ` case "${key}": return (await import(/* webpackChunkName: "${packageName.replace("@", "").replace("/", "-")}-messagebundle-${key}" */ "../assets/i18n/messagebundle_${key}.json", {with: { type: 'json'}})).default;`).join("\n");
65
69
 
66
70
  // Resulting file content
67
71
 
68
72
  contentDynamic = getContent(dynamicImportsString, languagesKeysStringArray, packageName);
69
73
  contentFetchMetaResolve = getContent(fetchMetaResolveString, languagesKeysStringArray, packageName);
70
-
74
+ contentDynamicImportJSONAttr = getContent(dynamicImportJSONAttrString, languagesKeysStringArray, packageName);
71
75
  }
72
76
 
73
77
  await fs.mkdir(path.dirname(outputFileDynamic), { recursive: true });
74
78
  return Promise.all([
75
79
  fs.writeFile(outputFileDynamic, contentDynamic),
76
80
  fs.writeFile(outputFileFetchMetaResolve, contentFetchMetaResolve),
81
+ fs.writeFile(outputFileDynamicImportJSONImport, contentDynamicImportJSONAttr),
77
82
  ]);
78
83
  }
79
84
 
@@ -8,6 +8,7 @@ const ext = isTypeScript ? 'ts' : 'js';
8
8
  const generate = async () => {
9
9
  const inputFolder = path.normalize(process.argv[2]);
10
10
  const outputFileDynamic = path.normalize(`${process.argv[3]}/Themes.${ext}`);
11
+ const outputFileDynamicImportJSONAttr = path.normalize(`${process.argv[3]}/Themes-node.${ext}`);
11
12
  const outputFileFetchMetaResolve = path.normalize(`${process.argv[3]}/Themes-fetch.${ext}`);
12
13
 
13
14
  // All supported optional themes
@@ -24,6 +25,7 @@ const generate = async () => {
24
25
 
25
26
  const availableThemesArray = `[${themesOnFileSystem.map(theme => `"${theme}"`).join(", ")}]`;
26
27
  const dynamicImportLines = themesOnFileSystem.map(theme => `\t\tcase "${theme}": return (await import(/* webpackChunkName: "${packageName.replace("@", "").replace("/", "-")}-${theme.replace("_", "-")}-parameters-bundle" */"../assets/themes/${theme}/parameters-bundle.css.json")).default;`).join("\n");
28
+ const dynamicImportJSONAttrLines = themesOnFileSystem.map(theme => `\t\tcase "${theme}": return (await import(/* webpackChunkName: "${packageName.replace("@", "").replace("/", "-")}-${theme.replace("_", "-")}-parameters-bundle" */"../assets/themes/${theme}/parameters-bundle.css.json", {with: { type: 'json'}})).default;`).join("\n");
27
29
  const fetchMetaResolveLines = themesOnFileSystem.map(theme => `\t\tcase "${theme}": return (await fetch(new URL("../assets/themes/${theme}/parameters-bundle.css.json", import.meta.url))).json();`).join("\n");
28
30
 
29
31
  // dynamic imports file content
@@ -54,6 +56,7 @@ ${availableThemesArray}
54
56
  await fs.mkdir(path.dirname(outputFileDynamic), { recursive: true });
55
57
  return Promise.all([
56
58
  fs.writeFile(outputFileDynamic, contentDynamic(dynamicImportLines)),
59
+ fs.writeFile(outputFileDynamicImportJSONAttr, contentDynamic(dynamicImportJSONAttrLines)),
57
60
  fs.writeFile(outputFileFetchMetaResolve, contentDynamic(fetchMetaResolveLines)),
58
61
  ]);
59
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-tools",
3
- "version": "2.11.0-rc.1",
3
+ "version": "2.11.0-rc.3",
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": "8702780b18c6100b879cab8d93ca992a944868e0"
85
+ "gitHead": "74e76986dcd0c20ea4cbd6441702c8e72a00b6d3"
86
86
  }