-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is path.resolve
used on subprocessBin
but not subprocessBin
?
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.
@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.x
which is a pretty major change (so that I can use the newpkgConf
feature), 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