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

added flow to babel cli #10244

Merged
merged 2 commits into from
Jul 25, 2019
Merged

added flow to babel cli #10244

merged 2 commits into from
Jul 25, 2019

Conversation

letladi
Copy link
Contributor

@letladi letladi commented Jul 19, 2019

Added flow to the babel-cli package.

@letladi
Copy link
Contributor Author

letladi commented Jul 19, 2019

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.

@JLHwung
Copy link
Contributor

JLHwung commented Jul 20, 2019

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.

@babel-bot
Copy link
Collaborator

babel-bot commented Jul 20, 2019

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11224/

@@ -65,7 +76,7 @@ export default async function({ cliOptions, babelOptions }) {
babelOptions.sourceMaps === "inline" ||
(!cliOptions.outFile && babelOptions.sourceMaps)
) {
code += "\n" + convertSourceMap.fromObject(map).toComment();
code += "\n" + convertSourceMap.fromObject(map.toJSON()).toComment();
Copy link
Contributor

@JLHwung JLHwung Jul 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

fromObject(obj: SourceMap): Converter,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright. I can make that change.

@JLHwung JLHwung added the PR: Internal 🏠 A type of pull request used for our changelog categories label Jul 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants