all of nyc's configuration options can now also be set in package.json - #167
Conversation
|
I took a look through this, looking mostly at how it might affect the extensions feature. I think I like the changes. I did try it out on on of my projects, but I'm getting an error from istanbul, I think that was introduced in this recent merge 9fb7da4 from @novemberborn I'll try to drill down to see what's causing it more specifically and comment over on that PR. |
|
@lloydcotten if you delete I was seeing a similar problem, we should get to the bottom of this before we publish. |
|
Hmm... you are right. That does resolve it. I was seeing this: |
|
@lloydcotten do you caching turned on? |
|
Yes, I had caching on. |
|
@bcoe @lloydcotten the cache uses a salt derived from NYC's and Istanbul's version numbers. The version hasn't yet changed from before my path changes (it's still |
Remove tests for config.nyc entries in package.json. Using the fixture package.json for testing. Clean up config in actual package.json that was there for test purposes only.
|
@bcoe looks good! I took the liberty of pushing a commit which fixes some duplicate config tests. We're now also using |
|
@novemberborn from your discussion with @lloydcotten, it sounds like the act of bumping the version will fix the cache issue? I'll make this |
|
@bcoe I'm not sure why cache entries from an older version don't work, but if clearing the cache fixes the issue, then yes bumping the version should preclude any older cache entries from being used. |
| var config = this._loadConfig(opts) | ||
| this._istanbul = config.istanbul | ||
| this.subprocessBin = config.subprocessBin || path.resolve(__dirname, './bin/nyc.js') | ||
| this._tempDirectory = config.tempDirectory || './.nyc_output' |
There was a problem hiding this comment.
Why is path.resolve used on subprocessBin but not subprocessBin?
There was a problem hiding this comment.
@jameswomack I think the reasoning was that:
- if you explicitly specify the path to the bin that should be run, we assume you know the path that you want.
- otherwise we default to the bin that we know will be relative to
index.js.
all of nyc's configuration options can now also be set in package.json
This will need to be a major bump, because I've retired
config.nyc.This upgrades us to
yargs 4.xwhich is a pretty major change (so that I can use the newpkgConffeature), this is a pretty major change and I would love for folks to take an extra close look to make sure I haven't broken anything.Note that I could delete a bunch of code with yargs' improved command functionality \o/
Reviewers: @novemberborn, @jamestalmage, @jameswomack, @lloydcotten