diff --git a/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE.md
similarity index 56%
rename from ISSUE_TEMPLATE
rename to .github/ISSUE_TEMPLATE.md
index f891a2b6e..749671df0 100644
--- a/ISSUE_TEMPLATE
+++ b/.github/ISSUE_TEMPLATE.md
@@ -1,25 +1,26 @@
-## Link to bug demonstration repository.
+## Link to bug demonstration repository
## Expected Behavior
## Observed Behavior
-## Forensic Information
+### Troubleshooting steps
+- [ ] still occurrring when I put `cache: false` in my nyc config
-**Operating System:** the operating system you observed the issue on.
-**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
+## Environment Information
+
+```
+# paste the output here
-2. share a gist with the contents of output.txt.
+```
diff --git a/.gitignore b/.gitignore
index 397b8d1ea..2e5568e18 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,6 @@ coverage
node_modules
test/build/
.self_coverage
-*.covered.js
+self-coverage/
*.swp
needs-transpile.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7e3bc6ce1..2bc3490be 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,13 +2,56 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+# [14.0.0](https://github.com/istanbuljs/nyc/compare/v13.3.0...v14.0.0) (2019-04-15)
+
+
+### Bug Fixes
+
+* Add `cwd` option to instrument command ([#1024](https://github.com/istanbuljs/nyc/issues/1024)) ([051d95a](https://github.com/istanbuljs/nyc/commit/051d95a))
+* Add config values to hash salt ([#988](https://github.com/istanbuljs/nyc/issues/988)) ([7ac325d](https://github.com/istanbuljs/nyc/commit/7ac325d)), closes [#522](https://github.com/istanbuljs/nyc/issues/522)
+* Exclude negated not working with '--all' switch ([#977](https://github.com/istanbuljs/nyc/issues/977)) ([91de23c](https://github.com/istanbuljs/nyc/commit/91de23c))
+* Make --all work for transpiled code ([#1047](https://github.com/istanbuljs/nyc/issues/1047)) ([18e04ba](https://github.com/istanbuljs/nyc/commit/18e04ba))
+* Resolve absolute paths in nyc instrument ([#1012](https://github.com/istanbuljs/nyc/issues/1012)) ([3cb1861](https://github.com/istanbuljs/nyc/commit/3cb1861)), closes [#1014](https://github.com/istanbuljs/nyc/issues/1014)
+* Set processinfo pid/ppid to actual numbers ([#1057](https://github.com/istanbuljs/nyc/issues/1057)) ([32f75b0](https://github.com/istanbuljs/nyc/commit/32f75b0))
+* Use a single instance of nyc for all actions of main command. ([#1059](https://github.com/istanbuljs/nyc/issues/1059)) ([b909575](https://github.com/istanbuljs/nyc/commit/b909575))
+
+
+### Features
+
+* Add `delete` option to instrument command ([#1005](https://github.com/istanbuljs/nyc/issues/1005)) ([d6db551](https://github.com/istanbuljs/nyc/commit/d6db551))
+* Add `include` and `exclude` options to instrument command ([#1007](https://github.com/istanbuljs/nyc/issues/1007)) ([8da097e](https://github.com/istanbuljs/nyc/commit/8da097e))
+* Add processinfo index, add externalId ([#1055](https://github.com/istanbuljs/nyc/issues/1055)) ([8dcf180](https://github.com/istanbuljs/nyc/commit/8dcf180))
+* Add support for nyc.config.js ([#1019](https://github.com/istanbuljs/nyc/issues/1019)) ([3b203c7](https://github.com/istanbuljs/nyc/commit/3b203c7))
+* Add support to exclude files on coverage report generation ([#982](https://github.com/istanbuljs/nyc/issues/982)) ([509c6aa](https://github.com/istanbuljs/nyc/commit/509c6aa))
+* Add test-exclude args to check-coverage and report subcommands. ([0fc217e](https://github.com/istanbuljs/nyc/commit/0fc217e))
+* Always build the processinfo temp dir ([#1061](https://github.com/istanbuljs/nyc/issues/1061)) ([c213469](https://github.com/istanbuljs/nyc/commit/c213469))
+* Enable `es-modules` option for nyc instrument command ([#1006](https://github.com/istanbuljs/nyc/issues/1006)) ([596b120](https://github.com/istanbuljs/nyc/commit/596b120))
+* Fix excludeAfterRemap functionality. ([36bcc0b](https://github.com/istanbuljs/nyc/commit/36bcc0b))
+* Implement `nyc instrument --complete-copy` ([#1056](https://github.com/istanbuljs/nyc/issues/1056)) ([2eb13c6](https://github.com/istanbuljs/nyc/commit/2eb13c6))
+* Remove bundling ([#1017](https://github.com/istanbuljs/nyc/issues/1017)) ([b25492a](https://github.com/istanbuljs/nyc/commit/b25492a))
+* Support turning off node_modules default exclude via `exclude-node-modules` option ([#912](https://github.com/istanbuljs/nyc/issues/912)) ([b7e16cd](https://github.com/istanbuljs/nyc/commit/b7e16cd))
+* Add support for `--exclude-node-modules` to subcommands. ([#1053](https://github.com/istanbuljs/nyc/issues/1053)) ([e597c46](https://github.com/istanbuljs/nyc/commit/e597c46))
+
+
+### BREAKING CHANGES
+
+* The `--exclude-after-remap` option is now functional and enabled by default. This causes the `include` and `exclude` lists to be processed after using source maps to determine the original filename of sources.
+* Add a file named 'index.json' to the .nyc_output/processinfo directory, which has a different format from the other files in this dir.
+* Change the data type of the pid/ppid fields in processinfo files
+* `nyc instrument` now honors `include` and `exclude` settings, potentially resulting in some files that were previously instrumented being ignored.
+* The `plugins` option has been renamed to `parser-plugins`.
+* The logic involving include/exclude processing has changed. Results should be verified to ensure all desired sources have coverage data.
+* `nyc instrument` now enables the `--es-module` option by default. This can cause failures to instrument scripts which violate `'use strict'` rules.
+
+
+
# [13.3.0](https://github.com/istanbuljs/nyc/compare/v13.2.0...v13.3.0) (2019-02-14)
### Bug Fixes
-* update dependendencies due to vulnerabilities ([#992](https://github.com/istanbuljs/nyc/issues/992)) ([e8cc59b](https://github.com/istanbuljs/nyc/commit/e8cc59b)), closes [#991](https://github.com/istanbuljs/nyc/issues/991)
+* update dependencies due to vulnerabilities ([#992](https://github.com/istanbuljs/nyc/issues/992)) ([e8cc59b](https://github.com/istanbuljs/nyc/commit/e8cc59b)), closes [#991](https://github.com/istanbuljs/nyc/issues/991)
### Features
@@ -53,7 +96,7 @@ All notable changes to this project will be documented in this file. See [standa
### Bug Fixes
-* add flag to allow control of intrumenter esModules option, default to looser parsing ([#863](https://github.com/istanbuljs/nyc/issues/863)) ([6b6cd5e](https://github.com/istanbuljs/nyc/commit/6b6cd5e))
+* add flag to allow control of instrumenter esModules option, default to looser parsing ([#863](https://github.com/istanbuljs/nyc/issues/863)) ([6b6cd5e](https://github.com/istanbuljs/nyc/commit/6b6cd5e))
* Enable es-modules by default. ([#889](https://github.com/istanbuljs/nyc/issues/889)) ([d0b76e2](https://github.com/istanbuljs/nyc/commit/d0b76e2)), closes [#796](https://github.com/istanbuljs/nyc/issues/796)
* Update caching-transform options. ([#873](https://github.com/istanbuljs/nyc/issues/873)) ([52b69ef](https://github.com/istanbuljs/nyc/commit/52b69ef))
* use uuid/v4 to generate unique identifiers. ([#883](https://github.com/istanbuljs/nyc/issues/883)) ([7483ed9](https://github.com/istanbuljs/nyc/commit/7483ed9))
diff --git a/README.md b/README.md
index 8906b4a90..ee2b8810e 100644
--- a/README.md
+++ b/README.md
@@ -195,53 +195,139 @@ Install custom reporters as a development dependency and you can use the `--repo
nyc report --reporter=
```
-## Excluding files
+## Producing instrumented source
-You can tell nyc to exclude specific files and directories by adding
-an `nyc.exclude` array to your `package.json`. Each element of
-the array is a glob pattern indicating which paths should be omitted.
+The `nyc instrument` command can produce a set of instrumented source files.
+These files are suitable for client side deployment in end to end testing.
+You can create an instrumented version of your source code by running:
+
+```bash
+nyc instrument [output]
+```
+
+` ` can be any file or directory within the project root directory.
+The `[output]` directory is optional and can be located anywhere, if it is not set the instrumented code will be sent to `stdout`.
+For example, `nyc instrument . ./output` will produce instrumented versions of any source files it finds in `.` and store them in `./output`.
+
+Any existing output can be removed by specifying the `--delete` option.
+Run `nyc instrument --help` to display a full list of available command options.
+
+**Note:** `nyc instrument` will not copy the contents of a `.git` folder to the output directory.
+
+## Setting the project root directory
+
+nyc runs a lot of file system operations relative to the project root directory.
+During startup nyc will look for the *default* project root directory.
+The *default* project root directory is the first directory found that contains a `package.json` file when searching from the current working directory up.
+If nyc fails to find a directory containing a `package.json` file, it will use the current working directory as the *default* project root directory.
+You can change the project root directory with the `--cwd` option.
+
+nyc uses the project root directory when:
+ * looking for source files to instrument
+ * creating globs for include and exclude rules during file selection
+ * loading custom require hooks from the `require` array
+
+nyc may create artefact directories within the project root, such as:
+ * the report directory, `/coverage`
+ * the cache directory, `/node_modules/.cache/nyc`
+ * the temp directory, `/.nyc_output`
+
+## Selecting files for coverage
+
+By default, nyc only collects coverage for source files that are visited during a test.
+It does this by watching for files that are `require()`'d during the test.
+When a file is `require()`'d, nyc creates and returns an instrumented version of the source, rather than the original.
+Only source files that are visited during a test will appear in the coverage report and contribute to coverage statistics.
+
+nyc will instrument all files if the `--all` flag is set or if running `nyc instrument`.
+In this case all files will appear in the coverage report and contribute to coverage statistics.
+
+nyc will only collect coverage for files that are located under `cwd`, and then only `*.js` files or files with extensions listed in the `extension` array.
+
+You can reduce the set of instrumented files by adding `include` and `exclude` filter arrays to your config.
+These allow you to shape the set of instrumented files by specifying glob patterns that can filter files from the default instrumented set.
+The `exclude` array may also use exclude negated glob patterns, these are specified with a `!` prefix, and can restore sub-paths of excluded paths.
Globs are matched using [minimatch](https://www.npmjs.com/package/minimatch).
-For example, the following config will exclude any files with the extension `.spec.js`,
-and anything in the `build` directory:
+We use the following process to remove files from consideration:
+ 1. Limit the set of instrumented files to those files in paths listed in the `include` array.
+ 2. Remove any files that are found in the `exclude` array.
+ 3. Restore any exclude negated files that have been excluded in step 2.
+
+### Using include and exclude arrays
+
+If there are paths specified in the `include` array, then the set of instrumented files will be limited to eligible files found in those paths.
+If the `include` array is left undefined all eligible files will be included, equivalent to setting `include: ['**']`.
+Multiple `include` globs can be specified on the command line, each must follow a `--include`, `-n` switch.
+
+If there are paths specified in the `exclude` array, then the set of instrumented files will not feature eligible files found in those paths.
+You can also specify negated paths in the `exclude` array, by prefixing them with a `!`.
+Negated paths can restore paths that have been already been excluded in the `exclude` array.
+Multiple `exclude` globs can be specified on the command line, each must follow a `--exclude`, `-x` switch.
+
+The `exclude` option has the following defaults settings:
+```js
+[
+ 'coverage/**',
+ 'packages/*/test/**',
+ 'test/**',
+ 'test{,-*}.js',
+ '**/*{.,-}test.js',
+ '**/__tests__/**',
+ '**/node_modules/**',
+ '**/babel.config.js'
+]
+```
+These settings exclude `test` and `__tests__` directories as well as `test.js`, `*.test.js`, and `test-*.js` files.
+Specifying your own exclude property completely replaces these defaults.
+
+For example, the following config will collect coverage for every file in the `src` directory regardless of whether it is `require()`'d in a test.
+It will also exclude any files with the extension `.spec.js`.
```json
{
"nyc": {
+ "all": true,
+ "include": [
+ "src/**/*.js"
+ ],
"exclude": [
- "**/*.spec.js",
- "build"
+ "**/*.spec.js"
]
}
}
```
-> Note: Since version 9.0 files under `node_modules/` are excluded by default.
- add the exclude rule `!**/node_modules/` to stop this.
-> Note: exclude defaults to `['coverage/**', 'test/**', 'test{,-*}.js', '**/*.test.js', '**/__tests__/**', '**/node_modules/**']`,
-which would exclude `test`/`__tests__` directories as well as `test.js`, `*.test.js`,
-and `test-*.js` files. Specifying your own exclude property overrides these defaults.
+**Note:** Be wary of automatic OS glob expansion when specifying include/exclude globs with the CLI.
+To prevent this, wrap each glob in single quotes.
+
+### Including files within `node_modules`
-## Including files
+We always add `**/node_modules/**` to the exclude list, even if not specified in the config.
+You can override this by setting `--exclude-node-modules=false`.
-As an alternative to providing a list of files to `exclude`, you can provide
-an `include` key with a list of globs to specify specific files that should be covered:
+For example, in the following config, `"excludeNodeModules: false"` will prevent `node_modules` from being added to the exclude rules.
+The set of include rules then restrict nyc to only consider instrumenting files found under the `lib/` and `node_modules/@my-org/` directories.
+The exclude rules then prevent nyc instrumenting anything in a `test` folder and the file `node_modules/@my-org/something/unwanted.js`.
```json
{
"nyc": {
- "include": ["**/build/umd/moment.js"]
+ "all": true,
+ "include": [
+ "lib/**",
+ "node_modules/@my-org/**"
+ ],
+ "exclude": [
+ "node_modules/@my-org/something/unwanted.js",
+ "**/test/**"
+ ],
+ "excludeNodeModules": false
}
}
```
-> `nyc` uses minimatch for glob expansions, you can read its documentation [here](https://www.npmjs.com/package/minimatch).
-
-> Note: include defaults to `['**']`
-
-> ### Use the `--all` flag to include files that have not been required in your tests.
-
## Require additional modules
The `--require` flag can be provided to `nyc` to indicate that additional
@@ -255,7 +341,7 @@ modules should be required in the subprocess collecting coverage:
## Configuring `nyc`
-Any configuration options that can be set via the command line can also be specified in the `nyc` stanza of your package.json, or within a `.nycrc` (or `.nycrc.json`) file:
+Any configuration options that can be set via the command line can also be specified in the `nyc` stanza of your package.json, or within a `.nycrc`, `.nycrc.json`, or `nyc.config.js` file:
**package.json:**
@@ -294,6 +380,21 @@ Any configuration options that can be set via the command line can also be speci
}
```
+Configuration can also be provided by `nyc.config.js` if programmed logic is required:
+```js
+'use strict';
+const {defaultExclude} = require('test-exclude');
+const isWindows = require('is-windows');
+
+let platformExclude = [
+ isWindows() ? 'lib/posix.js' : 'lib/win32.js'
+];
+
+module.exports = {
+ exclude: platformExclude.concat(defaultExclude)
+};
+```
+
### Publish, and reuse, your nyc configuration
nyc allows you to inherit other configurations using the key `extends`. As an example,
@@ -362,76 +463,9 @@ rather than having to ignore every instance of that method:
}
```
-## Integrating with coveralls
-
-[coveralls.io](https://coveralls.io) is a great tool for adding
-coverage reports to your GitHub project. Here's how to get nyc
-integrated with coveralls and travis-ci.org:
-
-1. add the coveralls and nyc dependencies to your module:
-
- ```shell
- npm install coveralls nyc --save-dev
- ```
-
-2. update the scripts in your package.json to include these bins:
-
- ```json
- {
- "scripts": {
- "test": "nyc mocha",
- "coverage": "nyc report --reporter=text-lcov | coveralls"
- }
- }
- ```
-
-3. For private repos, add the environment variable `COVERALLS_REPO_TOKEN` to travis.
-
-4. add the following to your `.travis.yml`:
-
- ```yaml
- after_success: npm run coverage
- ```
-
-That's all there is to it!
-
-> Note: by default coveralls.io adds comments to pull-requests on GitHub, this can feel intrusive. To disable this, click on your repo on coveralls.io and uncheck `LEAVE COMMENTS?`.
-
-## Integrating with codecov
-
-`nyc npm test && nyc report --reporter=text-lcov > coverage.lcov && codecov`
-
-[codecov](https://codecov.io/) is a great tool for adding
-coverage reports to your GitHub project, even viewing them inline on GitHub with a browser extension:
-
-Here's how to get `nyc` integrated with codecov and travis-ci.org:
-
-1. add the codecov and nyc dependencies to your module:
-
- ```shell
- npm install codecov nyc --save-dev
- ```
-
-2. update the scripts in your package.json to include these bins:
-
- ```json
- {
- "scripts": {
- "test": "nyc tap ./test/*.js",
- "coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
- }
- }
- ```
-
-3. For private repos, add the environment variable `CODECOV_TOKEN` to travis.
-
-4. add the following to your `.travis.yml`:
-
- ```yaml
- after_success: npm run coverage
- ```
+## [Integrating with coveralls](./docs/setup-coveralls.md)
-That's all there is to it!
+## [Integrating with codecov](./docs/setup-codecov.md)
## Integrating with TAP formatters
diff --git a/bin/nyc.js b/bin/nyc.js
index 2a0690630..cd225844d 100755
--- a/bin/nyc.js
+++ b/bin/nyc.js
@@ -2,12 +2,7 @@
const configUtil = require('../lib/config-util')
const foreground = require('foreground-child')
-var NYC
-try {
- NYC = require('../index.covered.js')
-} catch (e) {
- NYC = require('../index.js')
-}
+const NYC = require('../index.js')
const processArgs = require('../lib/process-args')
const sw = require('spawn-wrap')
@@ -70,35 +65,25 @@ if ([
), function (done) {
var mainChildExitCode = process.exitCode
+ nyc.writeProcessIndex()
+
if (argv.checkCoverage) {
- checkCoverage(argv)
+ nyc.checkCoverage({
+ lines: argv.lines,
+ functions: argv.functions,
+ branches: argv.branches,
+ statements: argv.statements
+ }, argv['per-file'])
process.exitCode = process.exitCode || mainChildExitCode
- if (!argv.silent) report(argv)
- return done()
- } else {
- if (!argv.silent) report(argv)
- return done()
}
+
+ if (!argv.silent) {
+ nyc.report()
+ }
+
+ return done()
})
} else {
// I don't have a clue what you're doing.
yargs.showHelp()
}
-
-function report (argv) {
- process.env.NYC_CWD = process.cwd()
-
- var nyc = new NYC(argv)
- nyc.report()
-}
-
-function checkCoverage (argv, cb) {
- process.env.NYC_CWD = process.cwd()
-
- ;(new NYC(argv)).checkCoverage({
- lines: argv.lines,
- functions: argv.functions,
- branches: argv.branches,
- statements: argv.statements
- }, argv['per-file'])
-}
diff --git a/bin/wrap.js b/bin/wrap.js
index 0ec3cb0cd..1cff275e6 100644
--- a/bin/wrap.js
+++ b/bin/wrap.js
@@ -1,22 +1,20 @@
var sw = require('spawn-wrap')
-var NYC
-try {
- NYC = require('../index.covered.js')
-} catch (e) {
- NYC = require('../index.js')
-}
-
-var parentPid = process.env.NYC_PARENT_PID || '0'
-process.env.NYC_PARENT_PID = process.pid
+var NYC = require('../index.js')
var config = {}
if (process.env.NYC_CONFIG) config = JSON.parse(process.env.NYC_CONFIG)
config.isChildProcess = true
config._processInfo = {
- ppid: parentPid,
+ pid: process.pid,
+ ppid: process.ppid,
+ parent: process.env.NYC_PROCESS_ID || null,
root: process.env.NYC_ROOT_ID
}
+if (process.env.NYC_PROCESSINFO_EXTERNAL_ID) {
+ config._processInfo.externalId = process.env.NYC_PROCESSINFO_EXTERNAL_ID
+ delete process.env.NYC_PROCESSINFO_EXTERNAL_ID
+}
;(new NYC(config)).wrap()
diff --git a/build-self-coverage.js b/build-self-coverage.js
index bc8c2b63c..6526d0100 100644
--- a/build-self-coverage.js
+++ b/build-self-coverage.js
@@ -1,21 +1,43 @@
-var istanbul = require('istanbul-lib-instrument')
-var fs = require('fs')
-var path = require('path')
-
-;[
- 'index.js',
- 'lib/process.js'
-].forEach(function (name) {
- var indexPath = path.join(__dirname, name)
- var source = fs.readFileSync(indexPath, 'utf8')
-
- var instrumentor = istanbul.createInstrumenter({
- coverageVariable: '___NYC_SELF_COVERAGE___',
- esModules: true
- })
+const path = require('path')
+const fs = require('fs')
+const istanbul = require('istanbul-lib-instrument')
+const makeDir = require('make-dir')
+const glob = require('glob')
+
+const instrumenter = istanbul.createInstrumenter({
+ coverageVariable: '___NYC_SELF_COVERAGE___',
+ esModules: true
+})
+
+function instrumentFile (name) {
+ const indexPath = path.join(__dirname, name)
+ const outputPath = path.join(__dirname, 'self-coverage', name)
- var instrumentedSource = instrumentor.instrumentSync(source, indexPath)
+ const source = fs.readFileSync(indexPath, 'utf8')
+ const instrumentedSource = name === 'package.json' ? source : instrumenter.instrumentSync(source, indexPath)
- var outputPath = path.join(__dirname, name.replace(/\.js$/, '.covered.js'))
+ makeDir.sync(path.dirname(outputPath))
fs.writeFileSync(outputPath, instrumentedSource)
-})
+}
+
+function instrumentGlob (pattern) {
+ const result = glob.sync(pattern, {
+ cwd: __dirname,
+ nodir: true
+ })
+
+ result.forEach(file => {
+ instrumentFile(file)
+ })
+}
+
+function instrumentAll () {
+ /* package.json is just being copied so the instrumented copy of lib/hash.js can find it. */
+ const globPatterns = ['package.json', 'index.js', 'bin/*.js', 'lib/**/*.js']
+
+ globPatterns.forEach(pattern => {
+ instrumentGlob(pattern)
+ })
+}
+
+instrumentAll()
diff --git a/build-tests.js b/build-tests.js
deleted file mode 100644
index 3889f8806..000000000
--- a/build-tests.js
+++ /dev/null
@@ -1,56 +0,0 @@
-'use strict'
-
-var fs = require('fs')
-var path = require('path')
-var rimraf = require('rimraf')
-var mkdirp = require('make-dir')
-var forkingTap = require('forking-tap')
-var zeroFill = require('zero-fill')
-var sanitizeFilename = require('sanitize-filename')
-
-// Delete previous files.
-process.chdir(__dirname)
-rimraf.sync('test/build')
-mkdirp.sync(path.join(__dirname, 'test/build'))
-
-var testDir = path.join(__dirname, 'test/src')
-var buildDir = path.join(__dirname, 'test/build')
-var originalTestsFilename = path.join(testDir, 'nyc-tap.js')
-var originalTestSource = fs.readFileSync(originalTestsFilename, 'utf8')
-var individualTests = forkingTap(originalTestSource, {
- filename: originalTestsFilename,
- attachComment: true
-})
-
-function writeTest (test, i, enableCache) {
- var filename = ['built', zeroFill(3, i)]
- .concat(test.nestedName)
- .join('-')
-
- if (enableCache) {
- filename += '-cache'
- }
-
- filename += '.js'
-
- // file names with spaces are legal, but annoying to use w/ CLI commands
- filename = filename.replace(/\s/g, '_')
-
- // istanbul freaks out if the there are `'` characters in the file name
- filename = filename.replace(/'/g, '')
-
- // remove any illegal chars
- filename = sanitizeFilename(filename)
-
- var code = test.code
- if (enableCache) {
- code = code.replace('var enableCache = false', 'var enableCache = true')
- }
-
- fs.writeFileSync(path.join(buildDir, filename), code)
-}
-
-individualTests.forEach(function (test, i) {
- writeTest(test, i * 2, false)
- writeTest(test, i * 2 + 1, true)
-})
diff --git a/docs/setup-codecov.md b/docs/setup-codecov.md
new file mode 100644
index 000000000..9eabf4b18
--- /dev/null
+++ b/docs/setup-codecov.md
@@ -0,0 +1,34 @@
+# Integrating with codecov.io
+
+> **tl;dr**:
+> `nyc --reporter=lcov npm test && npx codecov`
+
+[codecov](https://codecov.io/) is a great tool for adding
+coverage reports to your GitHub project, even viewing them inline on GitHub with a browser extension:
+
+Here's how to get `nyc` integrated with codecov and travis-ci.org, assuming you have the `npx` executable (included with npm v5.2 and above):
+
+1. add the codecov and nyc dependencies to your module:
+
+ ```shell
+ npm install nyc --save-dev
+ ```
+
+2. update the scripts in your package.json to include these lines:
+
+ ```json
+ {
+ "scripts": {
+ "test": "nyc --reporter=lcov mocha ./test/*.js",
+ "coverage": "npx codecov"
+ }
+ }
+ ```
+
+3. For private repos, add the environment variable `CODECOV_TOKEN` to travis.
+
+4. add the following to your `.travis.yml`:
+
+ ```yaml
+ after_success: npm run coverage
+ ```
diff --git a/docs/setup-coveralls.md b/docs/setup-coveralls.md
new file mode 100644
index 000000000..623bd1bf2
--- /dev/null
+++ b/docs/setup-coveralls.md
@@ -0,0 +1,34 @@
+# Integrating with coveralls.io
+
+[coveralls.io](https://coveralls.io) is a great tool for adding
+coverage reports to your GitHub project. Here's how to get nyc
+integrated with coveralls and travis-ci.org:
+
+1. add the coveralls and nyc dependencies to your module:
+
+ ```shell
+ npm install coveralls nyc --save-dev
+ ```
+
+2. update the scripts in your package.json to include these bins:
+
+ ```json
+ {
+ "scripts": {
+ "test": "nyc mocha",
+ "coverage": "nyc report --reporter=text-lcov | coveralls"
+ }
+ }
+ ```
+
+3. For private repos, add the environment variable `COVERALLS_REPO_TOKEN` to travis.
+
+4. add the following to your `.travis.yml`:
+
+ ```yaml
+ after_success: npm run coverage
+ ```
+
+That's all there is to it!
+
+> Note: by default coveralls.io adds comments to pull-requests on GitHub, this can feel intrusive. To disable this, click on your repo on coveralls.io and uncheck `LEAVE COMMENTS?`.
diff --git a/index.js b/index.js
index 7ffde3216..f38645e6b 100755
--- a/index.js
+++ b/index.js
@@ -2,9 +2,8 @@
/* global __coverage__ */
-const arrify = require('arrify')
const cachingTransform = require('caching-transform')
-const util = require('util')
+const cpFile = require('cp-file')
const findCacheDir = require('find-cache-dir')
const fs = require('fs')
const glob = require('glob')
@@ -21,21 +20,16 @@ const resolveFrom = require('resolve-from')
const rimraf = require('rimraf')
const SourceMaps = require('./lib/source-maps')
const testExclude = require('test-exclude')
+const util = require('util')
const uuid = require('uuid/v4')
const debugLog = util.debuglog('nyc')
-var ProcessInfo
-try {
- ProcessInfo = require('./lib/process.covered.js')
-} catch (e) {
- /* istanbul ignore next */
- ProcessInfo = require('./lib/process.js')
-}
+const ProcessInfo = require('./lib/process.js')
/* istanbul ignore next */
-if (/index\.covered\.js$/.test(__filename)) {
- require('./lib/self-coverage-helper')
+if (/self-coverage/.test(__dirname)) {
+ require('../self-coverage-helper')
}
function NYC (config) {
@@ -50,15 +44,22 @@ function NYC (config) {
this._showProcessTree = config.showProcessTree || false
this._eagerInstantiation = config.eager || false
this.cwd = config.cwd || process.cwd()
- this.reporter = arrify(config.reporter || 'text')
+ this.reporter = [].concat(config.reporter || 'text')
this.cacheDirectory = (config.cacheDir && path.resolve(config.cacheDir)) || findCacheDir({ name: 'nyc', cwd: this.cwd })
this.cache = Boolean(this.cacheDirectory && config.cache)
+ this.extensions = [].concat(config.extension || [])
+ .concat('.js')
+ .map(ext => ext.toLowerCase())
+ .filter((item, pos, arr) => arr.indexOf(item) === pos)
+
this.exclude = testExclude({
cwd: this.cwd,
include: config.include,
- exclude: config.exclude
+ exclude: config.exclude,
+ excludeNodeModules: config.excludeNodeModules !== false,
+ extension: this.extensions
})
this.sourceMaps = new SourceMaps({
@@ -67,19 +68,12 @@ function NYC (config) {
})
// require extensions can be provided as config in package.json.
- this.require = arrify(config.require)
+ this.require = [].concat(config.require || [])
- this.extensions = arrify(config.extension).concat('.js').map(function (ext) {
- return ext.toLowerCase()
- }).filter(function (item, pos, arr) {
- // avoid duplicate extensions
- return arr.indexOf(item) === pos
- })
-
- this.transforms = this.extensions.reduce(function (transforms, ext) {
+ this.transforms = this.extensions.reduce((transforms, ext) => {
transforms[ext] = this._createTransform(ext)
return transforms
- }.bind(this), {})
+ }, {})
this.hookRequire = config.hookRequire
this.hookRunInContext = config.hookRunInContext
@@ -94,7 +88,7 @@ function NYC (config) {
NYC.prototype._createTransform = function (ext) {
var opts = {
- salt: Hash.salt,
+ salt: Hash.salt(this.config),
hashData: (input, metadata) => [metadata.filename],
onHash: (input, metadata, hash) => {
this.hashCache[metadata.filename] = hash
@@ -118,17 +112,10 @@ NYC.prototype._disableCachingTransform = function () {
}
NYC.prototype._loadAdditionalModules = function () {
- var _this = this
- this.require.forEach(function (r) {
- // first attempt to require the module relative to
- // the directory being instrumented.
- var p = resolveFrom.silent(_this.cwd, r)
- if (p) {
- require(p)
- return
- }
- // now try other locations, .e.g, the nyc node_modules folder.
- require(r)
+ this.require.forEach(requireModule => {
+ // Attempt to require the module relative to the directory being instrumented.
+ // Then try other locations, e.g. the nyc node_modules folder.
+ require(resolveFrom.silent(this.cwd, requireModule) || requireModule)
})
}
@@ -137,26 +124,19 @@ NYC.prototype.instrumenter = function () {
}
NYC.prototype._createInstrumenter = function () {
- return this._instrumenterLib(this.cwd, {
+ return this._instrumenterLib({
ignoreClassMethods: [].concat(this.config.ignoreClassMethod).filter(a => a),
produceSourceMap: this.config.produceSourceMap,
compact: this.config.compact,
preserveComments: this.config.preserveComments,
esModules: this.config.esModules,
- plugins: this.config.plugins
+ plugins: this.config.parserPlugins
})
}
NYC.prototype.addFile = function (filename) {
- var relFile = path.relative(this.cwd, filename)
- var source = this._readTranspiledSource(path.resolve(this.cwd, filename))
- var instrumentedSource = this._maybeInstrumentSource(source, filename, relFile)
-
- return {
- instrument: !!instrumentedSource,
- relFile: relFile,
- content: instrumentedSource || source
- }
+ const source = this._readTranspiledSource(filename)
+ this._maybeInstrumentSource(source, filename)
}
NYC.prototype._readTranspiledSource = function (filePath) {
@@ -174,21 +154,16 @@ NYC.prototype._readTranspiledSource = function (filePath) {
}
NYC.prototype.addAllFiles = function () {
- var _this = this
-
this._loadAdditionalModules()
this.fakeRequire = true
- this.walkAllFiles(this.cwd, function (filename) {
- filename = path.resolve(_this.cwd, filename)
- if (_this.exclude.shouldInstrument(filename)) {
- _this.addFile(filename)
- var coverage = coverageFinder()
- var lastCoverage = _this.instrumenter().lastFileCoverage()
- if (lastCoverage) {
- filename = lastCoverage.path
- coverage[filename] = lastCoverage
- }
+ this.exclude.globSync(this.cwd).forEach(relFile => {
+ const filename = path.resolve(this.cwd, relFile)
+ this.addFile(filename)
+ const coverage = coverageFinder()
+ const lastCoverage = this.instrumenter().lastFileCoverage()
+ if (lastCoverage) {
+ coverage[lastCoverage.path] = lastCoverage
}
})
this.fakeRequire = false
@@ -197,41 +172,38 @@ NYC.prototype.addAllFiles = function () {
}
NYC.prototype.instrumentAllFiles = function (input, output, cb) {
- var _this = this
- var inputDir = '.' + path.sep
- var visitor = function (filename) {
- var ext
- var transform
- var inFile = path.resolve(inputDir, filename)
- var code = fs.readFileSync(inFile, 'utf-8')
-
- for (ext in _this.transforms) {
- if (filename.toLowerCase().substr(-ext.length) === ext) {
- transform = _this.transforms[ext]
- break
- }
- }
-
- if (transform) {
- code = transform(code, { filename: filename, relFile: inFile })
- }
-
- if (!output) {
- console.log(code)
- } else {
- var outFile = path.resolve(output, filename)
+ let inputDir = '.' + path.sep
+ const visitor = relFile => {
+ const inFile = path.resolve(inputDir, relFile)
+ const inCode = fs.readFileSync(inFile, 'utf-8')
+ const outCode = this._transform(inCode, inFile) || inCode
+
+ if (output) {
+ const mode = fs.statSync(inFile).mode
+ const outFile = path.resolve(output, relFile)
mkdirp.sync(path.dirname(outFile))
- fs.writeFileSync(outFile, code, 'utf-8')
+ fs.writeFileSync(outFile, outCode)
+ fs.chmodSync(outFile, mode)
+ } else {
+ console.log(outCode)
}
}
this._loadAdditionalModules()
try {
- var stats = fs.lstatSync(input)
+ const stats = fs.lstatSync(input)
if (stats.isDirectory()) {
inputDir = input
- this.walkAllFiles(input, visitor)
+
+ const filesToInstrument = this.exclude.globSync(input)
+
+ if (this.config.completeCopy && output) {
+ const globOptions = { dot: true, nodir: true, ignore: ['**/.git', '**/.git/**', path.join(output, '**')] }
+ glob.sync(path.resolve(input, '**'), globOptions)
+ .forEach(src => cpFile.sync(src, path.join(output, path.relative(input, src))))
+ }
+ filesToInstrument.forEach(visitor)
} else {
visitor(input)
}
@@ -241,34 +213,19 @@ NYC.prototype.instrumentAllFiles = function (input, output, cb) {
cb()
}
-NYC.prototype.walkAllFiles = function (dir, visitor) {
- var pattern = null
- if (this.extensions.length === 1) {
- pattern = '**/*' + this.extensions[0]
- } else {
- pattern = '**/*{' + this.extensions.join() + '}'
- }
+NYC.prototype._transform = function (code, filename) {
+ const extname = path.extname(filename).toLowerCase()
+ const transform = this.transforms[extname] || (() => null)
- glob.sync(pattern, { cwd: dir, nodir: true, ignore: this.exclude.exclude }).forEach(function (filename) {
- visitor(filename)
- })
+ return transform(code, { filename })
}
-NYC.prototype._maybeInstrumentSource = function (code, filename, relFile) {
- var instrument = this.exclude.shouldInstrument(filename, relFile)
- if (!instrument) {
+NYC.prototype._maybeInstrumentSource = function (code, filename) {
+ if (!this.exclude.shouldInstrument(filename)) {
return null
}
- var ext, transform
- for (ext in this.transforms) {
- if (filename.toLowerCase().substr(-ext.length) === ext) {
- transform = this.transforms[ext]
- break
- }
- }
-
- return transform ? transform(code, { filename: filename, relFile: relFile }) : null
+ return this._transform(code, filename)
}
NYC.prototype._transformFactory = function (cacheDir) {
@@ -302,16 +259,14 @@ NYC.prototype._transformFactory = function (cacheDir) {
}
NYC.prototype._handleJs = function (code, options) {
- var filename = options.filename
- var relFile = path.relative(this.cwd, filename)
// ensure the path has correct casing (see istanbuljs/nyc#269 and nodejs/node#6624)
- filename = path.resolve(this.cwd, relFile)
- return this._maybeInstrumentSource(code, filename, relFile) || code
+ const filename = path.resolve(this.cwd, options.filename)
+ return this._maybeInstrumentSource(code, filename) || code
}
NYC.prototype._addHook = function (type) {
- var handleJs = this._handleJs.bind(this)
- var dummyMatcher = function () { return true } // we do all processing in transformer
+ const handleJs = this._handleJs.bind(this)
+ const dummyMatcher = () => true // we do all processing in transformer
libHook['hook' + type](dummyMatcher, handleJs, { extensions: this.extensions })
}
@@ -341,9 +296,7 @@ NYC.prototype.createTempDirectory = function () {
mkdirp.sync(this.tempDirectory())
if (this.cache) mkdirp.sync(this.cacheDirectory)
- if (this._showProcessTree) {
- mkdirp.sync(this.processInfoDirectory())
- }
+ mkdirp.sync(this.processInfoDirectory())
}
NYC.prototype.reset = function () {
@@ -352,16 +305,15 @@ NYC.prototype.reset = function () {
}
NYC.prototype._wrapExit = function () {
- var _this = this
-
// we always want to write coverage
// regardless of how the process exits.
- onExit(function () {
- _this.writeCoverageFile()
+ onExit(() => {
+ this.writeCoverageFile()
}, { alwaysLast: true })
}
NYC.prototype.wrap = function (bin) {
+ process.env.NYC_PROCESS_ID = this.processInfo.uuid
this._addRequireHooks()
this._wrapExit()
this._loadAdditionalModules()
@@ -391,7 +343,7 @@ NYC.prototype.writeCoverageFile = function () {
coverage = this.sourceMaps.remapCoverage(coverage)
}
- var id = this.generateUniqueID()
+ var id = this.processInfo.uuid
var coverageFilename = path.resolve(this.tempDirectory(), id + '.json')
fs.writeFileSync(
@@ -400,11 +352,8 @@ NYC.prototype.writeCoverageFile = function () {
'utf-8'
)
- if (!this._showProcessTree) {
- return
- }
-
this.processInfo.coverageFilename = coverageFilename
+ this.processInfo.files = Object.keys(coverage)
fs.writeFileSync(
path.resolve(this.processInfoDirectory(), id + '.json'),
@@ -421,22 +370,22 @@ function coverageFinder () {
}
NYC.prototype.getCoverageMapFromAllCoverageFiles = function (baseDirectory) {
- var _this = this
- var map = libCoverage.createCoverageMap({})
+ const map = libCoverage.createCoverageMap({})
this.eachReport(undefined, (report) => {
map.merge(report)
}, baseDirectory)
+
+ map.data = this.sourceMaps.remapCoverage(map.data)
+
// depending on whether source-code is pre-instrumented
// or instrumented using a JIT plugin like @babel/require
// you may opt to exclude files after applying
// source-map remapping logic.
if (this.config.excludeAfterRemap) {
- map.filter(function (filename) {
- return _this.exclude.shouldInstrument(filename)
- })
+ map.filter(filename => this.exclude.shouldInstrument(filename))
}
- map.data = this.sourceMaps.remapCoverage(map.data)
+
return map
}
@@ -462,6 +411,80 @@ NYC.prototype.report = function () {
}
}
+// XXX(@isaacs) Index generation should move to istanbul-lib-processinfo
+NYC.prototype.writeProcessIndex = function () {
+ const dir = this.processInfoDirectory()
+ const pidToUid = new Map()
+ const infoByUid = new Map()
+ const eidToUid = new Map()
+ const infos = fs.readdirSync(dir).filter(f => f !== 'index.json').map(f => {
+ try {
+ const info = JSON.parse(fs.readFileSync(path.resolve(dir, f), 'utf-8'))
+ info.children = []
+ pidToUid.set(info.uuid, info.pid)
+ pidToUid.set(info.pid, info.uuid)
+ infoByUid.set(info.uuid, info)
+ if (info.externalId) {
+ eidToUid.set(info.externalId, info.uuid)
+ }
+ return info
+ } catch (er) {
+ return null
+ }
+ }).filter(Boolean)
+
+ // create all the parent-child links and write back the updated info
+ infos.forEach(info => {
+ if (info.parent) {
+ const parentInfo = infoByUid.get(info.parent)
+ if (parentInfo.children.indexOf(info.uuid) === -1) {
+ parentInfo.children.push(info.uuid)
+ }
+ }
+ })
+
+ // figure out which files were touched by each process.
+ const files = infos.reduce((files, info) => {
+ info.files.forEach(f => {
+ files[f] = files[f] || []
+ files[f].push(info.uuid)
+ })
+ return files
+ }, {})
+
+ // build the actual index!
+ const index = infos.reduce((index, info) => {
+ index.processes[info.uuid] = {}
+ index.processes[info.uuid].parent = info.parent
+ if (info.externalId) {
+ if (index.externalIds[info.externalId]) {
+ throw new Error(`External ID ${info.externalId} used by multiple processes`)
+ }
+ index.processes[info.uuid].externalId = info.externalId
+ index.externalIds[info.externalId] = {
+ root: info.uuid,
+ children: info.children
+ }
+ }
+ index.processes[info.uuid].children = Array.from(info.children)
+ return index
+ }, { processes: {}, files: files, externalIds: {} })
+
+ // flatten the descendant sets of all the externalId procs
+ Object.keys(index.externalIds).forEach(eid => {
+ const { children } = index.externalIds[eid]
+ // push the next generation onto the list so we accumulate them all
+ for (let i = 0; i < children.length; i++) {
+ const nextGen = index.processes[children[i]].children
+ if (nextGen && nextGen.length) {
+ children.push(...nextGen.filter(uuid => children.indexOf(uuid) === -1))
+ }
+ }
+ })
+
+ fs.writeFileSync(path.resolve(dir, 'index.json'), JSON.stringify(index))
+}
+
NYC.prototype.showProcessTree = function () {
var processTree = ProcessInfo.buildProcessTree(this._loadProcessInfos())
@@ -481,9 +504,6 @@ NYC.prototype.checkCoverage = function (thresholds, perFile) {
// ERROR: Coverage for lines (90.12%) does not meet global threshold (120%)
nyc._checkCoverage(map.getCoverageSummary(), thresholds)
}
-
- // process.exitCode was not implemented until v0.11.8.
- if (/^v0\.(1[0-1]\.|[0-9]\.)/.test(process.version) && process.exitCode !== 0) process.exit(process.exitCode)
}
NYC.prototype._checkCoverage = function (summary, thresholds, file) {
@@ -501,19 +521,25 @@ NYC.prototype._checkCoverage = function (summary, thresholds, file) {
}
NYC.prototype._loadProcessInfos = function () {
- var _this = this
- var files = fs.readdirSync(this.processInfoDirectory())
-
- return files.map(function (f) {
+ return fs.readdirSync(this.processInfoDirectory()).map(f => {
+ let data
try {
- return new ProcessInfo(JSON.parse(fs.readFileSync(
- path.resolve(_this.processInfoDirectory(), f),
+ data = JSON.parse(fs.readFileSync(
+ path.resolve(this.processInfoDirectory(), f),
'utf-8'
- )))
+ ))
} catch (e) { // handle corrupt JSON output.
- return {}
+ return null
}
- })
+ if (f !== 'index.json') {
+ data.nodes = []
+ data = new ProcessInfo(data)
+ }
+ return { file: path.basename(f, '.json'), data: data }
+ }).filter(Boolean).reduce((infos, info) => {
+ infos[info.file] = info.data
+ return infos
+ }, {})
}
NYC.prototype.eachReport = function (filenames, iterator, baseDirectory) {
diff --git a/lib/commands/check-coverage.js b/lib/commands/check-coverage.js
index c12667bbe..8eb36eb50 100644
--- a/lib/commands/check-coverage.js
+++ b/lib/commands/check-coverage.js
@@ -1,9 +1,5 @@
-var NYC
-try {
- NYC = require('../../index.covered.js')
-} catch (e) {
- NYC = require('../../index.js')
-}
+const testExclude = require('test-exclude')
+const NYC = require('../../index.js')
exports.command = 'check-coverage'
@@ -11,6 +7,30 @@ exports.describe = 'check whether coverage is within thresholds provided'
exports.builder = function (yargs) {
yargs
+ .option('exclude', {
+ alias: 'x',
+ default: testExclude.defaultExclude,
+ describe: 'a list of specific files and directories that should be excluded from coverage, glob patterns are supported, node_modules is always excluded',
+ global: false
+ })
+ .option('exclude-node-modules', {
+ default: true,
+ type: 'boolean',
+ describe: 'whether or not to exclude all node_module folders (i.e. **/node_modules/**) by default',
+ global: false
+ })
+ .option('exclude-after-remap', {
+ default: true,
+ type: 'boolean',
+ description: 'should exclude logic be performed after the source-map remaps filenames?',
+ global: false
+ })
+ .option('include', {
+ alias: 'n',
+ default: [],
+ describe: 'a list of specific files that should be covered, glob patterns are supported',
+ global: false
+ })
.option('branches', {
default: 0,
description: 'what % of branches must be covered?'
diff --git a/lib/commands/instrument.js b/lib/commands/instrument.js
index 7c098d9a2..f744faef6 100644
--- a/lib/commands/instrument.js
+++ b/lib/commands/instrument.js
@@ -1,9 +1,7 @@
-var NYC
-try {
- NYC = require('../../index.covered.js')
-} catch (e) {
- NYC = require('../../index.js')
-}
+const NYC = require('../../index.js')
+const path = require('path')
+const rimraf = require('rimraf')
+const testExclude = require('test-exclude')
exports.command = 'instrument [output]'
@@ -51,32 +49,74 @@ exports.builder = function (yargs) {
type: 'boolean',
description: 'should nyc exit when an instrumentation failure occurs?'
})
+ .option('include', {
+ alias: 'n',
+ default: [],
+ describe: 'a list of specific files and directories that should be instrumented, glob patterns are supported'
+ })
+ .option('exclude', {
+ alias: 'x',
+ default: testExclude.defaultExclude,
+ describe: 'a list of specific files and directories that should not be instrumented, glob patterns are supported'
+ })
+ .option('exclude-node-modules', {
+ default: true,
+ type: 'boolean',
+ describe: 'whether or not to exclude all node_module folders (i.e. **/node_modules/**) by default',
+ global: false
+ })
+ .option('es-modules', {
+ default: true,
+ type: 'boolean',
+ description: 'tell the instrumenter to treat files as ES Modules'
+ })
+ .option('delete', {
+ describe: 'should the output folder be deleted before instrumenting files?',
+ default: false,
+ type: 'boolean'
+ })
+ .option('complete-copy', {
+ describe: 'should nyc copy all files from input to output as well as instrumented files?',
+ default: false,
+ type: 'boolean'
+ })
.example('$0 instrument ./lib ./output', 'instrument all .js files in ./lib with coverage and output in ./output')
}
exports.handler = function (argv) {
- // if instrument is set to false,
- // enable a noop instrumenter.
- if (!argv.instrument) argv.instrumenter = './lib/instrumenters/noop'
- else argv.instrumenter = './lib/instrumenters/istanbul'
+ if (argv.output && (path.resolve(argv.cwd, argv.input) === path.resolve(argv.cwd, argv.output))) {
+ console.error(`nyc instrument failed: cannot instrument files in place, must differ from `)
+ process.exitCode = 1
+ return
+ }
- var nyc = new NYC({
- instrumenter: argv.instrumenter,
- sourceMap: argv.sourceMap,
- produceSourceMap: argv.produceSourceMap,
- extension: argv.extension,
- require: argv.require,
- compact: argv.compact,
- preserveComments: argv.preserveComments,
- exitOnError: argv.exitOnError
- })
+ if (path.relative(argv.cwd, path.resolve(argv.cwd, argv.input)).startsWith('..')) {
+ console.error(`nyc instrument failed: cannot instrument files outside of project root directory`)
+ process.exitCode = 1
+ return
+ }
- nyc.instrumentAllFiles(argv.input, argv.output, function (err) {
+ if (argv.delete && argv.output && argv.output.length !== 0) {
+ const relPath = path.relative(process.cwd(), path.resolve(argv.output))
+ if (relPath !== '' && !relPath.startsWith('..')) {
+ rimraf.sync(argv.output)
+ } else {
+ console.error(`nyc instrument failed: attempt to delete '${process.cwd()}' or containing directory.`)
+ process.exit(1)
+ }
+ }
+
+ // If instrument is set to false enable a noop instrumenter.
+ argv.instrumenter = (argv.instrument)
+ ? './lib/instrumenters/istanbul'
+ : './lib/instrumenters/noop'
+
+ const nyc = new NYC(argv)
+
+ nyc.instrumentAllFiles(argv.input, argv.output, err => {
if (err) {
console.error(err.message)
- process.exit(1)
- } else {
- process.exit(0)
+ process.exitCode = 1
}
})
}
diff --git a/lib/commands/merge.js b/lib/commands/merge.js
index 3f76248fe..072cfc450 100644
--- a/lib/commands/merge.js
+++ b/lib/commands/merge.js
@@ -3,12 +3,7 @@ const fs = require('fs')
const path = require('path')
const makeDir = require('make-dir')
-var NYC
-try {
- NYC = require('../../index.covered.js')
-} catch (e) {
- NYC = require('../../index.js')
-}
+const NYC = require('../../index.js')
exports.command = 'merge [output-file]'
diff --git a/lib/commands/report.js b/lib/commands/report.js
index 0b48d869f..739ff30dc 100644
--- a/lib/commands/report.js
+++ b/lib/commands/report.js
@@ -1,9 +1,5 @@
-var NYC
-try {
- NYC = require('../../index.covered.js')
-} catch (e) {
- NYC = require('../../index.js')
-}
+const testExclude = require('test-exclude')
+const NYC = require('../../index.js')
exports.command = 'report'
@@ -28,6 +24,30 @@ exports.builder = function (yargs) {
.option('temp-directory', {
hidden: true
})
+ .option('exclude', {
+ alias: 'x',
+ default: testExclude.defaultExclude,
+ describe: 'a list of specific files and directories that should be excluded from coverage, glob patterns are supported, node_modules is always excluded',
+ global: false
+ })
+ .option('exclude-node-modules', {
+ default: true,
+ type: 'boolean',
+ describe: 'whether or not to exclude all node_module folders (i.e. **/node_modules/**) by default',
+ global: false
+ })
+ .option('exclude-after-remap', {
+ default: true,
+ type: 'boolean',
+ description: 'should exclude logic be performed after the source-map remaps filenames?',
+ global: false
+ })
+ .option('include', {
+ alias: 'n',
+ default: [],
+ describe: 'a list of specific files that should be covered, glob patterns are supported',
+ global: false
+ })
.option('show-process-tree', {
describe: 'display the tree of spawned processes',
default: false,
diff --git a/lib/config-util.js b/lib/config-util.js
index ac3e417da..5ca4043a5 100644
--- a/lib/config-util.js
+++ b/lib/config-util.js
@@ -1,6 +1,5 @@
'use strict'
-const arrify = require('arrify')
const fs = require('fs')
const path = require('path')
const findUp = require('find-up')
@@ -19,19 +18,28 @@ function guessCWD (cwd) {
}
Config.loadConfig = function (argv, cwd) {
- const rcPath = findUp.sync([argv.nycrcPath || '.nycrc', '.nycrc.json'], { cwd: guessCWD(cwd) })
+ const rcOptions = [
+ argv.nycrcPath || '.nycrc',
+ '.nycrc.json',
+ 'nyc.config.js'
+ ]
+ const rcPath = findUp.sync(rcOptions, { cwd: guessCWD(cwd) })
let config = {}
if (rcPath) {
- config = JSON.parse(
- fs.readFileSync(rcPath, 'utf-8')
- )
+ if (rcPath.toLowerCase().endsWith('.js')) {
+ config = require(rcPath)
+ } else {
+ config = JSON.parse(
+ fs.readFileSync(rcPath, 'utf-8')
+ )
+ }
}
- if (config.require) config.require = arrify(config.require)
- if (config.extension) config.extension = arrify(config.extension)
- if (config.exclude) config.exclude = arrify(config.exclude)
- if (config.include) config.include = arrify(config.include)
+ if (config.require) config.require = [].concat(config.require)
+ if (config.extension) config.extension = [].concat(config.extension)
+ if (config.exclude) config.exclude = [].concat(config.exclude)
+ if (config.include) config.include = [].concat(config.include)
return config
}
@@ -80,6 +88,12 @@ Config.buildYargs = function (cwd) {
description: 'should exclude logic be performed after the source-map remaps filenames?',
global: false
})
+ .option('exclude-node-modules', {
+ default: true,
+ type: 'boolean',
+ describe: 'whether or not to exclude all node_module folders (i.e. **/node_modules/**) by default',
+ global: false
+ })
.option('include', {
alias: 'n',
default: [],
diff --git a/lib/hash.js b/lib/hash.js
index 918f3773a..ebf6c7d3a 100644
--- a/lib/hash.js
+++ b/lib/hash.js
@@ -1,8 +1,30 @@
'use strict'
+function getInvalidatingOptions (config) {
+ return [
+ 'compact',
+ 'esModules',
+ 'ignoreClassMethods',
+ 'instrument',
+ 'instrumenter',
+ 'parserPlugins',
+ 'preserveComments',
+ 'produceSourceMap',
+ 'sourceMap'
+ ].reduce((acc, optName) => {
+ acc[optName] = config[optName]
+ return acc
+ }, {})
+}
+
module.exports = {
- salt: JSON.stringify({
- istanbul: require('istanbul-lib-coverage/package.json').version,
- nyc: require('../package.json').version
- })
+ salt (config) {
+ return JSON.stringify({
+ modules: {
+ 'istanbul-lib-instrument': require('istanbul-lib-instrument/package.json').version,
+ nyc: require('../package.json').version
+ },
+ nycrc: getInvalidatingOptions(config)
+ })
+ }
}
diff --git a/lib/instrumenters/istanbul.js b/lib/instrumenters/istanbul.js
index 5e823a431..4340f6081 100644
--- a/lib/instrumenters/istanbul.js
+++ b/lib/instrumenters/istanbul.js
@@ -4,8 +4,8 @@ const { createInstrumenter } = require('istanbul-lib-instrument')
const convertSourceMap = require('convert-source-map')
const mergeSourceMap = require('merge-source-map')
-function InstrumenterIstanbul (cwd, options) {
- const plugins = options.plugins
+function InstrumenterIstanbul (options) {
+ const plugins = options.parserPlugins
const configPlugins = plugins ? { plugins } : {}
const instrumenter = createInstrumenter(Object.assign({
diff --git a/lib/process.js b/lib/process.js
index c77ca503f..3a8cab8f7 100644
--- a/lib/process.js
+++ b/lib/process.js
@@ -1,9 +1,12 @@
const archy = require('archy')
const libCoverage = require('istanbul-lib-coverage')
+const uuid = require('uuid/v4')
function ProcessInfo (defaults) {
defaults = defaults || {}
+ this.uuid = null
+ this.parent = null
this.pid = String(process.pid)
this.argv = process.argv
this.execArgv = process.execArgv
@@ -12,13 +15,14 @@ function ProcessInfo (defaults) {
this.ppid = null
this.root = null
this.coverageFilename = null
- this.nodes = [] // list of children, filled by buildProcessTree()
-
- this._coverageMap = null
for (var key in defaults) {
this[key] = defaults[key]
}
+
+ if (!this.uuid) {
+ this.uuid = uuid()
+ }
}
Object.defineProperty(ProcessInfo.prototype, 'label', {
@@ -36,29 +40,19 @@ Object.defineProperty(ProcessInfo.prototype, 'label', {
})
ProcessInfo.buildProcessTree = function (infos) {
- var treeRoot = new ProcessInfo({ _label: 'nyc' })
- var nodes = { }
-
- infos = infos.sort(function (a, b) {
- return a.time - b.time
- })
-
- infos.forEach(function (p) {
- nodes[p.root + ':' + p.pid] = p
- })
-
- infos.forEach(function (p) {
- if (!p.ppid) {
- return
+ const treeRoot = new ProcessInfo({ _label: 'nyc', nodes: [] })
+ const index = infos.index
+ for (const id in index.processes) {
+ const node = infos[id]
+ if (!node) {
+ throw new Error(`Invalid entry in processinfo index: ${id}`)
}
-
- var parent = nodes[p.root + ':' + p.ppid]
- if (!parent) {
- parent = treeRoot
+ const idx = index.processes[id]
+ node.nodes = idx.children.map(id => infos[id]).sort((a, b) => a.time - b.time)
+ if (!node.parent) {
+ treeRoot.nodes.push(node)
}
-
- parent.nodes.push(p)
- })
+ }
return treeRoot
}
diff --git a/lib/source-maps.js b/lib/source-maps.js
index c3238544c..c4840fc01 100644
--- a/lib/source-maps.js
+++ b/lib/source-maps.js
@@ -4,12 +4,12 @@ const libSourceMaps = require('istanbul-lib-source-maps')
const fs = require('fs')
const path = require('path')
-// TODO: write some unit tests for this class.
+const sourceMapCache = libSourceMaps.createSourceMapStore()
function SourceMaps (opts) {
this.cache = opts.cache
this.cacheDirectory = opts.cacheDirectory
- this.sourceMapCache = libSourceMaps.createSourceMapStore()
this.loadedMaps = {}
+ this._sourceMapCache = sourceMapCache
}
SourceMaps.prototype.extractAndRegister = function (code, filename, hash) {
@@ -19,36 +19,35 @@ SourceMaps.prototype.extractAndRegister = function (code, filename, hash) {
var mapPath = path.join(this.cacheDirectory, hash + '.map')
fs.writeFileSync(mapPath, sourceMap.toJSON())
} else {
- this.sourceMapCache.registerMap(filename, sourceMap.sourcemap)
+ this._sourceMapCache.registerMap(filename, sourceMap.sourcemap)
}
}
return sourceMap
}
SourceMaps.prototype.remapCoverage = function (obj) {
- var transformed = this.sourceMapCache.transformCoverage(
+ var transformed = this._sourceMapCache.transformCoverage(
libCoverage.createCoverageMap(obj)
)
return transformed.map.data
}
SourceMaps.prototype.reloadCachedSourceMaps = function (report) {
- var _this = this
- Object.keys(report).forEach(function (absFile) {
+ Object.keys(report).forEach((absFile) => {
var fileReport = report[absFile]
if (fileReport && fileReport.contentHash) {
var hash = fileReport.contentHash
- if (!(hash in _this.loadedMaps)) {
+ if (!(hash in this.loadedMaps)) {
try {
- var mapPath = path.join(_this.cacheDirectory, hash + '.map')
- _this.loadedMaps[hash] = JSON.parse(fs.readFileSync(mapPath, 'utf8'))
+ var mapPath = path.join(this.cacheDirectory, hash + '.map')
+ this.loadedMaps[hash] = JSON.parse(fs.readFileSync(mapPath, 'utf8'))
} catch (e) {
// set to false to avoid repeatedly trying to load the map
- _this.loadedMaps[hash] = false
+ this.loadedMaps[hash] = false
}
}
- if (_this.loadedMaps[hash]) {
- _this.sourceMapCache.registerMap(absFile, _this.loadedMaps[hash])
+ if (this.loadedMaps[hash]) {
+ this._sourceMapCache.registerMap(absFile, this.loadedMaps[hash])
}
}
})
diff --git a/package-lock.json b/package-lock.json
index 83b69ac85..d043317c2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "nyc",
- "version": "13.3.0",
+ "version": "14.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -13,13 +13,13 @@
}
},
"@babel/generator": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.2.tgz",
- "integrity": "sha512-f3QCuPppXxtZOEm5GWPra/uYUjmNQlu9pbAD8D/9jze4pTY83rTtB1igTBSwvkeNlC5gR24zFFkz+2WHLFQhqQ==",
+ "version": "7.4.0",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz",
+ "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==",
"requires": {
- "@babel/types": "^7.3.2",
+ "@babel/types": "^7.4.0",
"jsesc": "^2.5.1",
- "lodash": "^4.17.10",
+ "lodash": "^4.17.11",
"source-map": "^0.5.0",
"trim-right": "^1.0.1"
}
@@ -43,11 +43,11 @@
}
},
"@babel/helper-split-export-declaration": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz",
- "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==",
+ "version": "7.4.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz",
+ "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==",
"requires": {
- "@babel/types": "^7.0.0"
+ "@babel/types": "^7.4.0"
}
},
"@babel/highlight": {
@@ -61,43 +61,43 @@
}
},
"@babel/parser": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.2.tgz",
- "integrity": "sha512-QzNUC2RO1gadg+fs21fi0Uu0OuGNzRKEmgCxoLNzbCdoprLwjfmZwzUrpUNfJPaVRwBpDY47A17yYEGWyRelnQ=="
+ "version": "7.4.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz",
+ "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ=="
},
"@babel/template": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz",
- "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==",
+ "version": "7.4.0",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz",
+ "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==",
"requires": {
"@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.2.2",
- "@babel/types": "^7.2.2"
+ "@babel/parser": "^7.4.0",
+ "@babel/types": "^7.4.0"
}
},
"@babel/traverse": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz",
- "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==",
+ "version": "7.4.3",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz",
+ "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==",
"requires": {
"@babel/code-frame": "^7.0.0",
- "@babel/generator": "^7.2.2",
+ "@babel/generator": "^7.4.0",
"@babel/helper-function-name": "^7.1.0",
- "@babel/helper-split-export-declaration": "^7.0.0",
- "@babel/parser": "^7.2.3",
- "@babel/types": "^7.2.2",
+ "@babel/helper-split-export-declaration": "^7.4.0",
+ "@babel/parser": "^7.4.3",
+ "@babel/types": "^7.4.0",
"debug": "^4.1.0",
"globals": "^11.1.0",
- "lodash": "^4.17.10"
+ "lodash": "^4.17.11"
}
},
"@babel/types": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.2.tgz",
- "integrity": "sha512-3Y6H8xlUlpbGR+XvawiH0UXehqydTmNmEpozWcXymqwcrwYAl5KMvKtQ+TF6f6E08V6Jur7v/ykdDSF+WDEIXQ==",
+ "version": "7.4.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz",
+ "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==",
"requires": {
"esutils": "^2.0.2",
- "lodash": "^4.17.10",
+ "lodash": "^4.17.11",
"to-fast-properties": "^2.0.0"
}
},
@@ -112,9 +112,9 @@
}
},
"acorn": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.0.tgz",
- "integrity": "sha512-MW/FjM+IvU9CgBzjO3UIPCE2pyEwUsoFl+VGdczOPEdxfGFjuKny/gN54mOuX7Qxmb9Rg9MCn2oKiSUeW+pjrw==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz",
+ "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==",
"dev": true
},
"acorn-jsx": {
@@ -124,9 +124,9 @@
"dev": true
},
"ajv": {
- "version": "6.9.1",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz",
- "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==",
+ "version": "6.10.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
+ "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
"dev": true,
"requires": {
"fast-deep-equal": "^2.0.1",
@@ -219,7 +219,8 @@
"arrify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
- "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0="
+ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
+ "dev": true
},
"asn1": {
"version": "0.2.4",
@@ -242,20 +243,6 @@
"integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
"dev": true
},
- "ast-types": {
- "version": "0.8.15",
- "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz",
- "integrity": "sha1-ju8IJ/BN/w7IhXupJavj/qYZTlI=",
- "dev": true
- },
- "async": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz",
- "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==",
- "requires": {
- "lodash": "^4.17.11"
- }
- },
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@@ -368,530 +355,156 @@
"integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==",
"dev": true
},
- "browser-stdout": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
- "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
- "dev": true
- },
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
"dev": true
},
- "bundle-dependencies": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/bundle-dependencies/-/bundle-dependencies-1.0.2.tgz",
- "integrity": "sha1-ml5PqYzH6qz3YhXuQTYdHVgDaKk=",
+ "caching-transform": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz",
+ "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==",
+ "requires": {
+ "hasha": "^3.0.0",
+ "make-dir": "^2.0.0",
+ "package-hash": "^3.0.0",
+ "write-file-atomic": "^2.4.2"
+ }
+ },
+ "caller-path": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz",
+ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=",
+ "dev": true,
+ "requires": {
+ "callsites": "^0.2.0"
+ }
+ },
+ "callsites": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz",
+ "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=",
+ "dev": true
+ },
+ "camelcase": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
+ },
+ "camelcase-keys": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz",
+ "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=",
"dev": true,
"requires": {
- "yargs": "^4.1.0"
+ "camelcase": "^4.1.0",
+ "map-obj": "^2.0.0",
+ "quick-lru": "^1.0.0"
},
"dependencies": {
- "ansi-regex": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "builtin-modules": {
- "version": "1.1.1",
- "bundled": true,
- "dev": true
- },
"camelcase": {
- "version": "2.1.0",
- "bundled": true,
- "dev": true
- },
- "cliui": {
- "version": "3.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.0",
- "wrap-ansi": "^1.0.0"
- }
- },
- "code-point-at": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "number-is-nan": "^1.0.0"
- }
- },
- "decamelize": {
- "version": "1.1.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "escape-string-regexp": "^1.0.4"
- }
- },
- "error-ex": {
- "version": "1.3.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-arrayish": "^0.2.1"
- }
- },
- "escape-string-regexp": {
- "version": "1.0.5",
- "bundled": true,
- "dev": true
- },
- "find-up": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "path-exists": "^2.0.0",
- "pinkie-promise": "^2.0.0"
- }
- },
- "graceful-fs": {
- "version": "4.1.3",
- "bundled": true,
- "dev": true
- },
- "hosted-git-info": {
- "version": "2.1.4",
- "bundled": true,
- "dev": true
- },
- "invert-kv": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "is-arrayish": {
- "version": "0.2.1",
- "bundled": true,
- "dev": true
- },
- "is-builtin-module": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "builtin-modules": "^1.0.0"
- }
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "number-is-nan": "^1.0.0"
- }
- },
- "is-utf8": {
- "version": "0.2.1",
- "bundled": true,
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
"dev": true
- },
- "lcid": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "invert-kv": "^1.0.0"
- }
- },
- "load-json-file": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^2.2.0",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0",
- "strip-bom": "^2.0.0"
- }
- },
- "lodash.assign": {
- "version": "4.0.3",
- "bundled": true,
- "dev": true,
+ }
+ }
+ },
+ "capture-stack-trace": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz",
+ "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==",
+ "dev": true
+ },
+ "caseless": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
+ "dev": true
+ },
+ "chai": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz",
+ "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==",
+ "dev": true,
+ "requires": {
+ "assertion-error": "^1.1.0",
+ "check-error": "^1.0.2",
+ "deep-eql": "^3.0.1",
+ "get-func-name": "^2.0.0",
+ "pathval": "^1.1.0",
+ "type-detect": "^4.0.5"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "chardet": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz",
+ "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=",
+ "dev": true
+ },
+ "check-error": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
+ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
+ "dev": true
+ },
+ "circular-json": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz",
+ "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==",
+ "dev": true
+ },
+ "clean-yaml-object": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz",
+ "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=",
+ "dev": true
+ },
+ "cli-cursor": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
+ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
+ "dev": true,
+ "requires": {
+ "restore-cursor": "^2.0.0"
+ }
+ },
+ "cli-width": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
+ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
+ "dev": true
+ },
+ "cliui": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
+ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
+ "requires": {
+ "string-width": "^2.1.1",
+ "strip-ansi": "^4.0.0",
+ "wrap-ansi": "^2.0.0"
+ },
+ "dependencies": {
+ "string-width": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"requires": {
- "lodash.keys": "^4.0.0",
- "lodash.rest": "^4.0.0"
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^4.0.0"
}
- },
- "lodash.keys": {
- "version": "4.0.3",
- "bundled": true,
- "dev": true
- },
- "lodash.rest": {
- "version": "4.0.1",
- "bundled": true,
- "dev": true
- },
- "normalize-package-data": {
- "version": "2.3.5",
- "bundled": true,
- "dev": true,
- "requires": {
- "hosted-git-info": "^2.1.4",
- "is-builtin-module": "^1.0.0",
- "semver": "2 || 3 || 4 || 5",
- "validate-npm-package-license": "^3.0.1"
- }
- },
- "number-is-nan": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "object-assign": {
- "version": "4.0.1",
- "bundled": true,
- "dev": true
- },
- "os-locale": {
- "version": "1.4.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "lcid": "^1.0.0"
- }
- },
- "parse-json": {
- "version": "2.2.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "error-ex": "^1.2.0"
- }
- },
- "path-exists": {
- "version": "2.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "pinkie-promise": "^2.0.0"
- }
- },
- "path-type": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0"
- }
- },
- "pify": {
- "version": "2.3.0",
- "bundled": true,
- "dev": true
- },
- "pinkie": {
- "version": "2.0.4",
- "bundled": true,
- "dev": true
- },
- "pinkie-promise": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "pinkie": "^2.0.0"
- }
- },
- "pkg-conf": {
- "version": "1.1.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "find-up": "^1.0.0",
- "object-assign": "^4.0.1",
- "read-pkg": "^1.0.0",
- "symbol": "^0.2.1"
- }
- },
- "read-pkg": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "load-json-file": "^1.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^1.0.0"
- }
- },
- "read-pkg-up": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "find-up": "^1.0.0",
- "read-pkg": "^1.0.0"
- }
- },
- "require-main-filename": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "semver": {
- "version": "5.1.0",
- "bundled": true,
- "dev": true
- },
- "spdx-correct": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "spdx-license-ids": "^1.0.2"
- }
- },
- "spdx-exceptions": {
- "version": "1.0.4",
- "bundled": true,
- "dev": true
- },
- "spdx-expression-parse": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "spdx-exceptions": "^1.0.4",
- "spdx-license-ids": "^1.0.0"
- }
- },
- "spdx-license-ids": {
- "version": "1.2.0",
- "bundled": true,
- "dev": true
- },
- "string-width": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- }
- },
- "strip-ansi": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
- "strip-bom": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-utf8": "^0.2.0"
- }
- },
- "symbol": {
- "version": "0.2.1",
- "bundled": true,
- "dev": true
- },
- "validate-npm-package-license": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "spdx-correct": "~1.0.0",
- "spdx-expression-parse": "~1.0.0"
- }
- },
- "window-size": {
- "version": "0.2.0",
- "bundled": true,
- "dev": true
- },
- "wrap-ansi": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "string-width": "^1.0.1"
- }
- },
- "y18n": {
- "version": "3.2.0",
- "bundled": true,
- "dev": true
- },
- "yargs": {
- "version": "4.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "camelcase": "^2.0.1",
- "cliui": "^3.0.3",
- "decamelize": "^1.1.1",
- "os-locale": "^1.4.0",
- "pkg-conf": "^1.1.1",
- "read-pkg-up": "^1.0.1",
- "require-main-filename": "^1.0.0",
- "string-width": "^1.0.1",
- "window-size": "^0.2.0",
- "y18n": "^3.2.0",
- "yargs-parser": "^2.1.0"
- }
- },
- "yargs-parser": {
- "version": "2.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "camelcase": "^2.1.0",
- "lodash.assign": "^4.0.2"
- }
- }
- }
- },
- "caching-transform": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.1.tgz",
- "integrity": "sha512-Y1KTLNwSPd4ljsDrFOtyXVmm7Gnk42yQitNq43AhE+cwUR/e4T+rmOHs1IPtzBg8066GBJfTOj1rQYFSWSsH2g==",
- "requires": {
- "hasha": "^3.0.0",
- "make-dir": "^1.3.0",
- "package-hash": "^3.0.0",
- "write-file-atomic": "^2.3.0"
- }
- },
- "caller-path": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz",
- "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=",
- "dev": true,
- "requires": {
- "callsites": "^0.2.0"
- }
- },
- "callsites": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz",
- "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=",
- "dev": true
- },
- "camelcase": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz",
- "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA=="
- },
- "camelcase-keys": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz",
- "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=",
- "dev": true,
- "requires": {
- "camelcase": "^4.1.0",
- "map-obj": "^2.0.0",
- "quick-lru": "^1.0.0"
- },
- "dependencies": {
- "camelcase": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
- "dev": true
- }
- }
- },
- "capture-stack-trace": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz",
- "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==",
- "dev": true
- },
- "caseless": {
- "version": "0.12.0",
- "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
- "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
- "dev": true
- },
- "chai": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz",
- "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==",
- "dev": true,
- "requires": {
- "assertion-error": "^1.1.0",
- "check-error": "^1.0.2",
- "deep-eql": "^3.0.1",
- "get-func-name": "^2.0.0",
- "pathval": "^1.1.0",
- "type-detect": "^4.0.5"
- }
- },
- "chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
- "requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- }
- },
- "chardet": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz",
- "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=",
- "dev": true
- },
- "check-error": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
- "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
- "dev": true
- },
- "circular-json": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz",
- "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==",
- "dev": true
- },
- "clean-yaml-object": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz",
- "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=",
- "dev": true
- },
- "cli-cursor": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
- "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
- "dev": true,
- "requires": {
- "restore-cursor": "^2.0.0"
- }
- },
- "cli-width": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
- "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
- "dev": true
- },
- "cliui": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
- "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
- "requires": {
- "string-width": "^2.1.1",
- "strip-ansi": "^4.0.0",
- "wrap-ansi": "^2.0.0"
+ }
}
},
"code-point-at": {
@@ -899,525 +512,311 @@
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
- "color-convert": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
- "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
- "requires": {
- "color-name": "1.1.3"
- }
- },
- "color-name": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
- },
- "color-support": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
- "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
- "dev": true
- },
- "combined-stream": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz",
- "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==",
- "dev": true,
- "requires": {
- "delayed-stream": "~1.0.0"
- }
- },
- "commander": {
- "version": "2.17.1",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
- "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==",
- "optional": true
- },
- "commondir": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
- "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
- },
- "compare-func": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz",
- "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=",
- "dev": true,
- "requires": {
- "array-ify": "^1.0.0",
- "dot-prop": "^3.0.0"
- }
- },
- "concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
- },
- "concat-stream": {
- "version": "1.6.2",
- "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
- "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
- "dev": true,
- "requires": {
- "buffer-from": "^1.0.0",
- "inherits": "^2.0.3",
- "readable-stream": "^2.2.2",
- "typedarray": "^0.0.6"
- }
- },
- "contains-path": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz",
- "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=",
- "dev": true
- },
- "conventional-changelog": {
- "version": "1.1.24",
- "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.24.tgz",
- "integrity": "sha512-2WcSUst4Y3Z4hHvoMTWXMJr/DmgVdLiMOVY1Kak2LfFz+GIz2KDp5naqbFesYbfXPmaZ5p491dO0FWZIJoJw1Q==",
- "dev": true,
- "requires": {
- "conventional-changelog-angular": "^1.6.6",
- "conventional-changelog-atom": "^0.2.8",
- "conventional-changelog-codemirror": "^0.3.8",
- "conventional-changelog-core": "^2.0.11",
- "conventional-changelog-ember": "^0.3.12",
- "conventional-changelog-eslint": "^1.0.9",
- "conventional-changelog-express": "^0.3.6",
- "conventional-changelog-jquery": "^0.1.0",
- "conventional-changelog-jscs": "^0.1.0",
- "conventional-changelog-jshint": "^0.3.8",
- "conventional-changelog-preset-loader": "^1.1.8"
- }
- },
- "conventional-changelog-angular": {
- "version": "1.6.6",
- "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz",
- "integrity": "sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg==",
- "dev": true,
- "requires": {
- "compare-func": "^1.3.1",
- "q": "^1.5.1"
- }
- },
- "conventional-changelog-atom": {
- "version": "0.2.8",
- "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.2.8.tgz",
- "integrity": "sha512-8pPZqhMbrnltNBizjoDCb/Sz85KyUXNDQxuAEYAU5V/eHn0okMBVjqc8aHWYpHrytyZWvMGbayOlDv7i8kEf6g==",
- "dev": true,
- "requires": {
- "q": "^1.5.1"
- }
- },
- "conventional-changelog-codemirror": {
- "version": "0.3.8",
- "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.3.8.tgz",
- "integrity": "sha512-3HFZKtBXTaUCHvz7ai6nk2+psRIkldDoNzCsom0egDtVmPsvvHZkzjynhdQyULfacRSsBTaiQ0ol6nBOL4dDiQ==",
- "dev": true,
- "requires": {
- "q": "^1.5.1"
- }
- },
- "conventional-changelog-core": {
- "version": "2.0.11",
- "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-2.0.11.tgz",
- "integrity": "sha512-HvTE6RlqeEZ/NFPtQeFLsIDOLrGP3bXYr7lFLMhCVsbduF1MXIe8OODkwMFyo1i9ku9NWBwVnVn0jDmIFXjDRg==",
- "dev": true,
- "requires": {
- "conventional-changelog-writer": "^3.0.9",
- "conventional-commits-parser": "^2.1.7",
- "dateformat": "^3.0.0",
- "get-pkg-repo": "^1.0.0",
- "git-raw-commits": "^1.3.6",
- "git-remote-origin-url": "^2.0.0",
- "git-semver-tags": "^1.3.6",
- "lodash": "^4.2.1",
- "normalize-package-data": "^2.3.5",
- "q": "^1.5.1",
- "read-pkg": "^1.1.0",
- "read-pkg-up": "^1.0.1",
- "through2": "^2.0.0"
- },
- "dependencies": {
- "find-up": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
- "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
- "dev": true,
- "requires": {
- "path-exists": "^2.0.0",
- "pinkie-promise": "^2.0.0"
- }
- },
- "load-json-file": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
- "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^2.2.0",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0",
- "strip-bom": "^2.0.0"
- }
- },
- "parse-json": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
- "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
- "dev": true,
- "requires": {
- "error-ex": "^1.2.0"
- }
- },
- "path-exists": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
- "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
- "dev": true,
- "requires": {
- "pinkie-promise": "^2.0.0"
- }
- },
- "path-type": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
- "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0"
- }
- },
- "pify": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
- "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
- "dev": true
- },
- "read-pkg": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
- "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
- "dev": true,
- "requires": {
- "load-json-file": "^1.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^1.0.0"
- }
- },
- "read-pkg-up": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
- "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
- "dev": true,
- "requires": {
- "find-up": "^1.0.0",
- "read-pkg": "^1.0.0"
- }
- },
- "strip-bom": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
- "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
- "dev": true,
- "requires": {
- "is-utf8": "^0.2.0"
- }
- }
- }
- },
- "conventional-changelog-ember": {
- "version": "0.3.12",
- "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-0.3.12.tgz",
- "integrity": "sha512-mmJzA7uzbrOqeF89dMMi6z17O07ORTXlTMArnLG9ZTX4oLaKNolUlxFUFlFm9JUoVWajVpaHQWjxH1EOQ+ARoQ==",
- "dev": true,
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"requires": {
- "q": "^1.5.1"
+ "color-name": "1.1.3"
}
},
- "conventional-changelog-eslint": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-1.0.9.tgz",
- "integrity": "sha512-h87nfVh2fdk9fJIvz26wCBsbDC/KxqCc5wSlNMZbXcARtbgNbNDIF7Y7ctokFdnxkzVdaHsbINkh548T9eBA7Q==",
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
+ },
+ "color-support": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
+ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
+ "dev": true
+ },
+ "combined-stream": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz",
+ "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==",
"dev": true,
"requires": {
- "q": "^1.5.1"
+ "delayed-stream": "~1.0.0"
}
},
- "conventional-changelog-express": {
- "version": "0.3.6",
- "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.3.6.tgz",
- "integrity": "sha512-3iWVtBJZ9RnRnZveNDzOD8QRn6g6vUif0qVTWWyi5nUIAbuN1FfPVyKdAlJJfp5Im+dE8Kiy/d2SpaX/0X678Q==",
+ "commander": {
+ "version": "2.19.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
+ "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==",
+ "optional": true
+ },
+ "commondir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
+ },
+ "compare-func": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz",
+ "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=",
"dev": true,
"requires": {
- "q": "^1.5.1"
+ "array-ify": "^1.0.0",
+ "dot-prop": "^3.0.0"
}
},
- "conventional-changelog-jquery": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz",
- "integrity": "sha1-Agg5cWLjhGmG5xJztsecW1+A9RA=",
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ },
+ "concat-stream": {
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
+ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
"dev": true,
"requires": {
- "q": "^1.4.1"
+ "buffer-from": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.2.2",
+ "typedarray": "^0.0.6"
}
},
- "conventional-changelog-jscs": {
+ "contains-path": {
"version": "0.1.0",
- "resolved": "https://registry.npmjs.org/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz",
- "integrity": "sha1-BHnrRDzH1yxYvwvPDvHURKkvDlw=",
+ "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz",
+ "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=",
+ "dev": true
+ },
+ "conventional-changelog": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.0.6.tgz",
+ "integrity": "sha512-1b96x3G67lDKakRvMm+VvYGwgRk+C8aapHKL5iZ/TJzzD/RuyGA2diHNEsR+uPHmQ7/A4Ts7j6N+VNqUoOfksg==",
"dev": true,
"requires": {
- "q": "^1.4.1"
+ "conventional-changelog-angular": "^5.0.3",
+ "conventional-changelog-atom": "^2.0.1",
+ "conventional-changelog-codemirror": "^2.0.1",
+ "conventional-changelog-core": "^3.1.6",
+ "conventional-changelog-ember": "^2.0.2",
+ "conventional-changelog-eslint": "^3.0.1",
+ "conventional-changelog-express": "^2.0.1",
+ "conventional-changelog-jquery": "^3.0.4",
+ "conventional-changelog-jshint": "^2.0.1",
+ "conventional-changelog-preset-loader": "^2.0.2"
}
},
- "conventional-changelog-jshint": {
- "version": "0.3.8",
- "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.3.8.tgz",
- "integrity": "sha512-hn9QU4ZI/5V50wKPJNPGT4gEWgiBFpV6adieILW4MaUFynuDYOvQ71EMSj3EznJyKi/KzuXpc9dGmX8njZMjig==",
+ "conventional-changelog-angular": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.3.tgz",
+ "integrity": "sha512-YD1xzH7r9yXQte/HF9JBuEDfvjxxwDGGwZU1+ndanbY0oFgA+Po1T9JDSpPLdP0pZT6MhCAsdvFKC4TJ4MTJTA==",
"dev": true,
"requires": {
"compare-func": "^1.3.1",
"q": "^1.5.1"
}
},
- "conventional-changelog-preset-loader": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.8.tgz",
- "integrity": "sha512-MkksM4G4YdrMlT2MbTsV2F6LXu/hZR0Tc/yenRrDIKRwBl/SP7ER4ZDlglqJsCzLJi4UonBc52Bkm5hzrOVCcw==",
- "dev": true
- },
- "conventional-changelog-writer": {
- "version": "3.0.9",
- "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-3.0.9.tgz",
- "integrity": "sha512-n9KbsxlJxRQsUnK6wIBRnARacvNnN4C/nxnxCkH+B/R1JS2Fa+DiP1dU4I59mEDEjgnFaN2+9wr1P1s7GYB5/Q==",
+ "conventional-changelog-atom": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-2.0.1.tgz",
+ "integrity": "sha512-9BniJa4gLwL20Sm7HWSNXd0gd9c5qo49gCi8nylLFpqAHhkFTj7NQfROq3f1VpffRtzfTQp4VKU5nxbe2v+eZQ==",
"dev": true,
"requires": {
- "compare-func": "^1.3.1",
- "conventional-commits-filter": "^1.1.6",
- "dateformat": "^3.0.0",
- "handlebars": "^4.0.2",
- "json-stringify-safe": "^5.0.1",
- "lodash": "^4.2.1",
- "meow": "^4.0.0",
- "semver": "^5.5.0",
- "split": "^1.0.0",
- "through2": "^2.0.0"
+ "q": "^1.5.1"
}
},
- "conventional-commits-filter": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.6.tgz",
- "integrity": "sha512-KcDgtCRKJCQhyk6VLT7zR+ZOyCnerfemE/CsR3iQpzRRFbLEs0Y6rwk3mpDvtOh04X223z+1xyJ582Stfct/0Q==",
+ "conventional-changelog-codemirror": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.1.tgz",
+ "integrity": "sha512-23kT5IZWa+oNoUaDUzVXMYn60MCdOygTA2I+UjnOMiYVhZgmVwNd6ri/yDlmQGXHqbKhNR5NoXdBzSOSGxsgIQ==",
"dev": true,
"requires": {
- "is-subset": "^0.1.1",
- "modify-values": "^1.0.0"
+ "q": "^1.5.1"
}
},
- "conventional-commits-parser": {
- "version": "2.1.7",
- "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz",
- "integrity": "sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ==",
+ "conventional-changelog-core": {
+ "version": "3.1.6",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.1.6.tgz",
+ "integrity": "sha512-5teTAZOtJ4HLR6384h50nPAaKdDr+IaU0rnD2Gg2C3MS7hKsEPH8pZxrDNqam9eOSPQg9tET6uZY79zzgSz+ig==",
"dev": true,
"requires": {
- "JSONStream": "^1.0.4",
- "is-text-path": "^1.0.0",
+ "conventional-changelog-writer": "^4.0.3",
+ "conventional-commits-parser": "^3.0.1",
+ "dateformat": "^3.0.0",
+ "get-pkg-repo": "^1.0.0",
+ "git-raw-commits": "2.0.0",
+ "git-remote-origin-url": "^2.0.0",
+ "git-semver-tags": "^2.0.2",
"lodash": "^4.2.1",
- "meow": "^4.0.0",
- "split2": "^2.0.0",
- "through2": "^2.0.0",
- "trim-off-newlines": "^1.0.0"
- }
- },
- "conventional-recommended-bump": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-1.2.1.tgz",
- "integrity": "sha512-oJjG6DkRgtnr/t/VrPdzmf4XZv8c4xKVJrVT4zrSHd92KEL+EYxSbYoKq8lQ7U5yLMw7130wrcQTLRjM/T+d4w==",
- "dev": true,
- "requires": {
- "concat-stream": "^1.4.10",
- "conventional-commits-filter": "^1.1.1",
- "conventional-commits-parser": "^2.1.1",
- "git-raw-commits": "^1.3.0",
- "git-semver-tags": "^1.3.0",
- "meow": "^3.3.0",
- "object-assign": "^4.0.1"
+ "normalize-package-data": "^2.3.5",
+ "q": "^1.5.1",
+ "read-pkg": "^3.0.0",
+ "read-pkg-up": "^3.0.0",
+ "through2": "^2.0.0"
},
"dependencies": {
- "camelcase": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
- "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=",
- "dev": true
- },
- "camelcase-keys": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
- "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
- "dev": true,
- "requires": {
- "camelcase": "^2.0.0",
- "map-obj": "^1.0.0"
- }
- },
"find-up": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
- "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
- "dev": true,
- "requires": {
- "path-exists": "^2.0.0",
- "pinkie-promise": "^2.0.0"
- }
- },
- "indent-string": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
- "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
- "dev": true,
- "requires": {
- "repeating": "^2.0.0"
- }
- },
- "load-json-file": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
- "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^2.2.0",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0",
- "strip-bom": "^2.0.0"
- }
- },
- "map-obj": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
- "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
- "dev": true
- },
- "meow": {
- "version": "3.7.0",
- "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
- "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
- "dev": true,
- "requires": {
- "camelcase-keys": "^2.0.0",
- "decamelize": "^1.1.2",
- "loud-rejection": "^1.0.0",
- "map-obj": "^1.0.1",
- "minimist": "^1.1.3",
- "normalize-package-data": "^2.3.4",
- "object-assign": "^4.0.1",
- "read-pkg-up": "^1.0.1",
- "redent": "^1.0.0",
- "trim-newlines": "^1.0.0"
- }
- },
- "minimist": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
- "dev": true
- },
- "parse-json": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
- "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
- "dev": true,
- "requires": {
- "error-ex": "^1.2.0"
- }
- },
- "path-exists": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
- "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
- "dev": true,
- "requires": {
- "pinkie-promise": "^2.0.0"
- }
- },
- "path-type": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
- "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0"
- }
- },
- "pify": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
- "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
- "dev": true
- },
- "read-pkg": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
- "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
- "dev": true,
- "requires": {
- "load-json-file": "^1.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^1.0.0"
- }
- },
- "read-pkg-up": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
- "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
"dev": true,
"requires": {
- "find-up": "^1.0.0",
- "read-pkg": "^1.0.0"
+ "locate-path": "^2.0.0"
}
},
- "redent": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
- "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
+ "locate-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
+ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
"dev": true,
"requires": {
- "indent-string": "^2.1.0",
- "strip-indent": "^1.0.1"
+ "p-locate": "^2.0.0",
+ "path-exists": "^3.0.0"
}
},
- "strip-bom": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
- "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
+ "p-limit": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
+ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
"dev": true,
"requires": {
- "is-utf8": "^0.2.0"
+ "p-try": "^1.0.0"
}
},
- "strip-indent": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
- "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
+ "p-locate": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
+ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
"dev": true,
"requires": {
- "get-stdin": "^4.0.1"
+ "p-limit": "^1.1.0"
}
},
- "trim-newlines": {
+ "p-try": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
- "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
"dev": true
+ },
+ "read-pkg-up": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz",
+ "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=",
+ "dev": true,
+ "requires": {
+ "find-up": "^2.0.0",
+ "read-pkg": "^3.0.0"
+ }
}
}
},
+ "conventional-changelog-ember": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.2.tgz",
+ "integrity": "sha512-qtZbA3XefO/n6DDmkYywDYi6wDKNNc98MMl2F9PKSaheJ25Trpi3336W8fDlBhq0X+EJRuseceAdKLEMmuX2tg==",
+ "dev": true,
+ "requires": {
+ "q": "^1.5.1"
+ }
+ },
+ "conventional-changelog-eslint": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.1.tgz",
+ "integrity": "sha512-yH3+bYrtvgKxSFChUBQnKNh9/U9kN2JElYBm253VpYs5wXhPHVc9ENcuVGWijh24nnOkei7wEJmnmUzgZ4ok+A==",
+ "dev": true,
+ "requires": {
+ "q": "^1.5.1"
+ }
+ },
+ "conventional-changelog-express": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-2.0.1.tgz",
+ "integrity": "sha512-G6uCuCaQhLxdb4eEfAIHpcfcJ2+ao3hJkbLrw/jSK/eROeNfnxCJasaWdDAfFkxsbpzvQT4W01iSynU3OoPLIw==",
+ "dev": true,
+ "requires": {
+ "q": "^1.5.1"
+ }
+ },
+ "conventional-changelog-jquery": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.4.tgz",
+ "integrity": "sha512-IVJGI3MseYoY6eybknnTf9WzeQIKZv7aNTm2KQsiFVJH21bfP2q7XVjfoMibdCg95GmgeFlaygMdeoDDa+ZbEQ==",
+ "dev": true,
+ "requires": {
+ "q": "^1.5.1"
+ }
+ },
+ "conventional-changelog-jshint": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.1.tgz",
+ "integrity": "sha512-kRFJsCOZzPFm2tzRHULWP4tauGMvccOlXYf3zGeuSW4U0mZhk5NsjnRZ7xFWrTFPlCLV+PNmHMuXp5atdoZmEg==",
+ "dev": true,
+ "requires": {
+ "compare-func": "^1.3.1",
+ "q": "^1.5.1"
+ }
+ },
+ "conventional-changelog-preset-loader": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.0.2.tgz",
+ "integrity": "sha512-pBY+qnUoJPXAXXqVGwQaVmcye05xi6z231QM98wHWamGAmu/ghkBprQAwmF5bdmyobdVxiLhPY3PrCfSeUNzRQ==",
+ "dev": true
+ },
+ "conventional-changelog-writer": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.3.tgz",
+ "integrity": "sha512-bIlpSiQtQZ1+nDVHEEh798Erj2jhN/wEjyw9sfxY9es6h7pREE5BNJjfv0hXGH/FTrAsEpHUq4xzK99eePpwuA==",
+ "dev": true,
+ "requires": {
+ "compare-func": "^1.3.1",
+ "conventional-commits-filter": "^2.0.1",
+ "dateformat": "^3.0.0",
+ "handlebars": "^4.1.0",
+ "json-stringify-safe": "^5.0.1",
+ "lodash": "^4.2.1",
+ "meow": "^4.0.0",
+ "semver": "^5.5.0",
+ "split": "^1.0.0",
+ "through2": "^2.0.0"
+ }
+ },
+ "conventional-commits-filter": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.1.tgz",
+ "integrity": "sha512-92OU8pz/977udhBjgPEbg3sbYzIxMDFTlQT97w7KdhR9igNqdJvy8smmedAAgn4tPiqseFloKkrVfbXCVd+E7A==",
+ "dev": true,
+ "requires": {
+ "is-subset": "^0.1.1",
+ "modify-values": "^1.0.0"
+ }
+ },
+ "conventional-commits-parser": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz",
+ "integrity": "sha512-P6U5UOvDeidUJ8ebHVDIoXzI7gMlQ1OF/id6oUvp8cnZvOXMt1n8nYl74Ey9YMn0uVQtxmCtjPQawpsssBWtGg==",
+ "dev": true,
+ "requires": {
+ "JSONStream": "^1.0.4",
+ "is-text-path": "^1.0.0",
+ "lodash": "^4.2.1",
+ "meow": "^4.0.0",
+ "split2": "^2.0.0",
+ "through2": "^2.0.0",
+ "trim-off-newlines": "^1.0.0"
+ }
+ },
+ "conventional-recommended-bump": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-4.0.4.tgz",
+ "integrity": "sha512-9mY5Yoblq+ZMqJpBzgS+RpSq+SUfP2miOR3H/NR9drGf08WCrY9B6HAGJZEm6+ThsVP917VHAahSOjM6k1vhPg==",
+ "dev": true,
+ "requires": {
+ "concat-stream": "^1.6.0",
+ "conventional-changelog-preset-loader": "^2.0.2",
+ "conventional-commits-filter": "^2.0.1",
+ "conventional-commits-parser": "^3.0.1",
+ "git-raw-commits": "2.0.0",
+ "git-semver-tags": "^2.0.2",
+ "meow": "^4.0.0",
+ "q": "^1.5.1"
+ }
+ },
"convert-source-map": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz",
@@ -1433,9 +832,9 @@
"dev": true
},
"coveralls": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.2.tgz",
- "integrity": "sha512-Tv0LKe/MkBOilH2v7WBiTBdudg2ChfGbdXafc/s330djpF3zKOmuehTeRwjXWc7pzfj9FrDUTA7tEx6Div8NFw==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.3.tgz",
+ "integrity": "sha512-viNfeGlda2zJr8Gj1zqXpDMRjw9uM54p7wzZdvLRyOgnAfCe974Dq4veZkjJdxQXbmdppu6flEajFYseHYaUhg==",
"dev": true,
"requires": {
"growl": "~> 1.10.0",
@@ -1443,7 +842,7 @@
"lcov-parse": "^0.0.10",
"log-driver": "^1.2.7",
"minimist": "^1.2.0",
- "request": "^2.85.0"
+ "request": "^2.86.0"
},
"dependencies": {
"minimist": {
@@ -1454,6 +853,18 @@
}
}
},
+ "cp-file": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz",
+ "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==",
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "make-dir": "^2.0.0",
+ "nested-error-stacks": "^2.0.0",
+ "pify": "^4.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
"cross-spawn": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz",
@@ -1593,10 +1004,22 @@
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true
},
+ "detect-indent": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz",
+ "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=",
+ "dev": true
+ },
+ "detect-newline": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz",
+ "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=",
+ "dev": true
+ },
"diff": {
- "version": "3.5.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
- "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz",
+ "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=",
"dev": true
},
"doctrine": {
@@ -1624,58 +1047,13 @@
}
},
"dotgitignore": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/dotgitignore/-/dotgitignore-1.0.3.tgz",
- "integrity": "sha512-eu5XjSstm0WXQsARgo6kPjkINYZlOUW+z/KtAAIBjHa5mUpMPrxJytbPIndWz6GubBuuuH5ljtVcXKnVnH5q8w==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/dotgitignore/-/dotgitignore-2.1.0.tgz",
+ "integrity": "sha512-sCm11ak2oY6DglEPpCB8TixLjWAxd3kJTs6UIcSasNYxXdFPV+YKlye92c8H4kKFqV5qYMIh7d+cYecEg0dIkA==",
"dev": true,
"requires": {
- "find-up": "^2.1.0",
+ "find-up": "^3.0.0",
"minimatch": "^3.0.4"
- },
- "dependencies": {
- "find-up": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
- "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
- "dev": true,
- "requires": {
- "locate-path": "^2.0.0"
- }
- },
- "locate-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
- "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
- "dev": true,
- "requires": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
- }
- },
- "p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
- "dev": true,
- "requires": {
- "p-try": "^1.0.0"
- }
- },
- "p-locate": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
- "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
- "dev": true,
- "requires": {
- "p-limit": "^1.1.0"
- }
- },
- "p-try": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
- "dev": true
- }
}
},
"ecc-jsbn": {
@@ -1688,6 +1066,11 @@
"safer-buffer": "^2.1.0"
}
},
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
+ },
"end-of-stream": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
@@ -2122,9 +1505,9 @@
"dev": true
},
"eslint-scope": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz",
- "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==",
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
+ "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==",
"dev": true,
"requires": {
"esrecurse": "^4.1.0",
@@ -2144,9 +1527,9 @@
"dev": true
},
"esm": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.4.tgz",
- "integrity": "sha512-wOuWtQCkkwD1WKQN/k3RsyGSSN+AmiUzdKftn8vaC+uV9JesYmQlODJxgXaaRz0LaaFIlUxZaUu5NPiUAjKAAA==",
+ "version": "3.2.22",
+ "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.22.tgz",
+ "integrity": "sha512-z8YG7U44L82j1XrdEJcqZOLUnjxco8pO453gKOlaMD1/md1n/5QrscAmYG+oKUspsmDLuBFZrpbxI6aQ67yRxA==",
"dev": true
},
"espree": {
@@ -2290,12 +1673,12 @@
}
},
"find-cache-dir": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz",
- "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
+ "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==",
"requires": {
"commondir": "^1.0.1",
- "make-dir": "^1.0.0",
+ "make-dir": "^2.0.0",
"pkg-dir": "^3.0.0"
}
},
@@ -2340,16 +1723,6 @@
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
"dev": true
},
- "forking-tap": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/forking-tap/-/forking-tap-0.1.1.tgz",
- "integrity": "sha1-1h0sMgrv7+1JEPTOAbCyrtluqx8=",
- "dev": true,
- "requires": {
- "inline-source-map-comment": "^1.0.5",
- "recast": "^0.10.39"
- }
- },
"form-data": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
@@ -2388,9 +1761,9 @@
"dev": true
},
"function-loop": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-1.0.1.tgz",
- "integrity": "sha1-gHa7MF6OajzO7ikgdl8zDRkPNAw=",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-1.0.2.tgz",
+ "integrity": "sha512-Iw4MzMfS3udk/rqxTiDDCllhGwlOrsr50zViTOO/W6lS/9y6B1J0BD2VZzrnWUYBJsl3aeqjgR5v7bWWhZSYbA==",
"dev": true
},
"functional-red-black-tree": {
@@ -2400,9 +1773,9 @@
"dev": true
},
"get-caller-file": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
- "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w=="
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
"get-func-name": {
"version": "2.0.0",
@@ -2449,6 +1822,12 @@
"pinkie-promise": "^2.0.0"
}
},
+ "get-stdin": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
+ "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
+ "dev": true
+ },
"indent-string": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
@@ -2594,9 +1973,9 @@
}
},
"get-stdin": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
- "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
+ "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
"dev": true
},
"get-stream": {
@@ -2617,9 +1996,9 @@
}
},
"git-raw-commits": {
- "version": "1.3.6",
- "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz",
- "integrity": "sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.0.tgz",
+ "integrity": "sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg==",
"dev": true,
"requires": {
"dargs": "^4.0.1",
@@ -2648,9 +2027,9 @@
}
},
"git-semver-tags": {
- "version": "1.3.6",
- "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.3.6.tgz",
- "integrity": "sha512-2jHlJnln4D/ECk9FxGEBh3k44wgYdWjWDtMmJPaecjoRmxKo3Y1Lh8GMYuOPu04CHw86NTAODchYjC5pnpMQig==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-2.0.2.tgz",
+ "integrity": "sha512-34lMF7Yo1xEmsK2EkbArdoU79umpvm0MfzaDkSNYSJqtM5QLAVTPWgpiXSVI5o/O9EvZPSrP4Zvnec/CqhSd5w==",
"dev": true,
"requires": {
"meow": "^4.0.0",
@@ -2696,11 +2075,11 @@
"dev": true
},
"handlebars": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.0.tgz",
- "integrity": "sha512-l2jRuU1NAWK6AW5qqcTATWQJvNPEwkM7NEKSiv/gqOsoSQbVoWyqVEY5GS+XPQ88zLNmqASRpzfdm8d79hJS+w==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.1.tgz",
+ "integrity": "sha512-3Zhi6C0euYZL5sM0Zcy7lInLXKQ+YLcF/olbN010mzGQ4XVm50JeyBnMqofHh696GrciGruC7kCcApPDJvVgwA==",
"requires": {
- "async": "^2.5.0",
+ "neo-async": "^2.6.0",
"optimist": "^0.6.1",
"source-map": "^0.6.1",
"uglify-js": "^3.1.4"
@@ -2774,12 +2153,6 @@
"is-stream": "^1.0.1"
}
},
- "he": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
- "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
- "dev": true
- },
"hosted-git-info": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
@@ -2840,68 +2213,7 @@
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
- "dev": true
- },
- "inline-source-map-comment": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/inline-source-map-comment/-/inline-source-map-comment-1.0.5.tgz",
- "integrity": "sha1-UKikTCp5DfrEQbXJTszVRiY1+vY=",
- "dev": true,
- "requires": {
- "chalk": "^1.0.0",
- "get-stdin": "^4.0.1",
- "minimist": "^1.1.1",
- "sum-up": "^1.0.1",
- "xtend": "^4.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "dev": true
- },
- "ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
- "dev": true
- },
- "chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
- "dev": true,
- "requires": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- }
- },
- "minimist": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
- "dev": true
- },
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "dev": true,
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
- "supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
- "dev": true
- }
- }
+ "dev": true
},
"inquirer": {
"version": "5.2.0",
@@ -2922,6 +2234,18 @@
"string-width": "^2.1.0",
"strip-ansi": "^4.0.0",
"through": "^2.3.6"
+ },
+ "dependencies": {
+ "string-width": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "dev": true,
+ "requires": {
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^4.0.0"
+ }
+ }
}
},
"invert-kv": {
@@ -3058,39 +2382,46 @@
"dev": true
},
"istanbul-lib-coverage": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
- "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw=="
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz",
+ "integrity": "sha512-LXTBICkMARVgo579kWDm8SqfB6nvSDKNqIOBEjmJRnL04JvoMHCYGWaMddQnseJYtkEuEvO/sIcOxPLk9gERug=="
},
"istanbul-lib-hook": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.3.tgz",
- "integrity": "sha512-CLmEqwEhuCYtGcpNVJjLV1DQyVnIqavMLFHV/DP+np/g3qvdxu3gsPqYoJMXm15sN84xOlckFB3VNvRbf5yEgA==",
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.6.tgz",
+ "integrity": "sha512-829DKONApZ7UCiPXcOYWSgkFXa4+vNYoNOt3F+4uDJLKL1OotAoVwvThoEj1i8jmOj7odbYcR3rnaHu+QroaXg==",
"requires": {
"append-transform": "^1.0.0"
}
},
"istanbul-lib-instrument": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz",
- "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.2.0.tgz",
+ "integrity": "sha512-06IM3xShbNW4NgZv5AP4QH0oHqf1/ivFo8eFys0ZjPXHGldHJQWb3riYOKXqmOqfxXBfxu4B+g/iuhOPZH0RJg==",
"requires": {
"@babel/generator": "^7.0.0",
"@babel/parser": "^7.0.0",
"@babel/template": "^7.0.0",
"@babel/traverse": "^7.0.0",
"@babel/types": "^7.0.0",
- "istanbul-lib-coverage": "^2.0.3",
- "semver": "^5.5.0"
+ "istanbul-lib-coverage": "^2.0.4",
+ "semver": "^6.0.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz",
+ "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ=="
+ }
}
},
"istanbul-lib-report": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.4.tgz",
- "integrity": "sha512-sOiLZLAWpA0+3b5w5/dq0cjm2rrNdAfHWaGhmn7XEFW6X++IV9Ohn+pnELAl9K3rfpaeBfbmH9JU5sejacdLeA==",
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.7.tgz",
+ "integrity": "sha512-wLH6beJBFbRBLiTlMOBxmb85cnVM1Vyl36N48e4e/aTKSM3WbOx7zbVIH1SQ537fhhsPbX0/C5JB4qsmyRXXyA==",
"requires": {
- "istanbul-lib-coverage": "^2.0.3",
- "make-dir": "^1.3.0",
+ "istanbul-lib-coverage": "^2.0.4",
+ "make-dir": "^2.1.0",
"supports-color": "^6.0.0"
},
"dependencies": {
@@ -3105,13 +2436,13 @@
}
},
"istanbul-lib-source-maps": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.2.tgz",
- "integrity": "sha512-JX4v0CiKTGp9fZPmoxpu9YEkPbEqCqBbO3403VabKjH+NRXo72HafD5UgnjTEqHL2SAjaZK1XDuDOkn6I5QVfQ==",
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.5.tgz",
+ "integrity": "sha512-eDhZ7r6r1d1zQPVZehLc3D0K14vRba/eBYkz3rw16DLOrrTzve9RmnkcwrrkWVgO1FL3EK5knujVe5S8QHE9xw==",
"requires": {
"debug": "^4.1.1",
- "istanbul-lib-coverage": "^2.0.3",
- "make-dir": "^1.3.0",
+ "istanbul-lib-coverage": "^2.0.4",
+ "make-dir": "^2.1.0",
"rimraf": "^2.6.2",
"source-map": "^0.6.1"
},
@@ -3124,9 +2455,9 @@
}
},
"istanbul-reports": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.1.tgz",
- "integrity": "sha512-FzNahnidyEPBCI0HcufJoSEoKykesRlFcSzQqjH9x0+LC8tnnE/p/90PBLu8iZTxr8yYZNyTtiAujUqyN+CIxw==",
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.2.tgz",
+ "integrity": "sha512-ZFuTdBQ3PSaPnm02aEA4R6mzQ2AF9w03CYiXADzWbbE48v/EFOWF4MaX4FT0NRdqIk48I7o0RPi+S8TMswaCbQ==",
"requires": {
"handlebars": "^4.1.0"
}
@@ -3137,9 +2468,9 @@
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"js-yaml": {
- "version": "3.12.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz",
- "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==",
+ "version": "3.13.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
+ "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
@@ -3246,6 +2577,13 @@
"parse-json": "^4.0.0",
"pify": "^3.0.0",
"strip-bom": "^3.0.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
+ }
}
},
"locate-path": {
@@ -3327,11 +2665,12 @@
}
},
"make-dir": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
- "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
+ "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"requires": {
- "pify": "^3.0.0"
+ "pify": "^4.0.1",
+ "semver": "^5.6.0"
}
},
"make-error": {
@@ -3355,12 +2694,12 @@
"dev": true
},
"mem": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/mem/-/mem-4.1.0.tgz",
- "integrity": "sha512-I5u6Q1x7wxO0kdOpYBB28xueHADYps5uty/zg936CiG8NTe5sJL8EjrCuLneuDW3PlMdZBGDIn8BirEVdovZvg==",
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
+ "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
"requires": {
"map-age-cleaner": "^0.1.1",
- "mimic-fn": "^1.0.0",
+ "mimic-fn": "^2.0.0",
"p-is-promise": "^2.0.0"
}
},
@@ -3458,24 +2797,24 @@
}
},
"mime-db": {
- "version": "1.37.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
- "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==",
+ "version": "1.38.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
+ "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==",
"dev": true
},
"mime-types": {
- "version": "2.1.21",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
- "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==",
+ "version": "2.1.22",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
+ "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
"dev": true,
"requires": {
- "mime-db": "~1.37.0"
+ "mime-db": "~1.38.0"
}
},
"mimic-fn": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
- "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
},
"minimatch": {
"version": "3.0.4",
@@ -3533,71 +2872,6 @@
}
}
},
- "mocha": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz",
- "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==",
- "dev": true,
- "requires": {
- "browser-stdout": "1.3.1",
- "commander": "2.15.1",
- "debug": "3.1.0",
- "diff": "3.5.0",
- "escape-string-regexp": "1.0.5",
- "glob": "7.1.2",
- "growl": "1.10.5",
- "he": "1.1.1",
- "minimatch": "3.0.4",
- "mkdirp": "0.5.1",
- "supports-color": "5.4.0"
- },
- "dependencies": {
- "commander": {
- "version": "2.15.1",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
- "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
- "dev": true
- },
- "debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
- },
- "supports-color": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
- "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
- }
- }
- },
"modify-values": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz",
@@ -3621,6 +2895,16 @@
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
+ "neo-async": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz",
+ "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA=="
+ },
+ "nested-error-stacks": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz",
+ "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug=="
+ },
"newline-regex": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/newline-regex/-/newline-regex-0.2.1.tgz",
@@ -3663,9 +2947,9 @@
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"nyc": {
- "version": "13.2.0",
- "resolved": "https://registry.npmjs.org/nyc/-/nyc-13.2.0.tgz",
- "integrity": "sha512-gQBlOqvfpYt9b2PZ7qElrHWt8x4y8ApNfbMBoDPdl3sY4/4RJwCxDGTSqhA9RnaguZjS5nW7taW8oToe86JLgQ==",
+ "version": "13.3.0",
+ "resolved": "https://registry.npmjs.org/nyc/-/nyc-13.3.0.tgz",
+ "integrity": "sha512-P+FwIuro2aFG6B0Esd9ZDWUd51uZrAEoGutqZxzrVmYl3qSfkLgcQpBPBjtDFsUQLFY1dvTQJPOyeqr8S9GF8w==",
"dev": true,
"requires": {
"archy": "^1.0.0",
@@ -3678,10 +2962,10 @@
"glob": "^7.1.3",
"istanbul-lib-coverage": "^2.0.3",
"istanbul-lib-hook": "^2.0.3",
- "istanbul-lib-instrument": "^3.0.1",
+ "istanbul-lib-instrument": "^3.1.0",
"istanbul-lib-report": "^2.0.4",
"istanbul-lib-source-maps": "^3.0.2",
- "istanbul-reports": "^2.1.0",
+ "istanbul-reports": "^2.1.1",
"make-dir": "^1.3.0",
"merge-source-map": "^1.1.0",
"resolve-from": "^4.0.0",
@@ -3718,11 +3002,11 @@
"dev": true
},
"async": {
- "version": "2.6.1",
+ "version": "2.6.2",
"bundled": true,
"dev": true,
"requires": {
- "lodash": "^4.17.10"
+ "lodash": "^4.17.11"
}
},
"balanced-match": {
@@ -3739,11 +3023,6 @@
"concat-map": "0.0.1"
}
},
- "builtin-modules": {
- "version": "1.1.1",
- "bundled": true,
- "dev": true
- },
"caching-transform": {
"version": "3.0.1",
"bundled": true,
@@ -3942,7 +3221,7 @@
"dev": true
},
"handlebars": {
- "version": "4.0.12",
+ "version": "4.1.0",
"bundled": true,
"dev": true,
"requires": {
@@ -4006,14 +3285,6 @@
"bundled": true,
"dev": true
},
- "is-builtin-module": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "builtin-modules": "^1.0.0"
- }
- },
"is-fullwidth-code-point": {
"version": "2.0.0",
"bundled": true,
@@ -4082,11 +3353,11 @@
}
},
"istanbul-reports": {
- "version": "2.1.0",
+ "version": "2.1.1",
"bundled": true,
"dev": true,
"requires": {
- "handlebars": "^4.0.11"
+ "handlebars": "^4.1.0"
}
},
"json-parse-better-errors": {
@@ -4158,13 +3429,13 @@
}
},
"mem": {
- "version": "4.0.0",
+ "version": "4.1.0",
"bundled": true,
"dev": true,
"requires": {
"map-age-cleaner": "^0.1.1",
"mimic-fn": "^1.0.0",
- "p-is-promise": "^1.1.0"
+ "p-is-promise": "^2.0.0"
}
},
"merge-source-map": {
@@ -4226,12 +3497,12 @@
"dev": true
},
"normalize-package-data": {
- "version": "2.4.0",
+ "version": "2.5.0",
"bundled": true,
"dev": true,
"requires": {
"hosted-git-info": "^2.1.4",
- "is-builtin-module": "^1.0.0",
+ "resolve": "^1.10.0",
"semver": "2 || 3 || 4 || 5",
"validate-npm-package-license": "^3.0.1"
}
@@ -4292,7 +3563,7 @@
"dev": true
},
"p-is-promise": {
- "version": "1.1.0",
+ "version": "2.0.0",
"bundled": true,
"dev": true
},
@@ -4352,6 +3623,11 @@
"bundled": true,
"dev": true
},
+ "path-parse": {
+ "version": "1.0.6",
+ "bundled": true,
+ "dev": true
+ },
"path-type": {
"version": "3.0.0",
"bundled": true,
@@ -4424,6 +3700,14 @@
"bundled": true,
"dev": true
},
+ "resolve": {
+ "version": "1.10.0",
+ "bundled": true,
+ "dev": true,
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
+ },
"resolve-from": {
"version": "4.0.0",
"bundled": true,
@@ -4729,6 +4013,14 @@
"dev": true,
"requires": {
"mimic-fn": "^1.0.0"
+ },
+ "dependencies": {
+ "mimic-fn": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
+ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
+ "dev": true
+ }
}
},
"opener": {
@@ -4820,9 +4112,9 @@
"integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg=="
},
"p-limit": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz",
- "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
+ "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
"requires": {
"p-try": "^2.0.0"
}
@@ -4836,9 +4128,9 @@
}
},
"p-try": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
- "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ=="
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"package-hash": {
"version": "3.0.0",
@@ -4898,6 +4190,13 @@
"integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
"requires": {
"pify": "^3.0.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
+ }
}
},
"pathval": {
@@ -4913,9 +4212,9 @@
"dev": true
},
"pify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
- "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
+ "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="
},
"pinkie": {
"version": "2.0.4",
@@ -5018,12 +4317,6 @@
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
"dev": true
},
- "private": {
- "version": "0.1.8",
- "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
- "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
- "dev": true
- },
"process-nextick-args": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
@@ -5092,9 +4385,9 @@
"dev": true
},
"react-is": {
- "version": "16.8.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.1.tgz",
- "integrity": "sha512-ioMCzVDWvCvKD8eeT+iukyWrBGrA3DiFYkXfBsVYIRdaREZuBjENG+KjrikavCLasozqRWTwFUagU/O4vPpRMA==",
+ "version": "16.8.6",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz",
+ "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==",
"dev": true
},
"read-pkg": {
@@ -5131,26 +4424,6 @@
"util-deprecate": "~1.0.1"
}
},
- "recast": {
- "version": "0.10.43",
- "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz",
- "integrity": "sha1-uV1Q9tYHYaX2JS4V2AZ4FoSRzn8=",
- "dev": true,
- "requires": {
- "ast-types": "0.8.15",
- "esprima-fb": "~15001.1001.0-dev-harmony-fb",
- "private": "~0.1.5",
- "source-map": "~0.5.0"
- },
- "dependencies": {
- "esprima-fb": {
- "version": "15001.1001.0-dev-harmony-fb",
- "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz",
- "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=",
- "dev": true
- }
- }
- },
"redent": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz",
@@ -5218,9 +4491,9 @@
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
"require-main-filename": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
- "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
},
"require-uncached": {
"version": "1.0.3",
@@ -5322,9 +4595,9 @@
}
},
"semver": {
- "version": "5.6.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
- "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
+ "version": "5.7.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
+ "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA=="
},
"set-blocking": {
"version": "2.0.0",
@@ -5364,9 +4637,9 @@
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
},
"source-map-support": {
- "version": "0.5.10",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz",
- "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==",
+ "version": "0.5.12",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
+ "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
"dev": true,
"requires": {
"buffer-from": "^1.0.0",
@@ -5487,348 +4760,122 @@
}
},
"standard-engine": {
- "version": "9.0.0",
- "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-9.0.0.tgz",
- "integrity": "sha512-ZfNfCWZ2Xq67VNvKMPiVMKHnMdvxYzvZkf1AH8/cw2NLDBm5LRsxMqvEJpsjLI/dUosZ3Z1d6JlHDp5rAvvk2w==",
- "dev": true,
- "requires": {
- "deglob": "^2.1.0",
- "get-stdin": "^6.0.0",
- "minimist": "^1.1.0",
- "pkg-conf": "^2.0.0"
- },
- "dependencies": {
- "get-stdin": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
- "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
- "dev": true
- },
- "minimist": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
- "dev": true
- }
- }
- },
- "standard-version": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-4.4.0.tgz",
- "integrity": "sha512-jJ8FZhnmh9xJRQLnaXiGRLaAUNItIH29lOQZGpL5fd4+jUHto9Ij6SPCYN86h6ZNNXkYq2TYiIVVF7gVyC+pcQ==",
- "dev": true,
- "requires": {
- "chalk": "^1.1.3",
- "conventional-changelog": "^1.1.0",
- "conventional-recommended-bump": "^1.0.0",
- "dotgitignore": "^1.0.3",
- "figures": "^1.5.0",
- "fs-access": "^1.0.0",
- "semver": "^5.1.0",
- "yargs": "^8.0.1"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "dev": true
- },
- "ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
- "dev": true
- },
- "camelcase": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
- "dev": true
- },
- "chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
- "dev": true,
- "requires": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- }
- },
- "cliui": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
- "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
- "dev": true,
- "requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1",
- "wrap-ansi": "^2.0.0"
- },
- "dependencies": {
- "string-width": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
- "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
- "dev": true,
- "requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- }
- }
- }
- },
- "cross-spawn": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
- "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
- "dev": true,
- "requires": {
- "lru-cache": "^4.0.1",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "execa": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
- "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
- "dev": true,
- "requires": {
- "cross-spawn": "^5.0.1",
- "get-stream": "^3.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- }
- },
- "figures": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
- "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
- "dev": true,
- "requires": {
- "escape-string-regexp": "^1.0.5",
- "object-assign": "^4.1.0"
- }
- },
- "find-up": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
- "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
- "dev": true,
- "requires": {
- "locate-path": "^2.0.0"
- }
- },
- "get-stream": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
- "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
- "dev": true
- },
- "invert-kv": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
- "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-9.0.0.tgz",
+ "integrity": "sha512-ZfNfCWZ2Xq67VNvKMPiVMKHnMdvxYzvZkf1AH8/cw2NLDBm5LRsxMqvEJpsjLI/dUosZ3Z1d6JlHDp5rAvvk2w==",
+ "dev": true,
+ "requires": {
+ "deglob": "^2.1.0",
+ "get-stdin": "^6.0.0",
+ "minimist": "^1.1.0",
+ "pkg-conf": "^2.0.0"
+ },
+ "dependencies": {
+ "minimist": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "dev": true,
- "requires": {
- "number-is-nan": "^1.0.0"
- }
- },
- "lcid": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
- "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
- "dev": true,
- "requires": {
- "invert-kv": "^1.0.0"
- }
- },
- "load-json-file": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
- "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^2.2.0",
- "pify": "^2.0.0",
- "strip-bom": "^3.0.0"
- }
- },
- "locate-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
- "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
- "dev": true,
- "requires": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
- }
- },
- "mem": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
- "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
- "dev": true,
- "requires": {
- "mimic-fn": "^1.0.0"
- }
- },
- "os-locale": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
- "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
- "dev": true,
- "requires": {
- "execa": "^0.7.0",
- "lcid": "^1.0.0",
- "mem": "^1.1.0"
- }
- },
- "p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
- "dev": true,
- "requires": {
- "p-try": "^1.0.0"
- }
- },
- "p-locate": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
- "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
- "dev": true,
- "requires": {
- "p-limit": "^1.1.0"
- }
- },
- "p-try": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
+ }
+ }
+ },
+ "standard-version": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-5.0.2.tgz",
+ "integrity": "sha512-vvdWZySinwWU9UZhtgYUGGTkYzqrwYMw3c7CFJ17E7vMbAEqVSui/bm+ZcSukAAU2WmphPTWIKFmn8ni+lk4NA==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.4.1",
+ "conventional-changelog": "^3.0.6",
+ "conventional-recommended-bump": "^4.0.4",
+ "detect-indent": "^5.0.0",
+ "detect-newline": "^2.1.0",
+ "dotgitignore": "^2.1.0",
+ "figures": "^2.0.0",
+ "fs-access": "^1.0.0",
+ "git-semver-tags": "^2.0.2",
+ "semver": "^5.2.0",
+ "stringify-package": "^1.0.0",
+ "yargs": "^12.0.2"
+ },
+ "dependencies": {
+ "get-caller-file": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
+ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
"dev": true
},
- "parse-json": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
- "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
- "dev": true,
- "requires": {
- "error-ex": "^1.2.0"
- }
- },
- "path-type": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
- "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
- "dev": true,
- "requires": {
- "pify": "^2.0.0"
- }
- },
- "pify": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
- "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "require-main-filename": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
+ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
"dev": true
},
- "read-pkg": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
- "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
- "dev": true,
- "requires": {
- "load-json-file": "^2.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^2.0.0"
- }
- },
- "read-pkg-up": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
- "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
- "dev": true,
- "requires": {
- "find-up": "^2.0.0",
- "read-pkg": "^2.0.0"
- }
- },
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "string-width": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"dev": true,
"requires": {
- "ansi-regex": "^2.0.0"
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^4.0.0"
}
},
- "supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
- "dev": true
- },
- "y18n": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
- "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
- "dev": true
- },
"yargs": {
- "version": "8.0.2",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
- "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
+ "version": "12.0.5",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz",
+ "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==",
"dev": true,
"requires": {
- "camelcase": "^4.1.0",
- "cliui": "^3.2.0",
- "decamelize": "^1.1.1",
+ "cliui": "^4.0.0",
+ "decamelize": "^1.2.0",
+ "find-up": "^3.0.0",
"get-caller-file": "^1.0.1",
- "os-locale": "^2.0.0",
- "read-pkg-up": "^2.0.0",
+ "os-locale": "^3.0.0",
"require-directory": "^2.1.1",
"require-main-filename": "^1.0.1",
"set-blocking": "^2.0.0",
"string-width": "^2.0.0",
"which-module": "^2.0.0",
- "y18n": "^3.2.1",
- "yargs-parser": "^7.0.0"
+ "y18n": "^3.2.1 || ^4.0.0",
+ "yargs-parser": "^11.1.1"
}
},
"yargs-parser": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz",
- "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=",
+ "version": "11.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz",
+ "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
"dev": true,
"requires": {
- "camelcase": "^4.1.0"
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
}
}
}
},
"string-width": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
- "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"requires": {
+ "emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^4.0.0"
+ "strip-ansi": "^5.1.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
+ }
}
},
"string_decoder": {
@@ -5840,6 +4887,12 @@
"safe-buffer": "~5.1.0"
}
},
+ "stringify-package": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/stringify-package/-/stringify-package-1.0.0.tgz",
+ "integrity": "sha512-JIQqiWmLiEozOC0b0BtxZ/AOUtdUZHCBPgqIZ2kSJJqGwgb9neo44XdTHUC4HZSGqi03hOeB7W/E8rAlKnGe9g==",
+ "dev": true
+ },
"strip-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
@@ -5870,57 +4923,6 @@
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
"dev": true
},
- "sum-up": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/sum-up/-/sum-up-1.0.3.tgz",
- "integrity": "sha1-HGYfZnBX9jvLeHWqFDi8FiUlFW4=",
- "dev": true,
- "requires": {
- "chalk": "^1.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "dev": true
- },
- "ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
- "dev": true
- },
- "chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
- "dev": true,
- "requires": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- }
- },
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "dev": true,
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
- "supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
- "dev": true
- }
- }
- },
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
@@ -5947,12 +4949,24 @@
"lodash": "^4.17.4",
"slice-ansi": "1.0.0",
"string-width": "^2.1.1"
+ },
+ "dependencies": {
+ "string-width": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "dev": true,
+ "requires": {
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^4.0.0"
+ }
+ }
}
},
"tap": {
- "version": "12.5.2",
- "resolved": "https://registry.npmjs.org/tap/-/tap-12.5.2.tgz",
- "integrity": "sha512-r1uXuQ39+EnnR4hqWDTKw854+2ZSGR6QUEZwVRfabqcnhoNmkPQfiJCaVyhw+DILuMcJyT2/VRTVzn6puxkJ6w==",
+ "version": "12.6.1",
+ "resolved": "https://registry.npmjs.org/tap/-/tap-12.6.1.tgz",
+ "integrity": "sha512-av4rQscF4IspCJ16BM+/G6LKcKwkB6HBtixf0x0PTZQCW3KlicBy9F4SwkazbMSGMrecVWvFQFeabiy5YPhAhw==",
"dev": true,
"requires": {
"bind-obj-methods": "^2.0.0",
@@ -5962,16 +4976,16 @@
"color-support": "^1.1.0",
"coveralls": "^3.0.2",
"domain-browser": "^1.2.0",
- "esm": "^3.2.3",
+ "esm": "^3.2.5",
"foreground-child": "^1.3.3",
"fs-exists-cached": "^1.0.0",
"function-loop": "^1.0.1",
"glob": "^7.1.3",
"isexe": "^2.0.0",
- "js-yaml": "^3.12.1",
+ "js-yaml": "^3.13.0",
"minipass": "^2.3.5",
"mkdirp": "^0.5.1",
- "nyc": "^13.2.0",
+ "nyc": "^13.3.0",
"opener": "^1.5.1",
"os-homedir": "^1.0.2",
"own-or": "^1.0.0",
@@ -5980,7 +4994,7 @@
"signal-exit": "^3.0.0",
"source-map-support": "^0.5.10",
"stack-utils": "^1.0.2",
- "tap-mocha-reporter": "^3.0.7",
+ "tap-mocha-reporter": "^3.0.9",
"tap-parser": "^7.0.0",
"tmatch": "^4.0.0",
"trivial-deferred": "^1.0.1",
@@ -5992,9 +5006,9 @@
}
},
"tap-mocha-reporter": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-3.0.7.tgz",
- "integrity": "sha512-GHVXJ38C3oPRpM3YUc43JlGdpVZYiKeT1fmAd3HH2+J+ZWwsNAUFvRRdoGsXLw9+gU9o+zXpBqhS/oXyRQYwlA==",
+ "version": "3.0.9",
+ "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-3.0.9.tgz",
+ "integrity": "sha512-VO07vhC9EG27EZdOe7bWBj1ldbK+DL9TnRadOgdQmiQOVZjFpUEQuuqO7+rNSO2kfmkq5hWeluYXDWNG/ytXTQ==",
"dev": true,
"requires": {
"color-support": "^1.1.0",
@@ -6017,12 +5031,6 @@
"ms": "2.0.0"
}
},
- "diff": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz",
- "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=",
- "dev": true
- },
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
@@ -6054,14 +5062,14 @@
}
},
"test-exclude": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.1.0.tgz",
- "integrity": "sha512-gwf0S2fFsANC55fSeSqpb8BYk6w3FDvwZxfNjeF6FRgvFa43r+7wRiA/Q0IxoRU37wB/LE8IQ4221BsNucTaCA==",
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.2.tgz",
+ "integrity": "sha512-N2pvaLpT8guUpb5Fe1GJlmvmzH3x+DAKmmyEQmFP792QcLYoGE1syxztSvPD1V8yPe6VrcCt6YGQVjSRjCASsA==",
"requires": {
- "arrify": "^1.0.1",
+ "glob": "^7.1.3",
"minimatch": "^3.0.4",
"read-pkg-up": "^4.0.0",
- "require-main-filename": "^1.0.1"
+ "require-main-filename": "^2.0.0"
}
},
"text-extensions": {
@@ -6163,9 +5171,9 @@
}
},
"ts-node": {
- "version": "8.0.2",
- "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz",
- "integrity": "sha512-MosTrinKmaAcWgO8tqMjMJB22h+sp3Rd1i4fdoWY4mhBDekOwIAKI/bzmRi7IcbCmjquccYg2gcF6NBkLgr0Tw==",
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.3.tgz",
+ "integrity": "sha512-2qayBA4vdtVRuDo11DEFSsD/SFsBXQBRZZhbRGSIkmYmVkWjULn/GGMdG10KVqkaGndljfaTD8dKjWgcejO8YA==",
"dev": true,
"requires": {
"arg": "^4.1.0",
@@ -6173,6 +5181,14 @@
"make-error": "^1.1.1",
"source-map-support": "^0.5.6",
"yn": "^3.0.0"
+ },
+ "dependencies": {
+ "diff": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
+ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
+ "dev": true
+ }
}
},
"tsame": {
@@ -6218,18 +5234,18 @@
"dev": true
},
"typescript": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.3.tgz",
- "integrity": "sha512-Y21Xqe54TBVp+VDSNbuDYdGw0BpoR/Q6wo/+35M8PAU0vipahnyduJWirxxdxjsAkS7hue53x2zp8gz7F05u0A==",
+ "version": "3.4.1",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.1.tgz",
+ "integrity": "sha512-3NSMb2VzDQm8oBTLH6Nj55VVtUEpe/rgkIzMir0qVoLyjDZlnMBva0U6vDiV3IH+sl/Yu6oP5QwsAQtHPmDd2Q==",
"dev": true
},
"uglify-js": {
- "version": "3.4.9",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz",
- "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==",
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.3.tgz",
+ "integrity": "sha512-rIQPT2UMDnk4jRX+w4WO84/pebU2jiLsjgIyrCktYgSvx28enOE3iYQMr+BD1rHiitWnDmpu0cY/LfIEpKcjcw==",
"optional": true,
"requires": {
- "commander": "~2.17.1",
+ "commander": "~2.19.0",
"source-map": "~0.6.1"
},
"dependencies": {
@@ -6433,28 +5449,27 @@
"dev": true
},
"yargs": {
- "version": "12.0.5",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz",
- "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==",
+ "version": "13.2.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz",
+ "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==",
"requires": {
"cliui": "^4.0.0",
- "decamelize": "^1.2.0",
"find-up": "^3.0.0",
- "get-caller-file": "^1.0.1",
- "os-locale": "^3.0.0",
+ "get-caller-file": "^2.0.1",
+ "os-locale": "^3.1.0",
"require-directory": "^2.1.1",
- "require-main-filename": "^1.0.1",
+ "require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
- "string-width": "^2.0.0",
+ "string-width": "^3.0.0",
"which-module": "^2.0.0",
- "y18n": "^3.2.1 || ^4.0.0",
- "yargs-parser": "^11.1.1"
+ "y18n": "^4.0.0",
+ "yargs-parser": "^13.0.0"
}
},
"yargs-parser": {
- "version": "11.1.1",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz",
- "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
+ "version": "13.0.0",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz",
+ "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==",
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
diff --git a/package.json b/package.json
index 1d6a73815..7503983b9 100644
--- a/package.json
+++ b/package.json
@@ -1,18 +1,15 @@
{
"name": "nyc",
- "version": "13.3.0",
+ "version": "14.0.0",
"description": "the Istanbul command line interface",
"main": "index.js",
"scripts": {
- "bundle": "bundle-dependencies update",
+ "pretest": "npm run clean && npm run instrument",
+ "test": "tap -t360 --no-cov -b ./test/*.js && npm run report",
"posttest": "standard",
- "test": "npm run clean && npm run build && npm run instrument && npm run test-integration && npm run test-mocha && npm run report",
- "clean": "rimraf ./.nyc_output ./node_modules/.cache ./.self_coverage ./test/fixtures/.nyc_output ./test/fixtures/node_modules/.cache *covered.js ./lib/*covered.js",
- "build": "node ./build-tests",
+ "clean": "rimraf ./.nyc_output ./node_modules/.cache ./.self_coverage ./test/fixtures/.nyc_output ./test/fixtures/node_modules/.cache ./self-coverage",
"instrument": "node ./build-self-coverage.js",
- "test-integration": "tap -t120 --no-cov -b ./test/build/*.js && mocha --timeout=15000 ./test/nyc-bin.js",
- "test-mocha": "node ./bin/nyc --no-clean --silent --temp-dir=./.self_coverage mocha ./test/nyc.js ./test/process-args.js",
- "report": "node ./bin/nyc --temp-dir ./.self_coverage/ -r text -r lcov report",
+ "report": "node ./self-coverage/bin/nyc report --temp-dir ./.self_coverage/ -r text -r lcov",
"release": "standard-version"
},
"bin": {
@@ -21,22 +18,18 @@
"files": [
"index.js",
"bin/*.js",
- "lib/*.js",
- "lib/commands/*.js",
- "lib/instrumenters/*.js",
- "!**/*covered.js"
+ "lib/**/*.js"
],
"nyc": {
"exclude": [
"node_modules",
- "bin",
"coverage",
+ "self-coverage",
"test/fixtures/coverage.js",
"test/build/*",
"test/src/*",
"test/nyc.js",
"test/process-args.js",
- "index.covered.js",
"test/fixtures/_generateCoverage.js"
]
},
@@ -74,47 +67,44 @@
"license": "ISC",
"dependencies": {
"archy": "^1.0.0",
- "arrify": "^1.0.1",
- "caching-transform": "^3.0.1",
+ "caching-transform": "^3.0.2",
"convert-source-map": "^1.6.0",
- "find-cache-dir": "^2.0.0",
+ "cp-file": "^6.2.0",
+ "find-cache-dir": "^2.1.0",
"find-up": "^3.0.0",
"foreground-child": "^1.5.6",
"glob": "^7.1.3",
- "istanbul-lib-coverage": "^2.0.3",
- "istanbul-lib-hook": "^2.0.3",
- "istanbul-lib-instrument": "^3.1.0",
- "istanbul-lib-report": "^2.0.4",
- "istanbul-lib-source-maps": "^3.0.2",
- "istanbul-reports": "^2.1.1",
- "make-dir": "^1.3.0",
+ "istanbul-lib-coverage": "^2.0.4",
+ "istanbul-lib-hook": "^2.0.6",
+ "istanbul-lib-instrument": "^3.2.0",
+ "istanbul-lib-report": "^2.0.7",
+ "istanbul-lib-source-maps": "^3.0.5",
+ "istanbul-reports": "^2.2.2",
+ "make-dir": "^2.1.0",
"merge-source-map": "^1.1.0",
"resolve-from": "^4.0.0",
"rimraf": "^2.6.3",
"signal-exit": "^3.0.2",
"spawn-wrap": "^1.4.2",
- "test-exclude": "^5.1.0",
+ "test-exclude": "^5.2.2",
"uuid": "^3.3.2",
- "yargs": "^12.0.5",
- "yargs-parser": "^11.1.1"
+ "yargs": "^13.2.2",
+ "yargs-parser": "^13.0.0"
},
"devDependencies": {
"any-path": "^1.3.0",
- "bundle-dependencies": "^1.0.2",
"chai": "^4.2.0",
- "coveralls": "^3.0.2",
- "forking-tap": "^0.1.1",
+ "coveralls": "^3.0.3",
"is-windows": "^1.0.2",
"lodash": "^4.17.11",
- "mocha": "^5.2.0",
"newline-regex": "^0.2.1",
"requirejs": "^2.3.6",
"sanitize-filename": "^1.6.1",
- "source-map-support": "^0.5.10",
+ "source-map-support": "^0.5.12",
"standard": "^12.0.1",
- "standard-version": "^4.4.0",
+ "standard-version": "^5.0.2",
"strip-indent": "^2.0.0",
- "tap": "^12.4.0",
+ "tap": "^12.6.1",
"which": "^1.3.1",
"zero-fill": "^2.2.3"
},
@@ -124,30 +114,5 @@
"repository": {
"type": "git",
"url": "git@github.com:istanbuljs/nyc.git"
- },
- "bundledDependencies": [
- "archy",
- "arrify",
- "caching-transform",
- "convert-source-map",
- "find-cache-dir",
- "find-up",
- "foreground-child",
- "glob",
- "istanbul-lib-coverage",
- "istanbul-lib-hook",
- "istanbul-lib-report",
- "istanbul-lib-source-maps",
- "istanbul-reports",
- "make-dir",
- "merge-source-map",
- "resolve-from",
- "rimraf",
- "signal-exit",
- "spawn-wrap",
- "test-exclude",
- "uuid",
- "yargs",
- "yargs-parser"
- ]
+ }
}
diff --git a/lib/self-coverage-helper.js b/self-coverage-helper.js
similarity index 88%
rename from lib/self-coverage-helper.js
rename to self-coverage-helper.js
index d4d2d2cb5..9eeeb68b0 100644
--- a/lib/self-coverage-helper.js
+++ b/self-coverage-helper.js
@@ -10,7 +10,7 @@ onExit(function () {
if (typeof ___NYC_SELF_COVERAGE___ === 'object') coverage = ___NYC_SELF_COVERAGE___
if (!coverage) return
- var selfCoverageDir = path.join(__dirname, '../.self_coverage')
+ var selfCoverageDir = path.join(__dirname, '.self_coverage')
mkdirp.sync(selfCoverageDir)
fs.writeFileSync(
path.join(selfCoverageDir, process.pid + '.json'),
diff --git a/test/fixtures/_generateReport.js b/test/fixtures/_generateReport.js
index 09b8b9683..4da897293 100644
--- a/test/fixtures/_generateReport.js
+++ b/test/fixtures/_generateReport.js
@@ -10,7 +10,7 @@ var _ = require('lodash')
var rimraf = require('rimraf')
var sourceMapFixtures = require('source-map-fixtures')
-var NYC = require('../../')
+var NYC = require('../../self-coverage')
// Load source map fixtures.
var fixtures = {
diff --git a/test/fixtures/cli/.instrument-nycrc b/test/fixtures/cli/.instrument-nycrc
new file mode 100644
index 000000000..dcd61a6b0
--- /dev/null
+++ b/test/fixtures/cli/.instrument-nycrc
@@ -0,0 +1,6 @@
+{
+ "exclude": [
+ "**/exclude-me/**"
+ ],
+ "complete-copy": true
+}
diff --git a/test/fixtures/cli/no-transform/half-covered.xjs b/test/fixtures/cli/no-transform/half-covered.xjs
new file mode 100644
index 000000000..fd8c8f68d
--- /dev/null
+++ b/test/fixtures/cli/no-transform/half-covered.xjs
@@ -0,0 +1,9 @@
+var a = 0
+
+a++
+
+if (a === 0) {
+ a++;
+ a--;
+ a++;
+}
diff --git a/test/fixtures/cli/nyc-config-js/ignore.js b/test/fixtures/cli/nyc-config-js/ignore.js
new file mode 100644
index 000000000..2ace002b5
--- /dev/null
+++ b/test/fixtures/cli/nyc-config-js/ignore.js
@@ -0,0 +1 @@
+var i = 2
diff --git a/test/fixtures/cli/nyc-config-js/index.js b/test/fixtures/cli/nyc-config-js/index.js
new file mode 100644
index 000000000..8f4dfee22
--- /dev/null
+++ b/test/fixtures/cli/nyc-config-js/index.js
@@ -0,0 +1,11 @@
+require('./ignore')
+
+var a = 0
+
+a++
+
+if (a === 0) {
+ a++;
+ a--;
+ a++;
+}
diff --git a/test/fixtures/cli/nyc-config-js/nyc.config.js b/test/fixtures/cli/nyc-config-js/nyc.config.js
new file mode 100644
index 000000000..cc19aea0c
--- /dev/null
+++ b/test/fixtures/cli/nyc-config-js/nyc.config.js
@@ -0,0 +1,3 @@
+module.exports = {
+ exclude: ['nyc.config.js', 'nycrc-config.js', 'ignore.js']
+};
diff --git a/test/fixtures/cli/nyc-config-js/nycrc-config.js b/test/fixtures/cli/nyc-config-js/nycrc-config.js
new file mode 100644
index 000000000..3c92a4454
--- /dev/null
+++ b/test/fixtures/cli/nyc-config-js/nycrc-config.js
@@ -0,0 +1,9 @@
+module.exports = {
+ 'check-coverage': true,
+ 'per-file': true,
+ lines: 100,
+ statements: 100,
+ functions: 100,
+ branches: 100,
+ exclude: []
+}
diff --git a/test/fixtures/cli/nyc-config-js/package.json b/test/fixtures/cli/nyc-config-js/package.json
new file mode 100644
index 000000000..d73c43154
--- /dev/null
+++ b/test/fixtures/cli/nyc-config-js/package.json
@@ -0,0 +1,5 @@
+{
+ "nyc": {
+ "reporter": ["text-lcov"]
+ }
+}
diff --git a/test/fixtures/cli/subdir/.gitignore b/test/fixtures/cli/subdir/.gitignore
index 21ba3bc07..a5cb0329a 100644
--- a/test/fixtures/cli/subdir/.gitignore
+++ b/test/fixtures/cli/subdir/.gitignore
@@ -1 +1,2 @@
output-dir
+!node_modules
diff --git a/test/fixtures/cli/subdir/input-dir/exclude-me/index.js b/test/fixtures/cli/subdir/input-dir/exclude-me/index.js
new file mode 100644
index 000000000..239a04e74
--- /dev/null
+++ b/test/fixtures/cli/subdir/input-dir/exclude-me/index.js
@@ -0,0 +1,2 @@
+'use strict';
+console.log('Hello, World!')
diff --git a/test/fixtures/cli/subdir/input-dir/include-me/exclude-me.js b/test/fixtures/cli/subdir/input-dir/include-me/exclude-me.js
new file mode 100644
index 000000000..239a04e74
--- /dev/null
+++ b/test/fixtures/cli/subdir/input-dir/include-me/exclude-me.js
@@ -0,0 +1,2 @@
+'use strict';
+console.log('Hello, World!')
diff --git a/test/fixtures/cli/subdir/input-dir/include-me/include-me.js b/test/fixtures/cli/subdir/input-dir/include-me/include-me.js
new file mode 100644
index 000000000..239a04e74
--- /dev/null
+++ b/test/fixtures/cli/subdir/input-dir/include-me/include-me.js
@@ -0,0 +1,2 @@
+'use strict';
+console.log('Hello, World!')
diff --git a/test/fixtures/cli/subdir/input-dir/node_modules/index.js b/test/fixtures/cli/subdir/input-dir/node_modules/index.js
new file mode 100644
index 000000000..239a04e74
--- /dev/null
+++ b/test/fixtures/cli/subdir/input-dir/node_modules/index.js
@@ -0,0 +1,2 @@
+'use strict';
+console.log('Hello, World!')
diff --git a/test/fixtures/exclude-node-modules/.gitignore b/test/fixtures/exclude-node-modules/.gitignore
new file mode 100644
index 000000000..9ef48a5db
--- /dev/null
+++ b/test/fixtures/exclude-node-modules/.gitignore
@@ -0,0 +1,2 @@
+!node_modules
+node_modules/.cache/
diff --git a/test/fixtures/exclude-node-modules/bin/do-nothing.js b/test/fixtures/exclude-node-modules/bin/do-nothing.js
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/fixtures/exclude-node-modules/node_modules/@istanbuljs/fake-module-1/index.js b/test/fixtures/exclude-node-modules/node_modules/@istanbuljs/fake-module-1/index.js
new file mode 100644
index 000000000..6be02374d
--- /dev/null
+++ b/test/fixtures/exclude-node-modules/node_modules/@istanbuljs/fake-module-1/index.js
@@ -0,0 +1 @@
+console.log('hello world');
diff --git a/test/fixtures/exclude-node-modules/node_modules/@istanbuljs/fake-module-2/index.js b/test/fixtures/exclude-node-modules/node_modules/@istanbuljs/fake-module-2/index.js
new file mode 100644
index 000000000..6be02374d
--- /dev/null
+++ b/test/fixtures/exclude-node-modules/node_modules/@istanbuljs/fake-module-2/index.js
@@ -0,0 +1 @@
+console.log('hello world');
diff --git a/test/fixtures/exclude-node-modules/package.json b/test/fixtures/exclude-node-modules/package.json
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/test/fixtures/exclude-node-modules/package.json
@@ -0,0 +1 @@
+{}
diff --git a/test/fixtures/package.json b/test/fixtures/package.json
index 13746bfb3..0a5f68adc 100644
--- a/test/fixtures/package.json
+++ b/test/fixtures/package.json
@@ -9,8 +9,8 @@
},
"nyc": {
"exclude": [
- "**/blarg",
- "**/blerg"
+ "**/blarg.js",
+ "**/blerg.js"
]
}
}
diff --git a/test/lib/reset-state.js b/test/lib/reset-state.js
new file mode 100644
index 000000000..dc73d32da
--- /dev/null
+++ b/test/lib/reset-state.js
@@ -0,0 +1,23 @@
+// reset global state modified by nyc in non-integration tests.
+const extensions = Object.assign({}, require.extensions) // eslint-disable-line
+const glob = require('glob')
+const rimraf = require('rimraf')
+
+module.exports = function () {
+ // nuke any temporary files created during test runs.
+ glob.sync('test/**/*/{.nyc_output,.cache}').forEach(function (path) {
+ rimraf.sync(path)
+ })
+ // reset Node's require cache.
+ Object.keys(require.cache).forEach((key) => {
+ if (key.indexOf('node_modules') === -1) delete require.cache[key]
+ })
+ // reset any custom loaders for extensions, disabling the stack maintained
+ // by append-transform.
+ Object.keys(require.extensions).forEach((key) => { // eslint-disable-line
+ delete require.extensions[key] // eslint-disable-line
+ if (extensions[key]) require.extensions[key] = extensions[key] // eslint-disable-line
+ })
+ // reset any NYC-specific environment variables that might have been set.
+ delete process.env.NYC_CWD
+}
diff --git a/test/nyc-index.js b/test/nyc-index.js
new file mode 100644
index 000000000..f7b549e3b
--- /dev/null
+++ b/test/nyc-index.js
@@ -0,0 +1,533 @@
+/* global describe, it, beforeEach */
+
+require('source-map-support').install({ hookRequire: true })
+
+const fs = require('fs')
+const _ = require('lodash')
+const ap = require('any-path')
+
+const configUtil = require('../self-coverage/lib/config-util')
+const NYC = require('../self-coverage')
+// we test exit handlers in nyc-integration.js.
+NYC.prototype._wrapExit = () => {}
+
+const path = require('path')
+const rimraf = require('rimraf')
+const isWindows = require('is-windows')()
+const spawn = require('child_process').spawn
+const fixtures = path.resolve(__dirname, './fixtures')
+const bin = path.resolve(__dirname, '../self-coverage/bin/nyc')
+const resetState = require('./lib/reset-state')
+
+require('chai').should()
+require('tap').mochaGlobals()
+
+const transpileHook = path.resolve(process.cwd(), './test/fixtures/transpile-hook')
+
+describe('nyc', function () {
+ beforeEach(resetState)
+
+ describe('cwd', function () {
+ it('sets cwd to process.cwd() if no environment variable is set', function () {
+ var nyc = new NYC(configUtil.buildYargs().parse())
+
+ nyc.cwd.should.eql(process.cwd())
+ })
+
+ it('uses NYC_CWD environment variable for cwd if it is set', function () {
+ process.env.NYC_CWD = path.resolve(__dirname, './fixtures')
+ var nyc = new NYC(configUtil.buildYargs().parse())
+
+ nyc.cwd.should.equal(path.resolve(__dirname, './fixtures'))
+ })
+
+ it('will look upwards for package.json from cwd', function () {
+ var nyc = new NYC(configUtil.buildYargs(__dirname).parse())
+ nyc.cwd.should.eql(path.join(__dirname, '..'))
+ })
+
+ it('uses --cwd for cwd if it is set (highest priority and does not look upwards for package.json) ', function () {
+ var nyc = new NYC(configUtil.buildYargs(__dirname).parse(['--cwd', __dirname]))
+ nyc.cwd.should.eql(__dirname)
+ })
+ })
+
+ describe('config', function () {
+ it("loads 'exclude' patterns from package.json#nyc", function () {
+ var nyc = new NYC(configUtil.buildYargs(path.resolve(__dirname, './fixtures')).parse())
+ nyc.exclude.exclude.length.should.eql(8)
+ })
+
+ it("loads 'extension' patterns from package.json#nyc", function () {
+ var nyc = new NYC(configUtil.buildYargs(path.resolve(__dirname, './fixtures/conf-multiple-extensions')).parse())
+ nyc.extensions.length.should.eql(3)
+ })
+
+ it("ignores 'include' option if it's falsy or []", function () {
+ var nyc1 = new NYC(configUtil.buildYargs(path.resolve(__dirname, './fixtures/conf-empty')).parse())
+
+ nyc1.exclude.include.should.equal(false)
+
+ var nyc2 = new NYC({
+ include: []
+ })
+
+ nyc2.exclude.include.should.equal(false)
+ })
+
+ it("ignores 'exclude' option if it's falsy", function () {
+ var nyc1 = new NYC(configUtil.buildYargs(path.resolve(__dirname, './fixtures/conf-empty')).parse())
+ nyc1.exclude.exclude.length.should.eql(15)
+ })
+
+ it("allows for empty 'exclude'", function () {
+ var nyc2 = new NYC({ exclude: [] })
+
+ // an empty exclude still has **/node_modules/**, node_modules/** and added.
+ nyc2.exclude.exclude.length.should.eql(2)
+ })
+ })
+
+ describe('shouldInstrumentFile', function () {
+ it('should exclude appropriately with defaults', function () {
+ var nyc = new NYC(configUtil.buildYargs('/cwd').parse([
+ '--exclude=test/**',
+ '--exclude=test{,-*}.js',
+ '--exclude=**/*.test.js',
+ '--exclude=**/__tests__/**'
+ ]))
+
+ // nyc always excludes "node_modules/**"
+ nyc.exclude.shouldInstrument('/cwd/foo.js', 'foo.js').should.equal(true)
+ nyc.exclude.shouldInstrument('/cwd/node_modules/bar.js', 'node_modules/bar.js').should.equal(false)
+ nyc.exclude.shouldInstrument('/cwd/foo/node_modules/bar.js', 'foo/node_modules/bar.js').should.equal(false)
+ nyc.exclude.shouldInstrument('/cwd/test.js', 'test.js').should.equal(false)
+ nyc.exclude.shouldInstrument('/cwd/testfoo.js', 'testfoo.js').should.equal(true)
+ nyc.exclude.shouldInstrument('/cwd/test-foo.js', 'test-foo.js').should.equal(false)
+ nyc.exclude.shouldInstrument('/cwd/lib/test.js', 'lib/test.js').should.equal(true)
+ nyc.exclude.shouldInstrument('/cwd/foo/bar/test.js', './test.js').should.equal(false)
+ nyc.exclude.shouldInstrument('/cwd/foo/bar/test.js', '.\\test.js').should.equal(false)
+ nyc.exclude.shouldInstrument('/cwd/foo/bar/foo.test.js', './foo.test.js').should.equal(false)
+ nyc.exclude.shouldInstrument('/cwd/foo/bar/__tests__/foo.js', './__tests__/foo.js').should.equal(false)
+ })
+
+ it('should exclude appropriately with config.exclude', function () {
+ var nyc = new NYC(configUtil.buildYargs(fixtures).parse())
+
+ // fixtures/package.json configures excludes: "blarg", "blerg"
+ nyc.exclude.shouldInstrument('blarg.js', 'blarg.js').should.equal(false)
+ nyc.exclude.shouldInstrument('blarg/foo.js', 'blarg/foo.js').should.equal(false)
+ nyc.exclude.shouldInstrument('blerg.js', 'blerg.js').should.equal(false)
+ nyc.exclude.shouldInstrument('./blerg.js', './blerg.js').should.equal(false)
+ nyc.exclude.shouldInstrument('./blerg.js', '.\\blerg.js').should.equal(false)
+ })
+
+ it('should exclude outside of the current working directory', function () {
+ var nyc = new NYC(configUtil.buildYargs('/cwd/foo/').parse())
+ nyc.exclude.shouldInstrument('/cwd/bar.js', '../bar.js').should.equal(false)
+ })
+
+ it('should not exclude if the current working directory is inside node_modules', function () {
+ var nyc = new NYC(configUtil.buildYargs('/cwd/node_modules/foo/').parse())
+ nyc.exclude.shouldInstrument('/cwd/node_modules/foo/bar.js', './bar.js').should.equal(true)
+ nyc.exclude.shouldInstrument('/cwd/node_modules/foo/bar.js', '.\\bar.js').should.equal(true)
+ })
+
+ it('allows files to be explicitly included, rather than excluded', function () {
+ var nyc = new NYC(configUtil.buildYargs('/cwd/').parse(['--include=foo.js']))
+
+ nyc.exclude.shouldInstrument('/cwd/foo.js', 'foo.js').should.equal(true)
+ nyc.exclude.shouldInstrument('/cwd/index.js', 'index.js').should.equal(false)
+ })
+
+ it('exclude overrides include', function () {
+ var nyc = new NYC(configUtil.buildYargs('/cwd/').parse([
+ '--include=foo.js',
+ '--include=test.js',
+ '--exclude=**/node_modules/**',
+ '--exclude=test/**',
+ '--exclude=test{,-*}.js'
+ ]))
+
+ nyc.exclude.shouldInstrument('/cwd/foo.js', 'foo.js').should.equal(true)
+ nyc.exclude.shouldInstrument('/cwd/test.js', 'test.js').should.equal(false)
+ })
+ })
+
+ describe('wrap', function () {
+ it('wraps modules with coverage counters when they are required', function () {
+ var nyc = new NYC(configUtil.buildYargs().parse())
+ nyc.reset()
+ nyc.wrap()
+
+ var check = require('./fixtures/check-instrumented')
+ check().should.equal(true)
+ })
+
+ describe('custom require hooks are installed', function () {
+ it('wraps modules with coverage counters when the custom require hook compiles them', function () {
+ let required = false
+ const hook = function (module, filename) {
+ if (filename.indexOf('check-instrumented.js') !== -1) {
+ required = true
+ }
+ module._compile(fs.readFileSync(filename, 'utf8'), filename)
+ }
+
+ var nyc = new NYC(configUtil.buildYargs().parse())
+ nyc.reset()
+ nyc.wrap()
+
+ // install the custom require hook
+ require.extensions['.js'] = hook // eslint-disable-line
+
+ const check = require('./fixtures/check-instrumented')
+ check().should.equal(true)
+
+ // and the hook should have been called
+ required.should.equal(true)
+ })
+ })
+
+ describe('produce source map', function () {
+ it('handles stack traces', function () {
+ var nyc = new NYC(configUtil.buildYargs().parse('--produce-source-map'))
+ nyc.reset()
+ nyc.wrap()
+
+ var check = require('./fixtures/stack-trace')
+ check().should.match(/stack-trace.js:4:/)
+ })
+
+ it('does not handle stack traces when disabled', function () {
+ var nyc = new NYC(configUtil.buildYargs().parse())
+ nyc.reset()
+ nyc.wrap()
+
+ var check = require('./fixtures/stack-trace')
+ check().should.match(/stack-trace.js:1:/)
+ })
+ })
+
+ describe('compile handlers for custom extensions are assigned', function () {
+ it('assigns a function to custom extensions', function () {
+ var nyc = new NYC(configUtil.buildYargs(
+ path.resolve(__dirname, './fixtures/conf-multiple-extensions')
+ ).parse())
+ nyc.reset()
+ nyc.wrap()
+
+ require.extensions['.es6'].should.be.a('function') // eslint-disable-line
+ require.extensions['.foo.bar'].should.be.a('function') // eslint-disable-line
+
+ // default should still exist
+ require.extensions['.js'].should.be.a('function') // eslint-disable-line
+ })
+
+ it('calls the `_handleJs` function for custom file extensions', function () {
+ const required = {
+ es6: false,
+ custom: false
+ }
+ var nyc = new NYC(configUtil.buildYargs(
+ path.resolve(__dirname, './fixtures/conf-multiple-extensions')
+ ).parse())
+
+ nyc['_handleJs'] = (code, options) => {
+ if (options.filename.indexOf('check-instrumented.es6') !== -1) {
+ required.es6 = true
+ }
+ if (options.filename.indexOf('check-instrumented.foo.bar') !== -1) {
+ required.custom = true
+ }
+ return code
+ }
+
+ nyc.reset()
+ nyc.wrap()
+
+ require('./fixtures/conf-multiple-extensions/check-instrumented.es6')
+ require('./fixtures/conf-multiple-extensions/check-instrumented.foo.bar')
+ required.custom.should.equal(true)
+ required.es6.should.equal(true)
+ })
+ })
+
+ function testSignal (signal, done) {
+ var nyc = (new NYC(configUtil.buildYargs(fixtures).parse()))
+
+ var proc = spawn(process.execPath, [bin, './' + signal + '.js'], {
+ cwd: fixtures,
+ env: {},
+ stdio: 'ignore'
+ })
+
+ proc.on('close', function () {
+ var reports = _.filter(nyc.loadReports(), function (report) {
+ return report[path.join(fixtures, signal + '.js')]
+ })
+ reports.length.should.equal(1)
+ return done()
+ })
+ }
+
+ it('writes coverage report when process is killed with SIGTERM', function (done) {
+ if (isWindows) return done()
+ testSignal('sigterm', done)
+ })
+
+ it('writes coverage report when process is killed with SIGINT', function (done) {
+ if (isWindows) return done()
+ testSignal('sigint', done)
+ })
+
+ it('does not output coverage for files that have not been included, by default', function (done) {
+ var nyc = (new NYC(configUtil.buildYargs(process.cwd()).parse()))
+ nyc.wrap()
+ nyc.reset()
+
+ var reports = _.filter(nyc.loadReports(), function (report) {
+ return report['./test/fixtures/not-loaded.js']
+ })
+ reports.length.should.equal(0)
+ return done()
+ })
+ })
+
+ describe('report', function () {
+ it('allows coverage report to be output in an alternative directory', function (done) {
+ var nyc = new NYC(configUtil.buildYargs().parse(
+ ['--report-dir=./alternative-report', '--reporter=lcov']
+ ))
+ nyc.reset()
+
+ var proc = spawn(process.execPath, ['./test/fixtures/child-1.js'], {
+ cwd: process.cwd(),
+ env: process.env,
+ stdio: 'inherit'
+ })
+
+ proc.on('close', function () {
+ nyc.report()
+ fs.existsSync('./alternative-report/lcov.info').should.equal(true)
+ rimraf.sync('./alternative-report')
+ return done()
+ })
+ })
+ })
+
+ describe('addAllFiles', function () {
+ it('outputs an empty coverage report for all files that are not excluded', function (done) {
+ var nyc = new NYC(configUtil.buildYargs(fixtures).parse())
+ nyc.reset()
+ nyc.addAllFiles()
+
+ var notLoadedPath = path.join(fixtures, './not-loaded.js')
+ var reports = _.filter(nyc.loadReports(), function (report) {
+ return ap(report)[notLoadedPath]
+ })
+ var report = reports[0][notLoadedPath]
+
+ reports.length.should.equal(1)
+ report.s['0'].should.equal(0)
+ report.s['1'].should.equal(0)
+ return done()
+ })
+
+ it('outputs an empty coverage report for multiple configured extensions', function (done) {
+ var cwd = path.resolve(fixtures, './conf-multiple-extensions')
+ var nyc = new NYC(configUtil.buildYargs(cwd).parse())
+ nyc.reset()
+ nyc.addAllFiles()
+
+ var notLoadedPath1 = path.join(cwd, './not-loaded.es6')
+ var notLoadedPath2 = path.join(cwd, './not-loaded.js')
+ var reports = _.filter(nyc.loadReports(), function (report) {
+ var apr = ap(report)
+ return apr[notLoadedPath1] || apr[notLoadedPath2]
+ })
+
+ reports.length.should.equal(1)
+
+ var report1 = reports[0][notLoadedPath1]
+ report1.s['0'].should.equal(0)
+ report1.s['1'].should.equal(0)
+
+ var report2 = reports[0][notLoadedPath2]
+ report2.s['0'].should.equal(0)
+ report2.s['1'].should.equal(0)
+
+ return done()
+ })
+
+ it('tracks coverage appropriately once the file is required', function (done) {
+ var nyc = (new NYC(configUtil.buildYargs(fixtures).parse()))
+ nyc.reset()
+ nyc.wrap()
+
+ require('./fixtures/not-loaded')
+
+ nyc.writeCoverageFile()
+
+ var notLoadedPath = path.join(fixtures, './not-loaded.js')
+ var reports = _.filter(nyc.loadReports(), function (report) {
+ return report[notLoadedPath]
+ })
+ var report = reports[0][notLoadedPath]
+
+ reports.length.should.equal(1)
+ report.s['0'].should.equal(1)
+ report.s['1'].should.equal(1)
+
+ return done()
+ })
+
+ it('transpiles .js files added via addAllFiles', function (done) {
+ fs.writeFileSync(
+ './test/fixtures/needs-transpile.js',
+ '--> pork chop sandwiches <--\nvar a = 99',
+ 'utf-8'
+ )
+
+ var nyc = (new NYC(configUtil.buildYargs(fixtures).parse(['--require', transpileHook])))
+ nyc.reset()
+ nyc.addAllFiles()
+
+ var needsTranspilePath = path.join(fixtures, './needs-transpile.js')
+ var reports = _.filter(nyc.loadReports(), function (report) {
+ return ap(report)[needsTranspilePath]
+ })
+ var report = reports[0][needsTranspilePath]
+
+ reports.length.should.equal(1)
+ report.s['0'].should.equal(0)
+
+ fs.unlinkSync(needsTranspilePath)
+ return done()
+ })
+
+ it('does not attempt to transpile files when they are excluded', function (done) {
+ var notNeedTranspilePath = path.join(fixtures, './do-not-need-transpile.do-not-transpile')
+ fs.writeFileSync(
+ notNeedTranspilePath,
+ '--> pork chop sandwiches <--\nvar a = 99',
+ 'utf-8'
+ )
+
+ var nyc = (new NYC(configUtil.buildYargs(fixtures).parse([
+ `--require=${transpileHook}`,
+ '--extension=.do-not-transpile',
+ '--include=needs-transpile.do-not-transpile'
+ ])))
+
+ nyc.reset()
+ nyc.addAllFiles()
+ fs.unlinkSync(notNeedTranspilePath)
+ return done()
+ })
+ })
+
+ it('transpiles non-.js files added via addAllFiles', function (done) {
+ fs.writeFileSync(
+ './test/fixtures/needs-transpile.whatever',
+ '--> pork chop sandwiches <--\nvar a = 99',
+ 'utf-8'
+ )
+
+ var nyc = (new NYC(configUtil.buildYargs(fixtures).parse([
+ `--require=${transpileHook}`,
+ '--extension=.whatever'
+ ])))
+
+ nyc.reset()
+ nyc.addAllFiles()
+
+ var needsTranspilePath = path.join(fixtures, './needs-transpile.whatever')
+ var reports = _.filter(nyc.loadReports(), function (report) {
+ return ap(report)[needsTranspilePath]
+ })
+ var report = reports[0][needsTranspilePath]
+
+ reports.length.should.equal(1)
+ report.s['0'].should.equal(0)
+
+ fs.unlinkSync(needsTranspilePath)
+ return done()
+ })
+
+ describe('cache', function () {
+ it('handles collisions', function (done) {
+ var nyc = new NYC(configUtil.buildYargs(fixtures).parse())
+ nyc.clearCache()
+
+ var args = [bin, process.execPath, './cache-collision-runner.js']
+
+ var proc = spawn(process.execPath, args, {
+ cwd: fixtures,
+ env: {}
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ done()
+ })
+ })
+
+ it('handles identical files', function (done) {
+ var nyc = new NYC(configUtil.buildYargs(fixtures).parse())
+ nyc.clearCache()
+
+ var args = [bin, process.execPath, './identical-file-runner.js']
+
+ var proc = spawn(process.execPath, args, {
+ cwd: fixtures,
+ env: {}
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ done()
+ })
+ })
+ })
+
+ describe('_disableCachingTransform', function () {
+ it('is disabled if cache is "false"', function () {
+ const nyc = new NYC({ cache: false })
+ nyc._disableCachingTransform().should.equal(true)
+ })
+
+ it('is enabled if cache is "true" and isChildProcess is "true"', function () {
+ const nyc = new NYC({
+ cache: true,
+ isChildProcess: true
+ })
+ nyc._disableCachingTransform().should.equal(false)
+ })
+
+ it('is disabled if cache is "true" and isChildProcess is "false"', function () {
+ const nyc = new NYC({
+ cache: true,
+ isChildProcess: true
+ })
+ nyc._disableCachingTransform().should.equal(false)
+ })
+ })
+
+ describe('cacheDirectory', function () {
+ it('should resolve default cache folder to absolute path', function () {
+ const nyc = new NYC({
+ cache: true
+ })
+ path.isAbsolute(nyc.cacheDirectory).should.equal(true)
+ })
+
+ it('should resolve custom cache folder to absolute path', function () {
+ const nyc = new NYC({
+ cacheDir: '.nyc_cache',
+ cache: true
+ })
+ path.isAbsolute(nyc.cacheDirectory).should.equal(true)
+ })
+ })
+})
diff --git a/test/nyc-bin.js b/test/nyc-integration.js
similarity index 64%
rename from test/nyc-bin.js
rename to test/nyc-integration.js
index 1aae65b97..792fc1293 100644
--- a/test/nyc-bin.js
+++ b/test/nyc-integration.js
@@ -1,8 +1,8 @@
-/* global describe, it, beforeEach */
+/* global describe, it, beforeEach, afterEach */
const _ = require('lodash')
const path = require('path')
-const bin = path.resolve(__dirname, '../bin/nyc')
+const bin = path.resolve(__dirname, '../self-coverage/bin/nyc')
const fixturesCLI = path.resolve(__dirname, './fixtures/cli')
const fixturesHooks = path.resolve(__dirname, './fixtures/hooks')
const fixturesSourceMaps = path.resolve(__dirname, './fixtures/source-maps')
@@ -11,10 +11,12 @@ const fs = require('fs')
const glob = require('glob')
const isWindows = require('is-windows')()
const rimraf = require('rimraf')
+const makeDir = require('make-dir')
const spawn = require('child_process').spawn
const si = require('strip-indent')
require('chai').should()
+require('tap').mochaGlobals()
// beforeEach
rimraf.sync(path.resolve(fakebin, 'node'))
@@ -366,6 +368,80 @@ describe('the nyc cli', function () {
})
})
+ describe('nyc.config.js', function () {
+ var cwd = path.resolve(fixturesCLI, './nyc-config-js')
+
+ it('loads configuration from package.json and nyc.config.js', function (done) {
+ var args = [bin, process.execPath, './index.js']
+
+ var proc = spawn(process.execPath, args, {
+ cwd: cwd,
+ env: env
+ })
+
+ var stdout = ''
+ proc.stdout.on('data', function (chunk) {
+ stdout += chunk
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ stdout.should.match(/SF:.*index\.js/)
+ stdout.should.not.match(/SF:.*ignore\.js/)
+ stdout.should.not.match(/SF:.*nyc\.config\.js/)
+ stdout.should.not.match(/SF:.*nycrc-config\.js/)
+ done()
+ })
+ })
+
+ it('loads configuration from different module rather than nyc.config.js', function (done) {
+ var args = [bin, '--all', '--nycrc-path', './nycrc-config.js', process.execPath, './index.js']
+
+ var proc = spawn(process.execPath, args, {
+ cwd: cwd,
+ env: env
+ })
+
+ var stdout = ''
+ proc.stdout.on('data', function (chunk) {
+ stdout += chunk
+ })
+
+ proc.on('close', function (code) {
+ // should be 1 due to coverage check
+ code.should.equal(1)
+ stdout.should.match(/SF:.*index\.js/)
+ stdout.should.match(/SF:.*ignore\.js/)
+ stdout.should.match(/SF:.*nyc\.config\.js/)
+ stdout.should.match(/SF:.*nycrc-config\.js/)
+ done()
+ })
+ })
+
+ it('allows nyc.config.js configuration to be overridden with command line args', function (done) {
+ var args = [bin, '--all', '--exclude=foo.js', process.execPath, './index.js']
+
+ var proc = spawn(process.execPath, args, {
+ cwd: cwd,
+ env: env
+ })
+
+ var stdout = ''
+ proc.stdout.on('data', function (chunk) {
+ stdout += chunk
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ stdout.should.match(/SF:.*index\.js/)
+ stdout.should.match(/SF:.*ignore\.js/)
+ stdout.should.match(/SF:.*nyc\.config\.js/)
+ stdout.should.match(/SF:.*nycrc-config\.js/)
+ done()
+ })
+ })
+ })
+
describe('.nycrc', function () {
var cwd = path.resolve(fixturesCLI, './nycrc')
@@ -479,7 +555,7 @@ describe('the nyc cli', function () {
proc.on('close', function (code) {
code.should.equal(0)
- stdout.should.match(/path:"\.\/half-covered\.js"/)
+ stdout.should.contain(`path:${JSON.stringify(path.resolve(fixturesCLI, 'half-covered.js'))}`)
done()
})
})
@@ -506,18 +582,44 @@ describe('the nyc cli', function () {
})
})
+ it('returns unmodified source if there is no transform', function (done) {
+ const args = [bin, 'instrument', './no-transform/half-covered.xjs']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ let stdout = ''
+ proc.stdout.on('data', function (chunk) {
+ stdout += chunk
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ stdout.should.contain(`var a = 0`)
+ done()
+ })
+ })
+ })
+
+ describe('output folder specified', function () {
+ afterEach(function () {
+ rimraf.sync(path.resolve(fixturesCLI, 'output'))
+ })
+
it('works in directories without a package.json', function (done) {
- var args = [bin, 'instrument', './input-dir', './output-dir']
+ const args = [bin, 'instrument', './input-dir', './output-dir']
- var subdir = path.resolve(fixturesCLI, 'subdir')
- var proc = spawn(process.execPath, args, {
+ const subdir = path.resolve(fixturesCLI, 'subdir')
+ const proc = spawn(process.execPath, args, {
cwd: subdir,
env: env
})
proc.on('exit', function (code) {
code.should.equal(0)
- var target = path.resolve(subdir, 'output-dir', 'index.js')
+ const target = path.resolve(subdir, 'output-dir', 'index.js')
fs.readFileSync(target, 'utf8')
.should.match(/console.log\('Hello, World!'\)/)
done()
@@ -525,16 +627,10 @@ describe('the nyc cli', function () {
})
it('can be configured to exit on error', function (done) {
- var args = [
- bin,
- 'instrument',
- '--exit-on-error',
- './input-dir',
- './output-dir'
- ]
+ const args = [bin, 'instrument', '--exit-on-error', './input-dir', './output-dir']
- var subdir = path.resolve(fixturesCLI, 'subdir')
- var proc = spawn(process.execPath, args, {
+ const subdir = path.resolve(fixturesCLI, 'subdir')
+ const proc = spawn(process.execPath, args, {
cwd: subdir,
env: env
})
@@ -544,61 +640,379 @@ describe('the nyc cli', function () {
done()
})
})
- })
- describe('output folder specified', function () {
it('allows a single file to be instrumented', function (done) {
- var args = [bin, 'instrument', './half-covered.js', './output']
+ const args = [bin, 'instrument', './half-covered.js', './output']
- var proc = spawn(process.execPath, args, {
+ const inputPath = path.resolve(fixturesCLI, './half-covered.js')
+ const inputMode = fs.statSync(inputPath).mode & 0o7777
+ const newMode = 0o775
+ if (process.platform !== 'win32') {
+ fs.chmodSync(inputPath, newMode)
+ }
+
+ const proc = spawn(process.execPath, args, {
cwd: fixturesCLI,
env: env
})
proc.on('close', function (code) {
code.should.equal(0)
- var files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ const files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
files.length.should.equal(1)
files.should.include('half-covered.js')
- rimraf.sync(path.resolve(fixturesCLI, 'output'))
+
+ if (process.platform !== 'win32') {
+ const outputPath = path.resolve(fixturesCLI, 'output', 'half-covered.js')
+ const outputMode = fs.statSync(outputPath).mode & 0o7777
+ outputMode.should.equal(newMode)
+
+ fs.chmodSync(inputPath, inputMode)
+ }
+
done()
})
})
it('allows a directory of files to be instrumented', function (done) {
- var args = [bin, 'instrument', './', './output']
+ const args = [bin, 'instrument', './nyc-config-js', './output']
- var proc = spawn(process.execPath, args, {
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ const files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ files.should.include('index.js')
+ files.should.include('ignore.js')
+ files.should.not.include('package.json')
+ files.should.not.include('node_modules')
+ const includeTarget = path.resolve(fixturesCLI, 'output', 'ignore.js')
+ fs.readFileSync(includeTarget, 'utf8')
+ .should.match(/var cov_/)
+ done()
+ })
+ })
+
+ it('copies all files from to as well as those that have been instrumented', function (done) {
+ const args = [bin, 'instrument', '--complete-copy', './nyc-config-js', './output']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ const files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ files.should.include('index.js')
+ files.should.include('ignore.js')
+ files.should.include('package.json')
+ files.should.include('node_modules')
+ const includeTarget = path.resolve(fixturesCLI, 'output', 'ignore.js')
+ fs.readFileSync(includeTarget, 'utf8')
+ .should.match(/var cov_/)
+ done()
+ })
+ })
+
+ it('can instrument the project directory', function (done) {
+ const args = [bin, 'instrument', '.', './output']
+
+ const proc = spawn(process.execPath, args, {
cwd: fixturesCLI,
env: env
})
proc.on('close', function (code) {
code.should.equal(0)
- var files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
- files.should.include('env.js')
- files.should.include('es6.js')
- rimraf.sync(path.resolve(fixturesCLI, 'output'))
+ const files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ files.should.include('args.js')
+ files.should.include('subdir')
done()
})
})
it('allows a sub-directory of files to be instrumented', function (done) {
- var args = [bin, 'instrument', './subdir/input-dir', './output']
+ const args = [bin, 'instrument', './subdir/input-dir', './output']
- var proc = spawn(process.execPath, args, {
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ const files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ files.should.include('index.js')
+ done()
+ })
+ })
+
+ it('allows a subdirectory to be excluded via .nycrc file', function (done) {
+ const args = [bin, 'instrument', '--nycrc-path', './.instrument-nycrc', './subdir/input-dir', './output']
+
+ const proc = spawn(process.execPath, args, {
cwd: fixturesCLI,
env: env
})
proc.on('close', function (code) {
code.should.equal(0)
- var files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ const files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ files.length.should.not.equal(0)
+ files.should.include('exclude-me')
+ files.should.include('node_modules')
files.should.include('index.js')
- rimraf.sync(path.resolve(fixturesCLI, 'output'))
+ files.should.include('bad.js')
+ const includeTarget = path.resolve(fixturesCLI, 'output', 'index.js')
+ fs.readFileSync(includeTarget, 'utf8')
+ .should.match(/var cov_/)
+ const excludeTarget = path.resolve(fixturesCLI, 'output', 'exclude-me', 'index.js')
+ fs.readFileSync(excludeTarget, 'utf8')
+ .should.not.match(/var cov_/)
+ done()
+ })
+ })
+
+ it('allows a file to be excluded', function (done) {
+ const args = [bin, 'instrument', '--complete-copy', '--exclude', 'exclude-me/index.js', './subdir/input-dir', './output']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ const files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ files.length.should.not.equal(0)
+ files.should.include('exclude-me')
+ const excludeTarget = path.resolve(fixturesCLI, 'output', 'exclude-me', 'index.js')
+ fs.readFileSync(excludeTarget, 'utf8')
+ .should.not.match(/var cov_/)
+ done()
+ })
+ })
+
+ it('allows specifying a single sub-directory to be included', function (done) {
+ const args = [bin, 'instrument', '--include', '**/include-me/**', './subdir/input-dir', './output']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ const files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ files.length.should.not.equal(0)
+ files.should.include('include-me')
+ const instrumented = path.resolve(fixturesCLI, 'output', 'include-me', 'include-me.js')
+ fs.readFileSync(instrumented, 'utf8')
+ .should.match(/var cov_/)
+ done()
+ })
+ })
+
+ it('allows a file to be excluded from an included directory', function (done) {
+ const args = [bin, 'instrument', '--complete-copy', '--exclude', '**/exclude-me.js', '--include', '**/include-me/**', './subdir/input-dir', './output']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ const files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ files.length.should.not.equal(0)
+ files.should.include('include-me')
+ const includeMeFiles = fs.readdirSync(path.resolve(fixturesCLI, 'output', 'include-me'))
+ includeMeFiles.length.should.not.equal(0)
+ includeMeFiles.should.include('include-me.js')
+ includeMeFiles.should.include('exclude-me.js')
+ const includeTarget = path.resolve(fixturesCLI, 'output', 'include-me', 'include-me.js')
+ fs.readFileSync(includeTarget, 'utf8')
+ .should.match(/var cov_/)
+ const excludeTarget = path.resolve(fixturesCLI, 'output', 'exclude-me', 'index.js')
+ fs.readFileSync(excludeTarget, 'utf8')
+ .should.not.match(/var cov_/)
+ done()
+ })
+ })
+
+ it('aborts if trying to write files in place', function (done) {
+ const args = [bin, 'instrument', '--delete', './', './']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ let stderr = ''
+ proc.stderr.on('data', function (chunk) {
+ stderr += chunk
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(1)
+ stderr.should.include('nyc instrument failed: cannot instrument files in place')
done()
})
})
+
+ it('aborts if trying to instrument files from outside the project root directory', function (done) {
+ const args = [bin, 'instrument', '--delete', '../', './']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ let stderr = ''
+ proc.stderr.on('data', function (chunk) {
+ stderr += chunk
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(1)
+ stderr.should.include('nyc instrument failed: cannot instrument files outside of project root directory')
+ done()
+ })
+ })
+
+ describe('es-modules', function () {
+ afterEach(function () {
+ rimraf.sync(path.resolve(fixturesCLI, './output'))
+ })
+
+ it('instruments file with `package` keyword when es-modules is disabled', function (done) {
+ const args = [bin, 'instrument', '--no-es-modules', './not-strict.js', './output']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ const subdirExists = fs.existsSync(path.resolve(fixturesCLI, './output'))
+ subdirExists.should.equal(true)
+ const files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ files.should.include('not-strict.js')
+ done()
+ })
+ })
+
+ it('fails on file with `package` keyword when es-modules is enabled', function (done) {
+ const args = [bin, 'instrument', '--exit-on-error', './not-strict.js', './output']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ let stderr = ''
+ proc.stderr.on('data', function (chunk) {
+ stderr += chunk
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(1)
+ stdoutShouldEqual(stderr, `
+ Failed to instrument ${path.resolve(fixturesCLI, 'not-strict.js')}`)
+ const subdirExists = fs.existsSync(path.resolve(fixturesCLI, './output'))
+ subdirExists.should.equal(false)
+ done()
+ })
+ })
+ })
+
+ describe('delete', function () {
+ beforeEach(function () {
+ makeDir.sync(path.resolve(fixturesCLI, 'output', 'removed-by-clean'))
+ })
+
+ it('cleans the output directory if `--delete` is specified', function (done) {
+ const args = [bin, 'instrument', '--delete', 'true', './subdir/input-dir', './output']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ const subdirExists = fs.existsSync(path.resolve(fixturesCLI, './output'))
+ subdirExists.should.equal(true)
+ const files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ files.should.not.include('removed-by-clean')
+ files.should.include('exclude-me')
+ done()
+ })
+ })
+
+ it('does not clean the output directory by default', function (done) {
+ const args = [bin, 'instrument', './subdir/input-dir', './output']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ const subdirExists = fs.existsSync(path.resolve(fixturesCLI, './output'))
+ subdirExists.should.equal(true)
+ const files = fs.readdirSync(path.resolve(fixturesCLI, './output'))
+ files.should.include('removed-by-clean')
+ done()
+ })
+ })
+
+ it('aborts if trying to clean process.cwd()', function (done) {
+ const args = [bin, 'instrument', '--delete', './src', './']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ let stderr = ''
+ proc.stderr.on('data', function (chunk) {
+ stderr += chunk
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(1)
+ stderr.should.include('nyc instrument failed: attempt to delete')
+ done()
+ })
+ })
+
+ it('aborts if trying to clean outside working directory', function (done) {
+ const args = [bin, 'instrument', '--delete', './', '../']
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: env
+ })
+
+ let stderr = ''
+ proc.stderr.on('data', function (chunk) {
+ stderr += chunk
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(1)
+ stderr.should.include('nyc instrument failed: attempt to delete')
+ done()
+ })
+ })
+ })
})
})
@@ -710,23 +1124,6 @@ describe('the nyc cli', function () {
done()
})
})
-
- it('doesn’t create the temp directory for process info files when not present', function (done) {
- var args = [bin, process.execPath, 'selfspawn-fibonacci.js', '5']
-
- var proc = spawn(process.execPath, args, {
- cwd: fixturesCLI,
- env: env
- })
-
- proc.on('exit', function (code) {
- code.should.equal(0)
- fs.stat(path.resolve(fixturesCLI, '.nyc_output', 'processinfo'), function (err, stat) {
- err.code.should.equal('ENOENT')
- done()
- })
- })
- })
})
describe('--temp-dir', function () {
@@ -747,7 +1144,7 @@ describe('the nyc cli', function () {
proc.on('close', function (code) {
code.should.equal(0)
var tempFiles = fs.readdirSync(path.resolve(fixturesCLI, '.nyc_output'))
- tempFiles.length.should.equal(1)
+ tempFiles.length.should.equal(2) // the coverage file, and processinfo
var cliFiles = fs.readdirSync(path.resolve(fixturesCLI))
cliFiles.should.include('.nyc_output')
cliFiles.should.not.include('.temp_dir')
@@ -767,7 +1164,7 @@ describe('the nyc cli', function () {
proc.on('exit', function (code) {
code.should.equal(0)
var tempFiles = fs.readdirSync(path.resolve(fixturesCLI, '.temp_directory'))
- tempFiles.length.should.equal(1)
+ tempFiles.length.should.equal(2)
var cliFiles = fs.readdirSync(path.resolve(fixturesCLI))
cliFiles.should.not.include('.nyc_output')
cliFiles.should.not.include('.temp_dir')
@@ -787,7 +1184,7 @@ describe('the nyc cli', function () {
proc.on('exit', function (code) {
code.should.equal(0)
var tempFiles = fs.readdirSync(path.resolve(fixturesCLI, '.temp_dir'))
- tempFiles.length.should.equal(1)
+ tempFiles.length.should.equal(2)
var cliFiles = fs.readdirSync(path.resolve(fixturesCLI))
cliFiles.should.not.include('.nyc_output')
cliFiles.should.include('.temp_dir')
@@ -995,6 +1392,39 @@ describe('the nyc cli', function () {
done()
})
})
+
+ it('uses source-maps to exclude original sources from reports', (done) => {
+ const args = [
+ bin,
+ '--all',
+ '--cache', 'false',
+ '--exclude', 'original/s1.js',
+ process.execPath, './instrumented/s1.min.js'
+ ]
+
+ const proc = spawn(process.execPath, args, {
+ cwd: fixturesSourceMaps,
+ env: env
+ })
+
+ var stdout = ''
+ proc.stdout.on('data', function (chunk) {
+ stdout += chunk
+ })
+
+ proc.on('close', function (code) {
+ code.should.equal(0)
+ stdoutShouldEqual(stdout, `
+ ----------|----------|----------|----------|----------|-------------------|
+ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
+ ----------|----------|----------|----------|----------|-------------------|
+ All files | 0 | 100 | 0 | 0 | |
+ s2.js | 0 | 100 | 0 | 0 | 1,2,4,6 |
+ ----------|----------|----------|----------|----------|-------------------|`
+ )
+ done()
+ })
+ })
})
describe('.map file', () => {
@@ -1277,6 +1707,138 @@ describe('the nyc cli', function () {
})
})
})
+
+ describe('exclude-node-modules', () => {
+ const fixturesENM = path.resolve(__dirname, './fixtures/exclude-node-modules')
+ const globalArgs = [
+ bin,
+ '--all=true',
+ '--cache=false',
+ '--per-file=true',
+ '--exclude-node-modules=false',
+ '--include=node_modules/@istanbuljs/fake-module-1/**'
+ ]
+ const spawnOpts = {
+ cwd: fixturesENM,
+ env: env
+ }
+ const noCoverageError = `ERROR: Coverage for lines (0%) does not meet threshold (90%) for ${path.join(fixturesENM, 'node_modules/@istanbuljs/fake-module-1/index.js')}\n`
+
+ it('execute', done => {
+ function checkReport (code, stderr, stdout, next) {
+ code.should.equal(1)
+ stderr.should.equal(noCoverageError)
+ stdoutShouldEqual(stdout, `
+ ----------|----------|----------|----------|----------|-------------------|
+ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
+ ----------|----------|----------|----------|----------|-------------------|
+ All files | 0 | 100 | 100 | 0 | |
+ index.js | 0 | 100 | 100 | 0 | 1 |
+ ----------|----------|----------|----------|----------|-------------------|`)
+ next()
+ }
+
+ function executeMainCommand () {
+ const args = [
+ ...globalArgs,
+ '--check-coverage=true',
+ process.execPath, './bin/do-nothing.js'
+ ]
+
+ const proc = spawn(process.execPath, args, spawnOpts)
+
+ var stderr = ''
+ proc.stderr.on('data', function (chunk) {
+ stderr += chunk
+ })
+
+ var stdout = ''
+ proc.stdout.on('data', function (chunk) {
+ stdout += chunk
+ })
+
+ proc.on('close', code => checkReport(code, stderr, stdout, executeReport))
+ }
+
+ function executeReport () {
+ const args = [
+ ...globalArgs,
+ '--check-coverage=true',
+ 'report'
+ ]
+
+ const proc = spawn(process.execPath, args, spawnOpts)
+
+ var stderr = ''
+ proc.stderr.on('data', function (chunk) {
+ stderr += chunk
+ })
+
+ var stdout = ''
+ proc.stdout.on('data', function (chunk) {
+ stdout += chunk
+ })
+
+ proc.on('close', code => checkReport(code, stderr, stdout, executeCheckCoverage))
+ }
+
+ function executeCheckCoverage () {
+ const args = [
+ ...globalArgs,
+ 'check-coverage'
+ ]
+
+ const proc = spawn(process.execPath, args, spawnOpts)
+
+ var stderr = ''
+ proc.stderr.on('data', function (chunk) {
+ stderr += chunk
+ })
+
+ var stdout = ''
+ proc.stdout.on('data', function (chunk) {
+ stdout += chunk
+ })
+
+ proc.on('close', code => {
+ code.should.equal(1)
+ stderr.should.equal(noCoverageError)
+ stdoutShouldEqual(stdout, '')
+ done()
+ })
+ }
+
+ executeMainCommand()
+ })
+
+ it('instrument', done => {
+ const args = [
+ ...globalArgs,
+ 'instrument',
+ 'node_modules'
+ ]
+
+ const proc = spawn(process.execPath, args, spawnOpts)
+
+ var stderr = ''
+ proc.stderr.on('data', function (chunk) {
+ stderr += chunk
+ })
+
+ var stdout = ''
+ proc.stdout.on('data', function (chunk) {
+ stdout += chunk
+ })
+
+ proc.on('close', code => {
+ code.should.equal(0)
+ stderr.should.equal('')
+ stdout.should.match(/fake-module-1/)
+ stdout.should.not.match(/fake-module-2/)
+ done()
+ })
+ })
+ })
})
function stdoutShouldEqual (stdout, expected) {
diff --git a/test/nyc.js b/test/nyc.js
deleted file mode 100644
index 11e1c0c50..000000000
--- a/test/nyc.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/* global describe, it */
-
-const NYC = require('../')
-const path = require('path')
-
-require('chai').should()
-
-describe('NYC', function () {
- describe('_disableCachingTransform', function () {
- it('is disabled if cache is "false"', function () {
- const nyc = new NYC({ cache: false })
- nyc._disableCachingTransform().should.equal(true)
- })
-
- it('is enabled if cache is "true" and isChildProcess is "true"', function () {
- const nyc = new NYC({
- cache: true,
- isChildProcess: true
- })
- nyc._disableCachingTransform().should.equal(false)
- })
-
- it('is disabled if cache is "true" and isChildProcess is "false"', function () {
- const nyc = new NYC({
- cache: true,
- isChildProcess: true
- })
- nyc._disableCachingTransform().should.equal(false)
- })
- })
-
- describe('cacheDirectory', function () {
- it('should resolve default cache folder to absolute path', function () {
- const nyc = new NYC({
- cache: true
- })
- path.isAbsolute(nyc.cacheDirectory).should.equal(true)
- })
-
- it('should resolve custom cache folder to absolute path', function () {
- const nyc = new NYC({
- cacheDir: '.nyc_cache',
- cache: true
- })
- path.isAbsolute(nyc.cacheDirectory).should.equal(true)
- })
- })
-})
diff --git a/test/process-args.js b/test/process-args.js
index bab9806e8..fe5a2f8ef 100644
--- a/test/process-args.js
+++ b/test/process-args.js
@@ -1,8 +1,9 @@
/* global describe, it */
require('chai').should()
+require('tap').mochaGlobals()
-const processArgs = require('../lib/process-args')
+const processArgs = require('../self-coverage/lib/process-args')
describe('process-args', function () {
describe('hideInstrumenterArgs', function () {
diff --git a/test/processinfo.js b/test/processinfo.js
new file mode 100644
index 000000000..9fbf0352b
--- /dev/null
+++ b/test/processinfo.js
@@ -0,0 +1,95 @@
+const { resolve } = require('path')
+const bin = resolve(__dirname, '../self-coverage/bin/nyc')
+const { spawn } = require('child_process')
+const t = require('tap')
+const rimraf = require('rimraf')
+const node = process.execPath
+const fixturesCLI = resolve(__dirname, './fixtures/cli')
+const tmp = 'processinfo-test'
+const fs = require('fs')
+const resolvedJS = resolve(fixturesCLI, 'selfspawn-fibonacci.js')
+
+rimraf.sync(resolve(fixturesCLI, tmp))
+t.teardown(() => rimraf.sync(resolve(fixturesCLI, tmp)))
+
+t.test('build some processinfo', t => {
+ var args = [
+ bin, '-t', tmp,
+ node, 'selfspawn-fibonacci.js', '5'
+ ]
+ var proc = spawn(process.execPath, args, {
+ cwd: fixturesCLI,
+ env: {
+ PATH: process.env.PATH,
+ NYC_PROCESSINFO_EXTERNAL_ID: 'blorp'
+ }
+ })
+ // don't actually care about the output for this test, just the data
+ proc.stderr.resume()
+ proc.stdout.resume()
+ proc.on('close', (code, signal) => {
+ t.equal(code, 0)
+ t.equal(signal, null)
+ t.end()
+ })
+})
+
+t.test('validate the created processinfo data', t => {
+ const covs = fs.readdirSync(resolve(fixturesCLI, tmp))
+ .filter(f => f !== 'processinfo')
+ t.plan(covs.length * 2)
+
+ covs.forEach(f => {
+ fs.readFile(resolve(fixturesCLI, tmp, f), 'utf8', (er, covjson) => {
+ if (er) {
+ throw er
+ }
+ const covdata = JSON.parse(covjson)
+ t.same(Object.keys(covdata), [resolvedJS])
+ // should have matching processinfo for each cov json
+ const procInfoFile = resolve(fixturesCLI, tmp, 'processinfo', f)
+ fs.readFile(procInfoFile, 'utf8', (er, procInfoJson) => {
+ if (er) {
+ throw er
+ }
+ const procInfoData = JSON.parse(procInfoJson)
+ t.match(procInfoData, {
+ pid: Number,
+ ppid: Number,
+ uuid: f.replace(/\.json$/, ''),
+ argv: [
+ node,
+ resolvedJS,
+ /[1-5]/
+ ],
+ execArgv: [],
+ cwd: fixturesCLI,
+ time: Number,
+ root: /^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/,
+ coverageFilename: resolve(fixturesCLI, tmp, f),
+ files: [ resolvedJS ]
+ })
+ })
+ })
+ })
+})
+
+t.test('check out the index', t => {
+ const indexFile = resolve(fixturesCLI, tmp, 'processinfo', 'index.json')
+ const indexJson = fs.readFileSync(indexFile, 'utf-8')
+ const index = JSON.parse(indexJson)
+ const u = /^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/
+ t.match(index, {
+ processes: {},
+ files: {
+ [resolvedJS]: [ u, u, u, u, u, u, u, u, u ]
+ },
+ externalIds: {
+ blorp: {
+ root: u,
+ children: [ u, u, u, u, u, u, u, u ]
+ }
+ }
+ })
+ t.end()
+})
diff --git a/test/source-maps.js b/test/source-maps.js
new file mode 100644
index 000000000..c95334832
--- /dev/null
+++ b/test/source-maps.js
@@ -0,0 +1,20 @@
+/* global describe, it */
+
+require('chai').should()
+require('tap').mochaGlobals()
+
+const { readFileSync } = require('fs')
+const SourceMaps = require('../self-coverage/lib/source-maps')
+
+describe('source-maps', function () {
+ it('caches source maps globally', function () {
+ const sm = new SourceMaps({})
+ // load a source map into cache.
+ const sourceFile = require.resolve('./fixtures/source-maps/instrumented/s1.min.js')
+ sm.extractAndRegister(readFileSync(sourceFile, 'utf8'), sourceFile, 'abc123')
+ // create a new SourceMaps instance.
+ const sm2 = new SourceMaps({})
+ // the two instances of SourceMaps should share a cache.
+ sm._sourceMapCache.should.deep.equal(sm2._sourceMapCache)
+ })
+})
diff --git a/test/src/nyc-tap.js b/test/src/nyc-tap.js
index ac31015d0..3e60a12fb 100644
--- a/test/src/nyc-tap.js
+++ b/test/src/nyc-tap.js
@@ -2,18 +2,13 @@
require('source-map-support').install({ hookRequire: true })
+const fs = require('fs')
const _ = require('lodash')
const ap = require('any-path')
-const configUtil = require('../../lib/config-util')
-const fs = require('fs')
const enableCache = false
-let _NYC
-try {
- _NYC = require('../../index.covered.js')
-} catch (e) {
- _NYC = require('../../')
-}
+const configUtil = require('../../self-coverage/lib/config-util')
+const _NYC = require('../../self-coverage')
function NYC (opts) {
opts = opts || {}
@@ -29,7 +24,7 @@ var rimraf = require('rimraf')
var isWindows = require('is-windows')()
var spawn = require('child_process').spawn
var fixtures = path.resolve(__dirname, '../fixtures')
-var bin = path.resolve(__dirname, '../../bin/nyc')
+var bin = path.resolve(__dirname, '../../self-coverage/bin/nyc')
// beforeEach
glob.sync('**/*/{.nyc_output,.cache}').forEach(function (path) {
@@ -41,6 +36,8 @@ delete process.env.NYC_CWD
require('chai').should()
require('tap').mochaGlobals()
+const transpileHook = path.resolve(process.cwd(), './test/fixtures/transpile-hook')
+
describe('nyc', function () {
describe('cwd', function () {
it('sets cwd to process.cwd() if no environment variable is set', function () {
@@ -126,6 +123,20 @@ describe('nyc', function () {
nyc.exclude.shouldInstrument('/cwd/foo/bar/__tests__/foo.js', './__tests__/foo.js').should.equal(false)
})
+ it('should allow turning off default node_modules exclude', function () {
+ var nyc = new NYC(configUtil.buildYargs('/cwd').parse([
+ '--exclude-node-modules', 'false',
+ '--exclude=**/__tests__/**',
+ '--exclude=node_modules/**'
+ ]))
+ // For this test, only excluding root node_modules. Local node_modules are allowed, but we
+ // still exclude matching items inside of local node_modules.
+ nyc.exclude.shouldInstrument('/cwd/foo', 'foo').should.equal(true)
+ nyc.exclude.shouldInstrument('/cwd/node_modules/bar', 'node_modules/bar').should.equal(false)
+ nyc.exclude.shouldInstrument('/cwd/foo/node_modules/bar', 'foo/node_modules/bar').should.equal(true)
+ nyc.exclude.shouldInstrument('/cwd/foo/node_modules/bar/__tests__/baz.js', 'foo/node_modules/bar/__tests__/baz.js').should.equal(false)
+ })
+
it('should exclude appropriately with config.exclude', function () {
var nyc = new NYC(configUtil.buildYargs(fixtures).parse())
@@ -402,7 +413,7 @@ describe('nyc', function () {
'utf-8'
)
- var nyc = (new NYC(configUtil.buildYargs(fixtures).parse(['--require', './test/fixtures/transpile-hook'])))
+ var nyc = (new NYC(configUtil.buildYargs(fixtures).parse(['--require', transpileHook])))
nyc.reset()
nyc.addAllFiles()
@@ -428,7 +439,7 @@ describe('nyc', function () {
)
var nyc = (new NYC(configUtil.buildYargs(fixtures).parse([
- '--require=./test/fixtures/transpile-hook',
+ `--require=${transpileHook}`,
'--extension=.do-not-transpile',
'--include=needs-transpile.do-not-transpile'
])))
@@ -448,7 +459,7 @@ describe('nyc', function () {
)
var nyc = (new NYC(configUtil.buildYargs(fixtures).parse([
- '--require=./test/fixtures/transpile-hook',
+ `--require=${transpileHook}`,
'--extension=.whatever'
])))