-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
feat: Add support for yaml configuration file #1054
Conversation
@c-bandy thank you for the PR! would you mind adding to the README where it mentions the different kinds of rc files you can have? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see some basic tests for this. To do so please:
- Add js-yaml as a dev dependency.
- See test/nyc-integration.js at about line 445 (search for
describe('.nycrc', function () {
). This is where we have testing for.nycrc
. I think we should have similar tests forjs-yaml
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple minor coverage related issues then this should be good to merge.
@c-bandy Also please mention these new configuration files in our README.md. See https://github.com/istanbuljs/nyc#configuring-nyc |
@coreyfarrell Added! 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we are going to support multiple yaml parsers, let's pull the logic for loading the yaml parser into its own module lib/yaml
...
I'd rather just support one yaml parser. We're opening ourselves up to config bugs that exist in one parser but not the other, I'd rather be less democratic and pick one.
@c-bandy really appreciate this contribution 😄 the tests certainly seem like they're on the right track. |
@c-bandy I missed that both |
@bcoe Thanks for your feedback! I will look into making these changes today |
@c-bandy please hold off for a bit, we've been having a discussion on our slack about the best way to handle yaml and other formats. I don't think we've come to a consensus yet. At this point we are focused on getting [email protected] released. YAML config will be a non-breaking change so we can consider it for 14.1.0. |
Copying here my suggestion from the discussion elsewhere: since so many testing libraries include |
@c-bandy sorry to be a pain, I know it's annoying when a PR is blocked by folks not being able to reach consensus. If you'd like to join in with the conversation, we actually have a slack here: http://devtoolscommunity.herokuapp.com/ Would love to get your opinion as we opine. |
I have incorporated changed based on our discussions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is looking good to me, I like the introduction of the lookup table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving this but not sure it should be merged right now or wait until 14.0.0 is released.
I added support for
.yml
and.yaml
config files as per request in #892.I wasn't sure how to implement tests for this, so suggestions are welcome.