@depup/fast-xml-parser 5.11.1-depup.0 → 5.11.2-depup.0
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 +4 -3
- package/changes.json +6 -2
- package/lib/fxp.cjs +1 -1
- package/lib/fxp.d.cts +1 -1
- package/lib/fxp.min.js +1 -1
- package/lib/fxp.min.js.map +1 -1
- package/lib/fxparser.min.js +1 -1
- package/lib/fxparser.min.js.map +1 -1
- package/package.json +9 -5
- package/src/fxp.d.ts +1 -1
- package/src/xmlparser/XMLParser.js +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/fast-xml-parser",
|
|
3
|
-
"version": "5.11.
|
|
3
|
+
"version": "5.11.2-depup.0",
|
|
4
4
|
"description": "Validate XML, Parse XML, Build XML without C/C++ based libraries (with updated dependencies)",
|
|
5
5
|
"main": "./lib/fxp.cjs",
|
|
6
6
|
"type": "module",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
93
|
"dependencies": {
|
|
94
|
-
"@nodable/entities": "^3.
|
|
94
|
+
"@nodable/entities": "^3.1.0",
|
|
95
95
|
"fast-xml-builder": "^1.3.1",
|
|
96
96
|
"is-unsafe": "^2.0.2",
|
|
97
97
|
"path-expression-matcher": "^1.6.2",
|
|
@@ -100,6 +100,10 @@
|
|
|
100
100
|
},
|
|
101
101
|
"depup": {
|
|
102
102
|
"changes": {
|
|
103
|
+
"@nodable/entities": {
|
|
104
|
+
"from": "^3.0.1",
|
|
105
|
+
"to": "^3.1.0"
|
|
106
|
+
},
|
|
103
107
|
"fast-xml-builder": {
|
|
104
108
|
"from": "^1.2.0",
|
|
105
109
|
"to": "^1.3.1"
|
|
@@ -109,10 +113,10 @@
|
|
|
109
113
|
"to": "^2.0.2"
|
|
110
114
|
}
|
|
111
115
|
},
|
|
112
|
-
"depsUpdated":
|
|
116
|
+
"depsUpdated": 3,
|
|
113
117
|
"originalPackage": "fast-xml-parser",
|
|
114
|
-
"originalVersion": "5.11.
|
|
115
|
-
"processedAt": "2026-
|
|
118
|
+
"originalVersion": "5.11.2",
|
|
119
|
+
"processedAt": "2026-09-29T08:14:25.522Z",
|
|
116
120
|
"smokeTest": "passed"
|
|
117
121
|
}
|
|
118
122
|
}
|
package/src/fxp.d.ts
CHANGED
|
@@ -216,7 +216,7 @@ export type EntityDecoderOptions = {
|
|
|
216
216
|
addInputEntities: (entities: Record<string, string>) => void;
|
|
217
217
|
reset: () => void;
|
|
218
218
|
decode: (text: string) => string;
|
|
219
|
-
setXmlVersion: (version:
|
|
219
|
+
setXmlVersion: (version: number) => void;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
export type X2jOptions = {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* global Uint8Array */
|
|
1
2
|
import { buildOptions } from './OptionsBuilder.js';
|
|
2
3
|
import OrderedObjParser from './OrderedObjParser.js';
|
|
3
4
|
import prettify from './node2json.js';
|
|
@@ -18,7 +19,12 @@ export default class XMLParser {
|
|
|
18
19
|
*/
|
|
19
20
|
parse(xmlData, validationOption) {
|
|
20
21
|
if (typeof xmlData !== "string" && xmlData.toString) {
|
|
21
|
-
xmlData
|
|
22
|
+
if (xmlData instanceof Uint8Array &&
|
|
23
|
+
!(typeof Buffer !== "undefined" && Buffer.isBuffer(xmlData))) {
|
|
24
|
+
xmlData = new TextDecoder("utf-8", { ignoreBOM: true }).decode(xmlData);
|
|
25
|
+
} else {
|
|
26
|
+
xmlData = xmlData.toString();
|
|
27
|
+
}
|
|
22
28
|
} else if (typeof xmlData !== "string") {
|
|
23
29
|
throw new Error("XML data is accepted in String or Bytes[] form.")
|
|
24
30
|
}
|