fast-xml-parser 3.21.0 → 4.0.0-beta.3

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