Repository navigation
refactor(richtext-lexical)!: upgrade lexical to 0.53.0 - #19176
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Update Lexical version and migration guide packages/richtext-lexical/package.json, packages/richtext-lexical/src/index.ts, pnpm-workspace.yaml, docs/migration-guide/v4.mdx |
Lexical dependencies, the target version, and workspace release-age exclusions change to 0.53.0. The migration guide describes Markdown escaping, updated breaking-change references, changed type-argument support, and replacement import extensions. |
Filter table cells for row-height measurement packages/richtext-lexical/src/features/table/client/plugins/TableCellResizerPlugin/index.tsx |
Initial row-height calculation measures only row children that are table-cell nodes. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Suggested reviewers: germanjablo, jacobsfletch
Merge Risk: 
Minimal · previous review f1397
-
The upgrade and table-resizing changes have no identified merge-blocking risk.
Security architecture risk: 
Low · up to f1397
-
The inspected changes preserve the existing editor ownership and conversion boundaries, with no demonstrated expansion of privileges or attacker reachability. Risk is low rather than minimal because the upgrade changes public contracts and upstream runtime behavior was only partially verified.
Retained concerns
No architecture-level concerns identified.Security review details
-
Security Blast Radius
- inferred — The affected integration reaches applications using the browser rich-text editor and server-side headless converters. The inspected adapter changes do not establish a new cross-tenant, credential, or privileged-service path; deployment-wide exposure from unreviewed upstream behavior remains undetermined.
Trust Boundaries and Controls
- inferred — The public-entrypoint classification does not represent newly exposed resizer functionality. The component was already installed through TableFeatureClient, and the exact resizer diff changes measurement inputs rather than callers, permissions, or control placement.
Resilience and Maintainability Implications
- observed — Resize initiation, completion, and reset are unchanged by the PR. The installed Lexical table runtime also registers a row transform that filters descendants to table cells, providing counterevidence against ordinary built-in rows containing non-cell measurement inputs. This does not prove every custom or interrupted state is normalized.
-
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (3 skipped: 3 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖
Largest pathsThese visualization shows top 20 largest paths in the bundle.Meta file: packages/next/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_shared.json, Out file: esbuild/exports/shared.js
Meta file: packages/richtext-lexical/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_shared.json, Out file: esbuild/exports/shared_optimized/index.js
DetailsNext to the size is how much the size has increased or decreased compared with the base branch of this PR.
|
|
🚀 This is included in version v4.0.0-beta.6 |
Written with AI
Upgrades lexical from
0.52.0to0.53.0.Breaking changes
Rich-text data keeps its existing format. No database migration is needed. Payload's built-in features have been updated, but your own TypeScript code or custom features may need changes:
getParent<T>(),getParentOrThrow<T>(),getChildren<T>(),getFirstChild<T>(),getNextSibling<T>(),$getNodeByKey<T>()and the rest of that family no longer accept a type argument. Remove<T>and narrow the result with a node guard such as$isListItemNode. Runtime behavior is unchanged.LinkImportExtension,ListImportExtension,RichTextImportExtensionandHorizontalRuleImportExtension(deprecated in 0.52) are no longer exported from@payloadcms/richtext-lexical/lexical/link,/list,/rich-textand/html. UseLinkExtension,ListExtensionandRichTextExtension; for horizontal rules, useHorizontalRuleExtensionfrom@lexical/extension.convertLexicalToMarkdownescapes literal brackets and HTML-like text, for example[note]becomes[note], so it is not parsed back as a link or HTML.convertMarkdownToLexicalrestores the original text.Breaking changes and Payload migrations
Reviewed 0.53.0 and the
CHANGELOG.mdnow shipped in thelexicalpackage, including its behavior changes. Yes means Payload code needed adaptation; No means no Payload migration was required.TableCellResizerPlugincalledtableRow.getChildren<TableCellNode>(). It now uses.filter($isTableCellNode), matching the upstream playground.export *proxies listed above.ElementNode.reconcileObservedMutationrestores the committed children's DOM (@internal).@lexical/mdaststores table column alignment as cell paragraph format.@lexical/mdast.ContentEditablewithout an accessible name no longer rendersrole="textbox".aria-label, so labeled read-only editors keep the role.ClickableLinkPluginopens new tabs withoutwindow.opener, and nested editors handle their own link clicks.ClickableLinkPluginand gets the reverse-tabnabbing fix automatically.Package entry points of every proxied package were compared against 0.52.0. The only addition is the experimental
@lexical/html/BlockIdHTMLExtensionsubpath. Payload only re-exports the@lexical/htmlroot, so no proxy exports need adding or removing.Previous Lexical upgrades