facebook / lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
https://lexical.dev
MIT License
17.37k stars 1.43k forks source link

Bug: @lexical/react 0.14.4 brings in @lexical/devtools-core dependency without declaring it #5901

Closed etrepum closed 2 weeks ago

etrepum commented 2 weeks ago

Lexical version: 0.14.4

Steps To Reproduce

  1. Update a project to @lexical/react 0.14.4 without adding @lexical/devtools-core as a dependency
  2. Try and build or run the project

Link to code example:

https://github.com/etrepum/lexical-esm-nextjs but anything that imports @lexical/react/LexicalTreeView should demonstrate the problem

The current behavior

Tries to import from @lexical/devtools-core which is not published yet

The expected behavior

It should not import @lexical/devtools-core, or that package should be published and @lexical/react should have a dependency on it

Root cause

blame of packages/lexical-react/src/LexicalTreeView.tsx shows that this was last added in this commit: https://github.com/facebook/lexical/commit/c0cca39759172d5fa51f49842f39ab75c7adc767

etrepum commented 2 weeks ago

/cc @acywatson @StyleT @thegreatercurve

StyleT commented 2 weeks ago

It's a bummer :( Let me take a look

StyleT commented 2 weeks ago

Ok, so @lexical/devtools-core was never published. And it's version it behind the pack.

This immediate issue shall be fixed in #5902 and then we need to fix publish scripts

etrepum commented 2 weeks ago

5876 should take care of the build and publish scripts (and the fix to update-version to handle devDependencies is in there too). There is of course some risk in making large changes to them, but the build is broken or at least fragile anyway…

etrepum commented 2 weeks ago

The v0.14.5 release fixes this with next.js, I will verify that the other minimal framework examples still work and confirm shortly

etrepum commented 2 weeks ago

Confirmed that v0.14.5 is working with my sveltekit and astro examples as well! Closing as fixed 💯