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