@willbooster/tree-sitter-embedded-template 1.1.0 → 3.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
@@ -16,14 +16,16 @@ It parses templating languages such as ERB and EJS, in which scripting code is e
16
16
  `<%` and `%>`. This fork extends upstream's version 0.25.0 grammar with EJS output-tag whitespace slurping
17
17
  and HTML/Perl injections for angle-delimited Embedded Perl tags.
18
18
  It generates the parser with the
19
- [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator. The parser loads only with that fork's runtime, version 2.0.0 or later
19
+ [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator. The parser loads only with that
20
+ fork's runtime, version 10.0.2 or later in the 10.x series
20
21
  ([willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter),
21
22
  [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter)); upstream's runtime rejects it.
22
23
 
23
24
  ## Usage
24
25
 
25
26
  The npm package ships `tree-sitter-embedded_template.wasm` for
26
- [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 2.0.0 or later, which runs in Node.js, Bun, browsers, and Cloudflare Workers. In Node.js and Bun, load the grammar from its path:
27
+ [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 10.0.2 or later in the 10.x series, which runs in Node.js, Bun, browsers, and Cloudflare Workers.
28
+ In Node.js and Bun, load the grammar from its path:
27
29
 
28
30
  ```js
29
31
  import { fileURLToPath } from 'node:url';
@@ -69,10 +71,8 @@ For HTML Embedded Perl templates, select `queries/injections-ep.scm` (or `INJECT
69
71
  CLI language discovery associates every `.ep` file with the `text.html.ep` scope, including non-HTML templates
70
72
  such as `mail.txt.ep`. The query always treats template content as HTML; configure a different content injection
71
73
  for non-HTML formats. The host must process combined injections and provide HTML and Perl parsers generated
72
- with WillBooster/tree-sitter, matching this runtime's ABI. The `tree-sitter highlight` command of WillBooster/tree-sitter
73
- orders highlights from these combined injections correctly from version 2.0.29; earlier versions can drop the
74
- highlights of the first region.
75
- Use `@willbooster/tree-sitter-html` or `willbooster-tree-sitter-html` for HTML. For Perl, check out this repository
74
+ with WillBooster/tree-sitter, matching this runtime's ABI. Use `@willbooster/tree-sitter-html` or
75
+ `willbooster-tree-sitter-html` for HTML. For Perl, check out this repository
76
76
  and [tree-sitter-perl/tree-sitter-perl](https://github.com/tree-sitter-perl/tree-sitter-perl). From the Perl checkout
77
77
  as the working directory, run `<embedded-template-checkout>/script/tree-sitter generate grammar.js`, replacing
78
78
  `<embedded-template-checkout>` with this repository's absolute checkout path. Then build the generated parser for
@@ -89,8 +89,8 @@ fuzzed with:
89
89
 
90
90
  ```toml
91
91
  [dependencies]
92
- tree-sitter = { package = "willbooster-tree-sitter", version = "2.0.0" }
93
- tree-sitter-embedded-template = { package = "willbooster-tree-sitter-embedded-template", version = "1" }
92
+ tree-sitter = { package = "willbooster-tree-sitter", version = "10.0.2" }
93
+ tree-sitter-embedded-template = { package = "willbooster-tree-sitter-embedded-template", version = "3" }
94
94
  ```
95
95
 
96
96
  ```rust
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-embedded-template",
3
- "version": "1.1.0",
3
+ "version": "3.0.0",
4
4
  "description": "Embedded template (ERB, EJS) grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -47,7 +47,7 @@
47
47
  "@willbooster/oxfmt-config": "1.2.2",
48
48
  "@willbooster/oxlint-config": "1.4.8",
49
49
  "@willbooster/wb": "22.26.1",
50
- "@willbooster/web-tree-sitter": "2.0.29",
50
+ "@willbooster/web-tree-sitter": "10.0.2",
51
51
  "conventional-changelog-conventionalcommits": "10.4.0",
52
52
  "lefthook": "2.2.1",
53
53
  "oxfmt": "0.72.0",
@@ -60,7 +60,7 @@
60
60
  "wrangler": "4.147.0"
61
61
  },
62
62
  "peerDependencies": {
63
- "@willbooster/web-tree-sitter": "^2.0.0"
63
+ "@willbooster/web-tree-sitter": "^10.0.2"
64
64
  },
65
65
  "peerDependenciesMeta": {
66
66
  "@willbooster/web-tree-sitter": {
Binary file
package/tree-sitter.json CHANGED
@@ -47,7 +47,7 @@
47
47
  }
48
48
  ],
49
49
  "metadata": {
50
- "version": "1.1.0",
50
+ "version": "3.0.0",
51
51
  "license": "MIT",
52
52
  "description": "Embedded template (ERB, EJS) grammar for tree-sitter",
53
53
  "authors": [