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

Don't split an exported class when renaming an inner binding #8051

Merged
merged 2 commits into from
Jun 12, 2018

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented May 25, 2018

Q                       A
Fixed Issues? Fixes #8062, Fixes #8033, Fixes #7951, Fixes #7843
Patch: Bug Fix? 👍
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR
Any Dependency Changes?
License MIT

@nicolo-ribaudo nicolo-ribaudo added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: traverse (scope) labels May 25, 2018
@@ -0,0 +1,9 @@
export class Foo extends Bar {
Copy link
Member Author

Choose a reason for hiding this comment

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

The problem was that when ...args was renamed to ...args2, this export declaration was split.
For some reason classPath.parentPath was set to classPath instead of programPath. I'll investigate it, but this PR "workarounds" the problem by only splitting the export declaration when necessary.

@babel-bot
Copy link
Collaborator

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

1 similar comment
@babel-bot
Copy link
Collaborator

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

@loganfsmyth
Copy link
Member

@nicolo-ribaudo I added a bunch more issues to your "Fixed issues" list. Could you look them over and make sure they are the same problem, and see if there are any other tests cases we should add?

@nicolo-ribaudo
Copy link
Member Author

#7281 and #7177 (which use decorators) still don't work.
Do you have any suggestion for additional tests? All those issues use almost the same code.

@hzoo
Copy link
Member

hzoo commented Jun 11, 2018

Should we land this in the meantime?

@hzoo hzoo merged commit 3c46e75 into babel:master Jun 12, 2018
@nicolo-ribaudo nicolo-ribaudo deleted the bug-7951 branch November 25, 2018 18:43
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: traverse (scope) PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
4 participants