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

extending config breaks coverage #732

Closed
genepaul opened this issue Nov 30, 2017 · 10 comments
Closed

extending config breaks coverage #732

genepaul opened this issue Nov 30, 2017 · 10 comments

Comments

@genepaul
Copy link
Contributor

Expected Behavior

Using "extends": "./path/to/.nycrc" should work the same as using all the configuration options in the same config.

Observed Behavior

Using "extends' causes broken/unknown coverage - ignores any extended configs

Bonus Points! Code (or Repository) that Reproduces Issue

http://github.com/genepaul/nyc-test

Forensic Information

Operating System: Windows 7
Environment Information: information about your project's environment, see instructions below:

  1. run the following script:

sh -c 'node --version; npm --version; npm ls' > output.txt

  1. share a gist with the contents of output.txt.

https://gist.github.com/genepaul/b07ab7795a89dab1cc490b5a5593e93a

@genepaul
Copy link
Contributor Author

genepaul commented Nov 30, 2017

This appeared to work in a previous version (10.2.0). After upgrading to latest (11.3.0), it appears to have broken.

@genepaul
Copy link
Contributor Author

from what I can tell, yargs seems to check that the file is .json to do the extend. But I am certain this works with .nycrc in 10.2.0 of nyc, so I'm not sure what changed.

@genepaul
Copy link
Contributor Author

@bcoe, I submitted a pr: yargs/yargs#1080 that should take care of this.

@bcoe
Copy link
Member

bcoe commented Mar 4, 2018

@genepaul I've landed your feature in yargs, and published it to the next tag:

npm i yargs@next

mind trying to upgrade yargs in nyc, and if the upstream fix works for you, we can publish a new version of nyc.

@genepaul
Copy link
Contributor Author

genepaul commented Mar 5, 2018

Thanks so much! I'll test it today.

@genepaul
Copy link
Contributor Author

genepaul commented Mar 5, 2018

@bcoe - I tested this on a project that had been breaking when upgrading nyc, and verified that extending configs works fine now.

@bcoe
Copy link
Member

bcoe commented Mar 5, 2018

@genepaul great 👍 if you'd like to submit a patch with the yargs update, so that we don't forget, I'll get it landed soon.

@genepaul
Copy link
Contributor Author

genepaul commented Mar 7, 2018

Done.

@Gopikrishna19
Copy link

@bcoe can we please have a release for this change?

@stale stale bot added the wontfix label Jan 6, 2019
@JaKXz
Copy link
Member

JaKXz commented Jan 14, 2019

This fix has been implemented

@JaKXz JaKXz closed this as completed Jan 14, 2019
@JaKXz JaKXz removed the wontfix label Jan 14, 2019
@istanbuljs istanbuljs deleted a comment from stale bot Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants