New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nyc

Package Overview
Dependencies
Maintainers
2
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nyc - npm Package Compare versions

Comparing version 5.2.0 to 5.3.0

4

CHANGELOG.md
## Change Log
### v5.3.0 (2016/01/05 14:07 -08:00)
- [#132](https://github.com/bcoe/nyc/pull/132/files) Move config to top level nyc argument. (@jamestalmage)
### v5.2.0 (2016/01/02 17:13 -08:00)

@@ -4,0 +8,0 @@

@@ -18,2 +18,4 @@ /* global __coverage__ */

var findCacheDir = require('find-cache-dir')
var pkgUp = require('pkg-up')
var readPkg = require('read-pkg')

@@ -31,9 +33,8 @@ /* istanbul ignore next */

this._tempDirectory = opts.tempDirectory || './.nyc_output'
this.cwd = opts.cwd || process.env.NYC_CWD || process.cwd()
var config = this._loadConfig(opts)
this.cwd = config.cwd
this.reporter = arrify(opts.reporter || 'text')
// you can specify config in the nyc stanza of package.json.
var config = require(path.resolve(this.cwd, './package.json')).config || {}
config = config.nyc || {}
// load exclude stanza from config.

@@ -64,2 +65,20 @@ this.include = false

NYC.prototype._loadConfig = function (opts) {
var cwd = opts.cwd || process.env.NYC_CWD || process.cwd()
var pkgPath = pkgUp.sync(cwd)
// you can specify config in the nyc stanza of package.json.
var config
if (pkgPath) {
cwd = path.dirname(pkgPath)
var pkg = readPkg.sync(pkgPath, {normalize: false})
config = pkg.nyc || (pkg.config && pkg.config.nyc)
}
config = config || {}
config.cwd = cwd
return config
}
NYC.prototype._createTransform = function () {

@@ -66,0 +85,0 @@ var _this = this

32

package.json
{
"name": "nyc",
"version": "5.2.0",
"version": "5.3.0",
"description": "a code coverage tool that works well with subprocesses.",

@@ -26,16 +26,14 @@ "main": "index.js",

],
"config": {
"nyc": {
"exclude": [
"node_modules",
"bin",
"coverage",
"test/fixtures/coverage.js",
"test/build/*",
"test/nyc-test.js",
"test/source-map-cache.js",
"index.covered.js",
"test/fixtures/_generateCoverage.js"
]
}
"nyc": {
"exclude": [
"node_modules",
"bin",
"coverage",
"test/fixtures/coverage.js",
"test/build/*",
"test/nyc-test.js",
"test/source-map-cache.js",
"index.covered.js",
"test/fixtures/_generateCoverage.js"
]
},

@@ -72,3 +70,3 @@ "standard": {

"find-cache-dir": "^0.1.1",
"foreground-child": "^1.3.3",
"foreground-child": "1.3.3",
"glob": "^6.0.2",

@@ -79,2 +77,4 @@ "istanbul": "^0.4.1",

"mkdirp": "^0.5.0",
"pkg-up": "^1.0.0",
"read-pkg": "^1.1.0",
"resolve-from": "^2.0.0",

@@ -81,0 +81,0 @@ "rimraf": "^2.5.0",

@@ -85,3 +85,3 @@ # nyc

You can tell nyc to exclude specific files and directories by adding
an `config.nyc.exclude` array to your `package.json`. Each element of
an `nyc.exclude` array to your `package.json`. Each element of
the array is a glob pattern indicating which paths should be omitted.

@@ -94,3 +94,3 @@

For example, the following config will exclude all `node_modules`,
For example, the following config will exclude everything in `node_modules`,
any files with the extension `.spec.js`, and anything in the `build`

@@ -100,5 +100,4 @@ directory:

```json
{"config": {
"nyc": {
"exclude": [
{"nyc": {
"exclude": [
"**/*.spec.js",

@@ -108,3 +107,3 @@ "build"

}
}}
}
```

@@ -111,0 +110,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc