@mermanjs/tree-sitter-mermaid 0.3.0 → 0.3.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/CMakeLists.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  cmake_minimum_required(VERSION 3.13)
2
2
 
3
3
  project(tree-sitter-mermaid
4
- VERSION "0.3.0"
4
+ VERSION "0.3.1"
5
5
  DESCRIPTION "Tolerant Tree-sitter grammar and editor queries for Mermaid"
6
6
  HOMEPAGE_URL "https://github.com/Latias94/merman"
7
7
  LANGUAGES C)
package/Makefile CHANGED
@@ -5,7 +5,7 @@ endif
5
5
  LANGUAGE_NAME := tree-sitter-mermaid
6
6
  DESCRIPTION := Tolerant Tree-sitter grammar and editor queries for Mermaid
7
7
  HOMEPAGE_URL := https://github.com/Latias94/merman
8
- VERSION := 0.3.0
8
+ VERSION := 0.3.1
9
9
 
10
10
  SRC_DIR := src
11
11
  PARSER := $(SRC_DIR)/parser.c
package/README.md CHANGED
@@ -23,18 +23,18 @@ accept or render the document.
23
23
  | Node.js | [`@mermanjs/tree-sitter-mermaid`] | Native Node binding, TypeScript declarations, queries, and language WASM |
24
24
  | Browser or Worker | [`@mermanjs/tree-sitter-mermaid`] + [`web-tree-sitter`] | Language WASM and portable queries for the generic browser runtime |
25
25
  | Rust | [`tree-sitter-mermaid`] | `LANGUAGE`, `NODE_TYPES`, and the portable queries |
26
- | C/C++ and editors | Repository source, or a matching [GitHub Release] when available | Generated C parser/scanner, public header, Make, CMake, and pkg-config metadata |
26
+ | C/C++ and editors | Repository source, or a matching [GitHub Release] | Generated C parser/scanner, public header, Make, CMake, and pkg-config metadata |
27
27
 
28
28
  The grammar has its own version line, independent of Merman. Its npm and Cargo artifacts share that
29
29
  grammar version, but their registry names differ: the npm package is scoped under `@mermanjs`, while
30
30
  the Rust crate and C library retain the standard `tree-sitter-mermaid` name.
31
31
 
