-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve export name extraction for shortcode generation #1160
Conversation
Many different types of export syntax wasn't supported, primarily destructuring for objects and arrays. This adds export extraction to the import name extraction step so we can more accurately determine what shortcodes to generate.
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/mdx/mdx/qwkwpf4iv |
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.
Any idea why the tests are failing? I could be missing something but I think my comment and the other default value [] will never hit the return statement.
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.
Looks reasonable
Many different types of export syntax weren't supported,
primarily destructuring for objects and arrays. This adds
export extraction to the import name extraction step so
we can more accurately determine what shortcodes to
generate.
We will eventually want to use something different for
extraction (#1152), but for now let's just make it right before
we make it fast.