locize-cli 7.14.9 → 7.14.11

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
@@ -5,6 +5,14 @@ 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
+ ## [7.14.11](https://github.com/locize/locize-cli/compare/v7.14.10...v7.14.11) - 2023-10-13
9
+
10
+ - fix laravel sync
11
+
12
+ ## [7.14.10](https://github.com/locize/locize-cli/compare/v7.14.9...v7.14.10) - 2023-10-08
13
+
14
+ - fix opening of files provided with --config-path [#88](https://github.com/locize/locize-cli/pull/88)
15
+
8
16
  ## [7.14.9](https://github.com/locize/locize-cli/compare/v7.14.8...v7.14.9) - 2023-10-06
9
17
 
10
18
  - update some deps and add additional logs for json parse error
package/bin/locize CHANGED
@@ -55,7 +55,7 @@ program
55
55
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
56
56
  .action((options) => {
57
57
  try {
58
- config = ini.parse(fs.readFileSync(options.configPath)) || config;
58
+ config = ini.parse(fs.readFileSync(options.configPath, 'utf-8')) || config;
59
59
  } catch (e) {}
60
60
 
61
61
  const addPath = options.addPath || config.addPath || addPathUrl;
@@ -113,7 +113,7 @@ program
113
113
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
114
114
  .action((namespace, key, value, options) => {
115
115
  try {
116
- config = ini.parse(fs.readFileSync(options.configPath)) || config;
116
+ config = ini.parse(fs.readFileSync(options.configPath, 'utf-8')) || config;
117
117
  } catch (e) {}
118
118
 
119
119
  const apiKey = options.apiKey || config.apiKey || process.env.LOCIZE_API_KEY || process.env.LOCIZE_KEY;
@@ -172,7 +172,7 @@ program
172
172
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
173
173
  .action((namespace, key, options) => {
174
174
  try {
175
- config = ini.parse(fs.readFileSync(options.configPath)) || config;
175
+ config = ini.parse(fs.readFileSync(options.configPath, 'utf-8')) || config;
176
176
  } catch (e) {}
177
177
 
178
178
  const apiKey = options.apiKey || config.apiKey || process.env.LOCIZE_API_KEY || process.env.LOCIZE_KEY;
@@ -240,7 +240,7 @@ program
240
240
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
241
241
  .action((options) => {
242
242
  try {
243
- config = ini.parse(fs.readFileSync(options.configPath)) || config;
243
+ config = ini.parse(fs.readFileSync(options.configPath, 'utf-8')) || config;
244
244
  } catch (e) {}
245
245
 
246
246
  const projectId = options.projectId || config.projectId || process.env.LOCIZE_PROJECTID || process.env.LOCIZE_PID;
@@ -309,7 +309,7 @@ program
309
309
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
310
310
  .action((namespace, key, options) => {
311
311
  try {
312
- config = ini.parse(fs.readFileSync(options.configPath)) || config;
312
+ config = ini.parse(fs.readFileSync(options.configPath, 'utf-8')) || config;
313
313
  } catch (e) {}
314
314
 
315
315
  const projectId = options.projectId || config.projectId || process.env.LOCIZE_PROJECTID || process.env.LOCIZE_PID;
@@ -376,7 +376,7 @@ program
376
376
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
377
377
  .action((options) => {
378
378
  try {
379
- config = ini.parse(fs.readFileSync(options.configPath)) || config;
379
+ config = ini.parse(fs.readFileSync(options.configPath, 'utf-8')) || config;
380
380
  } catch (e) {}
381
381
 
382
382
  const getPath = options.getPath || config.getPath || options.addPath || config.addPath || getPathUrl;
@@ -470,7 +470,7 @@ program
470
470
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
471
471
  .action((options) => {
472
472
  try {
473
- config = ini.parse(fs.readFileSync(options.configPath)) || config;
473
+ config = ini.parse(fs.readFileSync(options.configPath, 'utf-8')) || config;
474
474
  } catch (e) {}
475
475
 
476
476
  const getPath = options.getPath || config.getPath || options.addPath || config.addPath || getPathUrl;
@@ -542,7 +542,7 @@ program
542
542
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
543
543
  .action((fromVersion, options) => {
544
544
  try {
545
- config = ini.parse(fs.readFileSync(options.configPath)) || config;
545
+ config = ini.parse(fs.readFileSync(options.configPath, 'utf-8')) || config;
546
546
  } catch (e) {}
547
547
 
548
548
  const apiKey = options.apiKey || config.apiKey || process.env.LOCIZE_API_KEY || process.env.LOCIZE_KEY;
@@ -590,7 +590,7 @@ program
590
590
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
591
591
  .action((options) => {
592
592
  try {
593
- config = ini.parse(fs.readFileSync(options.configPath)) || config;
593
+ config = ini.parse(fs.readFileSync(options.configPath, 'utf-8')) || config;
594
594
  } catch (e) {}
595
595
 
596
596
  const apiKey = options.apiKey || config.apiKey || process.env.LOCIZE_API_KEY || process.env.LOCIZE_KEY;
@@ -637,7 +637,7 @@ program
637
637
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
638
638
  .action((namespace, options) => {
639
639
  try {
640
- config = ini.parse(fs.readFileSync(options.configPath)) || config;
640
+ config = ini.parse(fs.readFileSync(options.configPath, 'utf-8')) || config;
641
641
  } catch (e) {}
642
642
 
643
643
  const apiKey = options.apiKey || config.apiKey || process.env.LOCIZE_API_KEY || process.env.LOCIZE_KEY;
@@ -685,7 +685,7 @@ program
685
685
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
686
686
  .action((fileOrDirectory, options) => {
687
687
  try {
688
- config = ini.parse(fs.readFileSync(options.configPath)) || config;
688
+ config = ini.parse(fs.readFileSync(options.configPath, 'utf-8')) || config;
689
689
  } catch (e) {}
690
690
 
691
691
  fileOrDirectory = fileOrDirectory || '.';
@@ -277,7 +277,7 @@ const convertToFlatFormat = (opt, data, lng, cb) => {
277
277
  return;
278
278
  }
279
279
  if (opt.format === 'laravel') {
280
- cb(null, flatten(laravel2js(data.toString())));
280
+ laravel2js(data.toString(), (err, res) => cb(err, flatten(res)));
281
281
  return;
282
282
  }
283
283
  if (opt.format === 'properties') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "locize-cli",
3
- "version": "7.14.9",
3
+ "version": "7.14.11",
4
4
  "description": "locize cli to import locales",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -22,7 +22,7 @@
22
22
  "https-proxy-agent": "5.0.1",
23
23
  "ini": "3.0.1",
24
24
  "js-yaml": "4.1.0",
25
- "laravelphp": "2.0.3",
25
+ "laravelphp": "2.0.4",
26
26
  "lodash.clonedeep": "4.5.0",
27
27
  "mkdirp": "2.1.6",
28
28
  "node-fetch": "2.7.0",
@@ -34,7 +34,7 @@
34
34
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.19.3/xlsx-0.19.3.tgz"
35
35
  },
36
36
  "devDependencies": {
37
- "eslint": "8.50.0",
37
+ "eslint": "8.51.0",
38
38
  "gh-release": "7.0.2",
39
39
  "pkg": "5.8.1"
40
40
  },