@willbooster/tree-sitter-xml 2.0.1 → 3.0.1
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/README.md +7 -5
- package/package.json +8 -8
- package/tree-sitter-dtd.wasm +0 -0
- package/tree-sitter-xml.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/WillBooster/tree-sitter-xml/actions/workflows/test.yml)
|
|
6
6
|
[](https://github.com/WillBooster/tree-sitter-xml/actions/workflows/test-rust.yml)
|
|
7
7
|
[](https://github.com/semantic-release/semantic-release)
|
|
8
|
-
[](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
|
|
9
9
|
[](https://crates.io/crates/willbooster-tree-sitter-xml)
|
|
10
10
|
|
|
11
11
|
XML and DTD grammars for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
|
|
@@ -14,7 +14,7 @@ to its authors and contributors. This is not an official release of that project
|
|
|
14
14
|
|
|
15
15
|
This fork builds on the grammars and queries of upstream's version 0.7.0 and generates the parsers with the
|
|
16
16
|
[WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator. The parsers carry that fork's own ABI
|
|
17
|
-
number (`
|
|
17
|
+
number (`0x57420007`) and load with that fork's runtime, version 10.0.3 or later in the 10.x series. The XML scanner
|
|
18
18
|
adapts to the generated array API with the change upstream itself made after 0.7.0. The parsers differ from
|
|
19
19
|
upstream's 0.7.0 packages in these ways:
|
|
20
20
|
|
|
@@ -23,6 +23,8 @@ upstream's 0.7.0 packages in these ways:
|
|
|
23
23
|
- Where a NUL character cannot be part of any token, the `ERROR` node covers it as it covers any other unexpected
|
|
24
24
|
character, without the unexpected-character node that upstream's parsers put inside it.
|
|
25
25
|
|
|
26
|
+
- Generic processing instructions accept multiline content and question marks up to the closing `?>`, including
|
|
27
|
+
when another instruction or markup immediately follows.
|
|
26
28
|
- Nonempty attribute values (`AttValue` and `PseudoAttValue`) and entity values (`EntityValue`) expose their full
|
|
27
29
|
unquoted value through the `content` field. This field points to an anonymous `content` node wrapping text and
|
|
28
30
|
references. Access references through this wrapper using the node API; references are not direct children of the
|
|
@@ -34,7 +36,7 @@ parses external DTD files.
|
|
|
34
36
|
## Usage
|
|
35
37
|
|
|
36
38
|
The npm package ships `tree-sitter-xml.wasm` and `tree-sitter-dtd.wasm` for
|
|
37
|
-
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version
|
|
39
|
+
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 10.0.3 or later in the 10.x series, which runs in Node.js, Bun, browsers, and Cloudflare Workers.
|
|
38
40
|
In Node.js and Bun, load the grammar from its path:
|
|
39
41
|
|
|
40
42
|
```js
|
|
@@ -83,8 +85,8 @@ fuzzed with:
|
|
|
83
85
|
|
|
84
86
|
```toml
|
|
85
87
|
[dependencies]
|
|
86
|
-
tree-sitter = { package = "willbooster-tree-sitter", version = "
|
|
87
|
-
tree-sitter-xml = { package = "willbooster-tree-sitter-xml", version = "
|
|
88
|
+
tree-sitter = { package = "willbooster-tree-sitter", version = "10.0.3" }
|
|
89
|
+
tree-sitter-xml = { package = "willbooster-tree-sitter-xml", version = "3" }
|
|
88
90
|
```
|
|
89
91
|
|
|
90
92
|
```rust
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-xml",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "XML & DTD grammars for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
@@ -48,16 +48,16 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@tsconfig/bun": "1.0.11",
|
|
51
|
-
"@types/bun": "1.4.
|
|
51
|
+
"@types/bun": "1.4.3",
|
|
52
52
|
"@vitest/browser-playwright": "5.0.3",
|
|
53
53
|
"@willbooster/oxfmt-config": "1.2.2",
|
|
54
54
|
"@willbooster/oxlint-config": "1.4.8",
|
|
55
|
-
"@willbooster/wb": "22.26.
|
|
56
|
-
"@willbooster/web-tree-sitter": "
|
|
55
|
+
"@willbooster/wb": "22.26.2",
|
|
56
|
+
"@willbooster/web-tree-sitter": "10.0.3",
|
|
57
57
|
"conventional-changelog-conventionalcommits": "10.4.0",
|
|
58
|
-
"lefthook": "2.2.
|
|
59
|
-
"oxfmt": "0.
|
|
60
|
-
"oxlint": "1.
|
|
58
|
+
"lefthook": "2.2.2",
|
|
59
|
+
"oxfmt": "0.73.0",
|
|
60
|
+
"oxlint": "1.88.0",
|
|
61
61
|
"oxlint-tsgolint": "7.0.2004",
|
|
62
62
|
"playwright": "1.63.0",
|
|
63
63
|
"semantic-release": "25.0.9",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"wrangler": "4.147.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@willbooster/web-tree-sitter": "^
|
|
69
|
+
"@willbooster/web-tree-sitter": "^10.0.3"
|
|
70
70
|
},
|
|
71
71
|
"peerDependenciesMeta": {
|
|
72
72
|
"@willbooster/web-tree-sitter": {
|
package/tree-sitter-dtd.wasm
CHANGED
|
Binary file
|
package/tree-sitter-xml.wasm
CHANGED
|
Binary file
|