Skip to content

v0.54.0 - #10023

Merged
potatowagon merged 1 commit into
mainfrom
0.54.0__release
Dec 2, 2026
Merged

v0.54.0#10023
potatowagon merged 1 commit into
mainfrom
0.54.0__release

Conversation

@potatowagon

@potatowagon potatowagon commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

v0.54.0 is the monthly release and collects the work since v0.53.0. Its headline is @lexical/y, an experimental collaboration binding for Yjs 14 (@y/y) that ships to npm for the first time in this release, with headless, migration, offline and server entry points beside it. Around that, the release is a large correctness pass over Markdown export escaping, HTML import, text entities, tables and the reconciler; it adds block handles for showing a document to a model, mark flavors, QuoteContainerNode and $deepCopy; and it drops @experimental from the DOM import pipeline, named slots, compact JSON export and the $config serialization schema.

Upgrading from v0.53.0: one breaking change can affect you. The CJK-friendly Markdown punctuation default (#9735) is the only breaking entry outside @lexical/y. Every other one below is in @lexical/y, which did not exist in v0.53.0, so those apply only to apps that tracked it through nightly or pkg.pr.new builds.

Breaking Changes

Markdown — affects every app that imports or exports Markdown

  • @lexical/markdown, @lexical/mdast: emphasis beside CJK punctuation now reads as CJK writers mean it, following the CommonMark CJK-friendly amendment (#9735). **你好。**世界 imports as bold where CommonMark reads literal asterisks. Export still writes strict-CommonMark-safe Markdown by default.
    • The four @lexical/markdown entry points take an options object in the position that took shouldPreserveNewLines: punctuation is 'cjk-friendly' (import default) or 'strict-commonmark' (export default). MdastExtension takes importPunctuation and exportPunctuation.
    • Migration: Markdown stored by an earlier version with an emoji (@lexical/mdast only) or a text variation selector at the inner edge of a run beside a letter — Hello**🎉 launch**, **©︎**2024 — now imports with literal markers. Import it with punctuation: 'strict-commonmark' to keep the old reading.
    • Detect: calls to $convertFromMarkdownString / $generateNodesFromMarkdownString that read stored Markdown; in types, that parameter is now boolean | MarkdownImportOptions (TS2345/TS2322 on mocks and pass-throughs).
    • @lexical/mdast now needs micromark-core-commonmark 2.0.4 and mdast-util-to-markdown 2.2.1.

@lexical/y — new package; these apply only to nightly/preview users

The binding's stored layout moved twice in this release and the floor moved with it, so a room stored by an earlier preview opens read-only until its server migrates it.

  • Store format runs as paired runs (layout 3) — MIN_LAYOUT, LAYOUT_VERSION and SEED_LAYOUT are 3 (#9777).
  • Store NodeState values on text as paired runs (layout 4) — all three constants are 4 (#9884).
    • Migration for both: upgrade every client of a room together. A server migrates each room as it loads it, before serving it, with prepareYRoom (@lexical/y/server) or migrateYState (@lexical/y/migrate); the default steps now include 2to3 and 3to4, and a step list of your own must add them in that order (after 1to2 for a layout 1 room). Keep the generation fence (checkYSession) on every relay, and replace the incarnation of rooms not yet seeded (needsNewIncarnation(room, SEED_LAYOUT)): the seed layout changed. Clear an app UndoManager at the migration with onYMigrationEpoch(doc, fn, root?).
    • Detect: rooms recording lexical-y:1/:2/:3 but not :4; UNSUPPORTED_LAYOUT_WARNING with reason: 'older'.
  • clientIDRange and ClientIDRange are gone (#9884). Every client id is a 53-bit Yjs 14 id, so a server on yrs (y-crdt) needs yrs 0.28 or later — earlier versions truncate 53-bit ids and an author's content comes back duplicated on reconnect. Delete the option from every config and the 'range' case from writer-warning handlers.
  • The warning API is frozen with open codes (#9766). YWarningCode is any string, YWarning<C> is generic, and YWarningData<C> gains a permanent {reason: 'other'} fallback. Narrow with isYWarning(value, CODE) before reading data; comparing .code after isYWarning(value) leaves data unknown. LAYOUT_VERSION is typed number. Flow drops YWarningOf. Direct Yjs writes below the binding root are unsupported (RAW_YJS_WRITE_WARNING in development builds).
  • The choices an app must make are now required (#9925): YBindingOptions.onStatus, YCollabInput.onYStatus and YCollabInput.synced (a handler, or null); HeadlessYConfig.onWarn; migrateYState's options.pending ('return' or 'discard', and the result is a union on split); prepareYRoom's result is a union on changed with everything to store under write. configExtension(YCollabExtension, ...) without onYStatus compiles but throws at build — the new @lexical/y-collab-status ESLint rule, in the recommended config, catches it.
  • @lexical/y/offline reshaped (#9925, #9924): markSynced() moves onto serverEpoch()'s 'same' verdict; attachYOfflineSession requires loaded, stopSync and one offline value in place of stage/store/persistEdits/keep; replayUnsyncedEdits and recoverYOfflineEdits require leftovers and autoReplay, with wrapLeftoversAsQuote(label) as a ready wrapper; YOfflineError is a union by code; store.clear requires slots and captures.

New APIs & Features

  • @lexical/y — the experimental Yjs 14 binding itself (#9400), keeping concurrent typing through block splits, joins, retypes and link changes. Entry points: @lexical/y (binding and extension), /headless (seed, edit and read without an editor, #9437), /migrate (frozen layout steps, #9766), /offline (IndexedDB persistence and offline replay, #9899), /server (prepareYRoom, checkYSession, quarantine records). Also from it: LexicalWarning and DEFER_COMPOSITION_MERGE_TAG in lexical, and BlockIdExtension's repairTransforms option.
  • Block handles, for showing a document to a model (#9531): $getBlockHandle(node) gives a block the shortest unambiguous prefix of a hash of its id — about 3–4 o200k tokens against 14 for a 21-character id — with $getBlockHandles() and $resolveBlockHandle(handle, {read}), which returns found / not-found / ambiguous / invalid rather than throwing. BlockIdHTMLExtension gains a handles option.
  • lexical: editorState.toJSON({compact, editor}) exports with the editor active, so a node whose exportJSON calls $getEditor() needs no wrapping read (#9941); @lexical/file's serializedDocumentFromEditorState takes the same editor option.
  • lexical: $deepCopy(node) copies a node with its whole subtree, named slots and NodeState, for features such as "Duplicate block" (#9936).
  • @lexical/mark: mark flavors — defineMarkExtension makes one extension per kind of annotation (comments, suggestions, highlights), each on its own NodeState key, with registerMarkIDsListener and MarkBaseExtension (#9496); isMarkIDShown chooses which ids render, for hiding resolved threads while their ids stay in the document (#9489).
  • @lexical/rich-text (experimental): QuoteContainerNode, a <blockquote> that holds blocks and declares it, with QuoteContainerReplacementExtension, QUOTE_CONTAINER for Markdown and MdastQuoteContainerExtension (#9913).

No longer experimental

#9980 drops @experimental from APIs that have shipped unchanged for several releases: the DOM import pipeline (DOMImportExtension, defineImportRule, CoreImportExtension, the node packages' import rules and schemas, ClipboardImportExtension), DOMRenderExtension, the shadow DOM helpers, setDOMUnmanaged/isDOMUnmanaged, keyboard shortcuts, named slots ($setSlot, $getSlot, $dfsWithSlots, DOMSlot/$getDOMSlot), compact JSON export ($withCompactExport, $exportNodeJSON) and the $config serialization schema.

Behavior changes to check before upgrading

Markdown export escaping, reversing v0.53.0's over-escaping

  • A literal bracket is escaped only where it would start a link, image, link reference definition or check-list item, so [1], done [x] and array[0] export as typed again (#9600); < and & likewise, so <3, 1<2 and Tom & survive (#9770). Markdown written by v0.53.0 still imports unchanged.
  • Import and the typing shortcuts now follow CommonMark's Unicode punctuation and whitespace classes (#9430), so **“bar”**baz imports with literal asterisks and See –**[here](url)** imports as a bold link. Export writes character references where a round trip needs them. Check Markdown export snapshots.
  • Format markers stay balanced around a space whose formats differ from the text beside it (#9420), link titles and destinations round-trip (#9464), and @lexical/mdast writes the references cmark-gfm needs (#9983) and only links a bare URL where micromark finds one, as GitHub does (#9990).
  • JSON shape: a code block imported from Markdown now holds a LineBreakNode per line and a TabNode per tab instead of one TextNode with \n (#9911). Read codeNode.getTextContent(), not codeNode.getFirstChild().getTextContent(). States serialized by earlier versions load unchanged.
  • JSON shape: an inline element whose text sits in another element inside it no longer serializes textFormat/textStyle (#9601).

DOM and CSS

  • @lexical/list no longer writes value on every live list item, which made Enter near the top of a long list quadratic in Chromium (#9958). li[value] and attr(value) CSS no longer match, and li.value reads 0 — read ListItemNode.getValue() or export the DOM. Copied and exported HTML still writes value.
  • HTML import keeps the spaces around <strike>, <font>, <small>, <big>, <nobr>, <dfn>, <bdi>, <bdo> and <data>, so pasted is <strike>old</strike> now no longer becomes isoldnow (#9744); isInlineDomNode returns true for them.
  • $generateNodesFromDOM keeps the formatting of a <span> around another <span>, as Word for the web writes every run (#9919). Every tag's forChild now runs for same-tag nesting, so check any importDOM conversion whose forChild is not idempotent.
  • getTextDirection now returns what the browser gives dir="auto" (#9942); text starting with an emoji followed by Hebrew or Arabic is 'rtl', not 'ltr'.

Editor semantics

  • The editor stays active wherever Lexical reads a state from a listener, so $getEditor() works in text-content listeners, undo merging, markdown shortcuts, collaboration, HMR and toJSON() (#9941). editor.read(editorState, fn) is a new overload.
  • An update that throws is discarded even when onError rethrows, so the next update no longer commits its changes and tags (#9509).
  • RangeSelection.insertText keeps text inside an inline element that accepts it at its edge, as before v0.49.0 (#9863); return false from canInsertTextBefore/After to keep it outside.
  • With NodeStructureExtension, a class declaring children: 'block' is a block container: $insertList, $wrapNodes, insertNodes, insertParagraph, $insertNodeToNearestRoot and the Markdown block shortcuts stop at it instead of replacing or splitting it (#9590).
  • registerLexicalTextEntity keeps the NodeState of an entity that stops matching, and no longer loops forever when typing splits text between two differently formatted nodes (#9713).

Notable fixes

Tables — a ragged table no longer throws on selection, delete, copy or paste (#9749); a cell whose row span reaches past the last row is selectable (#9781); deleting a row keeps a merged cell changed earlier in the same update (#9851); plain text pasted into a right-to-left or upward selection starts at its top-left cell (#9774); a cell styled bold no longer strips the bold of <strong> inside it (#9916).

Large documents — $generateNodesFromDOM (#9957), Enter and $splitNode in a block of 130,000 children (#9883) and migrateYState (#9880) no longer throw RangeError: Maximum call stack size exceeded.

Reconciler — no DOMSlot.insertChild: before is not in element when a new element takes in the node it was created in front of (#9757); a node removed while its parent's DOM is rebuilt leaves the DOM map and gets destroyed (#9773); a slot value moved out of its slot no longer strips the DOM of the element it moved into (#9778).

Links, marks, code, input — $toggleLink(url) inside an autolink makes it a real link instead of losing the URL on the next edit (#9822); MarkStateExtension keeps comment ids across block-type and list changes (#9503) and through IME composition over a selection (#9540); the code highlighter keeps NodeState on re-tokenization (#9832, #9855, #9862); Enter in a code block keeps a plain line's indentation (#9923); on iOS, Return after a #+= symbol starts a paragraph (#9745); typing after a selected block decorator works in Firefox and WebKit (#9845).

@lexical/yjs — collaboration v2 no longer misplaces content or fails with "Lexical node does not exist" when a block or text equals another (#9584); the yjs peer dependency is optional, so @lexical/react without LexicalCollaborationPlugin no longer pulls it in (#9931).

Performance

A commit no longer computes the whole document's text with no text-content listener registered (#9548); reconciling a decorator host with named slots no longer forces a synchronous style recalculation in Chrome (#9743); strict Markdown export is much faster on long paragraphs (#9988); bundles drop unused mark flavors (#9496).

@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lexical Ready Ready Preview Dec 2, 2026 12:30pm UTC
lexical-playground Ready Ready Preview Dec 2, 2026 12:30pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 2, 2026
@rootnode-bot

rootnode-bot Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Dec 2, 2026, 12:49 PM UTC

@pkg-pr-new

pkg-pr-new Bot commented Dec 2, 2026

Copy link
Copy Markdown
lexical

npm i https://pkg.pr.new/lexical@10023

@lexical/a11y

npm i https://pkg.pr.new/@lexical/a11y@10023

@lexical/clipboard

npm i https://pkg.pr.new/@lexical/clipboard@10023

@lexical/code

npm i https://pkg.pr.new/@lexical/code@10023

@lexical/code-core

npm i https://pkg.pr.new/@lexical/code-core@10023

@lexical/code-prism

npm i https://pkg.pr.new/@lexical/code-prism@10023

@lexical/code-shiki

npm i https://pkg.pr.new/@lexical/code-shiki@10023

@lexical/compiler

npm i https://pkg.pr.new/@lexical/compiler@10023

@lexical/devtools-core

npm i https://pkg.pr.new/@lexical/devtools-core@10023

@lexical/dragon

npm i https://pkg.pr.new/@lexical/dragon@10023

@lexical/eslint-plugin

npm i https://pkg.pr.new/@lexical/eslint-plugin@10023

@lexical/extension

npm i https://pkg.pr.new/@lexical/extension@10023

@lexical/fast-check

npm i https://pkg.pr.new/@lexical/fast-check@10023

@lexical/file

npm i https://pkg.pr.new/@lexical/file@10023

@lexical/hashtag

npm i https://pkg.pr.new/@lexical/hashtag@10023

@lexical/headless

npm i https://pkg.pr.new/@lexical/headless@10023

@lexical/history

npm i https://pkg.pr.new/@lexical/history@10023

@lexical/html

npm i https://pkg.pr.new/@lexical/html@10023

@lexical/internal

npm i https://pkg.pr.new/@lexical/internal@10023

@lexical/link

npm i https://pkg.pr.new/@lexical/link@10023

@lexical/list

npm i https://pkg.pr.new/@lexical/list@10023

@lexical/mark

npm i https://pkg.pr.new/@lexical/mark@10023

@lexical/markdown

npm i https://pkg.pr.new/@lexical/markdown@10023

@lexical/mdast

npm i https://pkg.pr.new/@lexical/mdast@10023

@lexical/offset

npm i https://pkg.pr.new/@lexical/offset@10023

@lexical/overflow

npm i https://pkg.pr.new/@lexical/overflow@10023

@lexical/plain-text

npm i https://pkg.pr.new/@lexical/plain-text@10023

@lexical/react

npm i https://pkg.pr.new/@lexical/react@10023

@lexical/rich-text

npm i https://pkg.pr.new/@lexical/rich-text@10023

@lexical/selection

npm i https://pkg.pr.new/@lexical/selection@10023

@lexical/table

npm i https://pkg.pr.new/@lexical/table@10023

@lexical/tailwind

npm i https://pkg.pr.new/@lexical/tailwind@10023

@lexical/text

npm i https://pkg.pr.new/@lexical/text@10023

@lexical/utils

npm i https://pkg.pr.new/@lexical/utils@10023

@lexical/y

npm i https://pkg.pr.new/@lexical/y@10023

@lexical/yjs

npm i https://pkg.pr.new/@lexical/yjs@10023

commit: 25b8825

@rootnode-bot rootnode-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This release PR looks good to me. The version bump, the consumed changesets and the generated v0.54.0 block all check out. The block matches what scripts/changesets/release.mjs renders from the 207 changesets (I reproduced it from the base commit), every PR link points at the pull request that added its changeset, and ### All changes matches git log v0.53.0.. on the base. The suggestions below are optional, non-blocking edits to CHANGELOG.md:

  1. Say that @lexical/y is new in this release (CHANGELOG.md:28). npm has only nightly versions of @lexical/y, so v0.54.0 is its first stable release. Even so, 10 of the 11 entries under ### Breaking changes are @lexical/y changes relative to nightlies, and they come before the one break to a stable API (@lexical/markdown/@lexical/mdast, line 92). The preamble of CHANGELOG.md defines breaking changes as ones that "need a code change", and for someone upgrading from 0.53.0 none of these do. They also print with pnpm run changelog:range -- --breaking. One sentence under the heading would save readers some time, for example: "@lexical/y is published for the first time in this release; its [breaking] entries apply to nightly builds only."
  2. Duplicate line (CHANGELOG.md:1351-1352): #9778 is listed twice in ### All changes because main holds a second, empty commit with the same subject. You can delete one of the two lines.

Automated review (maintainer link)

Comment thread CHANGELOG.md
@@ -25,6 +25,1458 @@ This file also ships in the `lexical` package as
`node_modules/lexical/CHANGELOG.md`. See
[Upgrading Lexical](https://lexical.dev/docs/upgrading).

## v0.54.0 (2026-12-02)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: npm has only nightly versions of @lexical/y, so this is its first stable release, yet 10 of the 11 ### Breaking changes entries below are @lexical/y changes relative to nightlies. One sentence here would tell readers upgrading from 0.53.0 that those entries don't apply to them, for example: "@lexical/y is published for the first time in this release; its [breaking] entries apply to nightly builds only."

Comment thread CHANGELOG.md
- [lexical-website] Documentation Update: Describe type-signature breaks in CHANGELOG.md by the call shapes they break, and add the missing v0.48 list Backspace behavior change ([#9728](https://github.com/meta/lexical/pull/9728)) Gerard Rovira
- [lexical-table] Bug Fix: A table selection on a cell whose row span reaches past the last row no longer throws ([#9781](https://github.com/meta/lexical/pull/9781)) Gerard Rovira
- [lexical] Bug Fix: A named slot's value moved out of its slot no longer makes the reconciler remove the DOM of the element it moved into ([#9778](https://github.com/meta/lexical/pull/9778)) Gerard Rovira
- [lexical] Bug Fix: A named slot's value moved out of its slot no longer makes the reconciler remove the DOM of the element it moved into ([#9778](https://github.com/meta/lexical/pull/9778)) Gerard Rovira

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: this line repeats the one above it. main has a second, empty commit with the #9778 subject, so one of the two lines can go.

@potatowagon
potatowagon added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 0390a34 Dec 2, 2026
62 checks passed

This branch was successfully deployed

2 active deployments
Preview – lexical — 25b88255 Deployed Dec 2, 2026 by vercel[bot]
Preview – lexical-playground — 25b88255 Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants