fast-xml-parser 3.20.3 → 4.0.0-beta.2

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 ADDED
@@ -0,0 +1,421 @@
1
+ Note: If you find missing information about particular minor version, that version must have been changed without any functional change in this library.
2
+
3
+ **⚠️ 4.0.0-beta.2 / 2021-11-19**
4
+ * rename `attrMap` to `attibutes` in parser output when `preserveOrder:true`
5
+ * supports unpairedTags
6
+
7
+ **⚠️ 4.0.0-beta.1 / 2021-11-18**
8
+ * Parser returns an array now
9
+ * to make the structure common
10
+ * and to return root level detail
11
+ * renamed `cdataTagName` to `cdataPropName`
12
+ * Added `commentPropName`
13
+ * fix typings
14
+
15
+ **⚠️ 4.0.0-beta.0 / 2021-11-16**
16
+ * Name change of many configuration properties.
17
+ * `attrNodeName` to `attributesGroupName`
18
+ * `attrValueProcessor` to `attributeValueProcessor`
19
+ * `parseNodeValue` to `parseTagValue`
20
+ * `ignoreNameSpace` to `removeNSPrefix`
21
+ * `numParseOptions` to `numberParseOptions`
22
+ * spelling correction for `suppressEmptyNode`
23
+ * Name change of cli and browser bundle to **fxparser**
24
+ * `isArray` option is added to parse a tag into array
25
+ * `preserveOrder` option is added to render XML in such a way that the result js Object maintains the order of properties same as in XML.
26
+ * Processing behaviour of `tagValueProcessor` and `attributeValueProcessor` are changes with extra input parameters
27
+ * j2xparser is renamed to XMLBuilder.
28
+ * You need to build XML parser instance for given options first before parsing XML.
29
+ * fix #327, #336: throw error when extra text after XML content
30
+ * fix #330: attribute value can have '\n',
31
+ * fix #350: attrbiutes can be separated by '\n' from tagname
32
+
33
+ 3.21.1 / 2021-10-31
34
+ * Correctly format JSON elements with a text prop but no attribute props ( By [haddadnj](https://github.com/haddadnj) )
35
+
36
+ 3.21.0 / 2021-10-25
37
+ * feat: added option `rootNodeName` to set tag name for array input when converting js object to XML.
38
+ * feat: added option `alwaysCreateTextNode` to force text node creation (by: *@massimo-ua*)
39
+ * ⚠️ feat: Better error location for unclosed tags. (by *@Gei0r*)
40
+ * Some error messages would be changed when validating XML. Eg
41
+ * `{ InvalidXml: "Invalid '[ \"rootNode\"]' found." }` → `{InvalidTag: "Unclosed tag 'rootNode'."}`
42
+ * `{ InvalidTag: "Closing tag 'rootNode' is expected inplace of 'rootnode'." }` → `{ InvalidTag: "Expected closing tag 'rootNode' (opened in line 1) instead of closing tag 'rootnode'."}`
43
+ * ⚠️ feat: Column in error response when validating XML
44
+ ```js
45
+ {
46
+ "code": "InvalidAttr",
47
+ "msg": "Attribute 'abc' is repeated.",
48
+ "line": 1,
49
+ "col": 22
50
+ }
51
+ ```
52
+
53
+ 3.20.1 / 2021-09-25
54
+ * update strnum package
55
+
56
+ 3.20.0 / 2021-09-10
57
+ * Use strnum npm package to parse string to number
58
+ * breaking change: long number will be parsed to scientific notation.
59
+
60
+ 3.19.0 / 2021-03-14
61
+ * License changed to MIT original
62
+ * Fix #321 : namespace tag parsing
63
+
64
+ 3.18.0 / 2021-02-05
65
+ * Support RegEx and function in arrayMode option
66
+ * Fix #317 : validate nested PI tags
67
+
68
+ 3.17.4 / 2020-06-07
69
+ * Refactor some code to support IE11
70
+ * Fix: `<tag >` space as attribute string
71
+
72
+ 3.17.3 / 2020-05-23
73
+ * Fix: tag name separated by \n \t
74
+ * Fix: throw error for unclosed tags
75
+
76
+ 3.17.2 / 2020-05-23
77
+ * Fixed an issue in processing doctype tag
78
+ * Fixed tagName where it should not have whitespace chars
79
+
80
+ 3.17.1 / 2020-05-19
81
+ * Fixed an issue in checking opening tag
82
+
83
+ 3.17.0 / 2020-05-18
84
+ * parser: fix '<' issue when it comes in aatr value
85
+ * parser: refactoring to remove dependency from regex
86
+ * validator: fix IE 11 issue for error messages
87
+ * updated dev dependencies
88
+ * separated benchmark module to sub-module
89
+ * breaking change: comments will not be removed from CDATA data
90
+
91
+ 3.16.0 / 2020-01-12
92
+ * validaor: fix for ampersand characters (#215)
93
+ * refactoring to support unicode chars in tag name
94
+ * update typing for validator error
95
+
96
+ 3.15.1 / 2019-12-09
97
+ * validaor: fix multiple roots are not allowed
98
+
99
+ 3.15.0 / 2019-11-23
100
+ * validaor: improve error messaging
101
+ * validator: add line number in case of error
102
+ * validator: add more error scenarios to make it more descriptive
103
+
104
+ 3.14.0 / 2019-10-25
105
+ * arrayMode for XML to JS obj parsing
106
+
107
+ 3.13.0 / 2019-10-02
108
+ * pass tag/attr name to tag/attr value processor
109
+ * inbuilt optional validation with XML parser
110
+
111
+ 3.12.21 / 2019-10-02
112
+ * Fix validator for unclosed XMLs
113
+ * move nimnjs dependency to dev dependency
114
+ * update dependencies
115
+
116
+ 3.12.20 / 2019-08-16
117
+ * Revert: Fix #167: '>' in attribute value as it is causing high performance degrade.
118
+
119
+ 3.12.19 / 2019-07-28
120
+ * Fix js to xml parser should work for date values. (broken: `tagValueProcessor` will receive the original value instead of string always) (breaking change)
121
+
122
+ 3.12.18 / 2019-07-27
123
+ * remove configstore dependency
124
+
125
+ 3.12.17 / 2019-07-14
126
+ * Fix #167: '>' in attribute value
127
+
128
+ 3.12.16 / 2019-03-23
129
+ * Support a new option "stopNodes". (#150)
130
+ Accept the list of tags which are not required to be parsed. Instead, all the nested tag and data will be assigned as string.
131
+ * Don't show post-install message
132
+
133
+ 3.12.12 / 2019-01-11
134
+ * fix : IE parseInt, parseFloat error
135
+
136
+ 3.12.11 / 2018-12-24
137
+ * fix #132: "/" should not be parsed as boolean attr in case of self closing tags
138
+
139
+ 3.12.9 / 2018-11-23
140
+ * fix #129 : validator should not fail when an atrribute name is 'length'
141
+
142
+ 3.12.8 / 2018-11-22
143
+ * fix #128 : use 'attrValueProcessor' to process attribute value in json2xml parser
144
+
145
+ 3.12.6 / 2018-11-10
146
+ * Fix #126: check for type
147
+
148
+ 3.12.4 / 2018-09-12
149
+ * Fix: include tasks in npm package
150
+
151
+ 3.12.3 / 2018-09-12
152
+ * Fix CLI issue raised in last PR
153
+
154
+ 3.12.2 / 2018-09-11
155
+ * Fix formatting for JSON to XML output
156
+ * Migrate to webpack (PR merged)
157
+ * fix cli (PR merged)
158
+
159
+ 3.12.0 / 2018-08-06
160
+ * Support hexadecimal values
161
+ * Support true number parsing
162
+
163
+ 3.11.2 / 2018-07-23
164
+ * Update Demo for more options
165
+ * Update license information
166
+ * Update readme for formatting, users, and spelling mistakes
167
+ * Add missing typescript definition for j2xParser
168
+ * refactoring: change filenames
169
+
170
+ 3.11.1 / 2018-06-05
171
+ * fix #93: read the text after self closing tag
172
+
173
+ 3.11.0 / 2018-05-20
174
+ * return defaultOptions if there are not options in buildOptions function
175
+ * added localeRange declaration in parser.d.ts
176
+ * Added support of cyrillic characters in validator XML
177
+ * fixed bug in validator work when XML data with byte order marker
178
+
179
+ 3.10.0 / 2018-05-13
180
+ * Added support of cyrillic characters in parsing XML to JSON
181
+
182
+ 3.9.11 / 2018-05-09
183
+ * fix https://github.com/NaturalIntelligence/fast-xml-parser/issues/80 fix nimn chars
184
+ * update package information
185
+ * fix https://github.com/NaturalIntelligence/fast-xml-parser/issues/86: json 2 xml parser : property with null value should be parsed to self closing tag.
186
+ * update online demo
187
+ * revert zombiejs to old version to support old version of node
188
+ * update dependencies
189
+
190
+ 3.3.10 / 2018-04-23
191
+ * fix #77 : parse even if closing tag has space before '>'
192
+ * include all css & js lib in demo app
193
+ * remove babel dependencies until needed
194
+
195
+ 3.3.9 / 2018-04-18
196
+ * fix #74 : TS2314 TypeScript compiler error
197
+
198
+ 3.3.8 / 2018-04-17
199
+ * fix #73 : IE doesn't support Object.assign
200
+
201
+ 3.3.7 / 2018-04-14
202
+ * fix: use let insted of const in for loop of validator
203
+ * Merge pull request
204
+ https://github.com/NaturalIntelligence/fast-xml-parser/issues/71 from bb/master
205
+ first draft of typings for typescript
206
+ https://github.com/NaturalIntelligence/fast-xml-parser/issues/69
207
+ * Merge pull request
208
+ https://github.com/NaturalIntelligence/fast-xml-parser/issues/70 from bb/patch-1
209
+ fix some typos in readme
210
+
211
+ 3.3.6 / 2018-03-21
212
+ * change arrow functions to full notation for IE compatibility
213
+
214
+ 3.3.5 / 2018-03-15
215
+ * fix https://github.com/NaturalIntelligence/fast-xml-parser/issues/67 : attrNodeName invalid behavior
216
+ * fix: remove decodeHTML char condition
217
+
218
+ 3.3.4 / 2018-03-14
219
+ * remove dependency on "he" package
220
+ * refactor code to separate methods in separate files.
221
+ * draft code for transforming XML to json string. It is not officially documented due to performance issue.
222
+
223
+ 3.3.0 / 2018-03-05
224
+ * use common default options for XML parsing for consistency. And add `parseToNimn` method.
225
+ * update nexttodo
226
+ * update README about XML to Nimn transformation and remove special notes about 3.x release
227
+ * update CONTRIBUTING.ms mentioning nexttodo
228
+ * add negative case for XML PIs
229
+ * validate xml processing instruction tags https://github.com/NaturalIntelligence/fast-xml-parser/issues/62
230
+ * nimndata: handle array with object
231
+ * nimndata: node with nested node and text node
232
+ * nimndata: handle attributes and text node
233
+ * nimndata: add options, handle array
234
+ * add xml to nimn data converter
235
+ * x2j: direct access property with tagname
236
+ * update changelog
237
+ * fix validator when single quote presents in value enclosed with double quotes or vice versa
238
+ * Revert "remove unneded nimnjs dependency, move opencollective to devDependencies and replace it
239
+ with more light opencollective-postinstall"
240
+ This reverts commit d47aa7181075d82db4fee97fd8ea32b056fe3f46.
241
+ * Merge pull request: https://github.com/NaturalIntelligence/fast-xml-parser/issues/63 from HaroldPutman/suppress-undefined
242
+ Keep undefined nodes out of the XML output : This is useful when you are deleting nodes from the JSON and rewriting XML.
243
+
244
+ 3.2.4 / 2018-03-01
245
+ * fix #59 fix in validator when open quote presents in attribute value
246
+ * Create nexttodo.md
247
+ * exclude static from bitHound tests
248
+ * add package lock
249
+
250
+ 3.2.3 / 2018-02-28
251
+ * Merge pull request from Delagen/master: fix namespaces can contain the same characters as xml names
252
+
253
+ 3.2.2 / 2018-02-22
254
+ * fix: attribute xmlns should not be removed if ignoreNameSpace is false
255
+ * create CONTRIBUTING.md
256
+
257
+ 3.2.1 / 2018-02-17
258
+ * fix: empty attribute should be parsed
259
+
260
+ 3.2.0 / 2018-02-16
261
+ * Merge pull request : Dev to Master
262
+ * Update README and version
263
+ * j2x:add performance test
264
+ * j2x: Remove extra empty line before closing tag
265
+ * j2x: suppress empty nodes to self closing node if configured
266
+ * j2x: provide option to give indentation depth
267
+ * j2x: make optional formatting
268
+ * j2x: encodeHTMLchat
269
+ * j2x: handle cdata tag
270
+ * j2x: handle grouped attributes
271
+ * convert json to xml
272
+ - nested object
273
+ - array
274
+ - attributes
275
+ - text value
276
+ * small refactoring
277
+ * Merge pull request: Update cli.js to let user validate XML file or data
278
+ * Add option for rendering CDATA as separate property
279
+
280
+ 3.0.1 / 2018-02-09
281
+ * fix CRLF: replace it with single space in attributes value only.
282
+
283
+ 3.0.0 / 2018-02-08
284
+ * change online tool with new changes
285
+ * update info about new options
286
+ * separate tag value processing to separate function
287
+ * make HTML decoding optional
288
+ * give an option to allow boolean attributes
289
+ * change cli options as per v3
290
+ * Correct comparison table format on README
291
+ * update v3 information
292
+ * some performance improvement changes
293
+ * Make regex object local to the method and move some common methods to util
294
+ * Change parser to
295
+ - handle multiple instances of CDATA
296
+ - make triming of value optionals
297
+ - HTML decode attribute and text value
298
+ - refactor code to separate files
299
+ * Ignore newline chars without RE (in validator)
300
+ * validate for XML prolog
301
+ * Validate DOCTYPE without RE
302
+ * Update validator to return error response
303
+ * Update README to add detail about V3
304
+ * Separate xmlNode model class
305
+ * include vscode debug config
306
+ * fix for repeated object
307
+ * fix attribute regex for boolean attributes
308
+ * Fix validator for invalid attributes
309
+ 2.9.4 / 2018-02-02
310
+ * Merge pull request: Decode HTML characters
311
+ * refactor source folder name
312
+ * ignore bundle / browser js to be published to npm
313
+ 2.9.3 / 2018-01-26
314
+ * Merge pull request: Correctly remove CRLF line breaks
315
+ * Enable to parse attribute in online editor
316
+ * Fix testing demo app test
317
+ * Describe parsing options
318
+ * Add options for online demo
319
+ 2.9.2 / 2018-01-18
320
+ * Remove check if tag starting with "XML"
321
+ * Fix: when there are spaces before / after CDATA
322
+
323
+ 2.9.1 / 2018-01-16
324
+ * Fix: newline should be replaced with single space
325
+ * Fix: for single and multiline comments
326
+ * validate xml with CDATA
327
+ * Fix: the issue when there is no space between 2 attributes
328
+ * Fix: https://github.com/NaturalIntelligence/fast-xml-parser/issues/33: when there is newline char in attr val, it doesn't parse
329
+ * Merge pull request: fix ignoreNamespace
330
+ * fix: don't wrap attributes if only namespace attrs
331
+ * fix: use portfinder for run tests, update deps
332
+ * fix: don't treat namespaces as attributes when ignoreNamespace enabled
333
+
334
+ 2.9.0 / 2018-01-10
335
+ * Rewrite the validator to handle large files.
336
+ Ignore DOCTYPE validation.
337
+ * Fix: When attribute value has equal sign
338
+
339
+ 2.8.3 / 2017-12-15
340
+ * Fix: when a tag has value along with subtags
341
+
342
+ 2.8.2 / 2017-12-04
343
+ * Fix value parsing for IE
344
+
345
+ 2.8.1 / 2017-12-01
346
+ * fix: validator should return false instead of err when invalid XML
347
+
348
+ 2.8.0 / 2017-11-29
349
+ * Add CLI option to ignore value conversion
350
+ * Fix variable name when filename is given on CLI
351
+ * Update CLI help text
352
+ * Merge pull request: xml2js: Accept standard input
353
+ * Test Node 8
354
+ * Update dependencies
355
+ * Bundle readToEnd
356
+ * Add ability to read from standard input
357
+
358
+ 2.7.4 / 2017-09-22
359
+ * Merge pull request: Allow wrap attributes with subobject to compatible with other parsers output
360
+
361
+ 2.7.3 / 2017-08-02
362
+ * fix: handle CDATA with regx
363
+
364
+ 2.7.2 / 2017-07-30
365
+ * Change travis config for yarn caching
366
+ * fix validator: when tag property is same as array property
367
+ * Merge pull request: Failing test case in validator for valid SVG
368
+
369
+ 2.7.1 / 2017-07-26
370
+ * Fix: Handle val 0
371
+
372
+ 2.7.0 / 2017-07-25
373
+ * Fix test for arrayMode
374
+ * Merge pull request: Add arrayMode option to parse any nodes as arrays
375
+
376
+ 2.6.0 / 2017-07-14
377
+ * code improvement
378
+ * Add unit tests for value conversion for attr
379
+ * Merge pull request: option of an attribute value conversion to a number (textAttrConversion) the same way as the textNodeConversion option does. Default value is false.
380
+
381
+ 2.5.1 / 2017-07-01
382
+ * Fix XML element name pattern
383
+ * Fix XML element name pattern while parsing
384
+ * Fix validation for xml tag element
385
+
386
+ 2.5.0 / 2017-06-25
387
+ * Improve Validator performance
388
+ * update attr matching regex
389
+ * Add perf tests
390
+ * Improve atrr regex to handle all cases
391
+
392
+ 2.4.4 / 2017-06-08
393
+ * Bug fix: when an attribute has single or double quote in value
394
+
395
+ 2.4.3 / 2017-06-05
396
+ * Bug fix: when multiple CDATA tags are given
397
+ * Merge pull request: add option "textNodeConversion"
398
+ * add option "textNodeConversion"
399
+
400
+ 2.4.1 / 2017-04-14
401
+ * fix tests
402
+ * Bug fix: preserve initial space of node value
403
+ * Handle CDATA
404
+
405
+ 2.3.1 / 2017-03-15
406
+ * Bug fix: when single self closing tag
407
+ * Merge pull request: fix .codeclimate.yml
408
+ * Update .codeclimate.yml - Fixed config so it does not error anymore.
409
+ * Update .codeclimate.yml
410
+
411
+ 2.3.0 / 2017-02-26
412
+ * Code improvement
413
+ * add bithound config
414
+ * Update usage
415
+ * Update travis to generate bundle js before running tests
416
+ * 1.Browserify, 2. add more tests for validator
417
+ * Add validator
418
+ * Fix CLI default parameter bug
419
+
420
+ 2.2.1 / 2017-02-05
421
+ * Bug fix: CLI default option