Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Adjust cloning of nodes in import/export-specifiers and obj-destructuring #24

Merged
merged 1 commit into from
Jun 21, 2016
Merged

Adjust cloning of nodes in import/export-specifiers and obj-destructuring #24

merged 1 commit into from
Jun 21, 2016

Conversation

danez
Copy link
Member

@danez danez commented Apr 25, 2016

The cloning caused comments that where added to the original node to be persisted into the cloned node. And this later on causes problems in babel-eslint/eslint see babel/babel-eslint#163
Espree/Acorn does not have any cloning, that's why it is working there.

This change adds a parameter to omit comments when cloning, as removing the cloning completely
causes tests in babel to fail.

@danez danez changed the title Adjust cloning of nodes in import/export-specifiers ad obj-destructuring Adjust cloning of nodes in import/export-specifiers and obj-destructuring Apr 25, 2016
@hzoo
Copy link
Member

hzoo commented May 4, 2016

👍

@sebmck
Copy link
Contributor

sebmck commented Jun 21, 2016

Can we make __clone always exclude comment properties?

…ring

The cloning caused comments that where added to the original node to be persisted into
the cloned node.
Espree/Acorn does not have any cloning, that's why it is working there.
This change adds a parameter to omit comments when cloning, as removing the cloning
causes tests in babel to fail.
@danez
Copy link
Member Author

danez commented Jun 21, 2016

Ok I changed it so that __clone is now always excluding comments.

@hzoo hzoo merged commit f11a82c into babel:master Jun 21, 2016
@danez danez deleted the fix-comment-bubbling branch June 21, 2016 16:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants