-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Use magicast for astro add #11772
Use magicast for astro add #11772
Conversation
🦋 Changeset detectedLatest commit: 5ce4c58 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Should we do this against |
I did another pass and fix some edge cases where they're adding an integration that is already setup. I think it should be fine in the next minor, or even a patch though since the problem magicast solves is well-scoped. I did some tests locally and it's working fine for a lot of happy paths and edge cases. One thing I realize is that before I think bugs could happen for sure, but I don't think it would be too hard to solve. The worst case is that users have to manually update the config themselves. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
talked it over and @bluwy feels confident
If anything happens, feel free to revert it 😅 (But I'll try to look into it too if it's not urgent) |
Changes
fix #11836
Use magicast to simplify our current code and reduce the dependency (particularly
@babel/generator
and@babel/traverse
). The generated code is slightly difference where magicast uses recast that injects new lines and trailing commas in some places. I think it's negligable thoughBefore:
After:
Testing
Ran
astro add
manually with different setups.Docs
n/a. internal change.