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

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,101 @@ 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.8](https://github.com/xmldom/xmldom/compare/0.9.0-beta.7...0.9.0-beta.8)
8
8
 
9
9
  ### Fixed
10
10
 
11
- - Properly check nodes before replacement [`#457`](https://github.com/xmldom/xmldom/pull/457) / [`#455`](https://github.com/xmldom/xmldom/issues/455)
11
+ - fix: Throw DOMException when calling removeChild with invalid parameter [`#494`](https://github.com/xmldom/xmldom/pull/494) / [`#135`](https://github.com/xmldom/xmldom/issues/135)
12
+
13
+ BREAKING CHANGE: Previously it was possible (but not documented) to call `Node.removeChild` with any node in the tree,
14
+ and with certain exceptions, it would work. This is no longer the case: calling `Node.removeChild` with an argument that is not a direct child of the node that it is called from, will throw a NotFoundError DOMException, as it is described by the specs.
15
+
16
+ Thank you, [@noseworthy](https://github.com/noseworthy), [@davidmc24](https://github.com/davidmc24), for your contributions
17
+
18
+
19
+ ## [0.9.0-beta.7](https://github.com/xmldom/xmldom/compare/0.9.0-beta.6...0.9.0-beta.7)
20
+
21
+ ### Feature
22
+
23
+ - Add `compareDocumentPosition` method from level 3 spec. [`#488`](https://github.com/xmldom/xmldom/pull/488)
24
+
25
+ ### Fixed
26
+
27
+ - `getAttribute` and `getAttributeNS` should return `null` (#477) [`#46`](https://github.com/xmldom/xmldom/issues/46)
28
+ - several issues in NamedNodeMap and Element (#482) [`#46`](https://github.com/xmldom/xmldom/issues/46)
29
+ - 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)
30
+ - extend list of HTML entities [`#489`](https://github.com/xmldom/xmldom/pull/489)
31
+
32
+ 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.
33
+ All of the changes are fixing misalignment with the DOM specs, so if you expected it to work as specified,
34
+ nothing should break for you.
35
+
36
+ ### Chore
37
+
38
+ - update multiple devDependencies
39
+ - Configure jest (correctly) and wallaby [`#481`](https://github.com/xmldom/xmldom/pull/481) / [`#483`](https://github.com/xmldom/xmldom/pull/483)
40
+
41
+ Thank you, [@bulandent](https://github.com/bulandent), [@zorkow](https://github.com/zorkow), for your contributions
42
+
43
+
44
+ ## [0.8.8](https://github.com/xmldom/xmldom/compare/0.8.7...0.8.8)
45
+
46
+ ### Fixed
47
+
48
+ - extend list of HTML entities [`#489`](https://github.com/xmldom/xmldom/pull/489)
49
+
50
+ Thank you, [@zorkow](https://github.com/zorkow), for your contributions
51
+
52
+ ## [0.7.11](https://github.com/xmldom/xmldom/compare/0.7.10...0.7.11)
53
+
54
+ ### Fixed
55
+
56
+ - extend list of HTML entities [`#489`](https://github.com/xmldom/xmldom/pull/489)
57
+
58
+ Thank you, [@zorkow](https://github.com/zorkow), for your contributions
59
+
60
+
61
+ ## [0.8.7](https://github.com/xmldom/xmldom/compare/0.8.6...0.8.7)
62
+
63
+ ### Fixed
64
+
65
+ - 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)
66
+
67
+ Thank you, [@bulandent](https://github.com/bulandent), for your contributions
68
+
69
+
70
+ ## [0.7.10](https://github.com/xmldom/xmldom/compare/0.7.9...0.7.10)
71
+
72
+ ### Fixed
73
+
74
+ - 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)
75
+
76
+ Thank you, [@bulandent](https://github.com/bulandent), for your contributions
77
+
78
+
79
+ ## [0.8.6](https://github.com/xmldom/xmldom/compare/0.8.5...0.8.6)
80
+
81
+ ### Fixed
82
+
83
+ - 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)
84
+
85
+ Thank you, [@edemaine](https://github.com/edemaine), [@pedro-l9](https://github.com/pedro-l9), for your contributions
86
+
87
+
88
+ ## [0.7.9](https://github.com/xmldom/xmldom/compare/0.7.8...0.7.9)
89
+
90
+ ### Fixed
91
+
92
+ - 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)
93
+
94
+ Thank you, [@edemaine](https://github.com/edemaine), [@pedro-l9](https://github.com/pedro-l9), for your contributions
95
+
96
+
97
+ ## [0.9.0-beta.6](https://github.com/xmldom/xmldom/compare/0.9.0-beta.5...0.9.0-beta.6)
98
+
99
+ ### Fixed
100
+
101
+ - 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
102
 
13
103
  Thank you, [@edemaine](https://github.com/edemaine), [@pedro-l9](https://github.com/pedro-l9), for your contributions
14
104
 
@@ -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;