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

Meta: create a tool to upgrade users to Babel 7 #44

hzoo opened this issue Nov 7, 2017 · 4 comments

Meta: create a tool to upgrade users to Babel 7 #44

hzoo opened this issue Nov 7, 2017 · 4 comments


Copy link

@hzoo hzoo commented Nov 7, 2017

It would be something that would work for 90% of most users (not using babel-core directly or any crazy options), would love for the community to come together to help out with this, especially as everyone is trying to update to v7 (at least can comment on the kinds of issues you have faced to see if they can be automated).

Because most of this is json, we need a tool that handles json files.

List of packages: (not all have an equivalent because they can be new for v7)

Scoped packages

  • Rename packages in package.json
    • Things like "babel-core": "6.26.0" -> "@babel/core": "7.0.0-beta.31" (support changing to the beta version or whatever is in the latest dist tag on npm)
  • Fix config in .babelrc
    • { "presets": ["env"] } -> { "presets": ["@babel/env"] }


  • #6575 Removed all -es20xx- prefixes from packages

babel-plugin-transform-es2015-classes -> babel-plugin-transform-classes
transform-es3-member-expression-literals -> transform-member-expression-literals

  • #6573 Merged transform-async-to-module-method into transform-async-to-generator as an option

change package json, modify babelrc.

  • #6570 Proposals are renamed

babel-plugin-transform-class-properties -> babel-plugin-proposal-class-properties

Peer Dep on @babel/core

This means if there wasn't a @babel/core at the top level, it should be added in package.json


Not sure if we have to do this, not reason to change if it's not necessary.

I think if they are using the "env" key a lot we could change it. The reason why we can change the config in the first place is because it's json and not js


I think we should probably add @babel/node back as a dependency in cli anyway

Add @babel/node as a dependency if they are using it in scripts.

Copy link

@Andarist Andarist commented Nov 7, 2017

Fix config in .babelrc

I know many people using a clever trick of doing {"presets": ["./.babelrc.js"]} in .babelrc. It would be nice to upgrade automatically those requested presets with relative paths.

Copy link

@rajasekarm rajasekarm commented Nov 10, 2017

Copy link
Member Author

@hzoo hzoo commented Feb 19, 2018

Ok closing since this is somewhat working already and we can add issues there instead.

@hzoo hzoo closed this Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.