@codemirror/language 6.11.2 → 6.11.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 6.11.3 (2025-08-15)
2
+
3
+ ### Bug fixes
4
+
5
+ Make the stream parser user 4 times smaller chunks to reduce the amount of re-parsed code on changes.
6
+
1
7
  ## 6.11.2 (2025-06-27)
2
8
 
3
9
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -2340,7 +2340,7 @@ class Parse {
2340
2340
  advance() {
2341
2341
  let context = ParseContext.get();
2342
2342
  let parseEnd = this.stoppedAt == null ? this.to : Math.min(this.to, this.stoppedAt);
2343
- let end = Math.min(parseEnd, this.chunkStart + 2048 /* C.ChunkSize */);
2343
+ let end = Math.min(parseEnd, this.chunkStart + 512 /* C.ChunkSize */);
2344
2344
  if (context)
2345
2345
  end = Math.min(end, context.viewport.to);
2346
2346
  while (this.parsedPos < end)
@@ -2446,7 +2446,7 @@ class Parse {
2446
2446
  length: this.parsedPos - this.chunkStart,
2447
2447
  nodeSet,
2448
2448
  topID: 0,
2449
- maxBufferLength: 2048 /* C.ChunkSize */,
2449
+ maxBufferLength: 512 /* C.ChunkSize */,
2450
2450
  reused: this.chunkReused
2451
2451
  });
2452
2452
  tree = new common.Tree(tree.type, tree.children, tree.positions, tree.length, [[this.lang.stateAfter, this.lang.streamParser.copyState(this.state)]]);
package/dist/index.js CHANGED
@@ -2338,7 +2338,7 @@ class Parse {
2338
2338
  advance() {
2339
2339
  let context = ParseContext.get();
2340
2340
  let parseEnd = this.stoppedAt == null ? this.to : Math.min(this.to, this.stoppedAt);
2341
- let end = Math.min(parseEnd, this.chunkStart + 2048 /* C.ChunkSize */);
2341
+ let end = Math.min(parseEnd, this.chunkStart + 512 /* C.ChunkSize */);
2342
2342
  if (context)
2343
2343
  end = Math.min(end, context.viewport.to);
2344
2344
  while (this.parsedPos < end)
@@ -2444,7 +2444,7 @@ class Parse {
2444
2444
  length: this.parsedPos - this.chunkStart,
2445
2445
  nodeSet,
2446
2446
  topID: 0,
2447
- maxBufferLength: 2048 /* C.ChunkSize */,
2447
+ maxBufferLength: 512 /* C.ChunkSize */,
2448
2448
  reused: this.chunkReused
2449
2449
  });
2450
2450
  tree = new Tree(tree.type, tree.children, tree.positions, tree.length, [[this.lang.stateAfter, this.lang.streamParser.copyState(this.state)]]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemirror/language",
3
- "version": "6.11.2",
3
+ "version": "6.11.3",
4
4
  "description": "Language support infrastructure for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",