Skip to content

Fix named destructuring exports#14655

Merged
JLHwung merged 1 commit intobabel:mainfrom
underfin:fix-system-export-named-from-destrcturing-object
Jun 10, 2022
Merged

Fix named destructuring exports#14655
JLHwung merged 1 commit intobabel:mainfrom
underfin:fix-system-export-named-from-destrcturing-object

Conversation

@underfin
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

@nicolo-ribaudo
Copy link
Copy Markdown
Member

What is the output before this PR?

({
foo: bar,
baz
} = {}), _export("baz", baz);
Copy link
Copy Markdown
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

const exportedNames = this.exports[name];
if (!exportedNames) return;
if (!exportedNames) continue;
for (const exportedName of exportedNames) {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@nicolo-ribaudo
Copy link
Copy Markdown
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.

5 participants