added flow to babel cli#10244
added flow to babel cli#10244nicolo-ribaudo merged 2 commits intobabel:masterfrom letladi:add-flow-to-babel-cli
Conversation
|
I re-created my changes from the latest master branch. I don't know what changes I need to make to make the CI checks pass. |
Test is good as long as Travis CI passes. Sometimes CircleCI returns flaky result. |
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11224/ |
packages/babel-cli/src/babel/file.js
Outdated
| (!cliOptions.outFile && babelOptions.sourceMaps) | ||
| ) { | ||
| code += "\n" + convertSourceMap.fromObject(map).toComment(); | ||
| code += "\n" + convertSourceMap.fromObject(map.toJSON()).toComment(); |
There was a problem hiding this comment.
toJSON() will incur extra Object memory allocation here.
Given that convertSourceMap can work with SourceMapGenerator to generate a base64 comment, I would suggest we extend the signature of fromObject to state that it can work with SourceMapGenerator.
babel/lib/third-party-libs.js.flow
Line 180 in fced5ce
There was a problem hiding this comment.
Alright. I can make that change.
Added flow to the babel-cli package.