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

Update babylon beta 3 #5394

Merged
merged 3 commits into from Feb 28, 2017

Conversation

@hzoo
Copy link
Member

hzoo commented Feb 28, 2017

The changes were either simple rename or code removal

@hzoo hzoo added this to the Babel 7 milestone Feb 28, 2017
@hzoo hzoo changed the title Update babylon 3 Update babylon beta 3 Feb 28, 2017
@@ -12,8 +12,6 @@ export function RestElement(node: Object) {

export {
RestElement as SpreadElement,
RestElement as SpreadProperty,

This comment has been minimized.

Copy link
@hzoo

hzoo Feb 28, 2017

Author Member

Removing since it won't be generated anymore

@@ -0,0 +1 @@
z = { x, ...y };

This comment has been minimized.

Copy link
@hzoo

hzoo Feb 28, 2017

Author Member

shouldn't be there. removing

@@ -61,23 +61,3 @@ defineType("ExportNamespaceSpecifier", {
}
}
});

defineType("RestProperty", {

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth Feb 28, 2017

Member

Should we add these as virtual types in https://github.com/babel/babel/blob/7.0/packages/babel-traverse/src/path/lib/virtual-types.js, e.g.

export const RestProperty = {
  types: ["RestElement"],
  checkPath(path: NodePath): boolean {
    return path.parentPath && path.parentPath.isObjectPattern();
  },
};
export const SpreadProperty = {
  types: ["RestElement"],
  checkPath(path: NodePath): boolean {
    return path.parentPath && path.parentPath.isObjectExpression();
  },
};

it might make it easier for people to convert a plugin from 6.x to 7.x

This comment has been minimized.

Copy link
@hzoo

hzoo Feb 28, 2017

Author Member

Ok we can do that, although the visitors are still gone since ast is changed, so would that do much?

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth Feb 28, 2017

Member

If other people write plugins that visit these types, this would keep the visitors working.

This comment has been minimized.

Copy link
@hzoo

hzoo Feb 28, 2017

Author Member

sounds good

This comment has been minimized.

Copy link
@hzoo

hzoo Feb 28, 2017

Author Member

Do we want to do that with the rest of the ast changes then?

ForAwaitStatement, NumericLiteralTypeAnnotation, ExistentialTypeParam

This comment has been minimized.

Copy link
@hzoo

hzoo Feb 28, 2017

Author Member

And then do we want to console.warn or something for these?

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth Feb 28, 2017

Member

It if is doable for a type, I'd vote we do it, but it won't work for all of them.

For .warn I'm not sure.

This comment has been minimized.

Copy link
@danez

danez Mar 1, 2017

Member

You want to do this virtual types in 6.x? imho it doesn't make sense to introduce bc code in a major version.

@hzoo hzoo force-pushed the update-babylon-3 branch from 2aa8d1a to 122d983 Feb 28, 2017
@hzoo hzoo requested a review from danez Feb 28, 2017
@hzoo

This comment has been minimized.

Copy link
Member Author

hzoo commented Feb 28, 2017

Ok added types - looked at babel/website#1146 for ast node changes

@hzoo hzoo merged commit 3ff77a6 into 7.0 Feb 28, 2017
1 check was pending
1 check was pending
ci/circleci Your tests are queued behind your running builds
Details
@hzoo hzoo deleted the update-babylon-3 branch Mar 3, 2017
nitin42 added a commit to nitin42/babel that referenced this pull request Mar 14, 2017
* Update babylon to v7-beta.3

* convert RestProperty/SpreadProperty to RestElement/SpreadElement

* add virtual types to make it easier to upgrade
@lock lock bot added the outdated label Oct 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.