32
- This guide documents `0.3.0`, including the Mermaid 12.1 sequence endpoint fix and updated generator/runtime contract. Match the examples to the version installed in your project; earlier versions have their own tagged documentation. Custom query consumers should review the [migration guide](https://github.com/Latias94/merman/blob/main/distribution/tree-sitter-mermaid/docs/query-migration.md).
32
+ This guide documents `0.3.1`, retaining the Mermaid 12.1 sequence endpoint fix from 0.3.0 and updating the generator/runtime contract. Match the examples to the version installed in your project; earlier versions have their own tagged documentation. Custom query consumers should review the [migration guide](https://github.com/Latias94/merman/blob/main/distribution/tree-sitter-mermaid/docs/query-migration.md).
33
33
 
34
34
  ## Node.js
35
35
 
36
36
  ```console
37
- npm install tree-sitter@0.25.1 @mermanjs/tree-sitter-mermaid@0.3.0
37
+ npm install tree-sitter@0.25.1 @mermanjs/tree-sitter-mermaid@0.3.1
38
38
  ```
39
39
 
40
40
  With npm 12 or later, review and approve the native install scripts, then rebuild:
@@ -71,7 +71,7 @@ import Mermaid from '@mermanjs/tree-sitter-mermaid';
71
71
  ## Browser and Workers
72
72
 
73
73
  ```console
74
- npm install web-tree-sitter@0.27.0 @mermanjs/tree-sitter-mermaid@0.3.0
74
+ npm install web-tree-sitter@0.27.1 @mermanjs/tree-sitter-mermaid@0.3.1
75
75
  ```
76
76
 
77
77
  The package exports `@mermanjs/tree-sitter-mermaid/tree-sitter-mermaid.wasm`. Copy that asset to a
@@ -92,7 +92,7 @@ A no-build browser prototype can pin the exact grammar version on jsDelivr:
92
92
 
93
93
  ```js
94
94
  const language = await Language.load(
95
- 'https://cdn.jsdelivr.net/npm/@mermanjs/tree-sitter-mermaid@0.3.0/tree-sitter-mermaid.wasm',
95
+ 'https://cdn.jsdelivr.net/npm/@mermanjs/tree-sitter-mermaid@0.3.1/tree-sitter-mermaid.wasm',
96
96
  );
97
97
  ```
98
98
 
@@ -104,7 +104,7 @@ diagnostics, completion, navigation, and rename.
104
104
  ## Rust
105
105
 
106
106
  ```console
107
- cargo add tree-sitter@=0.27.0 tree-sitter-mermaid@=0.3.0
107
+ cargo add tree-sitter@=0.27.1 tree-sitter-mermaid@=0.3.1
108
108
  ```
109
109
 
110
110
  ```rust
@@ -146,6 +146,8 @@ int main(void) {
146
146
  }
147
147
  ```
148
148
 
149
+ Version 0.3.1 pairs with Tree-sitter CLI, Rust, and Web runtime 0.27.1; the Rust language adapter uses compatible `^0.1.9`, and the generated language ABI remains 15. See [query migration](docs/query-migration.md) when upgrading queries and the [grammar release guide](../../docs/release/TREE_SITTER_MERMAID.md) when maintaining the package.
150
+
149
151
  ## Compatibility
150
152
 
151
153
  | Contract | Version |
@@ -154,8 +156,10 @@ int main(void) {
154
156
  | Agentflow and Usecase syntax | 12.0.0 |
155
157
  | ZenUML Core syntax baseline | 3.50.1 |
156
158
  | Tree-sitter language ABI | 15 |
157
- | Tested Rust runtime | 0.27.0 |
158
- | Tested Web runtime | 0.27.0 |
159
+ | Generator CLI | 0.27.1 |
160
+ | Rust language crate requirement / audited version | ^0.1.9 / 0.1.9 |
161
+ | Tested Rust runtime | 0.27.1 |
162
+ | Tested Web runtime | 0.27.1 |
159
163
  | Native Node runtime contract | 0.25.x |
160
164
 
161
165
  Before 1.0, a minor release may change named nodes, fields, canonical captures, the language ABI, or
@@ -206,6 +210,18 @@ npm run check:wasm --prefix distribution/tree-sitter-mermaid
206
210
  npm run test:wasm --prefix distribution/tree-sitter-mermaid
207
211
  ```
208
212
 
213
+ Regenerate both parser sources and language WASM after changing the version in `tree-sitter.json`:
214
+ the pinned generator embeds that version in `TSLanguage.metadata`.
215
+
216
+ `metadata/provenance.json` pins the [WASI SDK 34 release](https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-34)
217
+ and its LLVM commit. The official Windows compiler reports `23.1.0-rc3`; Linux and macOS report
218
+ `23.1.0-wasi-sdk` because the [SDK build configuration](https://github.com/WebAssembly/wasi-sdk/blob/wasi-sdk-34/cmake/wasi-sdk-toolchain.cmake#L81-L91)
219
+ overrides `LLVM_VERSION_SUFFIX` only outside Windows. Generation verifies the SDK's `VERSION`
220
+ and the exact host-specific compiler banner, including the LLVM commit. `-fno-ident` prevents
221
+ that banner from entering the WASM producers section; `--no-wasm-opt` excludes unpinned optimizers.
222
+ Freshness checks compare complete source and WASM bytes without normalization or host-specific
223
+ artifact hashes.
224
+
209
225
  See the [development guide] and [release guide] for grammar ownership, generation, testing, and
210
226
  publication details.
211
227
 
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "package": {
4
4
  "name": "tree-sitter-mermaid",
5
- "version": "0.3.0",
5
+ "version": "0.3.1",
6
6
  "releaseState": "candidate"
7
7
  },
8
8
  "language": {
@@ -12,12 +12,17 @@
12
12
  "querySchemaVersion": 1
13
13
  },
14
14
  "toolchain": {
15
- "treeSitterCli": "0.27.0",
16
- "rustRuntime": "0.27.0",
15
+ "treeSitterCli": "0.27.1",
16
+ "rustRuntime": "0.27.1",
17
17
  "nodeRuntime": "0.25.1",
18
- "webRuntime": "0.27.0",
19
- "wasiSdk": "29.0",
20
- "wasiClang": "21.1.4-wasi-sdk"
18
+ "webRuntime": "0.27.1",
19
+ "wasiSdk": "34.0",
20
+ "wasiClang": {
21
+ "win32": "23.1.0-rc3",
22
+ "linux": "23.1.0-wasi-sdk",
23
+ "darwin": "23.1.0-wasi-sdk"
24
+ },
25
+ "wasiLlvmCommit": "895aa2c896ada719451be2e3673c83da8ddf1141"
21
26
  },
22
27
  "sources": [
23
28
  {
@@ -31,10 +36,10 @@
31
36
  {
32
37
  "id": "tree-sitter",
33
38
  "kind": "generator-source",
34
- "version": "0.27.0",
39
+ "version": "0.27.1",
35
40
  "repository": "https://github.com/tree-sitter/tree-sitter.git",
36
- "ref": "v0.27.0",
37
- "commit": "6070dbfefd326bd735e5683eb128cc1b57dad0c0",
41
+ "ref": "v0.27.1",
42
+ "commit": "10eb5ac119eec9cb4267a8e035066473983f5f3a",
38
43
  "usage": "Pinned generator and generated support headers",
39
44
  "license": "MIT",
40
45
  "legalComponentId": "tree-sitter-generator"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mermanjs/tree-sitter-mermaid",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Tolerant Tree-sitter grammar and editor queries for Mermaid",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -80,15 +80,15 @@
80
80
  "node-gyp-build": "4.8.4"
81
81
  },
82
82
  "devDependencies": {
83
- "node-gyp": "13.0.2",
83
+ "node-gyp": "13.1.0",
84
84
  "prebuildify": "6.0.1",
85
85
  "tree-sitter": "0.25.1",
86
- "tree-sitter-cli": "0.27.0",
87
- "web-tree-sitter": "0.27.0"
86
+ "tree-sitter-cli": "0.27.1",
87
+ "web-tree-sitter": "0.27.1"
88
88
  },
89
89
  "allowScripts": {
90
90
  "tree-sitter@0.25.1": true,
91
- "tree-sitter-cli@0.27.0": true
91
+ "tree-sitter-cli@0.27.1": true
92
92
  },
93
93
  "peerDependencies": {
94
94
  "tree-sitter": "^0.25.0"
package/src/parser.c CHANGED
@@ -11,7 +11,7 @@
11
11
  #elif defined(__clang__)
12
12
  #pragma clang optimize off
13
13
  #elif defined(__GNUC__)
14
- #pragma GCC optimize ("O0")
14
+ #pragma GCC optimize ("O0", "jump-tables")
15
15
  #endif
16
16
 
17
17
  #define LANGUAGE_VERSION 15
@@ -343417,7 +343417,7 @@ TS_PUBLIC const TSLanguage *tree_sitter_mermaid(void) {
343417
343417
  .metadata = {
343418
343418
  .major_version = 0,
343419
343419
  .minor_version = 3,
343420
- .patch_version = 0,
343420
+ .patch_version = 1,
343421
343421
  },
343422
343422
  };
343423
343423
  return &language;
Binary file
package/tree-sitter.json CHANGED
@@ -17,7 +17,7 @@
17
17
  }
18
18
  ],
19
19
  "metadata": {
20
- "version": "0.3.0",
20
+ "version": "0.3.1",
21
21
  "license": "MIT",
22
22
  "description": "Tolerant Tree-sitter grammar and editor queries for Mermaid",
23
23
  "authors": [