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

Fixed null error in plugin opts and added a test for it #9945

Merged
merged 2 commits into from May 7, 2019

Conversation

divbhasin
Copy link
Contributor

Q                       A
Fixed Issues? Fixes #9936
Patch: Bug Fix? Yes
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes? No
License MIT

Note: this is my first PR, so I would welcome as much feedback as possible to learn as quickly as possible.

As described in #9936, there is an error when a null option is passed with a plugin in someone's .babelrc file. As suggested by @nicolo-ribaudo, I made a small change to check for the null value in packages/babel-core/src/config/validation/option-assertions.js and added the appropriate test in packages/babel-core/test/option-manager.js. The test only checks one plugin, as the error would just extend to multiple plugins, if that is the case.

@babel-bot
Copy link
Collaborator

babel-bot commented May 5, 2019

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

@babel-bot
Copy link
Collaborator

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

…e and undefined cases

Co-Authored-By: divbhasin <divbest99@gmail.com>
@nicolo-ribaudo nicolo-ribaudo added area: errors pkg: core PR: Polish 💅 A type of pull request used for our changelog categories labels May 6, 2019
@nicolo-ribaudo
Copy link
Member

Thank you!

@nicolo-ribaudo nicolo-ribaudo merged commit 7942dc0 into babel:master May 7, 2019
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: errors outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: core PR: Polish 💅 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build fails @babel/core - Invalid value used as weak map key
4 participants