@ui5/webcomponents-tools 0.0.0-47cc17a26 → 0.0.0-49bade48d

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +327 -1
  2. package/assets-meta.js +6 -4
  3. package/bin/dev.js +9 -4
  4. package/bin/ui5nps.js +44 -8
  5. package/components-package/eslint.js +1 -1
  6. package/components-package/nps.js +23 -18
  7. package/icons-collection/nps.js +1 -1
  8. package/lib/amd-to-es6/index.js +3 -1
  9. package/lib/cem/cem.js +4 -0
  10. package/lib/cem/custom-elements-manifest.config.mjs +88 -4
  11. package/lib/cem/merge.mjs +220 -0
  12. package/lib/cem/schema-internal.json +41 -1
  13. package/lib/cem/schema.json +41 -1
  14. package/lib/cem/types-internal.d.ts +32 -2
  15. package/lib/cem/types.d.ts +32 -2
  16. package/lib/cem/utils.mjs +13 -3
  17. package/lib/cem/validate.js +7 -2
  18. package/lib/chokidar/chokidar.js +28 -0
  19. package/lib/copy-and-watch/index.js +5 -0
  20. package/lib/copy-list/index.js +3 -1
  21. package/lib/create-icons/index.js +18 -13
  22. package/lib/create-illustrations/index.js +46 -4
  23. package/lib/css-processors/css-processor-components.mjs +14 -3
  24. package/lib/css-processors/css-processor-themes.mjs +148 -24
  25. package/lib/css-processors/merge-light-dark.mjs +131 -0
  26. package/lib/css-processors/postcss-plugin.mjs +153 -0
  27. package/lib/css-processors/scope-variables.mjs +26 -1
  28. package/lib/css-processors/shared.mjs +7 -6
  29. package/lib/eslint/eslint.js +44 -0
  30. package/lib/generate-js-imports/illustrations.js +3 -1
  31. package/lib/generate-json-imports/i18n.js +3 -1
  32. package/lib/generate-json-imports/themes.js +6 -2
  33. package/lib/i18n/defaults.js +3 -1
  34. package/lib/i18n/toJSON.js +28 -4
  35. package/lib/test-runner/test-runner.js +56 -48
  36. package/lib/vite-bundler/vite-bundler.mjs +35 -0
  37. package/package.json +2 -4
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
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
- # [0.0.0-47cc17a26](https://github.com/UI5/webcomponents/compare/v2.17.0-rc.1...v0.0.0-47cc17a26) (2025-11-07)
6
+ # [0.0.0-49bade48d](https://github.com/UI5/webcomponents/compare/v2.23.0-rc.1...v0.0.0-49bade48d) (2026-06-01)
7
7
 
8
8
  **Note:** Version bump only for package @ui5/webcomponents-tools
9
9
 
