Add babel-plugin-transform-async-to-module-method to packageData.js#46
Conversation
| @@ -1,5 +1,6 @@ | |||
| const transformPlugins = { | |||
| 'babel-plugin-transform-async-to-generator': '@babel/plugin-transform-async-to-generator', | |||
| 'babel-plugin-transform-async-to-module-method': '@babel/plugin-transform-async-to-generator', | |||
There was a problem hiding this comment.
oh this an interesting one - technically it's that new package but we have to support adding options.. yay 😅
{
"plugins": [
- ["@babel/transform-async-to-module-method"]
+ ["@babel/transform-async-to-generator", {
+ "module": "bluebird",
+ "method": "coroutine"
+ }]
]
}Also very few people use this package but I guess figuring it out could be useful
There was a problem hiding this comment.
Oops, sorry I forgot the option 😭
cf18644 to
2f9f89a
Compare
| "@babel/template": "7.0.0-beta.39", | ||
| "@babel/traverse": "7.0.0-beta.39", | ||
| "@babel/types": "7.0.0-beta.39", | ||
| "[object Object]": "7.0.0-beta.39", |
There was a problem hiding this comment.
@hzoo hmm... It seems better to expand it as a character string? But maybe it is difficult.🤔
expect(upgradeDeps(depsFixture, VERSION)).toMatchSnapshot();
There was a problem hiding this comment.
just came across this while browsing older PRs!
if i'm understanding this correctly, it looks like this is upgradeDeps trying to print { module: 'bluebird', method: 'coroutine' } as a dependency?
think this emerges from the handling of plugins that need to be replaced by two dependencies:
babel-upgrade/src/packageData.js
Line 89 in 00c5c2f
babel-upgrade/src/upgradeDeps.js
Lines 24 to 25 in 00c5c2f
we could check to make sure we only print strings to deps?
some stuff i was playing with in #55 might also relate here -- i was thinking about using some sort of object shape (as seen at https://github.com/babel/babel-upgrade/pull/55/files#diff-cf061c524d265adf7cfa52b35375795cR128) to describe deps that require more complicated transformations
No description provided.