@willbooster/tree-sitter-html 12.0.0 → 14.0.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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Test](https://github.com/WillBooster/tree-sitter-html/actions/workflows/test.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-html/actions/workflows/test.yml)
6
6
  [![Test rust](https://github.com/WillBooster/tree-sitter-html/actions/workflows/test-rust.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-html/actions/workflows/test-rust.yml)
7
7
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
8
- [![wbfy](https://img.shields.io/badge/wbfy-21.0.0-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
8
+ [![wbfy](https://img.shields.io/badge/wbfy-21.3.0-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
9
9
  [![crates.io](https://img.shields.io/crates/v/willbooster-tree-sitter-html.svg)](https://crates.io/crates/willbooster-tree-sitter-html)
10
10
 
11
11
  HTML grammar 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 is based on upstream's version 0.23.2 grammar and external scanner and generates the parser with the
16
16
  [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator. The parser carries that fork's own ABI
17
- number `0x5742000b`, so it loads with the WillBooster runtime, version 15.0.0 or later in the 15.x series
17
+ number `0x5742000c`, so it loads with the WillBooster runtime, version 17.0.1 or later in the 17.x series
18
18
  ([willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter),
19
19
  [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter)); upstream's runtime rejects
20
20
  it. Input that contains NUL characters can parse to a different tree than with upstream's 0.23.2 parser, because the
@@ -47,11 +47,6 @@ and processing instructions are siblings, and explicit void-element end tags are
47
47
  In SVG/MathML content outside HTML integration points, HTML breakout start tags such as `<p>` and `<span>` implicitly
48
48
  close the foreign ancestors. The same applies to `<font>` with a `color`, `face`, or `size` attribute and to `</br>` or
49
49
  `</p>`. Later end tags for those foreign ancestors become `erroneous_end_tag` nodes.
50
- Scanner serialization stores the open-tag stack from its innermost tag, compressing runs of identical tags, so active
51
- script and style elements retain their identities when deeply nested. When distinct tags exceed the fixed-size
52
- buffer, serialization prioritizes inner tags and outer namespace boundaries, replacing ordinary outer tags with unknown
53
- runs. Custom tag names are retained in full when they fit the remaining buffer. Names that exceed the buffer are
54
- omitted along with older tags. Lost tag identities can still produce recovery errors when those tags close.
55
50
  Malformed input after a void element can replace its enclosing element with an `ERROR` node during recovery.
56
51
 
57
52
  Attribute values use distinct `unquoted_attribute_value`, `singlequoted_attribute_value`, and
@@ -68,14 +63,14 @@ the value, so `noval= bool` remains one attribute with the unquoted value `bool`
68
63
  ## Support Scope
69
64
 
70
65
  This fork maintains only full parsing: valid input yields a correct tree, and invalid input yields `ERROR` or `MISSING`
71
- nodes without crashing, hanging, or taking more than linear time. Incremental parsing works as in upstream tree-sitter
72
- but is not tested here, and no queries (highlights, locals, injections, tags) are shipped. Node types, field names, and
73
- the trees that error recovery produces may change; such changes are released as new major versions.
66
+ nodes without crashing, hanging, or taking more than linear time. Incremental parsing and reuse of an earlier tree are
67
+ unsupported. No queries (highlights, locals, injections, tags) are shipped. Node types, field names, and the trees that
68
+ error recovery produces may change; such changes are released as new major versions.
74
69
 
75
70
  ## Usage
76
71
 
77
72
  The npm package ships `tree-sitter-html.wasm` for
78
- [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 15.0.0 or later in the 15.x series, which runs in Node.js, Bun, browsers, and Cloudflare Workers.
73
+ [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 17.0.1 or later in the 17.x series, which runs in Node.js, Bun, browsers, and Cloudflare Workers.
79
74
  In Node.js and Bun, load the grammar from its path:
80
75
 
81
76
  ```js
@@ -121,10 +116,9 @@ In Rust, depend on the [crate](https://crates.io/crates/willbooster-tree-sitter-
121
116
  [willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter), the runtime this package is tested and
122
117
  fuzzed with:
123
118
 
124
- ```toml
125
- [dependencies]
126
- tree-sitter = { package = "willbooster-tree-sitter", version = "15.0.0" }
127
- tree-sitter-html = { package = "willbooster-tree-sitter-html", version = "12" }
119
+ ```sh
120
+ cargo add willbooster-tree-sitter@17.0.1 --rename tree-sitter
121
+ cargo add willbooster-tree-sitter-html --rename tree-sitter-html
128
122
  ```
129
123
 
130
124
  ```rust
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-html",
3
- "version": "12.0.0",
3
+ "version": "14.0.0",
4
4
  "description": "HTML grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "html",
@@ -48,8 +48,8 @@
48
48
  "@types/bun": "1.4.4",
49
49
  "@vitest/browser-playwright": "5.0.5",
50
50
  "@willbooster/oxlint-config": "1.4.9",
51
- "@willbooster/wb": "23.0.0",
52
- "@willbooster/web-tree-sitter": "15.5.4",
51
+ "@willbooster/wb": "23.0.2",
52
+ "@willbooster/web-tree-sitter": "17.0.1",
53
53
  "conventional-changelog-conventionalcommits": "10.4.1",
54
54
  "lefthook": "2.2.2",
55
55
  "oxlint": "1.89.0",
@@ -57,10 +57,10 @@
57
57
  "playwright": "1.64.1",
58
58
  "semantic-release": "25.0.9",
59
59
  "vitest": "5.0.5",
60
- "wrangler": "4.151.1"
60
+ "wrangler": "4.152.0"
61
61
  },
62
62
  "peerDependencies": {
63
- "@willbooster/web-tree-sitter": "^15.0.0"
63
+ "@willbooster/web-tree-sitter": "^17.0.1"
64
64
  },
65
65
  "peerDependenciesMeta": {
66
66
  "@willbooster/web-tree-sitter": {
Binary file
package/tree-sitter.json CHANGED
@@ -18,7 +18,7 @@
18
18
  }
19
19
  ],
20
20
  "metadata": {
21
- "version": "12.0.0",
21
+ "version": "14.0.0",
22
22
  "license": "MIT",
23
23
  "description": "HTML grammar for tree-sitter",
24
24
  "authors": [