This repository has been archived by the owner. 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

Conversation

Projects
None yet
3 participants
@danez
Copy link
Member

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

@danez danez force-pushed the danez:fix-comment-bubbling branch from b97898b to 24b25d0 Apr 25, 2016

@hzoo

This comment has been minimized.

Copy link
Member

hzoo commented May 4, 2016

👍

@hzoo hzoo added the Tag: Bug Fix label May 4, 2016

@kittens

This comment has been minimized.

Copy link
Contributor

kittens commented Jun 21, 2016

Can we make __clone always exclude comment properties?

Adjust cloning of nodes in import/export-specifiers and obj-destructu…
…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 danez force-pushed the danez:fix-comment-bubbling branch from 24b25d0 to b0a3d63 Jun 21, 2016

@danez

This comment has been minimized.

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@danez danez deleted the danez:fix-comment-bubbling branch Jun 21, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.