babel / notes

♬ Notes from the @Babel Team (discuss in PRs)
https://github.com/babel/notes#meetings
122 stars 16 forks source link

Meta: breaking changes/codemod TODOs for Babel 7 #30

Closed hzoo closed 6 years ago

hzoo commented 7 years ago

We are already pretty swamped with all the work for v7 (and regular work) but I'd be really amazing if the community could help with creating an upgrade tool

So we already have started a guide for updating tool authors: https://github.com/babel/babel.github.io/blob/master/_posts/2017-03-01-upgrade-to-babel-7-for-tool-authors.md / https://babeljs.io/blog/2017/03/01/upgrade-to-babel-7-for-tool-authors (feel free to note and make a PR there too)

I'm just adding a place for people to post issues they've encountered when trying to update that aren't already documented - each of these could be an opportunity to make a codemod (or it's an actual bug)


Example:

file.delete has been removed

https://github.com/power-assert-js/babel-plugin-espower/commit/b887dc39757cef52b307fe7c8bbc661e092b94d0 by @twada

- file.delete('espowerAssertionVisitor');
+ file.set('espowerAssertionVisitor', null);
hzoo commented 7 years ago

Another PR that breaks plugin API: https://github.com/babel/babel/pull/5923, docs PR https://github.com/babel/babel.github.io/pull/1286

hzoo commented 7 years ago

https://github.com/hzoo/gyp.js/commit/a1712819b362955ae6e22dc70a518711c5151aa3 - no changes necessary


https://github.com/cst/cst/pull/164:


https://github.com/reactjs/redux/pull/2550 no changes needed

hzoo commented 7 years ago

https://github.com/styled-components/babel-plugin-styled-components/pull/84 file.opts.filename instead of file.opts.basename

xtuc commented 7 years ago

We need to add them to the breaking changes documented in the blog post. I'll try today if I have some time.

twada commented 6 years ago

https://github.com/power-assert-js/babel-plugin-espower/pull/23/commits/89a9d7e998f5c708429d56ee3a6a01cbbee5cb3c file.opts.parserOpts instead of file.parserOpts

twada commented 6 years ago

https://github.com/power-assert-js/babel-plugin-espower/pull/23/commits/ff72e23275996d69e5ed72f3c6f9cdaa05e0159c use file.inputMap to handle incoming sourcemaps (file.opts.inputSourceMap has gone away)

hzoo commented 6 years ago

@babel-bot move to babel/babel-upgrade

hzoo commented 6 years ago

Moving to https://github.com/babel/babel-upgrade/issues/59