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

fix(build): clean up of build-www rewriteImports (follow-up to #5995) #5999

Closed etrepum closed 2 weeks ago

etrepum commented 2 weeks ago

Description

Follow-up to #5995, while this fix worked it was not as clean as it should be and probably shouldn't pass flow type checks if it was analyzed. I did a little more digging and I found a more correct incantation, but it could probably still use some improvement if there is a hermes-transform expert around.

Test plan

Before

node ./scripts/www/rewriteImports.js rewrites flow files correctly (using sketchy code)

After

node ./scripts/www/rewriteImports.js rewrites flow files correctly (using slightly better code)

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 💬 Add feedback May 1, 2024 11:15pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2024 11:15pm
etrepum commented 2 weeks ago

I'll take a look at that approach and write some unit tests