facebook / lexical

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

Dont sync empty files #6004

Closed acywatson closed 2 weeks ago

acywatson commented 2 weeks ago

Flow files that contain only comments are copied over as empty. This is a problem for our internal linters. I couldn't figure out how to make this work in rewriteImports because I don't understand the hermes-transform API, but we can ignore empty files and that should prevent this issue.

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview May 1, 2024 11:06pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2024 11:06pm
github-actions[bot] commented 2 weeks ago

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/lexical/dist/Lexical.js 23.69 KB (0%) 474 ms (0%) 80 ms (+273.66% 🔺) 554 ms
packages/lexical-rich-text/dist/LexicalRichText.js 34 KB (0%) 680 ms (0%) 89 ms (+28.06% 🔺) 769 ms
packages/lexical-plain-text/dist/LexicalPlainText.js 33.94 KB (0%) 679 ms (0%) 98 ms (+64.89% 🔺) 777 ms
etrepum commented 2 weeks ago

The latest commit in #5999 should address this, it ensures there's always at least one statement in the code before handing it over to hermes and then it undoes that workaround before writing it to disk