Bump @lezer/common dependency from ^1.3.0 to ^1.5.0 #21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/bump-lezer-common-to-1-5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
@codemirror/language@6.12.2already requires@lezer/common ^1.5.0. Because@lezer/highlightonly declares^1.3.0, package managers (especially those that don't aggressively deduplicate) install both1.4.xand1.5.xside-by-side in the same project.NodePropIDs are assigned from a module-level counter in@lezer/common. When two instances exist, IDs from instance A collide with IDs from instance B. This causesnode.type.prop(ruleNodeProp)insidegetStyleTags()to return an unrelated object (one with no.tagsproperty) instead of aRule, crashing the editor with:This is the root cause behind issues #14 and #19.
Fix
Align the
@lezer/commonminimum version with@codemirror/language(^1.5.0). The 1.5.0 release only added anIterMode.EnterBracketedfeature and abracketedflag for nested trees — neither of which@lezer/highlightuses — so this is a non-breaking bump.With a single version of
@lezer/commonin the tree, allNodePropIDs are consistent and the crash cannot occur.Stop sending me AI pull requests. I'm not interested in wasting my time with those.
This is not how semantic versioning works.
^1.3.0matches1.5.0. If your package manager is unable to properly deduplicate, use another package manager. I'm not going to re-release all packages that depend on package X whenever a new version of X is tagged.Pull request closed