fast-xml-parser 3.21.1 → 4.0.0-beta.4

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