Skip to content

[lexical-react] Bug Fix: Add 'yjs' as optional peer dependency for Yarn PnP compatibility#8366

Merged
etrepum merged 2 commits intofacebook:mainfrom
grapgrap:fix/lexical-react-yjs-optional-peer
Apr 18, 2026
Merged

[lexical-react] Bug Fix: Add 'yjs' as optional peer dependency for Yarn PnP compatibility#8366
etrepum merged 2 commits intofacebook:mainfrom
grapgrap:fix/lexical-react-yjs-optional-peer

Conversation

@grapgrap
Copy link
Copy Markdown
Contributor

@grapgrap grapgrap commented Apr 17, 2026

Description

Re-submission of #8053 (closed due to unsigned CLA).
@flex-jonghyen is my own work account, but I'm unable to sign the CLA under it — so I'm re-opening this from my personal account.

Current problem:

  • @lexical/react includes @lexical/yjs as a dependency
  • @lexical/yjs requires yjs as a peer dependency (>=13.5.22)
  • However, yjs is not declared in @lexical/react
  • In strict dependency management environments like Yarn PnP, this causes a resolution error for yjs

Changes:

  • Added yjs as an optional peer dependency in @lexical/react (version range matches @lexical/yjs: >=13.5.22)
  • Users who don't use collaboration features are not affected

Test plan

Before

Yarn PnP environment fails to resolve yjs.

Workaround required in .yarnrc.yml:

packageExtensions:
  '@lexical/react@*':
    peerDependencies:
      'yjs': '*'

This workaround confirms that adding yjs as a peer dependency resolves the issue.

After

Works without the workaround.

…rn PnP compatibility

Co-authored-by: 김종현 <97939463+flex-jonghyen@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented Apr 17, 2026

Hi @grapgrap!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 17, 2026

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

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview, Comment Apr 18, 2026 6:07am
lexical-playground Ready Ready Preview, Comment Apr 18, 2026 6:07am

Request Review

@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented Apr 17, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@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 Apr 17, 2026
Copy link
Copy Markdown
Collaborator

@etrepum etrepum left a comment

Choose a reason for hiding this comment

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

CI is going to fail until pnpm-lock is updated accordingly

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@etrepum etrepum added this pull request to the merge queue Apr 18, 2026
Merged via the queue into facebook:main with commit 743dfd7 Apr 18, 2026
44 checks passed
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. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants