Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): fix build-www rewriteImports to always rewrite flow modules #5995

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

etrepum
Copy link
Contributor

@etrepum etrepum commented Apr 30, 2024

Description

rewriteImports regression caused some flow modules not to get rewritten. Working theory is that the in-place update only had an effect if a module was also rewritten, and some modules do not have dependencies (such as packages/lexical/dist/Lexical.js.flow)

Test plan

Before

build-www outputs some flow modules in dist without rewriting their comments

After

build-www outputs all flow modules in dist with rewritten comments

Copy link

vercel bot commented Apr 30, 2024

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 Apr 30, 2024 9:21pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2024 9:21pm

@facebook-github-bot facebook-github-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 30, 2024
// Let the transform know we actually did something.
// Could not figure out the right way to update the
// docblock without an in-place update
context.addLeadingComments(node, '');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't like this but hermes doesn't really have documentation and I was getting errors with other incantations that replaced or updated the program node

@acywatson
Copy link
Contributor

let's try it!

@acywatson acywatson merged commit 053e96e into facebook:main Apr 30, 2024
46 checks passed
etrepum added a commit to etrepum/lexical that referenced this pull request May 1, 2024
@etrepum etrepum deleted the rewriteImports-fix branch May 11, 2024 06:46
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants