@ui5/webcomponents-tools 2.16.1-rc.0 → 2.16.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 +6 -2
- package/bin/ui5nps.js +5 -1
- package/components-package/nps.js +2 -1
- package/lib/dev-server/dev-server.mjs +8 -8
- package/lib/i18n/toJSON.js +1 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,13 @@
|
|
|
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.16.
|
|
6
|
+
## [2.16.2](https://github.com/UI5/webcomponents/compare/v2.16.0...v2.16.2) (2025-11-21)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **build:** fix issue with legacy dev setup ([#12706](https://github.com/UI5/webcomponents/issues/12706)) ([42e7c1e](https://github.com/UI5/webcomponents/commit/42e7c1e3f33770fa80b1f6ffe06c50daa9af9bb9))
|
|
12
|
+
* **tools:** dev-server for 3rd party packages ([#12631](https://github.com/UI5/webcomponents/issues/12631)) ([e75d5bd](https://github.com/UI5/webcomponents/commit/e75d5bde1154c186d58e5f848f4b6d4cebf5fe37))
|
|
9
13
|
|
|
10
14
|
|
|
11
15
|
|
package/bin/ui5nps.js
CHANGED
|
@@ -140,7 +140,11 @@ class Parser {
|
|
|
140
140
|
process.exit(1);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
envs = scripts.__ui5envs;
|
|
143
|
+
envs = JSON.parse(JSON.stringify(scripts.__ui5envs || {}));
|
|
144
|
+
|
|
145
|
+
Object.entries(envs).forEach(([key, value]) => {
|
|
146
|
+
envs[key] = String(value);
|
|
147
|
+
});
|
|
144
148
|
|
|
145
149
|
// Package-script should provide default export with scripts object
|
|
146
150
|
if (envs && typeof envs !== "object") {
|
|
@@ -129,6 +129,7 @@ const getScripts = (options) => {
|
|
|
129
129
|
},
|
|
130
130
|
copyProps: `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "src/i18n/*.properties" dist/`,
|
|
131
131
|
copyPropsWithWatch: `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "src/i18n/*.properties" dist/ --watch --safe --skip-initial-copy`,
|
|
132
|
+
copySrcWithWatch: `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "src/**/*.{js,json}" dist/ --watch --safe --skip-initial-copy`,
|
|
132
133
|
copy: {
|
|
133
134
|
default: options.legacy ? "ui5nps copy.src copy.props" : "",
|
|
134
135
|
src: options.legacy ? `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "src/**/*.{js,json}" dist/` : "",
|
|
@@ -137,7 +138,7 @@ const getScripts = (options) => {
|
|
|
137
138
|
watch: {
|
|
138
139
|
default: `ui5nps-p watch.templates watch.typescript watch.src watch.styles watch.i18n watch.props`, // concurently
|
|
139
140
|
devServer: 'ui5nps-p watch.default watch.bundle', // concurently
|
|
140
|
-
src: options.legacy ? 'ui5nps
|
|
141
|
+
src: options.legacy ? 'ui5nps copySrcWithWatch' : "",
|
|
141
142
|
typescript: tsWatchCommandStandalone,
|
|
142
143
|
props: 'ui5nps copyPropsWithWatch',
|
|
143
144
|
bundle: `ui5nps-script ${LIB}dev-server/dev-server.mjs ${viteConfig}`,
|
|
@@ -4,13 +4,9 @@ import yargs from 'yargs';
|
|
|
4
4
|
import { hideBin } from 'yargs/helpers';
|
|
5
5
|
import { pathToFileURL } from "url";
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
.alias("c", "config")
|
|
9
|
-
.argv;
|
|
10
|
-
|
|
11
|
-
const startVite = async (port) => {
|
|
7
|
+
const startVite = async (config, port) => {
|
|
12
8
|
const server = await createServer({
|
|
13
|
-
configFile:
|
|
9
|
+
configFile: config,
|
|
14
10
|
server: {
|
|
15
11
|
port: port,
|
|
16
12
|
strictPort: true,
|
|
@@ -37,7 +33,11 @@ const rmPortFile = async () => {
|
|
|
37
33
|
process.on(eventType, rmPortFile);
|
|
38
34
|
});
|
|
39
35
|
|
|
40
|
-
async function start() {
|
|
36
|
+
async function start(outArgv) {
|
|
37
|
+
const argv = yargs(hideBin(outArgv))
|
|
38
|
+
.alias("c", "config")
|
|
39
|
+
.argv;
|
|
40
|
+
|
|
41
41
|
let retries = 10;
|
|
42
42
|
let port = 8080;
|
|
43
43
|
while (retries--) {
|
|
@@ -45,7 +45,7 @@ async function start() {
|
|
|
45
45
|
await fs.writeFile(".dev-server-port", `${port}`);
|
|
46
46
|
try {
|
|
47
47
|
// execSync(command, {stdio: 'pipe'});
|
|
48
|
-
const server = await startVite(port);
|
|
48
|
+
const server = await startVite(argv.config ?? "", port);
|
|
49
49
|
if (server) {
|
|
50
50
|
// server started, don't try other ports
|
|
51
51
|
break;
|
package/lib/i18n/toJSON.js
CHANGED
|
@@ -19,8 +19,7 @@ const convertToJSON = async (file, distPath) => {
|
|
|
19
19
|
const filename = path.basename(file, path.extname(file));
|
|
20
20
|
const language = filename.match(/^messagebundle_(.*?)$/)[1];
|
|
21
21
|
if (!allLanguages.includes(language)) {
|
|
22
|
-
console.
|
|
23
|
-
return;
|
|
22
|
+
console.warn("Not supported language or script: ", language);
|
|
24
23
|
}
|
|
25
24
|
const outputFile = path.normalize(`${distPath}/${filename}.json`);
|
|
26
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-tools",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.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": "
|
|
87
|
+
"gitHead": "607ec2ece97726b94ee32047a8dd311c5200c4fa"
|
|
88
88
|
}
|