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(findExports): get exports with trailing comma #61

Merged
merged 1 commit into from
Aug 3, 2022
Merged

fix(findExports): get exports with trailing comma #61

merged 1 commit into from
Aug 3, 2022

Conversation

westhide
Copy link
Contributor

Correct #59

Adjust EXPORT_NAMED_RE regex not to match the trailing comma & blank in export name, so no need to filter !!name after split exports

@antfu
Copy link
Member

antfu commented Jul 27, 2022

Can you add some tests to the case you are solving? Thanks

@westhide
Copy link
Contributor Author

Can you add some tests to the case you are solving? Thanks

This pr solve the same issue as #59 , can use test case add at that time.
I'll add a few more if need to.

'export { default , } from "./other"': { type: 'default', name: 'default', names: ['default'], specifier: './other' },

@westhide
Copy link
Contributor Author

Test cases have been added

@antfu antfu changed the title fix(#59): get export without trailing comma direct fix(findExports): get export without trailing comma direct Jul 27, 2022
@pi0
Copy link
Member

pi0 commented Aug 3, 2022

Thanks for PR @westhide <3 And sorry it merged late.

@pi0 pi0 changed the title fix(findExports): get export without trailing comma direct fix(findExports): get exports with trailing comma Aug 3, 2022
@pi0 pi0 merged commit 79a3ceb into unjs:main Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants