locize-cli 10.0.0 → 10.0.1
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/package.json +1 -1
- package/parseLocalLanguage.js +2 -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
|
+
## [10.0.1](https://github.com/locize/locize-cli/compare/v10.0.0...v10.0.1) - 2025-07-02
|
|
9
|
+
|
|
10
|
+
- respect opt.namespaces when parsing local namespaces
|
|
11
|
+
|
|
8
12
|
## [10.0.0](https://github.com/locize/locize-cli/compare/v9.1.4...v10.0.0) - 2025-06-30
|
|
9
13
|
|
|
10
14
|
- replace old/unmaintained yaml dependency
|
package/package.json
CHANGED
package/parseLocalLanguage.js
CHANGED
|
@@ -124,6 +124,7 @@ const parseLocalLanguage = (opt, lng, cb) => {
|
|
|
124
124
|
fPath = path.join(opt.path, dirPath.replace(nsMask, namespace), file);
|
|
125
125
|
}
|
|
126
126
|
if (!namespace) return clb(new Error(`namespace could not be found in ${fPath}`));
|
|
127
|
+
if (opt.namespaces && opt.namespaces.indexOf(namespace) < 0) return clb(null);
|
|
127
128
|
fs.readFile(fPath, (err, data) => {
|
|
128
129
|
if (err) return clb(err);
|
|
129
130
|
|
|
@@ -186,7 +187,7 @@ const parseLocalLanguage = (opt, lng, cb) => {
|
|
|
186
187
|
}, (err, ret) => {
|
|
187
188
|
if (err) return cb(err);
|
|
188
189
|
// xcstrings, returns array in array
|
|
189
|
-
const r = ret.reduce((prev, cur) => {
|
|
190
|
+
const r = ret.filter((r) => r !== undefined).reduce((prev, cur) => {
|
|
190
191
|
if (Array.isArray(cur)) {
|
|
191
192
|
prev = prev.concat(cur);
|
|
192
193
|
} else {
|