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 named destructuring exports #14655

Merged

Conversation

underfin
Copy link
Contributor

@underfin underfin commented Jun 10, 2022

…ructuring object

Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

@babel-bot
Copy link
Collaborator

babel-bot commented Jun 10, 2022

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52188/

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Jun 10, 2022

What is the output before this PR?

({
foo: bar,
baz
} = {}), _export("baz", baz);
Copy link
Contributor Author

@underfin underfin Jun 10, 2022

Choose a reason for hiding this comment

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

@nicolo-ribaudo before this pr, will not export baz

@@ -190,7 +190,7 @@ export default declare<PluginState>((api, options: Options) => {
return;
}
const exportedNames = this.exports[name];
if (!exportedNames) return;
if (!exportedNames) continue;
for (const exportedName of exportedNames) {
Copy link
Contributor Author

@underfin underfin Jun 10, 2022

Choose a reason for hiding this comment

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

If here not find matched export name, here will go out of function. The other names will not add to export.

@liuxingbaoyu liuxingbaoyu added the PR: Bug Fix 🐛 label Jun 10, 2022
Copy link
Contributor

@JLHwung JLHwung left a comment

Thanks.

@JLHwung JLHwung merged commit 1e08968 into babel:main Jun 10, 2022
35 checks passed
@nicolo-ribaudo nicolo-ribaudo changed the title fix(@babel/plugin-transform-modules-systemjs): export named from dest… Fix named destructuring exports Jun 10, 2022
@underfin underfin deleted the fix-system-export-named-from-destrcturing-object branch Jun 13, 2022
@underfin
Copy link
Contributor Author

underfin commented Jun 13, 2022

@JLHwung Can you publish a new version for this? Thanks :)

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Jun 13, 2022

Ok, doing it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: modules PR: Bug Fix 🐛
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants