Skip to content

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

Merged
pi0 merged 1 commit into
mainfrom
unknown repository
Aug 3, 2022
Merged

fix(findExports): get exports with trailing comma#61
pi0 merged 1 commit into
mainfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jul 27, 2022

Copy link
Copy Markdown

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

antfu commented Jul 27, 2022

Copy link
Copy Markdown
Member

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

@ghost

ghost commented Jul 27, 2022

Copy link
Copy Markdown
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' },

@ghost

ghost commented Jul 27, 2022

Copy link
Copy Markdown
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

pi0 commented Aug 3, 2022

Copy link
Copy Markdown
Member

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.

2 participants