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

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

@nicolo-ribaudo
Copy link
Member

What is the output before this PR?

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

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 🐛 A type of pull request used for our changelog categories label Jun 10, 2022
Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

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

Thanks.

@JLHwung JLHwung merged commit 1e08968 into babel:main Jun 10, 2022
@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 June 13, 2022 06:10
@underfin
Copy link
Contributor Author

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

@nicolo-ribaudo
Copy link
Member

Ok, doing it now.

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 13, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: modules outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants