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

Do not load root .babelrc #61

Merged
merged 3 commits into from
Sep 12, 2018
Merged

Do not load root .babelrc #61

merged 3 commits into from
Sep 12, 2018

Conversation

ykzts
Copy link
Contributor

@ykzts ykzts commented Sep 11, 2018

What: Do not load root .babelrc and babel.config.js in the run of transformFromAST in Babel v7.

Why: Without this change the Babel plugin will be loaded twice. (ref babel/babel#7911)

How: Set babelrc: false and configFile: false.

@ykzts
Copy link
Contributor Author

ykzts commented Sep 11, 2018

Jest: "global" coverage threshold for branches (100%) not met: 98.15%

🤔

@kentcdodds
Copy link
Owner

Thanks @ykzts! What if we didn't add the conditional logic and just made this code apply for any version of babel?

The reason that the code coverage isn't getting to 100% is because there's no test that runs both the Babel 6 and Babel 7 version of this code. I'm thinking that if we can just remove the condition and apply this to both then the code will be simpler and we wont have the coverage issue.

@ykzts
Copy link
Contributor Author

ykzts commented Sep 11, 2018

Babel v6 can not specify configFile in config, resulting in validation error. Therefore, conditional branching by version is necessary.

@ykzts
Copy link
Contributor Author

ykzts commented Sep 12, 2018

@kentcdodds nice!

@kentcdodds kentcdodds merged commit a3cd086 into kentcdodds:master Sep 12, 2018
@kentcdodds
Copy link
Owner

Thanks for the ping @ykzts! I thought I'd merged this 😅

@ykzts ykzts deleted the do-not-load-root-babelrc branch September 12, 2018 08:55
@kentcdodds
Copy link
Owner

🎉 This PR is included in version 3.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants