@xmldom/xmldom 0.9.0-beta.6 → 0.9.0-beta.7

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 CHANGED
@@ -4,11 +4,89 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [0.9.0-beta.6](https://github.com/xmldom/xmldom/compare/0.9.0-beta.5...0.9.0-beta.)
7
+ ## [0.9.0-beta.7](https://github.com/xmldom/xmldom/compare/0.9.0-beta.6...0.9.0-beta.7)
8
+
9
+ ### Feature
10
+
11
+ - Add `compareDocumentPosition` method from level 3 spec. [`#488`](https://github.com/xmldom/xmldom/pull/488)
12
+
13
+ ### Fixed
14
+
15
+ - `getAttribute` and `getAttributeNS` should return `null` (#477) [`#46`](https://github.com/xmldom/xmldom/issues/46)
16
+ - several issues in NamedNodeMap and Element (#482) [`#46`](https://github.com/xmldom/xmldom/issues/46)
17
+ - properly parse closing where the last attribute has no value [`#485`](https://github.com/xmldom/xmldom/pull/485) / [`#486`](https://github.com/xmldom/xmldom/issues/486)
18
+ - extend list of HTML entities [`#489`](https://github.com/xmldom/xmldom/pull/489)
19
+
20
+ BREAKING CHANGE: Iteration over attributes now happens in the right order and non-existing attributes now return `null` instead of undefined. THe same is true for the `namepsaceURI` and `prefix` of Attr nodes.
21
+ All of the changes are fixing misalignment with the DOM specs, so if you expected it to work as specified,
22
+ nothing should break for you.
23
+
24
+ ### Chore
25
+
26
+ - update multiple devDependencies
27
+ - Configure jest (correctly) and wallaby [`#481`](https://github.com/xmldom/xmldom/pull/481) / [`#483`](https://github.com/xmldom/xmldom/pull/483)
28
+
29
+ Thank you, [@bulandent](https://github.com/bulandent), [@zorkow](https://github.com/zorkow), for your contributions
30
+
31
+
32
+ ## [0.8.8](https://github.com/xmldom/xmldom/compare/0.8.7...0.8.8)
33
+
34
+ ### Fixed
35
+
36
+ - extend list of HTML entities [`#489`](https://github.com/xmldom/xmldom/pull/489)
37
+
38
+ Thank you, [@zorkow](https://github.com/zorkow), for your contributions
39
+
40
+ ## [0.7.11](https://github.com/xmldom/xmldom/compare/0.7.10...0.7.11)
41
+
42
+ ### Fixed
43
+
44
+ - extend list of HTML entities [`#489`](https://github.com/xmldom/xmldom/pull/489)
45
+
46
+ Thank you, [@zorkow](https://github.com/zorkow), for your contributions
47
+
48
+
49
+ ## [0.8.7](https://github.com/xmldom/xmldom/compare/0.8.6...0.8.7)
50
+
51
+ ### Fixed
52
+
53
+ - properly parse closing where the last attribute has no value [`#485`](https://github.com/xmldom/xmldom/pull/485) / [`#486`](https://github.com/xmldom/xmldom/issues/486)
54
+
55
+ Thank you, [@bulandent](https://github.com/bulandent), for your contributions
56
+
57
+
58
+ ## [0.7.10](https://github.com/xmldom/xmldom/compare/0.7.9...0.7.10)
59
+
60
+ ### Fixed
61
+
62
+ - properly parse closing where the last attribute has no value [`#485`](https://github.com/xmldom/xmldom/pull/485) / [`#486`](https://github.com/xmldom/xmldom/issues/486)
63
+
64
+ Thank you, [@bulandent](https://github.com/bulandent), for your contributions
65
+
66
+
67
+ ## [0.8.6](https://github.com/xmldom/xmldom/compare/0.8.5...0.8.6)
68
+
69
+ ### Fixed
70
+
71
+ - Properly check nodes before replacement [`#457`](https://github.com/xmldom/xmldom/pull/457) / [`#455`](https://github.com/xmldom/xmldom/issues/455) / [`#456`](https://github.com/xmldom/xmldom/issues/456)
72
+
73
+ Thank you, [@edemaine](https://github.com/edemaine), [@pedro-l9](https://github.com/pedro-l9), for your contributions
74
+
75
+
76
+ ## [0.7.9](https://github.com/xmldom/xmldom/compare/0.7.8...0.7.9)
77
+
78
+ ### Fixed
79
+
80
+ - Properly check nodes before replacement [`#457`](https://github.com/xmldom/xmldom/pull/457) / [`#455`](https://github.com/xmldom/xmldom/issues/455) / [`#456`](https://github.com/xmldom/xmldom/issues/456)
81
+
82
+ Thank you, [@edemaine](https://github.com/edemaine), [@pedro-l9](https://github.com/pedro-l9), for your contributions
83
+
84
+
85
+ ## [0.9.0-beta.6](https://github.com/xmldom/xmldom/compare/0.9.0-beta.5...0.9.0-beta.6)
8
86
 
9
87
  ### Fixed
10
88
 
11
- - Properly check nodes before replacement [`#457`](https://github.com/xmldom/xmldom/pull/457) / [`#455`](https://github.com/xmldom/xmldom/issues/455)
89
+ - Properly check nodes before replacement [`#457`](https://github.com/xmldom/xmldom/pull/457) / [`#455`](https://github.com/xmldom/xmldom/issues/455) / [`#456`](https://github.com/xmldom/xmldom/issues/456)
12
90
 
13
91
  Thank you, [@edemaine](https://github.com/edemaine), [@pedro-l9](https://github.com/pedro-l9), for your contributions
14
92
 
@@ -361,6 +361,23 @@ var NAMESPACE = freeze({
361
361
  XMLNS: 'http://www.w3.org/2000/xmlns/',
362
362
  });
363
363
 
364
+ // https://www.w3.org/TR/xml-names/#ns-decl
365
+ // https://www.w3.org/TR/REC-xml/#NT-Name
366
+ // https://www.w3.org/TR/xml-names/#ns-qualnames
367
+ // NAME_START_CHAR without ":"
368
+ var QNAME_START_CHAR =
369
+ /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; //\u10000-\uEFFFF
370
+ //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
371
+ var NAME_START_CHAR = new RegExp('[:' + QNAME_START_CHAR.source.slice(1, -1) + ']');
372
+ var NAME_CHAR = new RegExp('[\\-\\.0-9' + NAME_START_CHAR.source.slice(1, -1) + '\\u00B7\\u0300-\\u036F\\u203F-\\u2040]');
373
+ //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
374
+ // NAME_CHAR without ":"
375
+ var QNAME_CHAR = new RegExp('[\\-\\.0-9' + QNAME_START_CHAR.source.slice(1, -1) + '\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*');
376
+ // https://www.w3.org/TR/xml-names/#NT-NCName
377
+ var NCNAME = QNAME_START_CHAR.source + QNAME_CHAR.source;
378
+ // https://www.w3.org/TR/xml-names/#ns-qualnames
379
+ var QNAME = new RegExp('^' + NCNAME + '(?::' + NCNAME + ')?$');
380
+
364
381
  exports.assign = assign;
365
382
  exports.find = find;
366
383
  exports.freeze = freeze;
@@ -372,4 +389,9 @@ exports.isHTMLRawTextElement = isHTMLRawTextElement;
372
389
  exports.isHTMLEscapableRawTextElement = isHTMLEscapableRawTextElement;
373
390
  exports.isHTMLVoidElement = isHTMLVoidElement;
374
391
  exports.MIME_TYPE = MIME_TYPE;
392
+ exports.NAME_CHAR = NAME_CHAR;
393
+ exports.NAME_START_CHAR = NAME_START_CHAR;
375
394
  exports.NAMESPACE = NAMESPACE;
395
+ exports.QNAME = QNAME;
396
+ exports.QNAME_CHAR = QNAME_CHAR;
397
+ exports.QNAME_START_CHAR = QNAME_START_CHAR;