@@ -11,6 +11,332 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
+ # [2.23.0-rc.1](https://github.com/UI5/webcomponents/compare/v2.23.0-rc.0...v2.23.0-rc.1) (2026-05-28)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **tools:** resolve airbnb-base eslint config from tools package location ([#13575](https://github.com/UI5/webcomponents/issues/13575)) ([96201d6](https://github.com/UI5/webcomponents/commit/96201d6e817b825fe019b94a29eac3f80e46de21))
20
+ * **ui5-icons:** generate i18n JSON imports ([#13583](https://github.com/UI5/webcomponents/issues/13583)) ([eb2af62](https://github.com/UI5/webcomponents/commit/eb2af62871a392b0f3f9c0fc8ba03ee7e789b6c5)), closes [#13417](https://github.com/UI5/webcomponents/issues/13417)
21
+
22
+
23
+
24
+
25
+
26
+ # [2.23.0-rc.0](https://github.com/UI5/webcomponents/compare/v2.22.1-rc.0...v2.23.0-rc.0) (2026-05-23)
27
+
28
+ **Note:** Version bump only for package @ui5/webcomponents-tools
29
+
30
+
31
+
32
+
33
+
34
+ ## [2.22.1-rc.0](https://github.com/UI5/webcomponents/compare/v2.22.0-rc.6...v2.22.1-rc.0) (2026-05-21)
35
+
36
+ **Note:** Version bump only for package @ui5/webcomponents-tools
37
+
38
+
39
+
40
+
41
+
42
+ # [2.22.0](https://github.com/UI5/webcomponents/compare/v2.22.0-rc.4...v2.22.0) (2026-05-11)
43
+
44
+ **Note:** Version bump only for package @ui5/webcomponents-tools
45
+
46
+
47
+
48
+
49
+
50
+ # [2.22.0-rc.4](https://github.com/UI5/webcomponents/compare/v2.22.0-rc.3...v2.22.0-rc.4) (2026-05-07)
51
+
52
+ **Note:** Version bump only for package @ui5/webcomponents-tools
53
+
54
+
55
+
56
+
57
+
58
+ # [2.22.0-rc.3](https://github.com/UI5/webcomponents/compare/v2.22.0-rc.2...v2.22.0-rc.3) (2026-04-30)
59
+
60
+ **Note:** Version bump only for package @ui5/webcomponents-tools
61
+
62
+
63
+
64
+
65
+
66
+ # [2.22.0-rc.2](https://github.com/UI5/webcomponents/compare/v2.22.0-rc.1...v2.22.0-rc.2) (2026-04-23)
67
+
68
+ **Note:** Version bump only for package @ui5/webcomponents-tools
69
+
70
+
71
+
72
+
73
+
74
+ # [2.22.0-rc.1](https://github.com/UI5/webcomponents/compare/v2.22.0-rc.0...v2.22.0-rc.1) (2026-04-16)
75
+
76
+ **Note:** Version bump only for package @ui5/webcomponents-tools
77
+
78
+
79
+
80
+
81
+
82
+ # [2.22.0-rc.0](https://github.com/UI5/webcomponents/compare/v2.21.0...v2.22.0-rc.0) (2026-04-09)
83
+
84
+ **Note:** Version bump only for package @ui5/webcomponents-tools
85
+
86
+
87
+
88
+
89
+
90
+ # [2.21.0](https://github.com/UI5/webcomponents/compare/v2.21.0-rc.4...v2.21.0) (2026-04-07)
91
+
92
+ **Note:** Version bump only for package @ui5/webcomponents-tools
93
+
94
+
95
+
96
+
97
+
98
+ # [2.21.0-rc.4](https://github.com/UI5/webcomponents/compare/v2.21.0-rc.3...v2.21.0-rc.4) (2026-04-02)
99
+
100
+
101
+ ### Features
102
+
103
+ * update sap/icons to v5.12 & 4.24 ([#13319](https://github.com/UI5/webcomponents/issues/13319)) ([0b16434](https://github.com/UI5/webcomponents/commit/0b164348069b96f5464eaea3425a4876097dc44d))
104
+
105
+
106
+
107
+
108
+
109
+ # [2.21.0-rc.3](https://github.com/UI5/webcomponents/compare/v2.21.0-rc.2...v2.21.0-rc.3) (2026-03-26)
110
+
111
+ **Note:** Version bump only for package @ui5/webcomponents-tools
112
+
113
+
114
+
115
+
116
+
117
+ # [2.21.0-rc.2](https://github.com/UI5/webcomponents/compare/v2.21.0-rc.1...v2.21.0-rc.2) (2026-03-19)
118
+
119
+
120
+ ### Features
121
+
122
+ * **theming:** add OS-adaptive auto themes (sap_horizon_auto, sap_horizon_hc_auto) ([#13300](https://github.com/UI5/webcomponents/issues/13300)) ([f6ae2b5](https://github.com/UI5/webcomponents/commit/f6ae2b53ff86d0b4e1c420863535d8e43bae4ed4))
123
+
124
+
125
+
126
+
127
+
128
+ # [2.21.0-rc.1](https://github.com/UI5/webcomponents/compare/v2.21.0-rc.0...v2.21.0-rc.1) (2026-03-19)
129
+
130
+ **Note:** Version bump only for package @ui5/webcomponents-tools
131
+
132
+
133
+
134
+
135
+
136
+ # [2.21.0-rc.0](https://github.com/UI5/webcomponents/compare/v2.20.0...v2.21.0-rc.0) (2026-03-12)
137
+
138
+
139
+ ### Bug Fixes
140
+
141
+ * **ui5-illustrated-message:** add v5 loader in tnt illustrations ([#13160](https://github.com/UI5/webcomponents/issues/13160)) ([3dc4694](https://github.com/UI5/webcomponents/commit/3dc4694ecbb9ca3c2e8061fccaf917bfa211861a)), closes [#8145](https://github.com/UI5/webcomponents/issues/8145) [#8145](https://github.com/UI5/webcomponents/issues/8145)
142
+
143
+
144
+
145
+
146
+
147
+ # [2.20.0](https://github.com/UI5/webcomponents/compare/v2.20.0-rc.3...v2.20.0) (2026-03-05)
148
+
149
+ **Note:** Version bump only for package @ui5/webcomponents-tools
150
+
151
+
152
+
153
+
154
+
155
+ # [2.20.0-rc.3](https://github.com/UI5/webcomponents/compare/v2.20.0-rc.2...v2.20.0-rc.3) (2026-03-05)
156
+
157
+ **Note:** Version bump only for package @ui5/webcomponents-tools
158
+
159
+
160
+
161
+
162
+
163
+ # [2.20.0-rc.2](https://github.com/UI5/webcomponents/compare/v2.20.0-rc.1...v2.20.0-rc.2) (2026-02-26)
164
+
165
+
166
+ ### Bug Fixes
167
+
168
+ * CSS variables scoping to depend VersionInfo ([#13091](https://github.com/UI5/webcomponents/issues/13091)) ([d2e43ed](https://github.com/UI5/webcomponents/commit/d2e43ed692c63a0a36a9b14da59de354e2e7d0b0))
169
+
170
+
171
+
172
+
173
+
174
+ # [2.20.0-rc.1](https://github.com/UI5/webcomponents/compare/v2.20.0-rc.0...v2.20.0-rc.1) (2026-02-19)
175
+
176
+ **Note:** Version bump only for package @ui5/webcomponents-tools
177
+
178
+
179
+
180
+
181
+
182
+ # [2.20.0-rc.0](https://github.com/UI5/webcomponents/compare/v2.19.0...v2.20.0-rc.0) (2026-02-12)
183
+
184
+ **Note:** Version bump only for package @ui5/webcomponents-tools
185
+
186
+
187
+
188
+
189
+
190
+ # [2.19.0](https://github.com/UI5/webcomponents/compare/v2.19.0-rc.3...v2.19.0) (2026-02-05)
191
+
192
+ **Note:** Version bump only for package @ui5/webcomponents-tools
193
+
194
+
195
+
196
+
197
+
198
+ # [2.19.0-rc.3](https://github.com/UI5/webcomponents/compare/v2.19.0-rc.2...v2.19.0-rc.3) (2026-02-05)
199
+
200
+ **Note:** Version bump only for package @ui5/webcomponents-tools
201
+
202
+
203
+
204
+
205
+
206
+ # [2.19.0-rc.2](https://github.com/UI5/webcomponents/compare/v2.19.0-rc.1...v2.19.0-rc.2) (2026-01-22)
207
+
208
+ **Note:** Version bump only for package @ui5/webcomponents-tools
209
+
210
+
211
+
212
+
213
+
214
+ # [2.19.0-rc.1](https://github.com/UI5/webcomponents/compare/v2.19.0-rc.0...v2.19.0-rc.1) (2026-01-15)
215
+
216
+ **Note:** Version bump only for package @ui5/webcomponents-tools
217
+
218
+
219
+
220
+
221
+
222
+ # [2.19.0-rc.0](https://github.com/UI5/webcomponents/compare/v2.18.0...v2.19.0-rc.0) (2026-01-08)
223
+
224
+
225
+ ### Bug Fixes
226
+
227
+ * **i18n:** handle utf-8 escape sequences in message bundle properties files ([#12784](https://github.com/UI5/webcomponents/issues/12784)) ([54a3f15](https://github.com/UI5/webcomponents/commit/54a3f15a8d23de8683db5829c78255307ef3f8b5))
228
+
229
+
230
+
231
+
232
+
233
+ # [2.18.0](https://github.com/UI5/webcomponents/compare/v2.18.0-rc.3...v2.18.0) (2026-01-05)
234
+
235
+ **Note:** Version bump only for package @ui5/webcomponents-tools
236
+
237
+
238
+
239
+
240
+
241
+ # [2.18.0-rc.3](https://github.com/UI5/webcomponents/compare/v2.18.0-rc.2...v2.18.0-rc.3) (2026-01-01)
242
+
243
+ **Note:** Version bump only for package @ui5/webcomponents-tools
244
+
245
+
246
+
247
+
248
+
249
+ # [2.18.0-rc.2](https://github.com/UI5/webcomponents/compare/v2.18.0-rc.1...v2.18.0-rc.2) (2025-12-25)
250
+
251
+ **Note:** Version bump only for package @ui5/webcomponents-tools
252
+
253
+
254
+
255
+
256
+
257
+ # [2.18.0-rc.1](https://github.com/UI5/webcomponents/compare/v2.18.0-rc.0...v2.18.0-rc.1) (2025-12-18)
258
+
259
+ **Note:** Version bump only for package @ui5/webcomponents-tools
260
+
261
+
262
+
263
+
264
+
265
+ # [2.18.0-rc.0](https://github.com/UI5/webcomponents/compare/v2.17.0...v2.18.0-rc.0) (2025-12-11)
266
+
267
+ **Note:** Version bump only for package @ui5/webcomponents-tools
268
+
269
+
270
+
271
+
272
+
273
+ # [2.17.0](https://github.com/UI5/webcomponents/compare/v2.17.0-rc.5...v2.17.0) (2025-12-05)
274
+
275
+
276
+ ### Reverts
277
+
278
+ * Revert "feat(framework): scope theming css variables with component packages (#12491)" (#12775) ([3385623](https://github.com/UI5/webcomponents/commit/33856235e357a3d4d0b9391eab2a83a5b3010556)), closes [#12491](https://github.com/UI5/webcomponents/issues/12491) [#12775](https://github.com/UI5/webcomponents/issues/12775)
279
+ * Revert "chore: scope theming variables used in illustrations (#12687)" (#12770) ([c9288ff](https://github.com/UI5/webcomponents/commit/c9288ff0f655fdd03262b71ac788e5688c904add)), closes [#12687](https://github.com/UI5/webcomponents/issues/12687) [#12770](https://github.com/UI5/webcomponents/issues/12770)
280
+ * Revert "feat(framework): introduce loadBaseThemingCSSVariables configuration (#12699)" (#12767) ([db375d3](https://github.com/UI5/webcomponents/commit/db375d30b9f4a7e07961fabbdcefdcdc78a93f46)), closes [#12699](https://github.com/UI5/webcomponents/issues/12699) [#12767](https://github.com/UI5/webcomponents/issues/12767)
281
+
282
+
283
+
284
+
285
+
286
+ # [2.17.0-rc.5](https://github.com/UI5/webcomponents/compare/v2.17.0-rc.4...v2.17.0-rc.5) (2025-12-04)
287
+
288
+
289
+ ### Bug Fixes
290
+
291
+ * **tools:** dependencies usage ([#12716](https://github.com/UI5/webcomponents/issues/12716)) ([89bb0dd](https://github.com/UI5/webcomponents/commit/89bb0dd62322598bd1ea7ce984eaf0618546a6f2))
292
+
293
+
294
+ ### Features
295
+
296
+ * **framework:** introduce loadBaseThemingCSSVariables configuration ([#12699](https://github.com/UI5/webcomponents/issues/12699)) ([f01b2eb](https://github.com/UI5/webcomponents/commit/f01b2eb6256f2032bd802d0a60c4625b0d1af5fe))
297
+
298
+
299
+
300
+
301
+
302
+ # [2.17.0-rc.4](https://github.com/UI5/webcomponents/compare/v2.17.0-rc.3...v2.17.0-rc.4) (2025-11-27)
303
+
304
+
305
+ ### Bug Fixes
306
+
307
+ * **build:** fix issue with legacy dev setup ([#12706](https://github.com/UI5/webcomponents/issues/12706)) ([89fa5ca](https://github.com/UI5/webcomponents/commit/89fa5ca9f83551363e8c1d9980269cd58fa09d85))
308
+
309
+
310
+
311
+
312
+
313
+ # [2.17.0-rc.3](https://github.com/UI5/webcomponents/compare/v2.17.0-rc.2...v2.17.0-rc.3) (2025-11-20)
314
+
315
+
316
+ ### Bug Fixes
317
+
318
+ * **cem:** alias references ([#12682](https://github.com/UI5/webcomponents/issues/12682)) ([4ce5617](https://github.com/UI5/webcomponents/commit/4ce5617ff580c869640996545fa618ff90447ba4))
319
+
320
+
321
+ ### Features
322
+
323
+ * **framework:** scope theming css variables with component packages ([#12491](https://github.com/UI5/webcomponents/issues/12491)) ([43ff5de](https://github.com/UI5/webcomponents/commit/43ff5defaf6e08bac848df3d2d34943de15bee83))
324
+
325
+
326
+
327
+
328
+
329
+ # [2.17.0-rc.2](https://github.com/UI5/webcomponents/compare/v2.17.0-rc.1...v2.17.0-rc.2) (2025-11-13)
330
+
331
+
332
+ ### Bug Fixes
333
+
334
+ * **tools:** fix wc-dev test command ([#12662](https://github.com/UI5/webcomponents/issues/12662)) ([7dd11fb](https://github.com/UI5/webcomponents/commit/7dd11fbb88711a74d3602328a492a923552fd4ef))
335
+
336
+
337
+
338
+
339
+
14
340
  # [2.17.0-rc.1](https://github.com/UI5/webcomponents/compare/v2.17.0-rc.0...v2.17.0-rc.1) (2025-11-07)
15
341
 
16
342
 
package/assets-meta.js CHANGED
@@ -6,10 +6,12 @@ const assetsMeta = {
6
6
  "sap_fiori_3_dark",
7
7
  "sap_fiori_3_hcb",
8
8
  "sap_fiori_3_hcw",
9
- "sap_horizon",
10
- "sap_horizon_dark",
11
- "sap_horizon_hcb",
12
- "sap_horizon_hcw",
9
+ "sap_horizon",
10
+ "sap_horizon_auto", // os-based auto theme, not generated by merging light + dark
11
+ "sap_horizon_dark",
12
+ "sap_horizon_hc_auto", // os-based auto theme, merging hcb + hcw
13
+ "sap_horizon_hcb",
14
+ "sap_horizon_hcw",
13
15
  ],
14
16
  },
15
17
  "languages": {
package/bin/dev.js CHANGED
@@ -3,15 +3,20 @@
3
3
  const child_process = require("child_process");
4
4
  const { comma } = require("postcss/lib/list");
5
5
 
6
- let command = process.argv[2];
7
- const argument = process.argv[3];
6
+ // Check for verbose flag
7
+ const hasVerbose = process.argv.includes("--verbose") || process.argv.includes("-v");
8
+ const args = process.argv.slice(2).filter(arg => arg !== "--verbose" && arg !== "-v");
9
+
10
+ let command = args[0];
11
+ const argument = args[1];
8
12
 
9
13
  if (command === "watch") {
10
14
  if (["src", "test", "bundles", "styles", "templates", "samples"].includes(argument)) {
11
15
  command = `watch.${argument}`;
12
16
  }
13
17
  } else if (command === "test") {
14
- command = ["test", ...process.argv.slice(3)].join(" ");
18
+ command = ["test", ...args.slice(1)].join(" ");
15
19
  }
16
20
 
17
- child_process.execSync(`ui5nps "${command}"`, {stdio: 'inherit'});
21
+ const verboseFlag = hasVerbose ? " --verbose" : "";
22
+ child_process.execSync(`ui5nps${verboseFlag} "${command}"`, {stdio: 'inherit'});
package/bin/ui5nps.js CHANGED
@@ -13,6 +13,24 @@ const SCRIPT_NAMES = [
13
13
  "package-scripts.mjs"
14
14
  ]
15
15
 
16
+ /**
17
+ * Check if verbose mode is enabled via CLI flag or environment variable.
18
+ * @returns {boolean}
19
+ */
20
+ function isVerbose() {
21
+ return process.env.UI5_VERBOSE === "true";
22
+ }
23
+
24
+ /**
25
+ * Log a message only in verbose mode.
26
+ * @param {...any} args - Arguments to pass to console.log
27
+ */
28
+ function verboseLog(...args) {
29
+ if (isVerbose()) {
30
+ console.log(...args);
31
+ }
32
+ }
33
+
16
34
  /**
17
35
  * Parser for UI5 package scripts with support for parallel and sequential execution
18
36
  */
@@ -165,7 +183,12 @@ class Parser {
165
183
  return new Promise(async (resolve, reject) => {
166
184
  if (command.trim().startsWith("ui5nps-script")) {
167
185
  const argv = parseArgsStringToArgv(command);
168
- const importedContent = require(argv[1]);
186
+ if (!path.isAbsolute(argv[1])) {
187
+ throw new Error(`Script path must be absolute: ${argv[1]}`);
188
+ }
189
+
190
+ const importPath = argv[1];
191
+ const importedContent = require(importPath);
169
192
  let _ui5mainFn;
170
193
 
171
194
  if (importedContent.__esModule) {
@@ -174,7 +197,11 @@ class Parser {
174
197
  _ui5mainFn = importedContent._ui5mainFn;
175
198
  }
176
199
 
177
- console.log(` | Executing command ${commandName} as module.`);
200
+ if (!_ui5mainFn) {
201
+ return reject(new Error(`No valid _ui5mainFn function exported from ${importPath} tried to be executed with ui5nps-script. Either provide a valid _ui5mainFn function or use another way to execute the script (via node).`));
202
+ }
203
+
204
+ verboseLog(` | Executing command ${commandName} as module.`);
178
205
  const result = _ui5mainFn(argv);
179
206
 
180
207
  if (result instanceof Promise) {
@@ -184,11 +211,11 @@ class Parser {
184
211
  }
185
212
  }
186
213
 
187
- console.log(` | Executing command ${commandName} as command.\n Running: ${command}`);
214
+ verboseLog(` | Executing command ${commandName} as command.\n Running: ${command}`);
188
215
  const child = exec(command, { stdio: "inherit", env: { ...process.env, ...this.envs } });
189
216
 
190
217
  child.stdout.on("data", (data) => {
191
- console.log(data);
218
+ verboseLog(data);
192
219
  });
193
220
 
194
221
  child.stderr.on("data", (data) => {
@@ -237,16 +264,25 @@ class Parser {
237
264
  const parser = new Parser();
238
265
 
239
266
  // Basic input validation
240
- const commands = process.argv.slice(2);
267
+ const commands = process.argv.slice(2).filter(arg => arg !== "--verbose" && arg !== "-v");
268
+ const verbose = process.argv.includes("--verbose") || process.argv.includes("-v");
269
+
270
+ // Set verbose environment variable for child scripts
271
+ if (verbose) {
272
+ process.env.UI5_VERBOSE = "true";
273
+ }
274
+
241
275
  if (commands.length === 0) {
242
- console.error("Usage: ui5nps <command> [command2] [command3] ...");
276
+ console.error("Usage: ui5nps [--verbose|-v] <command> [command2] [command3] ...");
243
277
  console.error("No commands provided.");
244
278
  process.exit(1);
245
279
  }
246
280
 
247
281
  if (commands.includes("--help") || commands.includes("-h")) {
248
- console.log("Usage: ui5nps <command> [command2] [command3] ...");
249
- console.log("Available commands:");
282
+ console.log("Usage: ui5nps [--verbose|-v] <command> [command2] [command3] ...");
283
+ console.log("\nOptions:");
284
+ console.log(" --verbose, -v Show detailed output (default: quiet, errors only)");
285
+ console.log("\nAvailable commands:");
250
286
  for (const [key, value] of parser.parsedScripts.entries()) {
251
287
  console.log(` - ${key}: ${value}`);
252
288
  }
@@ -66,7 +66,7 @@ module.exports = {
66
66
  "es6": true
67
67
  },
68
68
  "root": true,
69
- "extends": "airbnb-base",
69
+ "extends": require.resolve("eslint-config-airbnb-base"),
70
70
  "overrides": tsMode ? getTsModeOverrides() : [],
71
71
  "parserOptions": {
72
72
  "ecmaVersion": 2018,
@@ -36,7 +36,7 @@ const getScripts = (options) => {
36
36
  createIllustrationsLoadersScript[`generate-${illustrations.set}-${illustrations.collection}`] = `ui5nps-script ${LIB}generate-js-imports/illustrations.js ${illustrations.path} ${illustrations.dynamicImports.outputFile} ${illustrations.set} ${illustrations.collection} ${illustrations.dynamicImports.location} ${illustrations.dynamicImports.filterOut.join(",")}`
37
37
  });
38
38
 
39
-
39
+ const standalone = options.standalone ?? true;
40
40
  const tsOption = !!(!options.legacy || options.jsx);
41
41
  const tsCommandOld = tsOption ? "tsc" : "";
42
42
  let tsWatchCommandStandalone = tsOption ? "tsc --watch" : "";
@@ -66,19 +66,22 @@ const getScripts = (options) => {
66
66
  viteConfig = `-c "${require.resolve("@ui5/webcomponents-tools/components-package/vite.config.js")}"`;
67
67
  }
68
68
 
69
- let eslintConfig;
70
- if (fs.existsSync(".eslintrc.js") || fs.existsSync(".eslintrc.cjs")) {
71
- // preferred way of custom configuration in root project folder
72
- eslintConfig = "";
73
- } else {
74
- // no custom configuration - use default from tools project
75
- eslintConfig = `--config "${require.resolve("@ui5/webcomponents-tools/components-package/eslint.js")}"`;
69
+
70
+ const getPrepareDefault = () => {
71
+ let result = `ui5nps clean prepare.all copy copyProps prepare.typescript`
72
+
73
+ if (standalone) {
74
+ result = `${result} generateAPI`;
75
+ }
76
+
77
+ return result;
76
78
  }
77
79
 
78
80
  const scripts = {
79
81
  __ui5envs: {
80
- UI5_CEM_MODE: options.dev,
82
+ UI5_CEM_MODE: typeof options.dev === "boolean" ? (options.dev ? "dev" : undefined) : options.dev,
81
83
  UI5_TS: `${tsOption}`,
84
+ CSS_VARIABLES_TARGET: options.cssVariablesTarget ?? "root",
82
85
  CYPRESS_COVERAGE: !!(options.internal?.cypress_code_coverage),
83
86
  },
84
87
  clean: {
@@ -86,22 +89,22 @@ const getScripts = (options) => {
86
89
  "generated": `ui5nps-script "${LIB}/rimraf/rimraf.js src/generated`,
87
90
  "dist": `ui5nps-script "${LIB}/rimraf/rimraf.js dist`,
88
91
  },
89
- lint: `eslint . ${eslintConfig}`,
90
- lintfix: `eslint . ${eslintConfig} --fix`,
92
+ lint: `ui5nps-script "${LIB}eslint/eslint.js"`,
93
+ lintfix: `ui5nps-script "${LIB}eslint/eslint.js" --fix`,
91
94
  generate: {
92
95
  default: `ui5nps prepare.all`,
93
96
  all: `ui5nps-p build.templates build.i18n prepare.styleRelated copyProps build.illustrations`, // concurently
94
97
  styleRelated: "ui5nps build.styles build.jsonImports build.jsImports",
95
98
  },
96
99
  prepare: {
97
- default: `ui5nps clean prepare.all copy copyProps prepare.typescript generateAPI`,
100
+ default: getPrepareDefault(),
98
101
  all: `ui5nps-p build.templates build.i18n prepare.styleRelated build.illustrations`, // concurently
99
102
  styleRelated: "ui5nps build.styles build.jsonImports build.jsImports",
100
103
  typescript: tsCommandOld,
101
104
  },
102
105
  build: {
103
106
  default: "ui5nps prepare lint build.bundle", // build.bundle2
104
- templates: options.legacy ? `mkdirp src/generated/templates && node "${LIB}hbs2ui5/index.js" -d src/ -o src/generated/templates` : "",
107
+ templates: options.legacy ? `node "${LIB}hbs2ui5/index.js" -d src/ -o src/generated/templates` : "",
105
108
  styles: {
106
109
  default: `ui5nps-p build.styles.themes build.styles.components`, // concurently
107
110
  themes: `ui5nps-script "${LIB}css-processors/css-processor-themes.mjs"`,
@@ -123,12 +126,13 @@ const getScripts = (options) => {
123
126
  default: "ui5nps build.jsImports.illustrationsLoaders",
124
127
  illustrationsLoaders: createIllustrationsLoadersScript,
125
128
  },
126
- bundle: `vite build ${viteConfig} --mode testing --base ${websiteBaseUrl}`,
129
+ bundle: `ui5nps-script "${LIB}vite-bundler/vite-bundler.mjs" ${viteConfig} --mode testing --base ${websiteBaseUrl}`,
127
130
  bundle2: ``,
128
131
  illustrations: createIllustrationsJSImportsScript,
129
132
  },
130
133
  copyProps: `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "src/i18n/*.properties" dist/`,
131
134
  copyPropsWithWatch: `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "src/i18n/*.properties" dist/ --watch --safe --skip-initial-copy`,
135
+ copySrcWithWatch: `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "src/**/*.{js,json}" dist/ --watch --safe --skip-initial-copy`,
132
136
  copy: {
133
137
  default: options.legacy ? "ui5nps copy.src copy.props" : "",
134
138
  src: options.legacy ? `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "src/**/*.{js,json}" dist/` : "",
@@ -137,7 +141,7 @@ const getScripts = (options) => {
137
141
  watch: {
138
142
  default: `ui5nps-p watch.templates watch.typescript watch.src watch.styles watch.i18n watch.props`, // concurently
139
143
  devServer: 'ui5nps-p watch.default watch.bundle', // concurently
140
- src: options.legacy ? 'ui5nps "copy.src --watch --safe --skip-initial-copy"' : "",
144
+ src: options.legacy ? 'ui5nps copySrcWithWatch' : "",
141
145
  typescript: tsWatchCommandStandalone,
142
146
  props: 'ui5nps copyPropsWithWatch',
143
147
  bundle: `ui5nps-script ${LIB}dev-server/dev-server.mjs ${viteConfig}`,
@@ -146,8 +150,8 @@ const getScripts = (options) => {
146
150
  themes: 'ui5nps build.styles.themesWithWatch',
147
151
  components: `ui5nps build.styles.componentsWithWatch`,
148
152
  },
149
- templates: options.legacy ? 'chokidar "src/**/*.hbs" -i "src/generated" -c "ui5nps build.templates"' : "",
150
- i18n: 'chokidar "src/i18n/messagebundle.properties" -c "ui5nps build.i18n.defaultsjs"'
153
+ templates: options.legacy ? `ui5nps-script "${LIB}chokidar/chokidar.js" "src/**/*.hbs" "ui5nps build.templates"` : "",
154
+ i18n: `ui5nps-script "${LIB}chokidar/chokidar.js" "src/i18n/messagebundle.properties" "ui5nps build.i18n.defaultsjs"`
151
155
  },
152
156
  start: "ui5nps prepare watch.devServer",
153
157
  test: `ui5nps-script "${LIB}/test-runner/test-runner.js"`,
@@ -172,9 +176,10 @@ const getScripts = (options) => {
172
176
  bundle: `ui5nps-script ${LIB}dev-server/dev-server.mjs ${viteConfig}`,
173
177
  },
174
178
  generateAPI: {
175
- default: tsOption ? "ui5nps generateAPI.generateCEM generateAPI.validateCEM" : "",
179
+ "default": tsOption ? "ui5nps generateAPI.generateCEM generateAPI.validateCEM generateAPI.mergeCEM" : "",
176
180
  generateCEM: `ui5nps-script "${LIB}cem/cem.js" analyze --config "${LIB}cem/custom-elements-manifest.config.mjs"`,
177
181
  validateCEM: `ui5nps-script "${LIB}cem/validate.js"`,
182
+ mergeCEM: `ui5nps-script "${LIB}cem/merge.mjs"`,
178
183
  },
179
184
  };
180
185
 
@@ -67,7 +67,7 @@ const getScripts = (options) => {
67
67
  },
68
68
  jsonImports: {
69
69
  default: "ui5nps build.jsonImports.i18n",
70
- i18n: `ui5nps-script "${LIB}/generate-json-imports/i18n.js" src/generated/assets/i18n src/generated/json-imports`,
70
+ i18n: `ui5nps-script "${LIB}/generate-json-imports/i18n.js" src/i18n src/generated/json-imports`,
71
71
  },
72
72
  icons: createJSImportsCmd,
73
73
  },
@@ -96,7 +96,9 @@ const transformAmdToES6Modules = async (argv) => {
96
96
  const fileNames = await globby(basePath.replace(/\\/g, "/") + "**/*.js");
97
97
  return Promise.all(fileNames.map(fileName => transformAmdToES6Module(fileName, basePath)).filter(x => !!x))
98
98
  .then(() => {
99
- console.log("Success: all amd modules are transformed to es6!");
99
+ if (process.env.UI5_VERBOSE === "true") {
100
+ console.log("Success: all amd modules are transformed to es6!");
101
+ }
100
102
  });
101
103
  };
102
104
 
package/lib/cem/cem.js CHANGED
@@ -2,6 +2,10 @@ const cemCLI = require("./patch/@custom-elements-manifest/analyzer/cli.js")
2
2
 
3
3
  const main = async argv => {
4
4
  const patchedArgv = argv.slice(2);
5
+ // Add --quiet flag unless verbose mode is enabled
6
+ if (process.env.UI5_VERBOSE !== "true" && !patchedArgv.includes("--quiet")) {
7
+ patchedArgv.push("--quiet");
8
+ }
5
9
  await cemCLI.cli({ argv: patchedArgv, cwd: process.cwd(), noWrite: false });
6
10
  }
7
11