fast-xml-parser 5.0.5 → 5.0.6
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/README.md +3 -2
- package/package.json +1 -1
- package/src/cli/cli.js +4 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<small>Note: If you find missing information about particular minor version, that version must have been changed without any functional change in this library.</small>
|
|
2
2
|
|
|
3
|
+
**5.0.6 / 2025-02-20**
|
|
4
|
+
- fix cli output (By [Angel Delgado](https://github.com/angeld7))
|
|
5
|
+
- remove multiple JSON parsing
|
|
6
|
+
|
|
3
7
|
**5.0.5 / 2025-02-20**
|
|
4
8
|
- fix parsing of string starting with 'e' or 'E' by updating strnum
|
|
5
9
|
|
package/README.md
CHANGED
|
@@ -155,7 +155,7 @@ Bundle size
|
|
|
155
155
|
|
|
156
156
|
### Documents
|
|
157
157
|
<table>
|
|
158
|
-
<tr><td>v3</td><td>v4</td><td>v6</td></tr>
|
|
158
|
+
<tr><td>v3</td><td>v4 and v5</td><td>v6</td></tr>
|
|
159
159
|
<tr>
|
|
160
160
|
<td>
|
|
161
161
|
<a href="./docs/v3/docs.md">documents</a>
|
|
@@ -179,7 +179,8 @@ Bundle size
|
|
|
179
179
|
</tr>
|
|
180
180
|
</table>
|
|
181
181
|
|
|
182
|
-
**note**: version
|
|
182
|
+
**note**: version 6 is released with version 4 for experimental use. Based on it's demand, it'll be developed and the features can be different in final release.
|
|
183
|
+
Version 5 has the same functionalities as version 4.
|
|
183
184
|
|
|
184
185
|
## Performance
|
|
185
186
|
<small>negative means error</small>
|
package/package.json
CHANGED
package/src/cli/cli.js
CHANGED
|
@@ -46,23 +46,21 @@ if (process.argv[2] === '--help' || process.argv[2] === '-h') {
|
|
|
46
46
|
|
|
47
47
|
const callback = function(xmlData) {
|
|
48
48
|
let output = '';
|
|
49
|
-
if (
|
|
50
|
-
const parser = new XMLParser(options);
|
|
51
|
-
output = parser.parse(xmlData,validate);
|
|
52
|
-
} else if (validateOnly) {
|
|
49
|
+
if (validateOnly) {
|
|
53
50
|
output = XMLValidator.validate(xmlData);
|
|
54
51
|
process.exitCode = output === true ? 0 : 1;
|
|
55
|
-
}
|
|
52
|
+
} else {
|
|
56
53
|
const parser = new XMLParser(options);
|
|
57
54
|
output = JSON.stringify(parser.parse(xmlData,validate), null, 4);
|
|
58
55
|
}
|
|
59
56
|
if (outputFileName) {
|
|
60
57
|
writeToFile(outputFileName, output);
|
|
61
58
|
} else {
|
|
62
|
-
console.log(
|
|
59
|
+
console.log(output);
|
|
63
60
|
}
|
|
64
61
|
};
|
|
65
62
|
|
|
63
|
+
|
|
66
64
|
try {
|
|
67
65
|
|
|
68
66
|
if (!fileName) {
|