Skip to content

chore(deps): bump @lexical/code from 0.49.0 to 0.50.0 in /packages/web - #69

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/packages/web/lexical/code-0.49.0
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/packages/web/lexical/code-0.49.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 11, 2026

Copy link
Copy Markdown

Bumps @lexical/code from 0.49.0 to 0.50.0.

Release notes

Sourced from @​lexical/code's releases.

v0.50.0 is a monthly release with a large number of PRs to improve correctness, accessibility, and performance. It also ships HMR support, compiled keyboard shortcut dispatch, and screen reader announcements for headings and auto-links, and build-time tree-shaking annotations (in a new @lexical/compiler package). We have upgraded to pnpm 11, so if you're working directly with the monorepo you will need to upgrade as well.

Breaking Changes

  • lexicalLexicalNode.replace() no longer re-homes a named slot value. A slot value has no parent (its up-link is __slotHost), so replacing one through the tree API now fails with an actionable invariant instead of a generic parent error; use $setSlot on the owning host. $setBlocksType and the block converters skip slot values for the same reason (#8938, #8905, #8901)
  • @lexical/clipboard — The Lexical JSON clipboard payload (application/x-lexical-editor) now asks excludeFromCopy('clone') instead of 'html', matching the destination the rest of that payload already uses. Nodes that opt out of HTML export but expect to survive a clone (e.g. MarkNode) are copied again; custom excludeFromCopy implementations that keyed on 'html' for this channel should be updated (#8995)

Behavior Changes to Watch

These were merged as bug fixes rather than breaking changes, but they change observable output — check them if you snapshot HTML, assert on the DOM, or depend on the old editing behavior.

  • HTML export emits a terminating <br>. A trailing LineBreakNode in a block now exports an extra <br data-lexical-managed-linebreak="true">, mirroring what the reconciler already puts in the live DOM, so <p>a<br></p> survives an export/import round trip. Both importers drop the marker, but exported-HTML fixtures will differ (#8765)
  • Rich text mounts an aria-live region by default. HeadingAnnounceExtension (via RichTextExtension) and AutoLinkAnnounceExtension (via AutoLinkExtension) depend on AriaLiveRegionExtension, which appends a live-region <div> to document.body — or to the configured owner element. Opt out with configExtension(HeadingAnnounceExtension, {disabled: true}) (#8908, #9071)
  • Select-all delete and cut now remove the blocks. A whole-document range is widened to the top-level blocks, so the editor is left on a fresh empty paragraph instead of an emptied heading, quote or list that went on styling the next character typed — and Cmd+X now carries those blocks, so pasting restores them (#8884)
  • A formatted paragraph copies as a block. ParagraphNode.extractWithChild now keeps a fully-selected paragraph that carries alignment, indent or inline style in the payload as a block, instead of splicing its children in and dropping that formatting. Paragraphs with none of it serialize as before (#9059)
  • importJSON applies registered node replacements. JSON deserialization builds through $create, so a replacement's class is constructed and its importJSON runs; a deprecated replace without withKlass is still applied the old way (#9061, #9090)
  • Listener return types tightened. Only RootListener and EditableListener are typed to return a cleanup function; returning one from another listener is now a TypeScript error — it was never called (#8990)
  • Collab and Markdown output shifts. @lexical/yjs no longer syncs root textFormat/textStyle (#8940); Markdown import restructures nested mixed-type lists and stores fence metadata in a new mdCodeMeta node state (#8283)
  • New invariants. Replacing a slot value (#8938), an insertText anchor that is not a text node, an empty KeyboardShortcutMatch key, and a createBindingV2 getXmlText/getXmlElement that returns an un-integrated or misnamed type (#6483) now throw instead of failing later

Deprecations

  • lexicalCAN_UNDO_COMMAND and CAN_REDO_COMMAND are deprecated in favor of the canUndo / canRedo signals on HistoryExtension. A command only reports a change, so a listener registered after initialization can't read the current value; the signal always holds it (#8918)

New APIs & Features

  • @lexical/compiler — New package that injects /* @__PURE__ */ annotations and inlines the trivial side-effect-free factories (defineExtension, configExtension, safeCast, createCommand, createState, …) at build time, as a Rollup and Vite plugin. Hand-written annotations on those calls are no longer needed (#9086)
  • @lexical/extensionHMRExtension (with HMRConfig, HMROutput, HotContext) keeps an editor alive across hot module replacement. @lexical/react gains LexicalMenuOption, LexicalAutoEmbedPluginUtils, LexicalTypeaheadMenuPluginUtils and LexicalCollaborationContextUtils entry points that split values out of component modules so Fast Refresh works — the original exports are unchanged (#8959)
  • lexical / @lexical/extension — Compiled keyboard shortcut dispatch: compileKeyboardShortcuts, CONTROL_OR_ALT, CONTROL_OR_META, CONTROL_OR_OTHER_KEY, keyboardEventMaskForPlatform and the KeyboardShortcut* types in core, plus KeyboardShortcutsExtension and formatKeyboardShortcut for declaring named shortcuts and rendering them per platform (#8876)
  • @lexical/rich-textHeadingAnnounceExtension announces heading changes to screen readers, on by default in RichTextExtension; @lexical/link's AutoLinkAnnounceExtension does the same when typing turns text into a link, on by default with AutoLinkExtension (#8908, #9071)
  • @lexical/list — Opt-in WordListImportExtension reconstructs list structure from Microsoft Word HTML (MsoListParagraph classes and mso-list metadata) on paste (#9082)
  • @lexical/rich-text — New shouldHandlePasteAsFiles config (and exported defaultShouldHandlePasteAsFiles, plus an optional third argument to registerRichText) lets an app decide that pasted files win over the incidental text/html browsers attach when an image is copied. The default is unchanged: files are handled only when the clipboard carries no text content (#8902, #8699)
  • @lexical/yjsCreateBindingV2Options__EXPERIMENTAL allows a custom Yjs XmlText, so a Lexical document can live inside a larger shared type (#6483)
  • lexical — New $getSelectionSlotFrame (#9052) and $flushSyncAfterUpdate (#9067) exports; $isBlockFullySelected moved into core and is still re-exported from @lexical/utils (#9059); @lexical/table now exports the TableCellHeaderState type (#9038); JSDoc added across the core exports (#8895)
  • Performance — Bulk inserts and removals no longer walk the parent's children to compute an offset the selection never reads, which made those operations quadratic (#9108)

Notable Fixes

Named slots & the node tree

  • Line breaks inside a slot insert and delete correctly (#8899); a managed line break is restored in wrapped slot hosts (#9066); reading the parent style of a slot value no longer throws (#8950); a slot-bearing decorator host is deleted correctly at the selection boundary (#8905)
  • replace() keeps the parent's __size correct when handed a sibling (#8917), and splice no longer creates a sibling cycle when it re-inserts a node after the range (#8916)

Node state, copy/paste & serialization

  • HTML import/export and slot frames carry the whole node state, keeping the HTML and Lexical clipboard payloads in agreement (#9052); copy and insert keep the original node's state (#9059); list operations and DOM import/export keep the node's own state (#9050); inline node transforms keep the node and its DOM in step (#9060); code blocks keep the caret and their own attributes (#9056); blocks pasted after consecutive line breaks are preserved (#8890)
  • Nodes keep their own properties across clone, split and export: EditorState.clone() keeps _parsed (#8989), AutoLinkNode.insertNewAfter keeps its properties (#8996), a split heading keeps its format and style (#8926), split lists continue numbering from the item's value (#8913), and in the playground the Excalidraw drawing and size survive a clone (#8984), a closed collapsible no longer exports as open (#8994), mention nodes keep their display text (#8999), custom nodes keep the theme classes createDOM applied (#9049) and an unparseable data-lexical-datetime no longer breaks serialization (#9047)

Selection & editing

... (truncated)

Changelog

Sourced from @​lexical/code's changelog.

v0.50.0 (2026-09-02)

  • lexical-extensionlexical-react Feature HMR support for extensions (#8959) mayrang
  • lexical Bug Fix Preserve pasted blocks after consecutive line breaks (#8890) Wan Xiankai
  • lexical Bug Fix collapse to a paragraph on select-all delete of a non-paragraph first block (#8884) Gunjan Jaswal
  • lexicallexical-html Bug Fix emit a terminating br so a trailing line break survives HTML export (#8765) Sherry
  • lexical-playgroundlexical-react Bug Fix only one collab client bootstraps a nested editors document (#9107) Bob Ippolito
  • lexical Performance Skip the sibling walk when no selection point reads the index (#9108) om singhal
  • Upgrade to pnpm 11 (#8816) Gerard Rovira
  • lexical-yjslexical-react Feature Allow custom Yjs XmlText (#6483) Flvio Carvalho
  • lexical-table Bug Fix Fix unreliable text cursor placement when tapping table cells on touch devices (#8827) arman
  • Add React MathType example (#8692) culpen90
  • lexical-markdownlexical-mdast Bug Fix markdown round trip keeps fenced code and enclosing blocks intact (#9055) Shaurya Singh
  • lexical-reactlexical-playground Bug Fix plugins and hooks re-derive when their inputs change (#9051) Shaurya Singh
  • lexicallexical-table Bug Fix selection and caret state at block and shadow-root boundaries (#9058) Shaurya Singh
  • lexical-tablelexical-playgroundlexical-rich-text Bug Fix table grid indices, cell state and boundary selection (#9054) Shaurya Singh
  • lexical-link Bug Fix open middle-clicked links in a new tab (#9078) Nithin
  • lexical-yjslexical-react Bug Fix collab sync gaps between the editor state and the yjs doc (#9057) Shaurya Singh
  • lexicallexical-htmllexical-clipboard Bug Fix HTML importexport and slot frames carry the whole state (#9052) Shaurya Singh
  • lexical-utils Bug Fix Prioritize file transfer over texthtml when pasting browser-copied images (#8699) Vivek Jariwala
  • lexical-listlexical-playground Bug Fix keep the focus on the editor when a press lands in a check list items label (#9088) Luan Taraschi
  • lexical-rich-text Bug Fix forward dropped files when the drop point has no caret (#9076) Nithin
  • lexical-list Bug Fix list operations and DOM importexport keep the nodes own state (#9050) Shaurya Singh
  • lexicallexical-rich-textlexical-utils Bug Fix copy and insert keep the original nodes state (#9059) Shaurya Singh
  • lexical-playground Bug Fix custom nodes keep the theme classes createDOM applied (#9049) Shaurya Singh
  • lexical Bug Fix insertText no longer throws when the caret is inside a segmented TextNode (#9104) om singhal
  • lexical-historylexical-utilslexical-playground Bug Fix overlays, hit targets and shared state at the editor boundary (#9053) Shaurya Singh
  • lexical-react Bug Fix Only open the auto embed menu when a bare link is pasted (#9091) om singhal
  • lexical-list Bug Fix stop throttling rapid mouse clicks on the same checklist checkbox (#9102) No Schmidt
  • lexical Bug Fix insertNodes no longer leaves an empty paragraph after a block inserted at the end of a paragraph (#9099) om singhal
  • lexical Bug Fix Backspace at a soft line-wrap boundary in Firefox (#9101) Bob Ippolito
  • tests Chore silence unnecessary stderr warnings in test-unit (#9098) Bob Ippolito
  • lexical-markdown Bug Fix import a link whose URL contains parentheses (#9093) Luan Taraschi
  • lexical-playground Bug Fix validateUrl no longer accepts a sentence that merely contains a URL (#9097) om singhal
  • lexical-compilerlexical-eslint-plugin-internal Feature inject PURE annotations at build time (#9086) Bob Ippolito
  • lexical-code-corelexical-code-prismlexical-code-shiki Bug Fix code blocks keep the caret and their own attributes (#9056) Shaurya Singh
  • lexical-htmllexical-rich-textlexical-website Docs clarify DOMImportExtension rule evaluation order (#9089) Bob Ippolito
  • lexical Feature build the node with create when importing JSON (#9090) Bob Ippolito
  • docs clarify vanilla quick start path (#8801) Alex Espinoza
  • ci Chore cache Playwrights apt packages and skip WebKit deps on Linux (#9085) Bob Ippolito
  • lexical-link Feature Tell screen reader users when typing turns text into a link (#9071) Brett Humphrey
  • ci Extract the internal-registry OIDC exchange into a reusable auth action (#9084) Gerard Rovira
  • lexical-list Bug Fix remove the stale depth theme class when a list changes depth (#9077) Nithin
  • lexical-link Bug Fix read the latest state in LinkNode and AutoLinkNode getters (#9080) Nithin
  • lexical-list Feature opt-in Word list paste overlay (#9082) MD Rifat Hossain
  • lexical-html Bug Fix reject an empty selector group in parseSelector (#9083) Luan Taraschi
  • lexical-utils Bug Fix objectKlassEquals throws on undefined and prototype-less objects (#9079) Nithin
  • lexical-table Bug Fix disconnect trackTable MutationObserver in removeListeners (#9074) kaminski-dev
  • lexical-markdown Bug Fix dont prefix a newline when a selection starts below the first block (#8960) Luan Taraschi
  • lexical-website Documentation Update Add Decorators concept guide (#8696) Ching Wei Kang

... (truncated)

Commits

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Aug 11, 2026
Bumps [@lexical/code](https://github.com/facebook/lexical/tree/HEAD/packages/lexical-code) from 0.49.0 to 0.50.0.
- [Release notes](https://github.com/facebook/lexical/releases)
- [Changelog](https://github.com/facebook/lexical/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/lexical/commits/v0.50.0/packages/lexical-code)

---
updated-dependencies:
- dependency-name: "@lexical/code"
  dependency-version: 0.49.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot changed the title chore(deps): bump @lexical/code from 0.43.0 to 0.49.0 in /packages/web chore(deps): bump @lexical/code from 0.49.0 to 0.50.0 in /packages/web Sep 6, 2026
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/packages/web/lexical/code-0.49.0 branch from 8b36044 to cdce6bf Compare September 6, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants