locize-cli 12.0.6 → 12.0.7
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 +4 -0
- package/dist/cjs/cli.js +1 -1
- package/dist/cjs/migrate.js +4 -0
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/request.js +1 -1
- package/dist/esm/cli.js +1 -1
- package/dist/esm/migrate.js +4 -0
- package/dist/esm/request.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
Project versioning adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
Change log format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
7
7
|
|
|
8
|
+
## [12.0.7](https://github.com/locize/locize-cli/compare/v12.0.6...v12.0.7) - 2026-03-02
|
|
9
|
+
|
|
10
|
+
- improve migrate command
|
|
11
|
+
|
|
8
12
|
## [12.0.6](https://github.com/locize/locize-cli/compare/v12.0.5...v12.0.6) - 2026-03-02
|
|
9
13
|
|
|
10
14
|
- improve error message when detecting wrong cdnType usage
|
package/dist/cjs/cli.js
CHANGED
|
@@ -50,7 +50,7 @@ const program = new commander.Command();
|
|
|
50
50
|
|
|
51
51
|
program
|
|
52
52
|
.description('The official locize CLI.')
|
|
53
|
-
.version('12.0.
|
|
53
|
+
.version('12.0.7'); // This string is replaced with the actual version at build time by rollup
|
|
54
54
|
// .option('-a, --api-endpoint <url>', `Specify the api-endpoint url that should be used (default: ${defaultApiEndpoint})`)
|
|
55
55
|
// .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`);
|
|
56
56
|
|
package/dist/cjs/migrate.js
CHANGED
|
@@ -26,6 +26,10 @@ const load = async (namespaces) => {
|
|
|
26
26
|
try {
|
|
27
27
|
const data = await fs.promises.readFile(ns.path, 'utf8');
|
|
28
28
|
ns.value = flatten(JSON.parse(data));
|
|
29
|
+
// remove all empty strings for migrate (i.e. used via i18next-cli)
|
|
30
|
+
Object.keys(ns.value).forEach((k) => {
|
|
31
|
+
if (ns.value[k] === '') delete ns.value[k];
|
|
32
|
+
});
|
|
29
33
|
} catch (err) {
|
|
30
34
|
console.error(colors.red(err.stack));
|
|
31
35
|
ns.value = {};
|
package/dist/cjs/package.json
CHANGED
package/dist/cjs/request.js
CHANGED
|
@@ -39,7 +39,7 @@ async function request (url, options) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
options.headers = options.headers || {};
|
|
42
|
-
options.headers['User-Agent'] = `locize-cli/v12.0.
|
|
42
|
+
options.headers['User-Agent'] = `locize-cli/v12.0.7 (node/${process.version}; ${process.platform} ${process.arch})`; // This string is replaced with the actual version at build time by rollup
|
|
43
43
|
options.headers['X-User-Agent'] = options.headers['User-Agent'];
|
|
44
44
|
if (options.body || options.method !== 'get') options.headers['Content-Type'] = 'application/json';
|
|
45
45
|
if (options.body) {
|
package/dist/esm/cli.js
CHANGED
|
@@ -48,7 +48,7 @@ const program = new Command();
|
|
|
48
48
|
|
|
49
49
|
program
|
|
50
50
|
.description('The official locize CLI.')
|
|
51
|
-
.version('12.0.
|
|
51
|
+
.version('12.0.7'); // This string is replaced with the actual version at build time by rollup
|
|
52
52
|
// .option('-a, --api-endpoint <url>', `Specify the api-endpoint url that should be used (default: ${defaultApiEndpoint})`)
|
|
53
53
|
// .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`);
|
|
54
54
|
|
package/dist/esm/migrate.js
CHANGED
|
@@ -24,6 +24,10 @@ const load = async (namespaces) => {
|
|
|
24
24
|
try {
|
|
25
25
|
const data = await fs.promises.readFile(ns.path, 'utf8');
|
|
26
26
|
ns.value = flatten(JSON.parse(data));
|
|
27
|
+
// remove all empty strings for migrate (i.e. used via i18next-cli)
|
|
28
|
+
Object.keys(ns.value).forEach((k) => {
|
|
29
|
+
if (ns.value[k] === '') delete ns.value[k];
|
|
30
|
+
});
|
|
27
31
|
} catch (err) {
|
|
28
32
|
console.error(colors.red(err.stack));
|
|
29
33
|
ns.value = {};
|
package/dist/esm/request.js
CHANGED
|
@@ -37,7 +37,7 @@ async function request (url, options) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
options.headers = options.headers || {};
|
|
40
|
-
options.headers['User-Agent'] = `locize-cli/v12.0.
|
|
40
|
+
options.headers['User-Agent'] = `locize-cli/v12.0.7 (node/${process.version}; ${process.platform} ${process.arch})`; // This string is replaced with the actual version at build time by rollup
|
|
41
41
|
options.headers['X-User-Agent'] = options.headers['User-Agent'];
|
|
42
42
|
if (options.body || options.method !== 'get') options.headers['Content-Type'] = 'application/json';
|
|
43
43
|
if (options.body) {
|