@xmldom/xmldom 0.9.9 → 0.9.10
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 +186 -70
- package/index.d.ts +144 -19
- package/lib/dom.js +705 -343
- package/lib/grammar.js +14 -0
- package/package.json +13 -10
package/lib/grammar.js
CHANGED
|
@@ -136,6 +136,11 @@ if (UNICODE_SUPPORT) {
|
|
|
136
136
|
// eslint-disable-next-line es5/no-unicode-code-point-escape
|
|
137
137
|
Char = reg('[', chars(Char), '\\u{10000}-\\u{10FFFF}', ']');
|
|
138
138
|
}
|
|
139
|
+
// Negation of Char: matches any character that is NOT a valid XML 1.0 Char.
|
|
140
|
+
// Derived directly from the Char character class above (after the unicode-support extension).
|
|
141
|
+
// XML 1.0 Char production [2]: #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
|
|
142
|
+
// @see https://www.w3.org/TR/xml/#NT-Char
|
|
143
|
+
var InvalidChar = new RegExp('[^' + chars(Char) + ']', UNICODE_SUPPORT ? 'u' : '');
|
|
139
144
|
|
|
140
145
|
var _SChar = /[\x20\x09\x0D\x0A]/;
|
|
141
146
|
var SChar_s = chars(_SChar);
|
|
@@ -397,6 +402,12 @@ var ExternalID_match = reg(
|
|
|
397
402
|
regg(PUBLIC, S, '(?<PubidLiteral>', PubidLiteral, ')', S, '(?<SystemLiteral>', SystemLiteral, ')')
|
|
398
403
|
)
|
|
399
404
|
);
|
|
405
|
+
// Full-string anchored matcher for requireWellFormed serializer checks
|
|
406
|
+
// https://w3c.github.io/DOM-Parsing/#xml-serializing-a-document-node
|
|
407
|
+
var PubidLiteral_match = reg('^', PubidLiteral, '$');
|
|
408
|
+
// Full-string anchored matcher for requireWellFormed serializer checks
|
|
409
|
+
// https://w3c.github.io/DOM-Parsing/#xml-serializing-a-document-node
|
|
410
|
+
var SystemLiteral_match = reg('^', SystemLiteral, '$');
|
|
400
411
|
|
|
401
412
|
// https://www.w3.org/TR/xml11/#NT-NDataDecl
|
|
402
413
|
// `[76] NDataDecl ::= S 'NDATA' S Name` [VC: Notation Declared]
|
|
@@ -520,6 +531,7 @@ exports.PEReference = PEReference;
|
|
|
520
531
|
exports.PI = PI;
|
|
521
532
|
exports.PUBLIC = PUBLIC;
|
|
522
533
|
exports.PubidLiteral = PubidLiteral;
|
|
534
|
+
exports.PubidLiteral_match = PubidLiteral_match;
|
|
523
535
|
exports.QName = QName;
|
|
524
536
|
exports.QName_exact = QName_exact;
|
|
525
537
|
exports.QName_group = QName_group;
|
|
@@ -528,6 +540,8 @@ exports.SChar_s = SChar_s;
|
|
|
528
540
|
exports.S_OPT = S_OPT;
|
|
529
541
|
exports.SYSTEM = SYSTEM;
|
|
530
542
|
exports.SystemLiteral = SystemLiteral;
|
|
543
|
+
exports.SystemLiteral_match = SystemLiteral_match;
|
|
544
|
+
exports.InvalidChar = InvalidChar;
|
|
531
545
|
exports.UNICODE_REPLACEMENT_CHARACTER = UNICODE_REPLACEMENT_CHARACTER;
|
|
532
546
|
exports.UNICODE_SUPPORT = UNICODE_SUPPORT;
|
|
533
547
|
exports.XMLDecl = XMLDecl;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmldom/xmldom",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.10",
|
|
4
4
|
"description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"w3c",
|
|
@@ -27,13 +27,16 @@
|
|
|
27
27
|
"index.d.ts",
|
|
28
28
|
"lib"
|
|
29
29
|
],
|
|
30
|
+
"config": {
|
|
31
|
+
"test_stack_size": 256
|
|
32
|
+
},
|
|
30
33
|
"scripts": {
|
|
31
34
|
"lint": "eslint examples lib test",
|
|
32
35
|
"format": "prettier --write examples lib test index.d.ts",
|
|
33
36
|
"format:check": "prettier --check examples lib test index.d.ts",
|
|
34
37
|
"changelog": "auto-changelog --unreleased-only",
|
|
35
38
|
"start": "nodemon --watch package.json --watch lib --watch test --exec 'npm --silent run test && npm --silent run lint'",
|
|
36
|
-
"test": "jest",
|
|
39
|
+
"test": "node --stack-size=$npm_package_config_test_stack_size ./node_modules/.bin/jest",
|
|
37
40
|
"fuzz": "jest --config=./jest.fuzz.config.js",
|
|
38
41
|
"test:types": "cd examples/typescript-node-es6 && ./pretest.sh 3 && ./pretest.sh 4 && ./pretest.sh 5 && node dist/index.js",
|
|
39
42
|
"testrelease": "npm test && eslint lib",
|
|
@@ -44,21 +47,21 @@
|
|
|
44
47
|
"node": ">=14.6"
|
|
45
48
|
},
|
|
46
49
|
"devDependencies": {
|
|
47
|
-
"@homer0/prettier-plugin-jsdoc": "10.0.
|
|
50
|
+
"@homer0/prettier-plugin-jsdoc": "10.0.1",
|
|
48
51
|
"auto-changelog": "2.5.0",
|
|
49
52
|
"eslint": "8.57.1",
|
|
50
53
|
"eslint-config-prettier": "10.1.8",
|
|
51
|
-
"eslint-plugin-anti-trojan-source": "1.1.
|
|
54
|
+
"eslint-plugin-anti-trojan-source": "1.1.2",
|
|
52
55
|
"eslint-plugin-es5": "1.5.0",
|
|
53
|
-
"eslint-plugin-n": "17.
|
|
54
|
-
"eslint-plugin-prettier": "5.5.
|
|
56
|
+
"eslint-plugin-n": "17.24.0",
|
|
57
|
+
"eslint-plugin-prettier": "5.5.5",
|
|
55
58
|
"get-stream": "6.0.1",
|
|
56
59
|
"jest": "29.7.0",
|
|
57
|
-
"nodemon": "3.1.
|
|
60
|
+
"nodemon": "3.1.14",
|
|
58
61
|
"np": "8.0.4",
|
|
59
|
-
"prettier": "3.
|
|
62
|
+
"prettier": "3.8.1",
|
|
60
63
|
"xmltest": "2.0.3",
|
|
61
|
-
"yauzl": "3.
|
|
64
|
+
"yauzl": "3.3.0"
|
|
62
65
|
},
|
|
63
66
|
"bugs": {
|
|
64
67
|
"url": "https://github.com/xmldom/xmldom/issues"
|
|
@@ -70,5 +73,5 @@
|
|
|
70
73
|
"tagPrefix": "",
|
|
71
74
|
"template": "./auto-changelog.hbs"
|
|
72
75
|
},
|
|
73
|
-
"packageManager": "npm@11.
|
|
76
|
+
"packageManager": "npm@11.12.1+sha512.cdca14b85d647b3192028d02aadbe82d75f79a446aceea9874be98e6d768f20ebd3555770a48d0e9906106007877bbc690f715e9372f2e2dc644a3c3157fb14c"
|
|
74
77
|
}
|