@willbooster/web-tree-sitter 16.1.0 → 17.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 CHANGED
@@ -183,9 +183,9 @@ If everything is fine, file `tree-sitter-javascript.wasm` should be generated in
183
183
 
184
184
  ### Wasm compatibility
185
185
 
186
- `@willbooster/web-tree-sitter` accepts language ABI `0x5742000b`. Generate parsers with the CLI from the same release
187
- as the runtime, then rebuild their `.wasm` files. Parsers generated for other ABI versions are rejected, including
188
- those generated by upstream's CLI. Upgrade the runtime and grammar `.wasm` files together.
186
+ `@willbooster/web-tree-sitter` accepts language ABI `0x5742000c` and the previous ABI `0x5742000b`, whose parse tables
187
+ are a subset of those of `0x5742000c`. Generate parsers with the CLI from the same release as the runtime, then rebuild
188
+ their `.wasm` files. Parsers generated for other ABI versions are rejected, including those generated by upstream's CLI.
189
189
 
190
190
  ### Running .wasm in Node.js
191
191
 
@@ -3975,7 +3975,7 @@ var TRANSFER_BUFFER;
3975
3975
  var LANGUAGE_VERSION;
3976
3976
  function assertSupportedLanguage(language) {
3977
3977
  const version = C._ts_language_abi_version(language[0]);
3978
- if (version !== LANGUAGE_VERSION) {
3978
+ if (version < MIN_COMPATIBLE_VERSION || version > LANGUAGE_VERSION) {
3979
3979
  throw new Error(
3980
3980
  `Incompatible language version 0x${(version >>> 0).toString(16)}. Expected 0x${LANGUAGE_VERSION.toString(16)}.`
3981
3981
  );
@@ -4044,8 +4044,8 @@ var Parser = class {
4044
4044
  * If the language was not successfully assigned, an error will be thrown.
4045
4045
  * This happens if the language was generated with an incompatible
4046
4046
  * version of the Tree-sitter CLI. Check the language's version using
4047
- * {@link Language#abiVersion} and compare it to this library's
4048
- * {@link LANGUAGE_VERSION} constant.
4047
+ * {@link Language#abiVersion}; this library accepts versions from
4048
+ * {@link MIN_COMPATIBLE_VERSION} to {@link LANGUAGE_VERSION}.
4049
4049
  */
4050
4050
  setLanguage(language) {
4051
4051
  let address;