locize-cli 8.6.0 → 8.6.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/convertToFlatFormat.js +12 -3
- 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
|
+
## [8.6.1](https://github.com/locize/locize-cli/compare/v8.6.0...v8.6.1) - 2025-03-11
|
|
9
|
+
|
|
10
|
+
- fix .yml yaml format variats to address [104](https://github.com/locize/locize-cli/issues/104)
|
|
11
|
+
|
|
8
12
|
## [8.6.0](https://github.com/locize/locize-cli/compare/v8.5.1...v8.6.0) - 2025-03-10
|
|
9
13
|
|
|
10
14
|
- introduce .yml yaml format variats to address [104](https://github.com/locize/locize-cli/issues/104)
|
package/convertToFlatFormat.js
CHANGED
|
@@ -117,19 +117,28 @@ const convertToFlatFormat = (opt, data, lng, cb) => {
|
|
|
117
117
|
cb(null, data);
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
|
-
if (
|
|
120
|
+
if (
|
|
121
|
+
opt.format === 'yaml' ||
|
|
122
|
+
opt.format === 'yml'
|
|
123
|
+
) {
|
|
121
124
|
const d = data.toString();
|
|
122
125
|
if (!d || d === '') return cb(null, {});
|
|
123
126
|
cb(null, flatten(jsyaml.load(d)));
|
|
124
127
|
return;
|
|
125
128
|
}
|
|
126
|
-
if (
|
|
129
|
+
if (
|
|
130
|
+
opt.format === 'yaml-nested' ||
|
|
131
|
+
opt.format === 'yml-nested'
|
|
132
|
+
) {
|
|
127
133
|
const d = data.toString();
|
|
128
134
|
if (!d || d === '') return cb(null, {});
|
|
129
135
|
cb(null, flatten(jsyaml.load(d)));
|
|
130
136
|
return;
|
|
131
137
|
}
|
|
132
|
-
if (
|
|
138
|
+
if (
|
|
139
|
+
opt.format === 'yaml-rails' ||
|
|
140
|
+
opt.format === 'yml-rails'
|
|
141
|
+
) {
|
|
133
142
|
const d = data.toString();
|
|
134
143
|
if (!d || d === '') return cb(null, {});
|
|
135
144
|
const jsObj = jsyaml.load(d);
|