diff --git a/.babelrc b/.babelrc deleted file mode 100644 index c13c5f627..000000000 --- a/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015"] -} diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..9d04f2868 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,27 @@ + +## Link to bug demonstration repository + + +## Expected Behavior + +## Observed Behavior + +### Troubleshooting steps +- [ ] still occurring when I put `cache: false` in my nyc config + +## Environment Information + +``` +# paste the output here + +``` diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 000000000..e4efb448f --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,8 @@ +daysUntilStale: 365 + +exemptLabels: + - "Great First Contribution" + - pinned + - security + +staleLabel: stale diff --git a/.gitignore b/.gitignore index 0c2715eef..2e5568e18 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,6 @@ coverage node_modules test/build/ .self_coverage -*.covered.js +self-coverage/ +*.swp needs-transpile.js diff --git a/.taprc b/.taprc new file mode 100644 index 000000000..66ddef5b6 --- /dev/null +++ b/.taprc @@ -0,0 +1,8 @@ +{ + "test-ignore": "^test/(helpers|src)/", + "coverage": false, + "jobs": 1, + "timeout": 360, + "bail": false, + "esm": false +} diff --git a/.travis.yml b/.travis.yml index ec47658b7..3d9f65aa5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,14 @@ -sudo: false language: node_js +os: + - linux + - osx node_js: - - 4 - - 5 - - "0.10" - - "0.12" - - "stable" - -before_install: - - "npm config set progress=false" - -env: - secure: "SVg7NpV0Sru296kdp+eFl07RFjtJy242fWQ1KDCUdk/1EtZEOzBoSKP7Tn3zX/VLBieexL0T31EwYvRztnL97Sr8VgpYU0z95vCPO8FrixElJR6NH3dqrKeNzC3xOYdV0fy2b4UMlPJOI0aYDT1KHm1aWtkb2J8zqII+XbMtlDaelfHCDxa2+RBII9nYYDP62z+0chQFS6MGPSNwve3G2emYHZpYP5iTFmOzaFUCAjLskKvnnsY0jyx5XssqAo17747WKZl5SDgN8YHZIwhE5tB9m9j3MGjJhwdsR3kmq2om0GD1tQFFAXzWhWad3zNBUE4fLqswgASi39o5NIEzvSRzpw77ttOkkIFGem0l421Zi25W8x5n6GZvP06Y47ddmjNBlniwIzG4fb3dbIByCy/g5SjUYmfnke7stXXBKsPv0eEadlLGFWnG5RIfnyGjvUgQ//QXSAnBBzYF9IK+KUdU8c9kHF6kPybsGEzjQoX+4EJL6kZ4sNX9qxjHERUr4Jb6rAMOnKI9VtCBNqwcCC3nV5DDWHS86hKwbuTbBFkszP7majOi0kUQJTO/tZGwVVcphSDwhL5QkmMepLOqXyRICdUcB2ffXHYhZLiZPofYdom8csaDolqFkotJEBj3GM3gwHvUC3i1vxshxtjF6NHjanhpiIpHLRCs6R1RESE=" + - "node" + - 10 + - 8 +git: + depth: + 1 after_script: - "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls" diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c879e417..71f88bf21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,724 @@ -# Change Log +# Changelog 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. +## [15.1.0](https://github.com/istanbuljs/nyc/compare/v15.0.1...v15.1.0) (2020-06-01) + + +### Features + +* **experimental:** Support using `--all` with node.js ESM ([#1320](https://github.com/istanbuljs/nyc/issues/1320)) ([992359a](https://github.com/istanbuljs/nyc/commit/992359a1e2108906e28324058008f28aa1052dc1)) + +## [15.0.1](https://github.com/istanbuljs/nyc/compare/v15.0.0...v15.0.1) (2020-04-02) + + +### Bug Fixes + +* Data merge concurrency limit to prevent OOM ([#1293](https://github.com/istanbuljs/nyc/issues/1293)) ([df34c1c](https://github.com/istanbuljs/nyc/commit/df34c1c71e74468fd67287caad2ac987176ae503)), closes [#1263](https://github.com/istanbuljs/nyc/issues/1263) +* Ignore insignificant lines when coalesce text report ([#1300](https://github.com/istanbuljs/nyc/issues/1300)) ([3a577f0](https://github.com/istanbuljs/nyc/commit/3a577f0ddc4799d0334f7c154b612653a46b532f)), closes [istanbuljs/istanbuljs#525](https://github.com/istanbuljs/istanbuljs/issues/525) + +## [15.0.0](https://github.com/istanbuljs/nyc/compare/v14.1.1...v15.0.0) (2019-12-20) + + +### ⚠ BREAKING CHANGES + +* The `flow` and `jsx` parser plugins are no longer +enabled by default. +* Node.js 8 is now required to run nyc +* Remove NYC_ROOT_ID and NYC_INSTRUMENTER environmental +variables. +* The `root` field has been removed from processinfo +files. + +### Features + +* Add `--use-spawn-wrap=true` option ([#1169](https://github.com/istanbuljs/nyc/issues/1169)) ([df4de4d](https://github.com/istanbuljs/nyc/commit/df4de4d490f8cd32204fba66a810ed0444c26d0d)) +* Add `.cjs`, `.mjs`, `.ts`, `.tsx`, `.jsx` to default extensions ([#1110](https://github.com/istanbuljs/nyc/issues/1110)) ([914b776](https://github.com/istanbuljs/nyc/commit/914b776215ad3ea54f0e46b4ba2904a8a9d4dfdd)), closes [#1103](https://github.com/istanbuljs/nyc/issues/1103) +* Allow `nyc instrument` to instrument code in place ([#1149](https://github.com/istanbuljs/nyc/issues/1149)) ([7783284](https://github.com/istanbuljs/nyc/commit/77832845b85134d21eca3a23c812c4f21f36713f)) +* Drop node.js 6, upgrade dependencies ([#1134](https://github.com/istanbuljs/nyc/issues/1134)) ([00c3b34](https://github.com/istanbuljs/nyc/commit/00c3b3440a5b2ffe11b9c19ae4e08ad2f5b70e33)) +* Filenames relative to project cwd in coverage reports ([#1212](https://github.com/istanbuljs/nyc/issues/1212)) ([5258e9f](https://github.com/istanbuljs/nyc/commit/5258e9fdb1d9e3d4abd4cc9768bc09cd8040a6be)) +* Use @istanbuljs/schema for yargs setup ([#1194](https://github.com/istanbuljs/nyc/issues/1194)) ([fd40d49](https://github.com/istanbuljs/nyc/commit/fd40d49331665d936b86f30e9a873ba80071b770)) +* Use istanbul-lib-processinfo ([#1145](https://github.com/istanbuljs/nyc/issues/1145)) ([7943413](https://github.com/istanbuljs/nyc/commit/7943413dc032f8f98a164fdde88d7344e817bb5e)) +* Use source base name to prefix cache files ([#1144](https://github.com/istanbuljs/nyc/issues/1144)) ([5c1b7a9](https://github.com/istanbuljs/nyc/commit/5c1b7a9c43771f3439af44a1104e5426519e1123)) + + +### Bug Fixes + +* Avoid `source-map` module during `signal-exit` handler ([#1191](https://github.com/istanbuljs/nyc/issues/1191)) ([83eb629](https://github.com/istanbuljs/nyc/commit/83eb6294f9492bf98405ee9fdf6281c3bc199a3d)) +* Better error handling for main execution, reporting ([#1229](https://github.com/istanbuljs/nyc/issues/1229)) ([dfd629d](https://github.com/istanbuljs/nyc/commit/dfd629d95716e6159aa7216c03e28a7fbbb161e7)) +* Correct handling of source-maps for pre-instrumented files ([#1216](https://github.com/istanbuljs/nyc/issues/1216)) ([8411a26](https://github.com/istanbuljs/nyc/commit/8411a26c9e520c66251cc8044cde2c81f33f1c5f)), closes [#1208](https://github.com/istanbuljs/nyc/issues/1208) +* Drop coverage produced by `nyc --all` for files that were tested ([#1155](https://github.com/istanbuljs/nyc/issues/1155)) ([fc1bbbf](https://github.com/istanbuljs/nyc/commit/fc1bbbf490f6ab0272359ce10ceb4987d1716256)), closes [#1113](https://github.com/istanbuljs/nyc/issues/1113) [#1124](https://github.com/istanbuljs/nyc/issues/1124) [#1148](https://github.com/istanbuljs/nyc/issues/1148) +* Honor eager setting (false by default) ([#1179](https://github.com/istanbuljs/nyc/issues/1179)) ([c18fb0a](https://github.com/istanbuljs/nyc/commit/c18fb0a9a8eae5904298d87c62d9934243de8674)) +* Remove vestigial environment variables ([#1078](https://github.com/istanbuljs/nyc/issues/1078)) ([cfd3da0](https://github.com/istanbuljs/nyc/commit/cfd3da05156b98952f03f7be2dd3d23ba328073f)) + +## [14.1.1](https://github.com/istanbuljs/nyc/compare/v14.1.0...v14.1.1) (2019-05-09) + + +### Bug Fixes + +* **check-coverage:** make the --temp-dir option visible ([#1101](https://github.com/istanbuljs/nyc/issues/1101)) ([b5b67de](https://github.com/istanbuljs/nyc/commit/b5b67de)) +* **cli:** Report error if unwanted positional arguments are received ([#1100](https://github.com/istanbuljs/nyc/issues/1100)) ([57debc1](https://github.com/istanbuljs/nyc/commit/57debc1)), closes [#401](https://github.com/istanbuljs/nyc/issues/401) + + + +# [14.1.0](https://github.com/istanbuljs/nyc/compare/v14.0.0...v14.1.0) (2019-04-24) + + +### Bug Fixes + +* Do not crash when nyc is run inside itself. ([#1068](https://github.com/istanbuljs/nyc/issues/1068)) ([c4fcf5e](https://github.com/istanbuljs/nyc/commit/c4fcf5e)), closes [#1067](https://github.com/istanbuljs/nyc/issues/1067) +* Exit with code 1 when nyc doesn't know what to do. ([#1070](https://github.com/istanbuljs/nyc/issues/1070)) ([21fb2c8](https://github.com/istanbuljs/nyc/commit/21fb2c8)) +* Purge source-map cache before reporting if cache is disabled. ([#1080](https://github.com/istanbuljs/nyc/issues/1080)) ([3d9eaa4](https://github.com/istanbuljs/nyc/commit/3d9eaa4)) +* Use correct config property for parser plugins ([#1082](https://github.com/istanbuljs/nyc/issues/1082)) ([a7bc7ae](https://github.com/istanbuljs/nyc/commit/a7bc7ae)) + + +### Features + +* add support for yaml configuration file ([#1054](https://github.com/istanbuljs/nyc/issues/1054)) ([ca37ffa](https://github.com/istanbuljs/nyc/commit/ca37ffa)) + + + +# [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`, `exclude` and `extension` 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 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 + +* Support nyc report --check-coverage ([#984](https://github.com/istanbuljs/nyc/issues/984)) ([dd48410](https://github.com/istanbuljs/nyc/commit/dd48410)) + + + + +# [13.2.0](https://github.com/istanbuljs/nyc/compare/v13.1.0...v13.2.0) (2019-01-27) + + +### Bug Fixes + +* Create directory for merge destination. ([#979](https://github.com/istanbuljs/nyc/issues/979)) ([921d386](https://github.com/istanbuljs/nyc/commit/921d386)), closes [#976](https://github.com/istanbuljs/nyc/issues/976) +* missing command temp-directory ([#928](https://github.com/istanbuljs/nyc/issues/928)) ([28b6d09](https://github.com/istanbuljs/nyc/commit/28b6d09)), closes [#927](https://github.com/istanbuljs/nyc/issues/927) +* nyc processing files not covered by include when `all` is enabled. ([#914](https://github.com/istanbuljs/nyc/issues/914)) ([40afc5f](https://github.com/istanbuljs/nyc/commit/40afc5f)), closes [#913](https://github.com/istanbuljs/nyc/issues/913) [#782](https://github.com/istanbuljs/nyc/issues/782) + + +### Features + +* avoid hardcoded HOME for spawn-wrap working dir ([#957](https://github.com/istanbuljs/nyc/issues/957)) ([ff834aa](https://github.com/istanbuljs/nyc/commit/ff834aa)), closes [#951](https://github.com/istanbuljs/nyc/issues/951) +* document the fact that cacheDir is configurable ([#968](https://github.com/istanbuljs/nyc/issues/968)) ([35cd49a](https://github.com/istanbuljs/nyc/commit/35cd49a)) +* Option Plugins ([#948](https://github.com/istanbuljs/nyc/issues/948)) ([df2730d](https://github.com/istanbuljs/nyc/commit/df2730d)) + + + + +# [13.1.0](https://github.com/istanbuljs/nyc/compare/v13.0.1...v13.1.0) (2018-09-06) + + +### Features + +* Bump dependencies. ([#915](https://github.com/istanbuljs/nyc/issues/915)) ([0b3d2cf](https://github.com/istanbuljs/nyc/commit/0b3d2cf)) +* Rename --temp-directory option to --temp-dir ([#897](https://github.com/istanbuljs/nyc/issues/897)) ([ccf42df](https://github.com/istanbuljs/nyc/commit/ccf42df)) + + + + +## [13.0.1](https://github.com/istanbuljs/nyc/compare/v13.0.0...v13.0.1) (2018-07-24) + + +### Bug Fixes + +* 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)) + + + + +# [13.0.0](https://github.com/istanbuljs/nyc/compare/v12.0.2...v13.0.0) (2018-06-08) + + +### Bug Fixes + +* source was being instrumented twice, due to upstream fix in ista… ([#853](https://github.com/istanbuljs/nyc/issues/853)) ([d0f654c](https://github.com/istanbuljs/nyc/commit/d0f654c)) + + +### Features + +* allow rows with 100% statement, branch, and function coverage to be skipped in text report ([#859](https://github.com/istanbuljs/nyc/issues/859)) ([893345a](https://github.com/istanbuljs/nyc/commit/893345a)) + + +### BREAKING CHANGES + +* --hook-run-in-context, and --hook-run-in-this-context are no longer true by default (they should be enabled if you're using a library like requirejs). + + + + +## [12.0.2](https://github.com/istanbuljs/nyc/compare/v12.0.1...v12.0.2) (2018-06-03) + + +### Bug Fixes + +* don't bundle istanbul-lib-instrument due to Node 6 issues ([b4c325b](https://github.com/istanbuljs/nyc/commit/b4c325b)) +* stop bundling istanbul-lib-instrument due to npm issue on Node 6 ([#854](https://github.com/istanbuljs/nyc/issues/854)) ([ddc9331](https://github.com/istanbuljs/nyc/commit/ddc9331)) + + + + +## [12.0.1](https://github.com/istanbuljs/nyc/compare/v12.0.0...v12.0.1) (2018-05-31) + + + + +# [12.0.0](https://github.com/istanbuljs/nyc/compare/v11.9.0...v12.0.0) (2018-05-31) + + +### Chores + +* upgrade to newest version of istanbul codebase ([#848](https://github.com/istanbuljs/nyc/issues/848)) ([19b7d21](https://github.com/istanbuljs/nyc/commit/19b7d21)) + + +### BREAKING CHANGES + +* babel@7 drops Node.js 4 support + + + + +# [11.9.0](https://github.com/istanbuljs/nyc/compare/v11.8.0...v11.9.0) (2018-05-31) + + +### Features + +* add option that allows instrument to exit on error ([#850](https://github.com/istanbuljs/nyc/issues/850)) ([1329a3b](https://github.com/istanbuljs/nyc/commit/1329a3b)) + + + + +# [11.8.0](https://github.com/istanbuljs/nyc/compare/v11.7.3...v11.8.0) (2018-05-14) + + +### Features + +* merge together multiple istanbul format reports ([#840](https://github.com/istanbuljs/nyc/issues/840)) ([9def3eb](https://github.com/istanbuljs/nyc/commit/9def3eb)) + + + + +## [11.7.3](https://github.com/istanbuljs/nyc/compare/v11.7.2...v11.7.3) (2018-05-10) + + + + +## [11.7.2](https://github.com/istanbuljs/nyc/compare/v11.7.1...v11.7.2) (2018-05-08) + + + + +## [11.7.1](https://github.com/istanbuljs/nyc/compare/v11.7.0...v11.7.1) (2018-04-17) + + + + +# [11.7.0](https://github.com/istanbuljs/nyc/compare/v11.6.0...v11.7.0) (2018-04-16) + + +### Features + +* allow 0-line files to be ignored in coverage output ([#808](https://github.com/istanbuljs/nyc/issues/808)) ([24e5979](https://github.com/istanbuljs/nyc/commit/24e5979)) +* load coverage files individually instead of all at once, addressing memory issues ([#806](https://github.com/istanbuljs/nyc/issues/806)) ([05fea60](https://github.com/istanbuljs/nyc/commit/05fea60)) + + + + +# [11.6.0](https://github.com/istanbuljs/nyc/compare/v11.5.0...v11.6.0) (2018-03-13) + + +### Bug Fixes + +* removes unused split-lines dependency. ([#787](https://github.com/istanbuljs/nyc/issues/787)) ([b4032ce](https://github.com/istanbuljs/nyc/commit/b4032ce)) +* update to yargs version that allows extending configs with no extension ([#790](https://github.com/istanbuljs/nyc/issues/790)) ([2d51562](https://github.com/istanbuljs/nyc/commit/2d51562)) + + +### Features + +* allow usage of ignoreClassMethods from istanbul ([#785](https://github.com/istanbuljs/nyc/issues/785)) ([c6b30ba](https://github.com/istanbuljs/nyc/commit/c6b30ba)) + + + + +# [11.5.0](https://github.com/istanbuljs/nyc/compare/v11.4.1...v11.5.0) (2018-02-13) + + +### Bug Fixes + +* coverage reportDir should respect `--cwd` ([#764](https://github.com/istanbuljs/nyc/issues/764)) ([b0d6dae](https://github.com/istanbuljs/nyc/commit/b0d6dae)) +* typo in option definition ([#758](https://github.com/istanbuljs/nyc/issues/758)) ([6a734b6](https://github.com/istanbuljs/nyc/commit/6a734b6)) + + +### Features + +* add command line options to control compacting and comment removal ([#754](https://github.com/istanbuljs/nyc/issues/754)) ([2030e0c](https://github.com/istanbuljs/nyc/commit/2030e0c)) +* resolve custom cache directory to absolute path ([#766](https://github.com/istanbuljs/nyc/issues/766)) ([dd48707](https://github.com/istanbuljs/nyc/commit/dd48707)) + + + + +## [11.4.1](https://github.com/istanbuljs/nyc/compare/v11.4.0...v11.4.1) (2017-12-14) + + +### Bug Fixes + +* explicitly update spawn-wrap ([#748](https://github.com/istanbuljs/nyc/issues/748)) ([4e4f428](https://github.com/istanbuljs/nyc/commit/4e4f428)) + + + + +# [11.4.0](https://github.com/istanbuljs/nyc/compare/v11.3.0...v11.4.0) (2017-11-28) + + +### Bug Fixes + +* always invoke instrumenter callback, set appropriate exit-code ([#703](https://github.com/istanbuljs/nyc/issues/703)) ([7ea96ba](https://github.com/istanbuljs/nyc/commit/7ea96ba)) + + +### Features + +* allow alternate path for .nycrc to be specified ([#724](https://github.com/istanbuljs/nyc/issues/724)) ([785fccb](https://github.com/istanbuljs/nyc/commit/785fccb)) + + + + +# [11.3.0](https://github.com/istanbuljs/nyc/compare/v11.2.1...v11.3.0) (2017-10-23) + + +### Features + +* add --exclude-after-remap option for users who pre-instrument their codebase ([#697](https://github.com/istanbuljs/nyc/issues/697)) ([cdfdff3](https://github.com/istanbuljs/nyc/commit/cdfdff3)) +* add option to hook vm.runInContext ([#680](https://github.com/istanbuljs/nyc/issues/680)) ([f04b7a9](https://github.com/istanbuljs/nyc/commit/f04b7a9)) +* allow instrument-only to produce sourcemaps ([#674](https://github.com/istanbuljs/nyc/issues/674)) ([f31d7a6](https://github.com/istanbuljs/nyc/commit/f31d7a6)) + + + + +## [11.2.1](https://github.com/istanbuljs/nyc/compare/v11.2.0...v11.2.1) (2017-09-06) + + +### Bug Fixes + +* apply exclude logic before remapping coverage ([#667](https://github.com/istanbuljs/nyc/issues/667)) ([a10d478](https://github.com/istanbuljs/nyc/commit/a10d478)) +* create temp directory when --no-clean flag is set [#663](https://github.com/istanbuljs/nyc/issues/663) ([#664](https://github.com/istanbuljs/nyc/issues/664)) ([3bd1527](https://github.com/istanbuljs/nyc/commit/3bd1527)) + + + + +# [11.2.0](https://github.com/istanbuljs/nyc/compare/v11.1.0...v11.2.0) (2017-09-05) + + +### Bug Fixes + +* remove excluded files from coverage before writing ([#649](https://github.com/istanbuljs/nyc/issues/649)) ([658dba4](https://github.com/istanbuljs/nyc/commit/658dba4)) + + +### Features + +* add possibility to filter coverage-maps ([#637](https://github.com/istanbuljs/nyc/issues/637)) ([dd40dc5](https://github.com/istanbuljs/nyc/commit/dd40dc5)) +* allow cwd to be configured see [#620](https://github.com/istanbuljs/nyc/issues/620) ([0dcceda](https://github.com/istanbuljs/nyc/commit/0dcceda)) + + + + +# [11.1.0](https://github.com/istanbuljs/nyc/compare/v11.0.3...v11.1.0) (2017-07-16) + + +### Features + +* add support for per file coverage checking ([#591](https://github.com/istanbuljs/nyc/issues/591)) ([bbadc1f](https://github.com/istanbuljs/nyc/commit/bbadc1f)) +* upgrade to version of spawn-wrap that supports .EXE ([#626](https://github.com/istanbuljs/nyc/issues/626)) ([8768afe](https://github.com/istanbuljs/nyc/commit/8768afe)) + + + + +## [11.0.3](https://github.com/istanbuljs/nyc/compare/v11.0.2...v11.0.3) (2017-06-25) + + +### Bug Fixes + +* update help link to list of reporters ([#601](https://github.com/istanbuljs/nyc/issues/601)) ([b1eb4d6](https://github.com/istanbuljs/nyc/commit/b1eb4d6)) +* upgrade to spawn-wrap version that works with babel-register ([#617](https://github.com/istanbuljs/nyc/issues/617)) ([923b062](https://github.com/istanbuljs/nyc/commit/923b062)) + + + + +## [11.0.2](https://github.com/istanbuljs/nyc/compare/v11.0.1...v11.0.2) (2017-06-02) + + + + +## [11.0.1](https://github.com/istanbuljs/nyc/compare/v11.0.0...v11.0.1) (2017-06-01) + + + + +# [11.0.0](https://github.com/istanbuljs/nyc/compare/v10.3.2...v11.0.0) (2017-05-31) + + +### Bug Fixes + +* add support for ES6 modules ([f18f780](https://github.com/istanbuljs/nyc/commit/f18f780)) + + +### Features + +* allow .nycrc.json ([#580](https://github.com/istanbuljs/nyc/issues/580)) ([a1a457f](https://github.com/istanbuljs/nyc/commit/a1a457f)) +* upgrade to version of yargs with support for presets ([33829b8](https://github.com/istanbuljs/nyc/commit/33829b8)) + + +### BREAKING CHANGES + +* new version of find-up requires dropping 0.10/0.12 support (which we had already been planning). + + + + +## [10.3.2](https://github.com/istanbuljs/nyc/compare/v10.3.1...v10.3.2) (2017-05-05) + + +### Bug Fixes + +* we should not create a cache folder if cache is false ([#567](https://github.com/istanbuljs/nyc/issues/567)) ([213206f](https://github.com/istanbuljs/nyc/commit/213206f)) + + + + +## [10.3.1](https://github.com/istanbuljs/nyc/compare/v10.3.0...v10.3.1) (2017-05-04) + + +### Bug Fixes + +* introduced a bug that resulted in source-maps not being loaded approriately on second test run ([#566](https://github.com/istanbuljs/nyc/issues/566)) ([1bf74fd](https://github.com/istanbuljs/nyc/commit/1bf74fd)) + + + + +# [10.3.0](https://github.com/istanbuljs/nyc/compare/v10.2.0...v10.3.0) (2017-04-29) + + +### Bug Fixes + +* source-maps were not being cached in the parent process when --all was being used ([#556](https://github.com/istanbuljs/nyc/issues/556)) ([ff73b18](https://github.com/istanbuljs/nyc/commit/ff73b18)) + + +### Features + +* add support for --no-clean, to disable deleting raw coverage output ([#558](https://github.com/istanbuljs/nyc/issues/558)) ([1887d1c](https://github.com/istanbuljs/nyc/commit/1887d1c)) + + + + +# [10.2.0](https://github.com/istanbuljs/nyc/compare/v10.1.0...v10.2.0) (2017-03-28) + + +### Bug Fixes + +* fix bug related to merging coverage reports see [#482](https://github.com/istanbuljs/nyc/issues/482) ([81229a0](https://github.com/istanbuljs/nyc/commit/81229a0)) +* revert defaulting to empty file-coverage report, this caused too many issues ([25aec77](https://github.com/istanbuljs/nyc/commit/25aec77)) + + +### Features + +* allow babel cache to be enabled ([#517](https://github.com/istanbuljs/nyc/issues/517)) ([98ebdff](https://github.com/istanbuljs/nyc/commit/98ebdff)) +* exclude the coverage/ folder by default 🚀 ([#502](https://github.com/istanbuljs/nyc/issues/502)) ([50adde4](https://github.com/istanbuljs/nyc/commit/50adde4)) +* upgrade to version of yargs with extend support ([#541](https://github.com/istanbuljs/nyc/issues/541)) ([95cc09a](https://github.com/istanbuljs/nyc/commit/95cc09a)) + + + + +## [10.1.2](https://github.com/istanbuljs/nyc/compare/v10.1.1...v10.1.2) (2017-01-18) + + +### Bug Fixes + +* revert defaulting to empty file-coverage report, this caused too many issues ([25aec77](https://github.com/istanbuljs/nyc/commit/25aec77)) + + + + +## [10.1.1](https://github.com/istanbuljs/nyc/compare/v10.1.0...v10.1.1) (2017-01-18) + + +### Bug Fixes + +* fix bug related to merging coverage reports see [#482](https://github.com/istanbuljs/nyc/issues/482) ([81229a0](https://github.com/istanbuljs/nyc/commit/81229a0)) + + + + +# [10.1.0](https://github.com/istanbuljs/nyc/compare/v10.0.2...v10.1.0) (2017-01-17) + + +### Bug Fixes + +* address edge-cases related to --all when instrumentation is disabled ([#482](https://github.com/istanbuljs/nyc/issues/482)) ([8c58d68](https://github.com/istanbuljs/nyc/commit/8c58d68)) +* pass configuration options to --check-coverage ([#483](https://github.com/istanbuljs/nyc/issues/483)) ([1022b16](https://github.com/istanbuljs/nyc/commit/1022b16)) + + +### Features + +* allow eager instantiation of instrumenter ([#490](https://github.com/istanbuljs/nyc/issues/490)) ([8b58c05](https://github.com/istanbuljs/nyc/commit/8b58c05)) +* reporting watermarks can now be set in nyc config stanza ([#469](https://github.com/istanbuljs/nyc/issues/469)) ([0a1d72a](https://github.com/istanbuljs/nyc/commit/0a1d72a)) +* upgrade to istanbul-lib-instrument with support for 'const foo = function () {}' name preservation. upgrade to istanbul-lib-hook with fix for ts-node. ([#494](https://github.com/istanbuljs/nyc/issues/494)) ([d8d2de0](https://github.com/istanbuljs/nyc/commit/d8d2de0)) + + + + +## [10.0.2](https://github.com/istanbuljs/nyc/compare/v10.0.1...v10.0.2) (2017-01-02) + + +### Bug Fixes + +* upgrade to newer istanbul-lib-instrument, with fixes for inferred function names ([#479](https://github.com/istanbuljs/nyc/issues/479)) ([e01ec8c](https://github.com/istanbuljs/nyc/commit/e01ec8c)) + + + + +## [10.0.1](https://github.com/istanbuljs/nyc/compare/v10.0.0...v10.0.1) (2016-12-27) + + +### Bug Fixes + +* upgrade spawn-wrap and istanbul-lib-instrument ([#477](https://github.com/istanbuljs/nyc/issues/477)) ([e0ef1d5](https://github.com/istanbuljs/nyc/commit/e0ef1d5)) + + + + +# [10.0.0](https://github.com/istanbuljs/nyc/compare/v9.0.1...v10.0.0) (2016-11-22) + + +### Bug Fixes + +* debug-log should be production dependency ([a3c7f83](https://github.com/istanbuljs/nyc/commit/a3c7f83)) + + +### Features + +* cache now turned on by default ([#454](https://github.com/istanbuljs/nyc/issues/454)) ([0dd970c](https://github.com/istanbuljs/nyc/commit/0dd970c)) + + +### BREAKING CHANGES + +* nyc's cache is now enabled by default + + + + +## [9.0.1](https://github.com/istanbuljs/nyc/compare/v9.0.0...v9.0.1) (2016-11-14) + + +### Bug Fixes + +* addresses several test-exclude edge-cases. addresses perf issue with yargs ([#442](https://github.com/istanbuljs/nyc/issues/444)) + + +# [9.0.0](https://github.com/istanbuljs/nyc/compare/v8.4.0...v9.0.0) (2016-11-13) + + +### Features + +* adds support for source-map production ([#439](https://github.com/istanbuljs/nyc/issues/439)) ([31488f5](https://github.com/istanbuljs/nyc/commit/31488f5)) +* allow an alternate cache folder to be provided ([#443](https://github.com/istanbuljs/nyc/issues/443)) ([b6713a3](https://github.com/istanbuljs/nyc/commit/b6713a3)) +* node_modules is again excluded by default when custom exclude is provided ([#442](https://github.com/istanbuljs/nyc/issues/442)) ([2828538](https://github.com/istanbuljs/nyc/commit/2828538)) + + +### BREAKING CHANGES + +* **/node_modules/** is again excluded by default. + + + + +# [8.4.0](https://github.com/istanbuljs/nyc/compare/v8.3.1...v8.4.0) (2016-10-30) + + +### Bug Fixes + +* hot-fix bad release of nyc ([c487eb3](https://github.com/istanbuljs/nyc/commit/c487eb3)) +* reverts _maybeInstrumentSource logic, so that exclude is still applied ([#429](https://github.com/istanbuljs/nyc/issues/429)) ([b90d26f](https://github.com/istanbuljs/nyc/commit/b90d26f)) +* update core istanbul libraries ([#426](https://github.com/istanbuljs/nyc/issues/426)) ([4945dac](https://github.com/istanbuljs/nyc/commit/4945dac)) + + +### Features + +* coverage information is now returned for process tree ([#416](https://github.com/istanbuljs/nyc/issues/416)) ([92dedda](https://github.com/istanbuljs/nyc/commit/92dedda)) +* read coverage header when using "noop" instrumenter ([#420](https://github.com/istanbuljs/nyc/issues/420)) ([63a8758](https://github.com/istanbuljs/nyc/commit/63a8758)) + + + + +## [8.3.1](https://github.com/istanbuljs/nyc/compare/v8.3.0...v8.3.1) (2016-10-06) + + +### Bug Fixes + +* swap to version of test-exclude that does not warn ([#410](https://github.com/istanbuljs/nyc/issues/410)) ([78aac45](https://github.com/istanbuljs/nyc/commit/78aac45)) +* update istanbul-lib-source-maps to 1.0.2 ([#411](https://github.com/istanbuljs/nyc/issues/411)) ([9c89945](https://github.com/istanbuljs/nyc/commit/9c89945)) + + + + +# [8.3.0](https://github.com/istanbuljs/nyc/compare/v8.2.0...v8.3.0) (2016-09-15) + + +### Bug Fixes + +* add a feature which allows us to bust the cache when breaking changes are introduced ([#394](https://github.com/istanbuljs/nyc/issues/394)) ([b7a413a](https://github.com/istanbuljs/nyc/commit/b7a413a)) +* add shim for check-coverage on node 0.10 ([#386](https://github.com/istanbuljs/nyc/issues/386)) ([9ebaea8](https://github.com/istanbuljs/nyc/commit/9ebaea8)) +* upgrade to newer versions of source-map, signal-exit, and instrument ([#389](https://github.com/istanbuljs/nyc/issues/389)) ([a9bdf0f](https://github.com/istanbuljs/nyc/commit/a9bdf0f)), closes [#379](https://github.com/istanbuljs/nyc/issues/379) + + +### Features + +* add support for .nycrc ([#391](https://github.com/istanbuljs/nyc/issues/391)) ([1c2349b](https://github.com/istanbuljs/nyc/commit/1c2349b)) +* refactored config to fix precedence of config vs. args ([#388](https://github.com/istanbuljs/nyc/issues/388)) ([99dbbb3](https://github.com/istanbuljs/nyc/commit/99dbbb3)), closes [#379](https://github.com/istanbuljs/nyc/issues/379) + + + + +# [8.2.0](https://github.com/istanbuljs/nyc/compare/v8.1.0...v8.2.0) (2016-09-02) + + +### Bug Fixes + +* upgrade standard, and a few other dependencies. fix standard nits ([#375](https://github.com/istanbuljs/nyc/issues/375)) ([64c68b7](https://github.com/istanbuljs/nyc/commit/64c68b7)) + + +### Features + +* gather process tree information ([#364](https://github.com/istanbuljs/nyc/issues/364)) ([fabe5f3](https://github.com/istanbuljs/nyc/commit/fabe5f3)) + + + + +# [8.1.0](https://github.com/bcoe/nyc/compare/v8.0.0...v8.1.0) (2016-08-14) + + +### Bug Fixes + +* serialization using ',' was breaking globs ([#353](https://github.com/bcoe/nyc/issues/353)) ([22929db](https://github.com/bcoe/nyc/commit/22929db)) + + +### Features + +* implicitly assume `node` when the command starts with an option ([#350](https://github.com/bcoe/nyc/issues/350)) ([2bb52cd](https://github.com/bcoe/nyc/commit/2bb52cd)) + + + + +# [8.0.0](https://github.com/bcoe/nyc/compare/v7.1.0...v8.0.0) (2016-08-12) + + +### Bug Fixes + +* make `nyc instrument` work in subdirectories ([#343](https://github.com/bcoe/nyc/issues/343)) ([a82cf49](https://github.com/bcoe/nyc/commit/a82cf49)) +* upgrade to versions of coverage/instrument that solve out-of-bound errors ([#349](https://github.com/bcoe/nyc/issues/349)) ([bee0328](https://github.com/bcoe/nyc/commit/bee0328)) + + +### Features + +* upgrade to new test-exclude; with suppport for node_modules, and empty exclude ([#348](https://github.com/bcoe/nyc/issues/348)) ([d616ffc](https://github.com/bcoe/nyc/commit/d616ffc)) + + +### BREAKING CHANGES + +* node_modules is no longer automatically excluded, and an empty array of exclude rules can now be provided. + + + + +# [7.1.0](https://github.com/bcoe/nyc/compare/v7.0.0...v7.1.0) (2016-07-24) + + +### Bug Fixes + +* make --all flag work with files with extensions other than .js ([#326](https://github.com/bcoe/nyc/issues/326)) ([d0a8674](https://github.com/bcoe/nyc/commit/d0a8674)) +* work around for Windows path issue nodejs/node[#6624](https://github.com/bcoe/nyc/issues/6624) ([6b1fed0](https://github.com/bcoe/nyc/commit/6b1fed0)) + + +### Features + +* nyc no longer tries to run arguments passed to the instrumented bin ([#322](https://github.com/bcoe/nyc/issues/322)) ([e0a8c0b](https://github.com/bcoe/nyc/commit/e0a8c0b)) +* use istanbul-lib-hook to wrap require and support vm hooks ([#308](https://github.com/bcoe/nyc/issues/308)) ([2b64cf8](https://github.com/bcoe/nyc/commit/2b64cf8)) + + + + +# [7.0.0](https://github.com/bcoe/nyc/compare/v6.6.1...v7.0.0) (2016-07-09) + + +### Bug Fixes + +* avoid pid collisions. ([#301](https://github.com/bcoe/nyc/issues/301)) ([f67bff7](https://github.com/bcoe/nyc/commit/f67bff7)) +* disable the babel/nyc cache ([#303](https://github.com/bcoe/nyc/issues/303)) ([104b3da](https://github.com/bcoe/nyc/commit/104b3da)) + + +### Features + +* adds instrument command line option ([#298](https://github.com/bcoe/nyc/issues/298)) ([e45b51b](https://github.com/bcoe/nyc/commit/e45b51b)) +* nyc is being refactored to become the official Istanbul 1.0 bin ([#286](https://github.com/bcoe/nyc/issues/286)) ([61a05ea](https://github.com/bcoe/nyc/commit/61a05ea)) + + +### BREAKING CHANGES + +* significant chunks of nyc's API have been reworked, to use the Istanbul 1.0 API: source-map support, instrumentation, the check-coverage command, etc. + + + ## [6.6.1](https://github.com/bcoe/nyc/compare/v6.6.0...v6.6.1) (2016-06-14) diff --git a/LICENSE.txt b/LICENSE.txt index c7e27478a..1a65117d3 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,3 +1,5 @@ +ISC License + Copyright (c) 2015, Contributors Permission to use, copy, modify, and/or distribute this software diff --git a/README.md b/README.md index 1b83a3e89..5076e4a17 100644 --- a/README.md +++ b/README.md @@ -1,315 +1,388 @@ # nyc -[![Build Status](https://travis-ci.org/bcoe/nyc.svg?branch=master)](https://travis-ci.org/bcoe/nyc) -[![Coverage Status](https://coveralls.io/repos/bcoe/nyc/badge.svg?branch=)](https://coveralls.io/r/bcoe/nyc?branch=) +[![Build Status](https://img.shields.io/travis/istanbuljs/nyc/master.svg)](https://travis-ci.org/istanbuljs/nyc) +[![Windows Build Status](https://img.shields.io/appveyor/ci/istanbuljs/nyc/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/istanbuljs/nyc/branch/master) +[![Coverage Status](https://img.shields.io/coveralls/github/istanbuljs/nyc/master.svg)](https://coveralls.io/r/istanbuljs/nyc?branch=master) [![NPM version](https://img.shields.io/npm/v/nyc.svg)](https://www.npmjs.com/package/nyc) -[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/nyc/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/nyc) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) +[![community slack](https://devtoolscommunity.herokuapp.com/badge.svg)](https://devtoolscommunity.herokuapp.com) -a code coverage tool built on [istanbul](https://www.npmjs.com/package/istanbul) -that works for applications that spawn subprocesses. +_Having problems? want to contribute? join our [community slack](https://devtoolscommunity.herokuapp.com)_. -## Instrumenting Your Code +Istanbul's state of the art command line interface, with support for: -You can install nyc as a development dependency and add it to the test stanza -in your package.json. +* applications that spawn subprocesses. +* source mapped coverage of Babel and TypeScript projects -```shell -npm i nyc --save-dev -``` +## Installation & Usage + +Use your package manager to add it as a dev dependency: `npm i -D nyc` or `yarn add -D nyc`. +You can use nyc to call npm scripts (assuming they don't already have nyc executed in them), like so (replace `mocha` with your test runner everywhere you see it): ```json { - "script": { - "test": "nyc tap ./test/*.js" + "scripts": { + "test": "mocha", + "coverage": "nyc npm run test" } } ``` -Alternatively, you can install nyc globally and use it to execute `npm test`: +You can use also `npx` instead of installing nyc as a dependency, but you might get updates you are not ready for; to get around this, pin to a specific major version by specifying, e.g. `nyc@14`. -```shell -npm i nyc -g +```json +{ + "scripts": { + "test": "npx nyc@latest mocha" + } +} ``` -```shell -nyc npm test -``` +This is a good way of testing upcoming releases of nyc, usually on the `next` tag. + +**Note**: If you use [`jest`](https://npm.im/jest) or [`tap`](https://www.node-tap.org/), you do not need to install `nyc`. +Those runners already have the IstanbulJS libraries to provide coverage for you. +Follow their documentation to enable and configure coverage reporting. + +## Configuring `nyc` -nyc accepts a wide variety of configuration arguments, run `nyc --help` for -thorough documentation. +nyc accepts a wide variety of configuration arguments, run `npx nyc --help` for thorough documentation. -Configuration arguments should be provided prior to the program that nyc -is executing. As an example, the following command executes `npm test`, -and indicates to nyc that it should output both an `lcov` -and a `text-lcov` coverage report. +Configuration arguments on the command-line should be provided prior to the program that nyc is executing. +As an example, the following command executes `ava`, and indicates to nyc that it should output both an `lcov` (`lcov.info` + html report) and a `text-summary` coverage report. ```shell -nyc --reporter=lcov --reporter=text-lcov npm test +nyc --reporter=lcov --reporter=text-summary ava ``` -## Support For Custom Require Hooks (Babel! ES2015!) - -nyc supports custom require hooks like -[`babel-register`](http://babeljs.io/docs/usage/require/). If necessary nyc can -load the hooks for you, [using the `--require` -flag](#require-additional-modules). - -Source maps are used to map coverage information back to the appropriate lines -of the pre-transpiled code. You'll have to configure your custom require hook -to inline the source map in the transpiled code. For Babel that means setting -the `sourceMaps` option to `inline`. - -## Use babel-plugin__coverage__ for Better ES6/ES7 Support - -[`babel-plugin-__coverage__`](https://github.com/dtinth/babel-plugin-__coverage__) can be used to enable better first-class ES6 support. - -1. enable the `__coverage__` plugin: - - ```json - { - "babel": { - "presets": ["es2015"], - "plugins": ["__coverage__"] - } - } - ``` - -2. disable nyc's instrumentation and source-maps: - - ```json - { - "nyc": { - "include": [ - "src/*.js" - ], - "require": [ - "babel-register" - ], - "sourceMap": false, - "instrument": false - } - } - ``` +### Babel projects -That's all there is to it, better ES6 syntax highlighting awaits: +Please start with the pre-configured [`@istanbuljs/nyc-config-babel`] preset. +You can add your custom configuration options as shown below. - +### TypeScript projects -## Support For Custom File Extensions (.jsx, .es6) +Please start with the pre-configured [`@istanbuljs/nyc-config-typescript`](https://www.npmjs.com/package/@istanbuljs/nyc-config-typescript) preset. -Supporting file extensions can be configured through either the configuration arguments or with the `nyc` config section in `package.json`. +#### Adding your overrides -```shell -nyc --extension .jsx --extension .es6 npm test -``` +nyc allows you to inherit other configurations using the key `extends` in the `package.json` stanza, `.nycrc`, or YAML files. +You can then add the specific configuration options you want that aren't in that particular shared config, e.g. ```json { - "nyc": { - "extension": [ - ".jsx", - ".es6" - ] - } + "extends": "@istanbuljs/nyc-config-typescript", + "all": true, + "check-coverage": true } ``` -## Checking Coverage +### Configuration files -nyc exposes istanbul's check-coverage tool. After running your tests with nyc, -simply run: +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 separate configuration file - a variety of flavors are available: -```shell -nyc check-coverage --lines 95 --functions 95 --branches 95 -``` +| File name | File Association | +|-----------------|------------------| +| `.nycrc` | JSON | +| `.nycrc.json` | JSON | +| `.nycrc.yaml` | YAML | +| `.nycrc.yml` | YAML | +| `nyc.config.js` | CommonJS export | -This feature makes it easy to fail your tests if coverage drops below a given threshold. +### Common Configuration Options -nyc also accepts a `--check-coverage` shorthand, which can be used to -both run tests and check that coverage falls within the threshold provided: +See `nyc --help` for all options available. +You can set these in any of the files listed above, or from the command line. +This table is a quick TLDR for the rest of this readme and there are more advanced docs available. -```shell -nyc --check-coverage --lines 100 npm test -``` +| Option name | Description | Type | Default | +| ----------- | ----------- | ---- | ------- | +| `all` | Whether or not to instrument all files (not just the ones touched by your test suite) | `Boolean` | `false` | +| `check-coverage` | Check whether coverage is within thresholds, fail if not | `Boolean` | `false` | +| `extension` | List of extensions that nyc should attempt to handle in addition to `.js` | `Array` | `['.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx']` | +| `include` | See [selecting files for coverage] for more info | `Array` | `['**']`| +| `exclude` | See [selecting files for coverage] for more info | `Array` | [list](https://github.com/istanbuljs/schema/blob/master/default-exclude.js) | +| `reporter` | [Coverage reporters to use](https://istanbul.js.org/docs/advanced/alternative-reporters/) | `Array` | `['text']` | +| `report-dir` | Where to put the coverage report files | `String` | `./coverage` | +| `skip-full` | Don't show files with 100% statement, branch, and function coverage | `Boolean` | `false` | +| `temp-dir` | Directory to output raw coverage information to | `String` | `./.nyc_output` | + +Configuration can also be provided by `nyc.config.js` if programmed logic is required: -The above check fails if coverage falls below 100%. +```js +'use strict'; -## Running Reports +const defaultExclude = require('@istanbuljs/schema/default-exclude'); +const isWindows = require('is-windows'); -Once you've run your tests with nyc, simply run: +let platformExclude = [ + isWindows() ? 'lib/posix.js' : 'lib/win32.js' +]; -```bash -nyc report +module.exports = { + exclude: platformExclude.concat(defaultExclude) +}; ``` -To view your coverage report: +### Publish and reuse your nyc configuration(s) - +To publish and reuse your own `nyc` configuration, simply create an npm module that exports your JSON config (via [`index.json`](https://github.com/istanbuljs/istanbuljs/blob/master/packages/nyc-config-typescript/) or a CJS [`index.js`](https://github.com/istanbuljs/istanbuljs/blob/master/packages/nyc-config-hook-run-in-this-context/)). -you can use any reporters that are supported by istanbul: +A more advanced use case would be to combine multiple shared configs in a `nyc.config.js` file: -```bash -nyc report --reporter=lcov +```js +'use strict'; + +const babelConfig = require('@istanbuljs/nyc-config-babel'); +const hookRunInThisContextConfig = require('@istanbuljs/nyc-config-hook-run-in-this-context'); + +module.exports = { + ...babelConfig, + ...hookRunInThisContextConfig, + all: true, + 'check-coverage': true +}; ``` -## Excluding Files +## 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. -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. +nyc will only collect coverage for files that are located under `cwd`, and then only files with extensions listed in the `extension` array. -Globs are matched using [micromatch](https://www.npmjs.com/package/micromatch). +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. -In addition to patterns specified in the package, nyc will always exclude -files in `node_modules`. +Globs are matched using [minimatch](https://www.npmjs.com/package/minimatch). -For example, the following config will exclude everything in `node_modules`, -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 default `exclude` list is defined in the [@istanbuljs/schema module](https://github.com/istanbuljs/schema/blob/master/default-exclude.js). +Specifying your own exclude property completely replaces these defaults. + +For example, the following `nyc` 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": { - "exclude": [ - "**/*.spec.js", - "build" - ] - } + "all": true, + "include": [ + "src/**/*.js" + ], + "exclude": [ + "**/*.spec.js" + ] } ``` -> Note: exclude defaults to `['test', 'test{,-*}.js', '**/*.test.js', '**/__tests__/**']`, -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 to specify specific files that should be covered: +For example, `"excludeNodeModules: false"` in the following `nyc` config 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 } ``` -> Note: include defaults to `['**']` +## 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: -## Include Reports For Files That Are Not Required +* looking for source files to instrument +* creating globs for include and exclude rules during file selection +* loading custom require hooks from the `require` array -By default nyc does not collect coverage for files that have not -been required, run nyc with the flag `--all` to enable this. +nyc may create artifact directories within the project root, with these defaults: + +* the report directory, `/coverage` +* the cache directory, `/node_modules/.cache/nyc` +* the temp directory, `/.nyc_output` ## Require additional modules -The `--require` flag can be provided to `nyc` to indicate that additional -modules should be required in the subprocess collecting coverage: +The `--require` flag can be provided to `nyc` to indicate that additional modules should be required in the subprocess collecting coverage: -`nyc --require babel-core/register --require babel-polyfill mocha` +```shell +nyc --require esm mocha +``` + +### Interaction with `--all` flag + +The `--require` flag also operates on the main nyc process for use by `--all`. +For example, in situations with `nyc --all --instrument false` and [`babel-plugin-istanbul`] setup the `--all` option only works if `--require @babel/register` is passed to nyc. +Passing it to mocha would cause the tests to be instrumented but unloaded sources would not be seen. +The [`@istanbuljs/nyc-config-babel`] package handles this for you! ## Caching -You can run `nyc` with the optional `--cache` flag, to prevent it from -instrumenting the same files multiple times. This can signficantly -improve runtime performance. +`nyc`'s default behavior is to cache instrumented files to disk to prevent instrumenting source files multiple times, and speed `nyc` execution times. +You can disable this behavior by running `nyc` with the `--cache false` flag. +You can also change the default cache directory from `./node_modules/.cache/nyc` by setting the `--cache-dir` flag. -## Configuring `nyc` +## Coverage thresholds -Any configuration options that can be set via the command line -can also be specified in the `nyc` stanza of your package.json: +You can set custom coverage thresholds that will fail if `check-coverage` is set to `true` and your coverage drops below those thresholds. +For example, in the following `nyc` configuration, dropping below 80% branch, line, functions, or statements coverage would fail the build (you can have any combination of these): ```json { - "nyc": { - "lines": 99, - "check-coverage": false, - "report-dir": "./alternative" - } + "branches": 80, + "lines": 80, + "functions": 80, + "statements": 80 } ``` -## Configuring Istanbul +To do this check on a per-file basis (as opposed to in aggregate), set the `per-file` option to `true`. + +### High and low watermarks + +Several of the coverage reporters supported by nyc display special information for high and low watermarks: + +* high-watermarks represent healthy test coverage (in many reports this is represented with green highlighting). +* low-watermarks represent sub-optimal coverage levels (in many reports this is represented with red highlighting). -Behind the scenes nyc uses [istanbul](https://www.npmjs.com/package/istanbul). You -can place a `.istanbul.yml` file in your project's root directory to pass config -setings to istanbul's code instrumenter: +You can specify custom high and low watermarks in nyc's configuration: -```yml -instrumentation: - preserve-comments: true +```json +{ + "watermarks": { + "lines": [80, 95], + "functions": [80, 95], + "branches": [80, 95], + "statements": [80, 95] + } +} ``` -## Integrating With Coveralls +## Parsing Hints (Ignoring Lines) -[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: +There may be some sections of your codebase that you wish to purposefully +exclude from coverage tracking, to do so you can use the following parsing +hints: -1. add the coveralls and nyc dependencies to your module: +* `/* istanbul ignore if */`: ignore the next if statement. +* `/* istanbul ignore else */`: ignore the else portion of an if statement. +* `/* istanbul ignore next */`: ignore the next _thing_ in the source-code ( + functions, if statements, classes, you name it). +* `/* istanbul ignore file */`: ignore an entire source-file (this should be + placed at the top of the file). - ```shell - npm install coveralls nyc --save - ``` +## Ignoring Methods -2. update the scripts in your package.json to include these bins: +You can ignore every instance of a method simply by adding its name to the `ignore-class-method` array in your `nyc` config. - ```json - { - "script": { - "test": "nyc tap ./test/*.js", - "coverage": "nyc report --reporter=text-lcov | coveralls" - } +```json +{ + "ignore-class-method": ["render"] +} +``` + +## Combining reports from multiple runs + +If for whatever reason you have different test runners in your project or a different series of test runs for different kinds of tests, nyc will automatically combine the coverage report for you if configured correctly with the `--no-clean` flag and the `report` command. +Originally inspired by @janiukjf in #1001, here's an example, where the `test:*` scripts (not shown) invoke only your test runner(s) and not nyc: + +```json +{ + "scripts": { + "cover": "npm run cover:unit && npm run cover:integration && npm run cover:report", + "cover:unit": "nyc --silent npm run test:unit", + "cover:integration": "nyc --silent --no-clean npm run test:integration", + "cover:report": "nyc report --reporter=lcov --reporter=text" } - ``` +} +``` -3. For private repos, add the environment variable `COVERALLS_REPO_TOKEN` to travis. +### What about `nyc merge`? -4. add the following to your `.travis.yml`: +The `nyc merge` command is for producing one _raw coverage output file_ that combines the results from many test runs. +So if you had the above setup and needed to produce a single `coverage.json` for some external tool, you could do: - ```yaml - after_success: npm run coverage - ``` +```json +{ + "scripts": { + "cover:merge": "npm run cover:unit && npm run cover:integration && nyc merge .nyc_output coverage.json" + } +} +``` -That's all there is to it! +## Source-Map support for pre-instrumented codebases -> 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?`. +If you opt to pre-instrument your source-code (rather than using a just-in-time transpiler like [`@babel/register`]) nyc supports both inline source-maps and `.map` files. +_Important: If you are using nyc with a project that pre-instruments its code, run nyc with the configuration option `--exclude-after-remap` set to `false`. +Otherwise nyc's reports will exclude any files that source-maps remap to folders covered under exclude rules._ -## Integrating with codecov +## [Integrating with coveralls](./docs/setup-coveralls.md) -`nyc npm test && nyc report --reporter=text-lcov > coverage.lcov && codecov` +## [Integrating with codecov](./docs/setup-codecov.md) -[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: +## [Producing instrumented source](./docs/instrument.md) -Here's how to get `nyc` integrated with codecov and travis-ci.org: +## Integrating with TAP formatters -1. add the codecov and nyc dependencies to your module: +Many testing frameworks (Mocha, Tape, Tap, etc.) can produce [TAP](https://en.wikipedia.org/wiki/Test_Anything_Protocol) output. [tap-nyc](https://github.com/MegaArman/tap-nyc) is a TAP formatter designed to look nice with nyc. - ```shell - npm install codecov nyc --save-dev - ``` +## Tutorials and Advanced Documentation -2. update the scripts in your package.json to include these bins: +See [more nyc tutorials](https://istanbul.js.org/docs/tutorials) and [advanced nyc documentation](https://istanbul.js.org/docs/advanced/). - ```json - { - "script": { - "test": "nyc tap ./test/*.js", - "coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov" - } - } - ``` +Please feel free to [contribute documentation](https://github.com/istanbuljs/istanbuljs.github.io/tree/development/content) to help us improve. -3. For private repos, add the environment variable `CODECOV_TOKEN` to travis. +## `nyc` for enterprise -4. add the following to your `.travis.yml`: +Available as part of the Tidelift Subscription. - ```yaml - after_success: npm run coverage - ``` +The maintainers of `nyc` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-nyc?utm_source=npm-nyc&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) -That's all there is to it! +[`@babel/register`]: https://www.npmjs.com/package/@babel/register +[`babel-plugin-istanbul`]: https://github.com/istanbuljs/babel-plugin-istanbul +[`@istanbuljs/nyc-config-babel`]: https://www.npmjs.com/package/@istanbuljs/nyc-config-babel +[selecting files for coverage]: #selecting-files-for-coverage diff --git a/appveyor.yml b/appveyor.yml index fa517f5bc..62ee40193 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,21 +1,31 @@ +version: "{build}" + +shallow_clone: true + environment: matrix: - - nodejs_version: '6' # stable - - nodejs_version: '4' # LTS - - nodejs_version: '0.12' + - NODEJS_VERSION: "13" + PLATFORM: x64 + - NODEJS_VERSION: "12" + PLATFORM: x64 + - NODEJS_VERSION: "10" + PLATFORM: x64 + - NODEJS_VERSION: "8" + PLATFORM: x64 + install: - - ps: Install-Product node $env:nodejs_version - - set CI=true - - npm config set progress=false - - set PATH=%APPDATA%\npm;%PATH% - - npm install -matrix: - fast_finish: true -build: off -version: '{build}' -shallow_clone: true -clone_depth: 1 + - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:NODEJS_VERSION) $env:PLATFORM + - npm ci + test_script: - node --version - npm --version - npm test + +build: off + +matrix: + fast_finish: true + +cache: + - '%APPDATA%\npm-cache\ -> appveyor.yml,package.json,package-lock.json' diff --git a/bin/nyc.js b/bin/nyc.js index 01874134f..e6a9be883 100755 --- a/bin/nyc.js +++ b/bin/nyc.js @@ -1,222 +1,118 @@ #!/usr/bin/env node -var arrify = require('arrify') -var foreground = require('foreground-child') -var NYC -try { - NYC = require('../index.covered.js') -} catch (e) { - NYC = require('../index.js') -} +'use strict' -var path = require('path') -var sw = require('spawn-wrap') -var wrapper = require.resolve('./wrap.js') +const configUtil = require('../lib/config-util') +const { cliWrapper, suppressEPIPE } = require('../lib/commands/helpers') +const foreground = require('foreground-child') +const resolveFrom = require('resolve-from') +const NYC = require('../index.js') -var yargs = require('yargs/yargs')(process.argv.slice(2)) - .usage('$0 [command] [options]\n\nrun your tests with the nyc bin to instrument them with coverage') - .command('report', 'run coverage report for .nyc_output', function (yargs) { - return yargs - .usage('$0 report [options]') - .example('$0 report --reporter=lcov', 'output an HTML lcov report to ./coverage') - }) - .command('check-coverage', 'check whether coverage is within thresholds provided', function (yargs) { - return yargs - .usage('$0 check-coverage [options]') - .example('$0 check-coverage --lines 95', "check whether the JSON in nyc's output folder meets the thresholds provided") - }) - .option('reporter', { - alias: 'r', - describe: 'coverage reporter(s) to use', - default: 'text', - global: true - }) - .option('report-dir', { - describe: 'default directory to output coverage reports in', - default: 'coverage', - global: true - }) - .option('silent', { - alias: 's', - default: false, - type: 'boolean', - describe: "don't output a report after tests finish running" - }) - .option('all', { - alias: 'a', - default: false, - type: 'boolean', - describe: 'whether or not to instrument all files of the project (not just the ones touched by your test suite)' - }) - .option('exclude', { - alias: 'x', - default: [], - describe: 'a list of specific files and directories that should be excluded from coverage, glob patterns are supported, node_modules is always excluded' - }) - .option('include', { - alias: 'n', - default: [], - describe: 'a list of specific files that should be covered, glob patterns are supported' - }) - .option('require', { - alias: 'i', - default: [], - describe: 'a list of additional modules that nyc should attempt to require in its subprocess, e.g., babel-register, babel-polyfill.' - }) - .option('cache', { - alias: 'c', - default: false, - type: 'boolean', - describe: 'cache instrumentation results for improved performance' - }) - .options('extension', { - alias: 'e', - default: [], - describe: 'a list of extensions that nyc should handle in addition to .js' - }) - .option('check-coverage', { - type: 'boolean', - default: false, - describe: 'check whether coverage is within thresholds provided' - }) - .option('branches', { - default: 0, - description: 'what % of branches must be covered?', - global: true - }) - .option('functions', { - default: 0, - description: 'what % of functions must be covered?', - global: true - }) - .option('lines', { - default: 90, - description: 'what % of lines must be covered?', - global: true - }) - .option('statements', { - default: 0, - description: 'what % of statements must be covered?', - global: true - }) - .option('source-map', { - default: true, - type: 'boolean', - description: 'should nyc detect and handle source maps?' - }) - .option('instrument', { - default: true, - type: 'boolean', - description: 'should nyc handle instrumentation?' - }) - .option('instrumenter', { - default: './lib/instrumenters/istanbul', - type: 'string', - description: 'what library should be used to instrument coverage?' - }) - .help('h') - .alias('h', 'help') - .version() - .pkgConf('nyc', process.cwd()) - .example('$0 npm test', 'instrument your tests with coverage') - .example('$0 --require babel-core/polyfill --require babel-core/register npm test', 'instrument your tests with coverage and babel') - .example('$0 report --reporter=text-lcov', 'output lcov report after running your tests') - .epilog('visit http://git.io/vTJJB for list of available reporters') - -var argv = yargs.argv - -if (argv._[0] === 'report') { - // run a report. - process.env.NYC_CWD = process.cwd() - - report(argv) -} else if (argv._[0] === 'check-coverage') { - checkCoverage(argv) -} else if (argv._.length) { - // wrap subprocesses and execute argv[1] - argv.require = arrify(argv.require) - argv.extension = arrify(argv.extension) - argv.exclude = arrify(argv.exclude) - argv.include = arrify(argv.include) +// parse configuration and command-line arguments; +// we keep these values in a few different forms, +// used in the various execution contexts of nyc: +// reporting, instrumenting subprocesses, etc. + +async function main () { + const { argv, childArgs, yargs } = await configUtil() + + if (['check-coverage', 'report', 'instrument', 'merge'].includes(argv._[0])) { + // look in lib/commands for logic. + return + } + + if (argv._.length === 0) { + // I don't have a clue what you're doing. + process.exitCode = 1 + yargs.showHelp() + return + } // if instrument is set to false, // enable a noop instrumenter. if (!argv.instrument) argv.instrumenter = './lib/instrumenters/noop' + else argv.instrumenter = './lib/instrumenters/istanbul' - var nyc = (new NYC({ - require: argv.require, - include: argv.include, - exclude: argv.exclude, - sourceMap: !!argv.sourceMap - })) - nyc.reset() - - if (argv.all) nyc.addAllFiles() - - var env = { - NYC_CWD: process.cwd(), - NYC_CACHE: argv.cache ? 'enable' : 'disable', - NYC_SOURCE_MAP: argv.sourceMap ? 'enable' : 'disable', - NYC_INSTRUMENTER: argv.instrumenter + var nyc = (new NYC(argv)) + if (argv.clean) { + await nyc.reset() + } else { + await nyc.createTempDirectory() } - if (argv.require.length) { - env.NYC_REQUIRE = argv.require.join(',') + + const env = { + NYC_CONFIG: JSON.stringify(argv), + NYC_CWD: process.cwd() } - if (argv.extension.length) { - env.NYC_EXTENSION = argv.extension.join(',') + + /* istanbul ignore else */ + if (argv['babel-cache'] === false) { + // babel's cache interferes with some configurations, so is + // disabled by default. opt in by setting babel-cache=true. + env.BABEL_DISABLE_CACHE = process.env.BABEL_DISABLE_CACHE = '1' } - if (argv.exclude.length) { - env.NYC_EXCLUDE = argv.exclude.join(',') + + if (!argv.useSpawnWrap) { + const requireModules = [ + require.resolve('../lib/register-env.js'), + ...nyc.require.map(mod => resolveFrom.silent(nyc.cwd, mod) || mod) + ] + const preloadList = require('node-preload') + preloadList.push( + ...requireModules, + require.resolve('../lib/wrap.js') + ) + + Object.assign(process.env, env) + requireModules.forEach(mod => { + require(mod) + }) } - if (argv.include.length) { - env.NYC_INCLUDE = argv.include.join(',') + + if (argv.all) { + await nyc.addAllFiles() + } + + if (argv.useSpawnWrap) { + const wrapper = require.resolve('./wrap.js') + // Support running nyc as a user without HOME (e.g. linux 'nobody'), + // https://github.com/istanbuljs/nyc/issues/951 + env.SPAWN_WRAP_SHIM_ROOT = process.env.SPAWN_WRAP_SHIM_ROOT || process.env.XDG_CACHE_HOME || require('os').homedir() + const sw = require('spawn-wrap') + + sw([wrapper], env) } - sw([wrapper], env) // Both running the test script invocation and the check-coverage run may // set process.exitCode. Keep track so that both children are run, but // a non-zero exit codes in either one leads to an overall non-zero exit code. process.exitCode = 0 - foreground(nyc.mungeArgs(argv), function (done) { - var mainChildExitCode = process.exitCode + foreground(childArgs, async () => { + const mainChildExitCode = process.exitCode + + try { + await nyc.writeProcessIndex() - if (argv.checkCoverage) { - checkCoverage(argv, function (done) { + nyc.maybePurgeSourceMapCache() + if (argv.checkCoverage) { + await nyc.checkCoverage({ + lines: argv.lines, + functions: argv.functions, + branches: argv.branches, + statements: argv.statements + }, argv['per-file']).catch(suppressEPIPE) process.exitCode = process.exitCode || mainChildExitCode + } - if (!argv.silent) report(argv) - return done() - }) - } else { - if (!argv.silent) report(argv) - return done() + if (!argv.silent) { + await nyc.report().catch(suppressEPIPE) + } + } catch (error) { + /* istanbul ignore next */ + process.exitCode = process.exitCode || mainChildExitCode || 1 + /* istanbul ignore next */ + console.error(error.message) } }) -} else { - // I don't have a clue what you're doing. - yargs.showHelp() } -function report (argv) { - process.env.NYC_CWD = process.cwd() - - ;(new NYC({ - reporter: argv.reporter, - reportDir: argv.reportDir - })).report() -} - -function checkCoverage (argv, cb) { - foreground( - process.execPath, - [ - require.resolve('istanbul/lib/cli'), - 'check-coverage', - '--lines=' + argv.lines, - '--functions=' + argv.functions, - '--branches=' + argv.branches, - '--statements=' + argv.statements, - path.resolve(process.cwd(), './.nyc_output/*.json') - ], - cb - ) -} +cliWrapper(main)() diff --git a/bin/wrap.js b/bin/wrap.js index 16372ae3d..ff810a420 100644 --- a/bin/wrap.js +++ b/bin/wrap.js @@ -1,19 +1,4 @@ -var sw = require('spawn-wrap') -var NYC -try { - NYC = require('../index.covered.js') -} catch (e) { - NYC = require('../index.js') -} +'use strict' -;(new NYC({ - require: process.env.NYC_REQUIRE ? process.env.NYC_REQUIRE.split(',') : [], - extension: process.env.NYC_EXTENSION ? process.env.NYC_EXTENSION.split(',') : [], - exclude: process.env.NYC_EXCLUDE ? process.env.NYC_EXCLUDE.split(',') : [], - include: process.env.NYC_INCLUDE ? process.env.NYC_INCLUDE.split(',') : [], - enableCache: process.env.NYC_CACHE === 'enable', - sourceMap: process.env.NYC_SOURCE_MAP === 'enable', - instrumenter: process.env.NYC_INSTRUMENTER -})).wrap() - -sw.runMain() +require('../lib/wrap') +require('spawn-wrap').runMain() diff --git a/build-self-coverage.js b/build-self-coverage.js index 0bf427dc6..42a0fe5d8 100644 --- a/build-self-coverage.js +++ b/build-self-coverage.js @@ -1,22 +1,45 @@ -var istanbul = require('istanbul') -var fs = require('fs') -var path = require('path') - -;[ - 'index.js', - 'lib/source-map-cache.js' -].forEach(function (name) { - var indexPath = path.join(__dirname, name) - var source = fs.readFileSync(indexPath, 'utf8') - - var instrumentor = new istanbul.Instrumenter({ - coverageVariable: '___NYC_SELF_COVERAGE___', - esModules: true, - noAutoWrap: true - }) +'use strict' - var instrumentedSource = instrumentor.instrumentSync(source, indexPath) +const path = require('path') +const fs = require('fs') +const istanbul = require('istanbul-lib-instrument') +const makeDir = require('make-dir') +const glob = require('glob') - var outputPath = path.join(__dirname, name.replace(/\.js$/, '.covered.js')) - fs.writeFileSync(outputPath, instrumentedSource) +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) + + const source = fs.readFileSync(indexPath, 'utf8') + const instrumentedSource = name === 'package.json' ? source : instrumenter.instrumentSync(source, indexPath) + + 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 62d755d8b..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('mkdirp') -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-test.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/instrument.md b/docs/instrument.md new file mode 100644 index 000000000..06126b992 --- /dev/null +++ b/docs/instrument.md @@ -0,0 +1,43 @@ +# Producing instrumented source + +The `nyc instrument` command can produce instrumented source files. +These files are suitable for client side deployment during end to end testing. +You can either pre-instrument your source, or write instrumented source to a stream. + +Run `nyc instrument --help` to display a full list of available command options. + +## Pre-instrumented source + +You can create pre-instrumented 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 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`. + +The `--delete` option will remove the existing output directory before instrumenting. + +The `--in-place` option will allow you to run the instrument command. + +The `--complete-copy` option will copy all remaining files from the `input` directory to the `output` directory. +When using `--complete-copy` nyc will not copy the contents of a `.git` folder to the output directory. + +**Note:** `--complete-copy` will dereference any symlinks during the copy process, this may stop scripts running properly from the output directory. + +## Streaming instrumentation + +`nyc instrument ` will stream instrumented source directly to `stdout` and that output can then be piped to another process. +You can use this behaviour to create a server that dynamically instruments files on request. +The following example shows streaming instrumentation middleware capable of instrumenting files on request. + +```javascript +app.use((req, res, next) => { + const myOptions = "" + const filename = myHelper.getFilename(req) + const nyc = cp.spawn(`nyc instrument ${myOptions} ${filename}`) + nyc.stdout.pipe(res) +}) +``` diff --git a/docs/profiling.md b/docs/profiling.md index 4d0f0709b..5dfbbad12 100644 --- a/docs/profiling.md +++ b/docs/profiling.md @@ -1,70 +1,70 @@ - -## Profiling: +# Profiling: The self-coverage tool can provide a [fairly interesting information on how nyc performs](https://github.com/bcoe/nyc/pull/101#issuecomment-165337057) in real world test suites. Doing this is a bit involved, detailed steps follow. *Note:* This assumes your locally cloned development version of `nyc` is in `/user/dev/nyc`, and that you are profiling against the AVA test suite in `/user/dev/ava`. Adapt as required. -### Initial Setup (NYC) +## Initial Setup (NYC) We must use `npm link`, and ensure we have fresh "self-coverage" scripts generated. ```sh # Go to the local clone of nyc -$ cd /user/dev/nyc +cd /user/dev/nyc # Link the local clone globally -$ npm link +npm link # Create the self-coverage instrumented files -$ node ./build-self-coverage +node ./build-self-coverage ``` -### Initial Setup (Test Project) +## Initial Setup (Test Project) ```sh # CD to the real world test suite you want to profile against -$ cd /user/dev/ava +cd /user/dev/ava # Link the globally linked nyc into your local node_modules -$ npm link nyc +npm link nyc ``` This will likely not work with `tap --coverage`, since tap will try to use it's own older copy of nyc instead of your globally linked one. Modify the test script in your test project so it uses the `nyc` binary directly, and disable `tap`s version with the `--no-cov` flag: - `package.json`: +`package.json`: + +```json +{ + "scripts" : { + "test": "nyc tap --no-cov test/*.js" + } +} +``` - ```json - { - "scripts" : { - "test": "nyc tap --no-cov test/*.js" - } - } - ``` -### Each Run +## Each Run ```sh # Clear existing self coverage (`trash` ~== `rm -rf`) -$ cd /user/dev/nyc -$ trash ./.self_coverage +cd /user/dev/nyc +trash ./.self_coverage # Clear the `.nyc_cache` folder in your test project -$ cd /user/dev/ava -$ trash ./.nyc_cache +cd /user/dev/ava +trash ./.nyc_cache # Run your test suite -$ npm test +npm test # Go back to the `nyc` folder and create a self-coverage report -$ cd /user/dev/nyc -$ npm run report +cd /user/dev/nyc +npm run report ``` A detailed profile of your test run now exists in `/user/dev/nyc/coverage/lcov-report` -*Note: * `trash` is a safer version of `rm -rf`. Install via `npm i -g trash-cli`. [More info](https://github.com/sindresorhus/guides/blob/master/how-not-to-rm-yourself.md). +*Note:* `trash` is a safer version of `rm -rf`. Install via `npm i -g trash-cli`. [More info](https://github.com/sindresorhus/guides/blob/master/how-not-to-rm-yourself.md). -### WARNING: Self coverage can cause some confusing problems. +## WARNING: Self coverage can cause some confusing problems. If `index.covered.js` exists, it will be used instead of the normal file. This means your changes to `index.js` will not have an effect until you recreate or delete the self coverage files. Unless you are trying to do some profiling, you should probably delete them so the regular files are used. @@ -72,9 +72,8 @@ You can delete the self coverage scripts and use the regular ones as follows: ```sh # Go to nyc directory and remove the self coverage scripts -$ cd /user/dev/nyc -$ npm run clean +cd /user/dev/nyc +npm run clean ``` You can rerun `node ./build-self-coverage` scripts as desired to re-enable self-coverage. - diff --git a/docs/setup-codecov.md b/docs/setup-codecov.md new file mode 100644 index 000000000..6d6b2ae4d --- /dev/null +++ b/docs/setup-codecov.md @@ -0,0 +1,38 @@ +# Integrating with codecov.io + +[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](https://docs.codecov.io/docs/browser-extension). + +## Quick start + +Assuming your `npm test` does not run `nyc` and you have the `npx` executable (npm v5.2+), have your CI runner execute the following: + +```shell +npx nyc --reporter=lcov npm test && npx codecov +``` + +## Without `npx` - Travis CI example using npm scripts + +1. add the codecov and nyc dependencies: + + ```shell + npm install codecov nyc --save-dev + ``` + +2. update the scripts in your package.json to include these lines (replace `mocha` with your test runner): + + ```json + { + "scripts": { + "test": "nyc --reporter=lcov mocha", + "coverage": "codecov" + } + } + ``` + +3. For private repos, add the environment variable `CODECOV_TOKEN` to Travis CI. + +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..f5f0dbbbf --- /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 CI. + +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 617791a6d..3164b1d0b 100755 --- a/index.js +++ b/index.js @@ -1,365 +1,546 @@ +'use strict' + /* global __coverage__ */ -var fs = require('fs') -var glob = require('glob') -var mkdirp = require('mkdirp') -var Module = require('module') -var appendTransform = require('append-transform') -var cachingTransform = require('caching-transform') -var path = require('path') -var rimraf = require('rimraf') -var onExit = require('signal-exit') -var resolveFrom = require('resolve-from') -var arrify = require('arrify') -var SourceMapCache = require('./lib/source-map-cache') -var convertSourceMap = require('convert-source-map') -var md5hex = require('md5-hex') -var findCacheDir = require('find-cache-dir') -var js = require('default-require-extensions/js') -var pkgUp = require('pkg-up') -var testExclude = require('test-exclude') -var yargs = require('yargs') + +const cachingTransform = require('caching-transform') +const findCacheDir = require('find-cache-dir') +const fs = require('./lib/fs-promises') +const os = require('os') +const { debuglog, promisify } = require('util') +const glob = promisify(require('glob')) +const Hash = require('./lib/hash') +const libCoverage = require('istanbul-lib-coverage') +const libHook = require('istanbul-lib-hook') +const { ProcessInfo, ProcessDB } = require('istanbul-lib-processinfo') +const mkdirp = require('make-dir') +const Module = require('module') +const onExit = require('signal-exit') +const path = require('path') +const rimraf = promisify(require('rimraf')) +const SourceMaps = require('./lib/source-maps') +const TestExclude = require('test-exclude') +const pMap = require('p-map') +const getPackageType = require('get-package-type') + +const debugLog = debuglog('nyc') + +let selfCoverageHelper /* istanbul ignore next */ -if (/index\.covered\.js$/.test(__filename)) { - require('./lib/self-coverage-helper') +if (/self-coverage/.test(__dirname)) { + selfCoverageHelper = require('../self-coverage-helper') +} else { + // Avoid additional conditional code + selfCoverageHelper = { + onExit () {} + } } -function NYC (opts) { - var config = this._loadConfig(opts || {}) - - this._istanbul = config.istanbul - this.subprocessBin = config.subprocessBin || path.resolve(__dirname, './bin/nyc.js') - this._tempDirectory = config.tempDirectory || './.nyc_output' - this._instrumenterLib = require(config.instrumenter || './lib/instrumenters/istanbul') - this._reportDir = config.reportDir - this._sourceMap = config.sourceMap - this.cwd = config.cwd +function coverageFinder () { + var coverage = global.__coverage__ + if (typeof __coverage__ === 'object') coverage = __coverage__ + if (!coverage) coverage = global.__coverage__ = {} + return coverage +} - this.reporter = arrify(config.reporter || 'text') +class NYC { + constructor (config) { + this.config = { ...config } + + this.subprocessBin = config.subprocessBin || path.resolve(__dirname, './bin/nyc.js') + this._tempDirectory = config.tempDirectory || config.tempDir || './.nyc_output' + this._instrumenterLib = require(config.instrumenter || './lib/instrumenters/istanbul') + this._reportDir = config.reportDir || 'coverage' + this._sourceMap = typeof config.sourceMap === 'boolean' ? config.sourceMap : true + this._showProcessTree = config.showProcessTree || false + this._eagerInstantiation = config.eager || false + this.cwd = config.cwd || process.cwd() + 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 = new TestExclude({ + cwd: this.cwd, + include: config.include, + exclude: config.exclude, + excludeNodeModules: config.excludeNodeModules !== false, + extension: this.extensions + }) - this.cacheDirectory = findCacheDir({name: 'nyc', cwd: this.cwd}) + this.sourceMaps = new SourceMaps({ + cache: this.cache, + cacheDirectory: this.cacheDirectory + }) - this.enableCache = Boolean(this.cacheDirectory && (config.enableCache === true || process.env.NYC_CACHE === 'enable')) + // require extensions can be provided as config in package.json. + this.require = [].concat(config.require || []) - this.exclude = testExclude({ - cwd: this.cwd, - include: config.include, - exclude: config.exclude - }) + this.transforms = this.extensions.reduce((transforms, ext) => { + transforms[ext] = this._createTransform(ext) + return transforms + }, {}) - // require extensions can be provided as config in package.json. - this.require = arrify(config.require) + this.hookRequire = config.hookRequire + this.hookRunInContext = config.hookRunInContext + this.hookRunInThisContext = config.hookRunInThisContext + this.fakeRequire = null - 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.processInfo = new ProcessInfo(Object.assign({}, config._processInfo, { + directory: path.resolve(this.tempDirectory(), 'processinfo') + })) - this.transforms = this.extensions.reduce(function (transforms, ext) { - transforms[ext] = this._createTransform(ext) - return transforms - }.bind(this), {}) + this.hashCache = {} + } - this.sourceMapCache = new SourceMapCache() + _createTransform (ext) { + const opts = { + salt: Hash.salt(this.config), + hashData: (input, metadata) => [metadata.filename], + filenamePrefix: metadata => path.parse(metadata.filename).name + '-', + onHash: (input, metadata, hash) => { + this.hashCache[metadata.filename] = hash + }, + cacheDir: this.cacheDirectory, + // when running --all we should not load source-file from + // cache, we want to instead return the fake source. + disableCache: this._disableCachingTransform(), + ext: ext + } + if (this._eagerInstantiation) { + opts.transform = this._transformFactory(this.cacheDirectory) + } else { + opts.factory = this._transformFactory.bind(this) + } + return cachingTransform(opts) + } - this.hashCache = {} - this.loadedMaps = null -} + _disableCachingTransform () { + return !(this.cache && this.config.isChildProcess) + } -NYC.prototype._loadConfig = function (opts) { - var cwd = opts.cwd || process.env.NYC_CWD || process.cwd() - var pkgPath = pkgUp.sync(cwd) + _loadAdditionalModules () { + if (!this.config.useSpawnWrap || this.require.length === 0) { + return + } - if (pkgPath) { - cwd = path.dirname(pkgPath) + const resolveFrom = require('resolve-from') + 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) + }) } - opts.cwd = cwd + instrumenter () { + return this._instrumenter || (this._instrumenter = this._createInstrumenter()) + } - return yargs([]) - .pkgConf('nyc', cwd) - .default(opts) - .argv -} + _createInstrumenter () { + 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, + parserPlugins: this.config.parserPlugins + }) + } -NYC.prototype._createTransform = function (ext) { - var _this = this - return cachingTransform({ - salt: JSON.stringify({ - istanbul: require('istanbul/package.json').version, - nyc: require('./package.json').version - }), - hash: function (code, metadata, salt) { - var hash = md5hex([code, metadata.filename, salt]) - _this.hashCache[metadata.filename] = hash - return hash - }, - factory: this._transformFactory.bind(this), - cacheDir: this.cacheDirectory, - disableCache: !this.enableCache, - ext: ext - }) -} + addFile (filename) { + const source = this._readTranspiledSource(filename) + this._maybeInstrumentSource(source, filename) + } -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(_this.cwd, r) - if (p) { - require(p) - return + _readTranspiledSource (filePath) { + var source = null + var ext = path.extname(filePath) + if (typeof Module._extensions[ext] === 'undefined') { + ext = '.js' } - // now try other locations, .e.g, the nyc node_modules folder. - require(r) - }) -} + Module._extensions[ext]({ + _compile: function (content, filename) { + source = content + } + }, filePath) + return source + } -NYC.prototype.instrumenter = function () { - return this._instrumenter || (this._instrumenter = this._createInstrumenter()) -} + _getSourceMap (code, filename, hash) { + const sourceMap = {} + if (this._sourceMap) { + sourceMap.sourceMap = this.sourceMaps.extract(code, filename) + sourceMap.registerMap = () => this.sourceMaps.registerMap(filename, hash, sourceMap.sourceMap) + } else { + sourceMap.registerMap = () => {} + } -NYC.prototype._createInstrumenter = function () { - return this._instrumenterLib(this.cwd) -} + return sourceMap + } -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) + async addAllFiles () { + this._loadAdditionalModules() + + this.fakeRequire = true + const files = await this.exclude.glob(this.cwd) + for (const relFile of files) { + const filename = path.resolve(this.cwd, relFile) + const ext = path.extname(filename) + if (ext === '.mjs' || (ext === '.js' && await getPackageType(filename) === 'module')) { + const source = await fs.readFile(filename, 'utf8') + this.instrumenter().instrumentSync( + source, + filename, + this._getSourceMap(source, filename) + ) + } else { + this.addFile(filename) + } + const coverage = coverageFinder() + const lastCoverage = this.instrumenter().lastFileCoverage() + if (lastCoverage) { + coverage[lastCoverage.path] = { + ...lastCoverage, + // Only use this data if we don't have it without `all: true` + all: true + } + } + } + this.fakeRequire = false - return { - instrument: !!instrumentedSource, - relFile: relFile, - content: instrumentedSource || source + this.writeCoverageFile() } -} -NYC.prototype._readTranspiledSource = function (path) { - var source = null - Module._extensions['.js']({ - _compile: function (content, filename) { - source = content + async instrumentAllFiles (input, output) { + let inputDir = '.' + path.sep + const visitor = async relFile => { + const inFile = path.resolve(inputDir, relFile) + const inCode = await fs.readFile(inFile, 'utf-8') + const outCode = this._transform(inCode, inFile) || inCode + + if (output) { + const { mode } = await fs.stat(inFile) + const outFile = path.resolve(output, relFile) + + await mkdirp(path.dirname(outFile)) + await fs.writeFile(outFile, outCode) + await fs.chmod(outFile, mode) + } else { + console.log(outCode) + } } - }, path) - return source -} - -NYC.prototype.addAllFiles = function () { - var _this = this - this._loadAdditionalModules() + this._loadAdditionalModules() + + const stats = await fs.lstat(input) + if (stats.isDirectory()) { + inputDir = input + + const filesToInstrument = await this.exclude.glob(input) + + const concurrency = output ? os.cpus().length : 1 + if (this.config.completeCopy && output) { + const files = await glob(path.resolve(input, '**'), { + dot: true, + nodir: true, + ignore: ['**/.git', '**/.git/**', path.join(output, '**')] + }) + const destDirs = new Set( + files.map(src => path.dirname(path.join(output, path.relative(input, src)))) + ) + + await pMap( + destDirs, + dir => mkdirp(dir), + { concurrency } + ) + await pMap( + files, + src => fs.copyFile(src, path.join(output, path.relative(input, src))), + { concurrency } + ) + } - var pattern = null - if (this.extensions.length === 1) { - pattern = '**/*' + this.extensions[0] - } else { - pattern = '**/*{' + this.extensions.join() + '}' + await pMap(filesToInstrument, visitor, { concurrency }) + } else { + await visitor(input) + } } - glob.sync(pattern, {cwd: this.cwd, nodir: true, ignore: this.exclude.exclude}).forEach(function (filename) { - var obj = _this.addFile(path.join(_this.cwd, filename)) - if (obj.instrument) { - module._compile( - _this.instrumenter().getPreamble(obj.content, obj.relFile), - filename - ) - } - }) + _transform (code, filename) { + const extname = path.extname(filename).toLowerCase() + const transform = this.transforms[extname] || (() => null) - this.writeCoverageFile() -} + return transform(code, { filename }) + } -NYC.prototype._maybeInstrumentSource = function (code, filename, relFile) { - var instrument = this.exclude.shouldInstrument(filename, relFile) + _maybeInstrumentSource (code, filename) { + if (!this.exclude.shouldInstrument(filename)) { + return null + } - if (!instrument) { - return null + return this._transform(code, filename) } - var ext, transform - for (ext in this.transforms) { - if (filename.toLowerCase().substr(-ext.length) === ext) { - transform = this.transforms[ext] - break + maybePurgeSourceMapCache () { + if (!this.cache) { + this.sourceMaps.purgeCache() } } - return transform ? transform(code, {filename: filename, relFile: relFile}) : null -} - -NYC.prototype._transformFactory = function (cacheDir) { - var _this = this - var instrumenter = this.instrumenter() + _transformFactory (cacheDir) { + const instrumenter = this.instrumenter() + let instrumented + + return (code, metadata, hash) => { + const filename = metadata.filename + const sourceMap = this._getSourceMap(code, filename, hash) + + try { + instrumented = instrumenter.instrumentSync(code, filename, sourceMap) + } catch (e) { + debugLog('failed to instrument ' + filename + ' with error: ' + e.stack) + if (this.config.exitOnError) { + console.error('Failed to instrument ' + filename) + process.exit(1) + } else { + instrumented = code + } + } - return function (code, metadata, hash) { - var filename = metadata.filename + if (this.fakeRequire) { + return 'function x () {}' + } else { + return instrumented + } + } + } - if (_this._sourceMap) _this._handleSourceMap(cacheDir, code, hash, filename) + _handleJs (code, options) { + // ensure the path has correct casing (see istanbuljs/nyc#269 and nodejs/node#6624) + const filename = path.resolve(this.cwd, options.filename) + return this._maybeInstrumentSource(code, filename) || code + } - return instrumenter.instrumentSync(code, filename) + _addHook (type) { + const handleJs = this._handleJs.bind(this) + const dummyMatcher = () => true // we do all processing in transformer + libHook['hook' + type](dummyMatcher, handleJs, { extensions: this.extensions }) } -} -NYC.prototype._handleSourceMap = function (cacheDir, code, hash, filename) { - var sourceMap = convertSourceMap.fromSource(code) || convertSourceMap.fromMapFileSource(code, path.dirname(filename)) - if (sourceMap) { - if (hash) { - var mapPath = path.join(cacheDir, hash + '.map') - fs.writeFileSync(mapPath, sourceMap.toJSON()) - } else { - this.sourceMapCache.addMap(filename, sourceMap.toJSON()) + _addRequireHooks () { + if (this.hookRequire) { + this._addHook('Require') + } + if (this.hookRunInContext) { + this._addHook('RunInContext') + } + if (this.hookRunInThisContext) { + this._addHook('RunInThisContext') } } -} -NYC.prototype._handleJs = function (code, filename) { - var relFile = path.relative(this.cwd, filename) - return this._maybeInstrumentSource(code, filename, relFile) || code -} + async createTempDirectory () { + await mkdirp(this.tempDirectory()) + if (this.cache) { + await mkdirp(this.cacheDirectory) + } -NYC.prototype._wrapRequire = function () { - var handleJs = this._handleJs.bind(this) + await mkdirp(this.processInfo.directory) + } - this.extensions.forEach(function (ext) { - require.extensions[ext] = js - appendTransform(handleJs, ext) - }) -} + async reset () { + if (!process.env.NYC_CWD) { + await rimraf(this.tempDirectory()) + } -NYC.prototype.cleanup = function () { - if (!process.env.NYC_CWD) rimraf.sync(this.tempDirectory()) -} + await this.createTempDirectory() + } -NYC.prototype.clearCache = function () { - if (this.enableCache) { - rimraf.sync(this.cacheDirectory) + _wrapExit () { + selfCoverageHelper.registered = true + + // we always want to write coverage + // regardless of how the process exits. + onExit( + () => { + this.writeCoverageFile() + selfCoverageHelper.onExit() + }, + { alwaysLast: true } + ) } -} -NYC.prototype.createTempDirectory = function () { - mkdirp.sync(this.tempDirectory()) -} + wrap (bin) { + process.env.NYC_PROCESS_ID = this.processInfo.uuid + // This is a bug with the spawn-wrap method where + // we cannot force propagation of NYC_PROCESS_ID. + if (!this.config.useSpawnWrap) { + const updateVariable = require('./lib/register-env.js') + updateVariable('NYC_PROCESS_ID') + } + this._addRequireHooks() + this._wrapExit() + this._loadAdditionalModules() + return this + } -NYC.prototype.reset = function () { - this.cleanup() - this.createTempDirectory() -} + writeCoverageFile () { + var coverage = coverageFinder() -NYC.prototype._wrapExit = function () { - var _this = this + // Remove any files that should be excluded but snuck into the coverage + Object.keys(coverage).forEach(function (absFile) { + if (!this.exclude.shouldInstrument(absFile)) { + delete coverage[absFile] + } + }, this) - // we always want to write coverage - // regardless of how the process exits. - onExit(function () { - _this.writeCoverageFile() - }, {alwaysLast: true}) -} + if (this.cache) { + Object.keys(coverage).forEach(function (absFile) { + if (this.hashCache[absFile] && coverage[absFile]) { + coverage[absFile].contentHash = this.hashCache[absFile] + } + }, this) + } -NYC.prototype.wrap = function (bin) { - this._wrapRequire() - this._wrapExit() - this._loadAdditionalModules() - return this -} + var id = this.processInfo.uuid + var coverageFilename = path.resolve(this.tempDirectory(), id + '.json') -NYC.prototype.writeCoverageFile = function () { - var coverage = global.__coverage__ - if (typeof __coverage__ === 'object') coverage = __coverage__ - if (!coverage) return + fs.writeFileSync( + coverageFilename, + JSON.stringify(coverage), + 'utf-8' + ) - if (this.enableCache) { - Object.keys(coverage).forEach(function (absFile) { - if (this.hashCache[absFile] && coverage[absFile]) { - coverage[absFile].contentHash = this.hashCache[absFile] - } - }, this) - } else { - this.sourceMapCache.applySourceMaps(coverage) + this.processInfo.coverageFilename = coverageFilename + this.processInfo.files = Object.keys(coverage) + this.processInfo.saveSync() } - fs.writeFileSync( - path.resolve(this.tempDirectory(), './', process.pid + '.json'), - JSON.stringify(coverage), - 'utf-8' - ) -} - -NYC.prototype.istanbul = function () { - return this._istanbul || (this._istanbul = require('istanbul')) -} + async getCoverageMapFromAllCoverageFiles (baseDirectory) { + const map = libCoverage.createCoverageMap({}) + const files = await this.coverageFiles(baseDirectory) + + await pMap( + files, + async f => { + const report = await this.coverageFileLoad(f, baseDirectory) + map.merge(report) + }, + { concurrency: os.cpus().length } + ) + + map.data = await 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(filename => this.exclude.shouldInstrument(filename)) + } -NYC.prototype.report = function (cb, _collector, _reporter) { - cb = cb || function () {} + return map + } - var istanbul = this.istanbul() - var collector = _collector || new istanbul.Collector() - var reporter = _reporter || new istanbul.Reporter(null, this._reportDir) + async report () { + const libReport = require('istanbul-lib-report') + const reports = require('istanbul-reports') - this._loadReports().forEach(function (report) { - collector.add(report) - }) + const context = libReport.createContext({ + dir: this.reportDirectory(), + watermarks: this.config.watermarks, + coverageMap: await this.getCoverageMapFromAllCoverageFiles() + }) - this.reporter.forEach(function (_reporter) { - reporter.add(_reporter) - }) + this.reporter.forEach((_reporter) => { + reports.create(_reporter, { + skipEmpty: this.config.skipEmpty, + skipFull: this.config.skipFull, + projectRoot: this.cwd, + maxCols: process.stdout.columns || 100 + }).execute(context) + }) - reporter.write(collector, true, cb) -} + if (this._showProcessTree) { + await this.showProcessTree() + } + } -NYC.prototype._loadReports = function () { - var _this = this - var files = fs.readdirSync(this.tempDirectory()) + async writeProcessIndex () { + const db = new ProcessDB(this.processInfo.directory) + await db.writeIndex() + } - var cacheDir = _this.cacheDirectory + async showProcessTree () { + const db = new ProcessDB(this.processInfo.directory) + console.log(await db.renderTree(this)) + } - var loadedMaps = this.loadedMaps || (this.loadedMaps = {}) + async checkCoverage (thresholds, perFile) { + const map = await this.getCoverageMapFromAllCoverageFiles() - return files.map(function (f) { - var report - try { - report = JSON.parse(fs.readFileSync( - path.resolve(_this.tempDirectory(), './', f), - 'utf-8' - )) - } catch (e) { // handle corrupt JSON output. - return {} + if (perFile) { + map.files().forEach(file => { + // ERROR: Coverage for lines (90.12%) does not meet threshold (120%) for index.js + this._checkCoverage(map.fileCoverageFor(file).toSummary(), thresholds, file) + }) + } else { + // ERROR: Coverage for lines (90.12%) does not meet global threshold (120%) + this._checkCoverage(map.getCoverageSummary(), thresholds) } + } - Object.keys(report).forEach(function (absFile) { - var fileReport = report[absFile] - if (fileReport && fileReport.contentHash) { - var hash = fileReport.contentHash - if (!(hash in loadedMaps)) { - try { - var mapPath = path.join(cacheDir, hash + '.map') - loadedMaps[hash] = JSON.parse(fs.readFileSync(mapPath, 'utf8')) - } catch (e) { - // set to false to avoid repeatedly trying to load the map - loadedMaps[hash] = false - } - } - if (loadedMaps[hash]) { - _this.sourceMapCache.addMap(absFile, loadedMaps[hash]) + _checkCoverage (summary, thresholds, file) { + Object.keys(thresholds).forEach(function (key) { + var coverage = summary[key].pct + if (coverage < thresholds[key]) { + process.exitCode = 1 + if (file) { + console.error('ERROR: Coverage for ' + key + ' (' + coverage + '%) does not meet threshold (' + thresholds[key] + '%) for ' + file) + } else { + console.error('ERROR: Coverage for ' + key + ' (' + coverage + '%) does not meet global threshold (' + thresholds[key] + '%)') } } }) - _this.sourceMapCache.applySourceMaps(report) - return report - }) -} + } -NYC.prototype.tempDirectory = function () { - return path.resolve(this.cwd, './', this._tempDirectory) -} + coverageFiles (baseDirectory = this.tempDirectory()) { + return fs.readdir(baseDirectory) + } + + async coverageFileLoad (filename, baseDirectory = this.tempDirectory()) { + try { + const report = JSON.parse(await fs.readFile(path.resolve(baseDirectory, filename)), 'utf8') + await this.sourceMaps.reloadCachedSourceMaps(report) + return report + } catch (error) { + return {} + } + } + + // TODO: Remove from nyc v16 + async coverageData (baseDirectory) { + const files = await this.coverageFiles(baseDirectory) + return pMap( + files, + f => this.coverageFileLoad(f, baseDirectory), + { concurrency: os.cpus().length } + ) + } -NYC.prototype.mungeArgs = function (yargv) { - var argv = process.argv.slice(1) - argv = argv.slice(argv.indexOf(yargv._[0])) - return argv + tempDirectory () { + return path.resolve(this.cwd, this._tempDirectory) + } + + reportDirectory () { + return path.resolve(this.cwd, this._reportDir) + } } module.exports = NYC diff --git a/lib/commands/check-coverage.js b/lib/commands/check-coverage.js new file mode 100644 index 000000000..cc361d16e --- /dev/null +++ b/lib/commands/check-coverage.js @@ -0,0 +1,28 @@ +'use strict' + +const NYC = require('../../index.js') +const { cliWrapper, suppressEPIPE, setupOptions } = require('./helpers.js') + +exports.command = 'check-coverage' + +exports.describe = 'check whether coverage is within thresholds provided' + +exports.builder = function (yargs) { + yargs + .demandCommand(0, 0) + .example('$0 check-coverage --lines 95', "check whether the JSON in nyc's output folder meets the thresholds provided") + + setupOptions(yargs, 'check-coverage') +} + +exports.handler = cliWrapper(async argv => { + process.env.NYC_CWD = process.cwd() + + const nyc = new NYC(argv) + await nyc.checkCoverage({ + lines: argv.lines, + functions: argv.functions, + branches: argv.branches, + statements: argv.statements + }, argv['per-file']).catch(suppressEPIPE) +}) diff --git a/lib/commands/helpers.js b/lib/commands/helpers.js new file mode 100644 index 000000000..92e09242b --- /dev/null +++ b/lib/commands/helpers.js @@ -0,0 +1,74 @@ +'use strict' + +const decamelize = require('decamelize') +const schema = require('@istanbuljs/schema') + +/* These options still need to be connected to the instrumenter + * Disabling them for now also avoids the issue with OSX cutting + * off the error help screen at 8192 characters. + */ +const blockOptions = [ + 'coverageVariable', + 'coverageGlobalScope', + 'coverageGlobalScopeFunc' +] + +module.exports = { + setupOptions (yargs, command, cwd) { + Object.entries(schema.nyc.properties).forEach(([name, setup]) => { + if (blockOptions.includes(name)) { + return + } + + const option = { + description: setup.description, + default: setup.default, + type: setup.type + } + + if (name === 'cwd') { + if (command !== null) { + return + } + + option.default = cwd + option.global = true + } + + if (option.type === 'array') { + option.type = 'string' + } + + if ('nycAlias' in setup) { + option.alias = setup.nycAlias + } + + const optionName = decamelize(name, '-') + yargs.option(optionName, option) + if (!setup.nycCommands.includes(command)) { + yargs.hide(optionName) + } + }) + }, + /* istanbul ignore next: unsure how to test this */ + suppressEPIPE (error) { + /* Prevent dumping error when `nyc npm t|head` causes stdout to + * be closed when reporting runs. */ + if (error.code !== 'EPIPE') { + throw error + } + }, + cliWrapper (execute) { + return argv => { + execute(argv).catch(error => { + try { + console.error(error.message) + } catch (_) { + /* We need to run process.exit(1) even if stderr is destroyed */ + } + + process.exit(1) + }) + } + } +} diff --git a/lib/commands/instrument.js b/lib/commands/instrument.js new file mode 100644 index 000000000..cabb43775 --- /dev/null +++ b/lib/commands/instrument.js @@ -0,0 +1,63 @@ +'use strict' + +const NYC = require('../../index.js') +const path = require('path') +const { promisify } = require('util') +const resolveFrom = require('resolve-from') +const rimraf = promisify(require('rimraf')) +const { cliWrapper, setupOptions } = require('./helpers.js') + +exports.command = 'instrument [output]' + +exports.describe = 'instruments a file or a directory tree and writes the instrumented code to the desired output location' + +exports.builder = function (yargs) { + yargs + .demandCommand(0, 0) + .example('$0 instrument ./lib ./output', 'instrument all .js files in ./lib with coverage and output in ./output') + + setupOptions(yargs, 'instrument') +} + +exports.handler = cliWrapper(async argv => { + if (argv.output && !argv.inPlace && (path.resolve(argv.cwd, argv.input) === path.resolve(argv.cwd, argv.output))) { + throw new Error('cannot instrument files in place, must differ from . Set \'--in-place\' to force') + } + + if (path.relative(argv.cwd, path.resolve(argv.cwd, argv.input)).startsWith('..')) { + throw new Error('cannot instrument files outside project root directory') + } + + if (argv.delete && argv.inPlace) { + throw new Error('cannot use \'--delete\' when instrumenting files in place') + } + + if (argv.delete && argv.output && argv.output.length !== 0) { + const relPath = path.relative(process.cwd(), path.resolve(argv.output)) + if (relPath !== '' && !relPath.startsWith('..')) { + await rimraf(argv.output) + } else { + throw new Error(`attempt to delete '${process.cwd()}' or containing directory.`) + } + } + + // If instrument is set to false enable a noop instrumenter. + argv.instrumenter = (argv.instrument) + ? './lib/instrumenters/istanbul' + : './lib/instrumenters/noop' + + if (argv.inPlace) { + argv.output = argv.input + argv.completeCopy = false + } + + const nyc = new NYC(argv) + if (!argv.useSpawnWrap) { + nyc.require.forEach(requireModule => { + const mod = resolveFrom.silent(nyc.cwd, requireModule) || requireModule + require(mod) + }) + } + + await nyc.instrumentAllFiles(argv.input, argv.output) +}) diff --git a/lib/commands/merge.js b/lib/commands/merge.js new file mode 100644 index 000000000..0aefd11ec --- /dev/null +++ b/lib/commands/merge.js @@ -0,0 +1,46 @@ +'use strict' +const path = require('path') +const makeDir = require('make-dir') +const fs = require('../fs-promises') +const { cliWrapper, setupOptions } = require('./helpers.js') + +const NYC = require('../../index.js') + +exports.command = 'merge [output-file]' + +exports.describe = 'merge istanbul format coverage output in a given folder' + +exports.builder = function (yargs) { + yargs + .demandCommand(0, 0) + .example('$0 merge ./out coverage.json', 'merge together reports in ./out and output as coverage.json') + .positional('input-directory', { + describe: 'directory containing multiple istanbul coverage files', + type: 'text', + default: './.nyc_output' + }) + .positional('output-file', { + describe: 'file to output combined istanbul format coverage to', + type: 'text', + default: 'coverage.json' + }) + + setupOptions(yargs, 'merge') + yargs.default('exclude-after-remap', false) +} + +exports.handler = cliWrapper(async argv => { + process.env.NYC_CWD = process.cwd() + const nyc = new NYC(argv) + const inputStat = await fs.stat(argv.inputDirectory).catch(error => { + throw new Error(`failed access input directory ${argv.inputDirectory} with error:\n\n${error.message}`) + }) + + if (!inputStat.isDirectory()) { + throw new Error(`${argv.inputDirectory} was not a directory`) + } + await makeDir(path.dirname(argv.outputFile)) + const map = await nyc.getCoverageMapFromAllCoverageFiles(argv.inputDirectory) + await fs.writeFile(argv.outputFile, JSON.stringify(map, null, 2), 'utf8') + console.info(`coverage files in ${argv.inputDirectory} merged into ${argv.outputFile}`) +}) diff --git a/lib/commands/report.js b/lib/commands/report.js new file mode 100644 index 000000000..6efb44166 --- /dev/null +++ b/lib/commands/report.js @@ -0,0 +1,30 @@ +'use strict' + +const NYC = require('../../index.js') +const { cliWrapper, suppressEPIPE, setupOptions } = require('./helpers.js') + +exports.command = 'report' + +exports.describe = 'run coverage report for .nyc_output' + +exports.builder = function (yargs) { + yargs + .demandCommand(0, 0) + .example('$0 report --reporter=lcov', 'output an HTML lcov report to ./coverage') + + setupOptions(yargs, 'report') +} + +exports.handler = cliWrapper(async argv => { + process.env.NYC_CWD = process.cwd() + var nyc = new NYC(argv) + await nyc.report().catch(suppressEPIPE) + if (argv.checkCoverage) { + await nyc.checkCoverage({ + lines: argv.lines, + functions: argv.functions, + branches: argv.branches, + statements: argv.statements + }, argv['per-file']).catch(suppressEPIPE) + } +}) diff --git a/lib/config-util.js b/lib/config-util.js new file mode 100644 index 000000000..883a12caa --- /dev/null +++ b/lib/config-util.js @@ -0,0 +1,65 @@ +'use strict' + +const path = require('path') +const findUp = require('find-up') +const Yargs = require('yargs/yargs') + +const { setupOptions } = require('./commands/helpers') +const processArgs = require('./process-args') +const { loadNycConfig } = require('@istanbuljs/load-nyc-config') + +async function guessCWD (cwd) { + cwd = cwd || process.env.NYC_CWD || process.cwd() + const pkgPath = await findUp('package.json', { cwd }) + if (pkgPath) { + cwd = path.dirname(pkgPath) + } + + return cwd +} + +async function processConfig (cwd) { + cwd = await guessCWD(cwd) + const yargs = Yargs([]) + .usage('$0 [command] [options]') + .usage('$0 [options] [bin-to-instrument]') + .showHidden(false) + + setupOptions(yargs, null, cwd) + + yargs + .example('$0 npm test', 'instrument your tests with coverage') + .example('$0 --require @babel/register npm test', 'instrument your tests with coverage and transpile with Babel') + .example('$0 report --reporter=text-lcov', 'output lcov report after running your tests') + .epilog('visit https://git.io/vHysA for list of available reporters') + .boolean('h') + .boolean('version') + .help(false) + .version(false) + + const instrumenterArgs = processArgs.hideInstrumenteeArgs() + + // This yargs.parse must come before any options that exit post-hoc + const childArgs = processArgs.hideInstrumenterArgs(yargs.parse(process.argv.slice(2))) + const config = await loadNycConfig(yargs.parse(instrumenterArgs)) + + yargs + .config(config) + .help('h') + .alias('h', 'help') + .version() + .command(require('./commands/check-coverage')) + .command(require('./commands/instrument')) + .command(require('./commands/report')) + .command(require('./commands/merge')) + + return { + get argv () { + return yargs.parse(instrumenterArgs) + }, + childArgs, + yargs + } +} + +module.exports = processConfig diff --git a/lib/fs-promises.js b/lib/fs-promises.js new file mode 100644 index 000000000..b67ebb1c2 --- /dev/null +++ b/lib/fs-promises.js @@ -0,0 +1,51 @@ +'use strict' + +const fs = require('fs') + +const { promisify } = require('util') + +module.exports = { ...fs } + +// Promisify all functions for consistency +const fns = [ + 'access', + 'appendFile', + 'chmod', + 'chown', + 'close', + 'copyFile', + 'fchmod', + 'fchown', + 'fdatasync', + 'fstat', + 'fsync', + 'ftruncate', + 'futimes', + 'lchmod', + 'lchown', + 'link', + 'lstat', + 'mkdir', + 'mkdtemp', + 'open', + 'read', + 'readdir', + 'readFile', + 'readlink', + 'realpath', + 'rename', + 'rmdir', + 'stat', + 'symlink', + 'truncate', + 'unlink', + 'utimes', + 'write', + 'writeFile' +] +fns.forEach(fn => { + /* istanbul ignore else: all functions exist on OSX */ + if (fs[fn]) { + module.exports[fn] = promisify(fs[fn]) + } +}) diff --git a/lib/hash.js b/lib/hash.js new file mode 100644 index 000000000..ebf6c7d3a --- /dev/null +++ b/lib/hash.js @@ -0,0 +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 (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 12a22a628..299f9bfea 100644 --- a/lib/instrumenters/istanbul.js +++ b/lib/instrumenters/istanbul.js @@ -1,23 +1,44 @@ -var fs = require('fs') -var path = require('path') +'use strict' -function InstrumenterIstanbul (cwd) { - var configFile = path.resolve(cwd, './.istanbul.yml') +function InstrumenterIstanbul (options) { + const { createInstrumenter } = require('istanbul-lib-instrument') + const convertSourceMap = require('convert-source-map') - if (!fs.existsSync(configFile)) configFile = undefined - var istanbul = InstrumenterIstanbul.istanbul() - var instrumenterConfig = istanbul.config.loadFile(configFile).instrumentation.config - - return new istanbul.Instrumenter({ + const instrumenter = createInstrumenter({ + autoWrap: true, coverageVariable: '__coverage__', - embedSource: instrumenterConfig['embed-source'], - noCompact: !instrumenterConfig.compact, - preserveComments: instrumenterConfig['preserve-comments'] + embedSource: true, + compact: options.compact, + preserveComments: options.preserveComments, + produceSourceMap: options.produceSourceMap, + ignoreClassMethods: options.ignoreClassMethods, + esModules: options.esModules, + parserPlugins: options.parserPlugins }) -} -InstrumenterIstanbul.istanbul = function () { - return InstrumenterIstanbul._istanbul || (InstrumenterIstanbul._istanbul = require('istanbul')) + return { + instrumentSync (code, filename, { sourceMap, registerMap }) { + var instrumented = instrumenter.instrumentSync(code, filename, sourceMap) + if (instrumented !== code) { + registerMap() + } + + // the instrumenter can optionally produce source maps, + // this is useful for features like remapping stack-traces. + if (options.produceSourceMap) { + var lastSourceMap = instrumenter.lastSourceMap() + /* istanbul ignore else */ + if (lastSourceMap) { + instrumented += '\n' + convertSourceMap.fromObject(lastSourceMap).toComment() + } + } + + return instrumented + }, + lastFileCoverage () { + return instrumenter.lastFileCoverage() + } + } } module.exports = InstrumenterIstanbul diff --git a/lib/instrumenters/noop.js b/lib/instrumenters/noop.js index 3159e4870..b0c9f70f9 100644 --- a/lib/instrumenters/noop.js +++ b/lib/instrumenters/noop.js @@ -1,7 +1,20 @@ +'use strict' + function NOOP () { + const { readInitialCoverage } = require('istanbul-lib-instrument') + return { - instrumentSync: function (code) { + instrumentSync (code, filename) { + const extracted = readInitialCoverage(code) + if (extracted) { + this.fileCoverage = extracted.coverageData + } else { + this.fileCoverage = null + } return code + }, + lastFileCoverage () { + return this.fileCoverage } } } diff --git a/lib/process-args.js b/lib/process-args.js new file mode 100644 index 000000000..60f5e5e5c --- /dev/null +++ b/lib/process-args.js @@ -0,0 +1,39 @@ +'use strict' + +const { Parser } = require('yargs/yargs') +const commands = [ + 'report', + 'check-coverage', + 'instrument', + 'merge' +] + +module.exports = { + // don't pass arguments that are meant + // for nyc to the bin being instrumented. + hideInstrumenterArgs: function (yargv) { + var argv = process.argv.slice(1) + argv = argv.slice(argv.indexOf(yargv._[0])) + if (argv[0][0] === '-') { + argv.unshift(process.execPath) + } + return argv + }, + // don't pass arguments for the bin being + // instrumented to nyc. + hideInstrumenteeArgs: function () { + var argv = process.argv.slice(2) + var yargv = Parser(argv) + if (!yargv._.length) return argv + for (var i = 0, command; (command = yargv._[i]) !== undefined; i++) { + if (~commands.indexOf(command)) return argv + } + + // drop all the arguments after the bin being + // instrumented by nyc. + argv = argv.slice(0, argv.indexOf(yargv._[0])) + argv.push(yargv._[0]) + + return argv + } +} diff --git a/lib/register-env.js b/lib/register-env.js new file mode 100644 index 000000000..a91ec5c27 --- /dev/null +++ b/lib/register-env.js @@ -0,0 +1,27 @@ +'use strict' + +const processOnSpawn = require('process-on-spawn') + +const envToCopy = {} + +processOnSpawn.addListener(({ env }) => { + Object.assign(env, envToCopy) +}) + +const copyAtLoad = [ + 'NYC_CONFIG', + 'NYC_CWD', + 'NYC_PROCESS_ID', + 'BABEL_DISABLE_CACHE', + 'NYC_PROCESS_ID' +] + +for (const env of copyAtLoad) { + if (env in process.env) { + envToCopy[env] = process.env[env] + } +} + +module.exports = function updateVariable (envName) { + envToCopy[envName] = process.env[envName] +} diff --git a/lib/self-coverage-helper.js b/lib/self-coverage-helper.js deleted file mode 100644 index ccea1db89..000000000 --- a/lib/self-coverage-helper.js +++ /dev/null @@ -1,20 +0,0 @@ -/* global ___NYC_SELF_COVERAGE___ */ - -var path = require('path') -var fs = require('fs') -var mkdirp = require('mkdirp') -var onExit = require('signal-exit') - -onExit(function () { - var coverage = global.___NYC_SELF_COVERAGE___ - if (typeof ___NYC_SELF_COVERAGE___ === 'object') coverage = ___NYC_SELF_COVERAGE___ - if (!coverage) return - - var selfCoverageDir = path.join(__dirname, '../.self_coverage') - mkdirp.sync(selfCoverageDir) - fs.writeFileSync( - path.join(selfCoverageDir, process.pid + '.json'), - JSON.stringify(coverage), - 'utf-8' - ) -}) diff --git a/lib/source-map-cache.js b/lib/source-map-cache.js deleted file mode 100644 index fbfd8dea6..000000000 --- a/lib/source-map-cache.js +++ /dev/null @@ -1,187 +0,0 @@ -var path = require('path') -var SourceMapConsumer = require('source-map').SourceMapConsumer - -function SourceMapCache () { - this.cache = {} -} - -SourceMapCache.prototype.addMap = function (absFile, map) { - this.cache[absFile] = new SourceMapConsumer(map) -} - -SourceMapCache.prototype.applySourceMaps = function (report) { - var _this = this - - Object.keys(report).forEach(function (absFile) { - var sourceMap = _this.cache[absFile] - if (!sourceMap) { - return - } - - var fileReport = report[absFile] - _this._rewritePath(report, fileReport, sourceMap) - _this._rewriteStatements(fileReport, sourceMap) - _this._rewriteFunctions(fileReport, sourceMap) - _this._rewriteBranches(fileReport, sourceMap) - }) -} - -// Istanbul occasionally reports invalid positions. Correct them before they're -// fed to the source-map consumer. -function clampPosition (pos) { - var line = pos.line - var column = pos.column - return { - // According to - // - // lines start at 1 and columns at 0. - line: Math.max(1, line), - column: Math.max(0, column) - } -} - -function discardPosition (pos) { - return !pos || !pos.source || pos.line === null || pos.column === null -} - -// Maps the coverage location based on the source map. Adapted from getMapping() -// in remap-istanbul: -// . -function mapLocation (sourceMap, location) { - var clampedStart = clampPosition(location.start) - var clampedEnd = clampPosition(location.end) - - var start = sourceMap.originalPositionFor(clampedStart) - var end = sourceMap.originalPositionFor(clampedEnd) - - /* istanbul ignore if: edge case too hard to test for */ - if (discardPosition(start) || discardPosition(end) || start.source !== end.source) { - return null - } - - if (start.line === end.line && start.column === end.column) { - end = sourceMap.originalPositionFor({ - line: clampedEnd.line, - column: clampedEnd.column, - bias: 2 - }) - - /* istanbul ignore if: edge case too hard to test for */ - if (discardPosition(end)) { - return null - } - - end.column = end.column - 1 - } - - var mapped = { - start: { - line: start.line, - column: start.column - }, - end: { - line: end.line, - column: end.column - } - } - if (location.skip === true) { - mapped.skip = true - } - return mapped -} - -SourceMapCache.prototype._rewritePath = function (report, fileReport, sourceMap) { - // only rewrite the path if the file comes from a single source - if (sourceMap.sources.length !== 1) return - - var originalPath = path.resolve(path.dirname(fileReport.path), sourceMap.sources[0]) - report[fileReport.path] = undefined // Hack for Windows tests, until we can normalize paths. - delete report[fileReport.path] - - fileReport.path = originalPath - report[originalPath] = fileReport -} - -SourceMapCache.prototype._rewriteStatements = function (fileReport, sourceMap) { - var s = {} - var statementMap = {} - var index = 1 - - Object.keys(fileReport.statementMap).forEach(function (k) { - var mapped = mapLocation(sourceMap, fileReport.statementMap[k]) - if (mapped) { - s[index + ''] = fileReport.s[k] - statementMap[index + ''] = mapped - index++ - } - }) - - fileReport.statementMap = statementMap - fileReport.s = s -} - -SourceMapCache.prototype._rewriteFunctions = function (fileReport, sourceMap) { - var f = {} - var fnMap = {} - var index = 1 - - Object.keys(fileReport.fnMap).forEach(function (k) { - var item = fileReport.fnMap[k] - var mapped = mapLocation(sourceMap, item.loc) - if (mapped) { - f[index + ''] = fileReport.f[k] - fnMap[index + ''] = { - name: item.name, - line: mapped.start.line, - loc: mapped - } - if (item.skip === true) { - fnMap[index + ''].skip = true - } - index++ - } - }) - - fileReport.fnMap = fnMap - fileReport.f = f -} - -SourceMapCache.prototype._rewriteBranches = function (fileReport, sourceMap) { - var b = {} - var branchMap = {} - var index = 1 - - Object.keys(fileReport.branchMap).forEach(function (k) { - var item = fileReport.branchMap[k] - var locations = [] - - item.locations.every(function (location) { - var mapped = mapLocation(sourceMap, location) - if (mapped) { - locations.push(mapped) - return true - } - }) - - if (locations.length > 0) { - b[index + ''] = fileReport.b[k] - - /* istanbul ignore next: hard to test for edge-case, - counts for more statements than exist post remapping */ - while (b[index + ''].length > locations.length) b[index + ''].pop() - - branchMap[index + ''] = { - line: locations[0].start.line, - type: item.type, - locations: locations - } - - index++ - } - }) - - fileReport.branchMap = branchMap - fileReport.b = b -} - -module.exports = SourceMapCache diff --git a/lib/source-maps.js b/lib/source-maps.js new file mode 100644 index 000000000..8a3914cdf --- /dev/null +++ b/lib/source-maps.js @@ -0,0 +1,84 @@ +'use strict' + +const convertSourceMap = require('convert-source-map') +const libCoverage = require('istanbul-lib-coverage') +const libSourceMaps = require('istanbul-lib-source-maps') +const fs = require('./fs-promises') +const os = require('os') +const path = require('path') +const pMap = require('p-map') + +class SourceMaps { + constructor (opts) { + this.cache = opts.cache + this.cacheDirectory = opts.cacheDirectory + this.loadedMaps = {} + this._sourceMapCache = libSourceMaps.createSourceMapStore() + } + + cachedPath (source, hash) { + return path.join( + this.cacheDirectory, + `${path.parse(source).name}-${hash}.map` + ) + } + + purgeCache () { + this._sourceMapCache = libSourceMaps.createSourceMapStore() + this.loadedMaps = {} + } + + extract (code, filename) { + const sourceMap = convertSourceMap.fromSource(code) || convertSourceMap.fromMapFileSource(code, path.dirname(filename)) + return sourceMap ? sourceMap.toObject() : undefined + } + + registerMap (filename, hash, sourceMap) { + if (!sourceMap) { + return + } + + if (this.cache && hash) { + const mapPath = this.cachedPath(filename, hash) + fs.writeFileSync(mapPath, JSON.stringify(sourceMap)) + } else { + this._sourceMapCache.registerMap(filename, sourceMap) + } + } + + async remapCoverage (obj) { + const transformed = await this._sourceMapCache.transformCoverage( + libCoverage.createCoverageMap(obj) + ) + return transformed.data + } + + async reloadCachedSourceMaps (report) { + await pMap( + Object.entries(report), + async ([absFile, fileReport]) => { + if (!fileReport || !fileReport.contentHash) { + return + } + + const hash = fileReport.contentHash + if (!(hash in this.loadedMaps)) { + try { + const mapPath = this.cachedPath(absFile, hash) + this.loadedMaps[hash] = JSON.parse(await fs.readFile(mapPath, 'utf8')) + } catch (e) { + // set to false to avoid repeatedly trying to load the map + this.loadedMaps[hash] = false + } + } + + if (this.loadedMaps[hash]) { + this._sourceMapCache.registerMap(absFile, this.loadedMaps[hash]) + } + }, + { concurrency: os.cpus().length } + ) + } +} + +module.exports = SourceMaps diff --git a/lib/wrap.js b/lib/wrap.js new file mode 100644 index 000000000..cf30637f4 --- /dev/null +++ b/lib/wrap.js @@ -0,0 +1,28 @@ +'use strict' + +const NYC = require('../index.js') + +const config = JSON.parse( + process.env.NYC_CONFIG || + /* istanbul ignore next */ '{}' +) + +config.isChildProcess = true + +config._processInfo = { + pid: process.pid, + ppid: process.ppid, + parent: process.env.NYC_PROCESS_ID || null +} + +if (process.env.NYC_PROCESSINFO_EXTERNAL_ID) { + config._processInfo.externalId = process.env.NYC_PROCESSINFO_EXTERNAL_ID + delete process.env.NYC_PROCESSINFO_EXTERNAL_ID +} + +if (process.env.NYC_CONFIG_OVERRIDE) { + Object.assign(config, JSON.parse(process.env.NYC_CONFIG_OVERRIDE)) + process.env.NYC_CONFIG = JSON.stringify(config) +} + +;(new NYC(config)).wrap() diff --git a/npm-run-clean.js b/npm-run-clean.js new file mode 100644 index 000000000..589dac3eb --- /dev/null +++ b/npm-run-clean.js @@ -0,0 +1,19 @@ +#!/usr/bin/env node +'use strict' + +const { promisify } = require('util') +const rimraf = promisify(require('rimraf')) + +Promise.all([ + '**/.nyc_output', + 'node_modules/.cache', + '.self_coverage', + 'test/**/.cache', + 'test/fixtures/cli/coverage', + 'test/fixtures/cli/fakebin/node', + 'test/fixtures/cli/fakebin/npm', + 'test/fixtures/cli/foo-cache', + 'test/fixtures/cli/nyc-config-js/node_modules', + 'test/temp-dir-*', + 'self-coverage' +].map(f => rimraf(f, { cwd: __dirname }))) diff --git a/nyc.config.js b/nyc.config.js new file mode 100644 index 000000000..eedda3dd0 --- /dev/null +++ b/nyc.config.js @@ -0,0 +1,22 @@ +'use strict' + +const isWindows = require('is-windows')() + +module.exports = { + exclude: [ + 'coverage', + 'self-coverage', + 'test/fixtures/coverage.js', + 'test/build/*', + 'test/src/*', + 'test/nyc.js', + 'test/process-args.js', + 'test/fixtures/_generateCoverage.js' + ], + /* Unknown why we don't get 100% coverage on Windows. */ + 'check-coverage': !isWindows, + branches: 100, + functions: 100, + lines: 100, + statements: 100 +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..fed4a9487 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,7376 @@ +{ + "name": "nyc", + "version": "15.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/core": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.6.tgz", + "integrity": "sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.9.6", + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helpers": "^7.9.6", + "@babel/parser": "^7.9.6", + "@babel/template": "^7.8.6", + "@babel/traverse": "^7.9.6", + "@babel/types": "^7.9.6", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.13", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "@babel/generator": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.6.tgz", + "integrity": "sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ==", + "requires": { + "@babel/types": "^7.9.6", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz", + "integrity": "sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==", + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.9.5" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", + "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-module-imports": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", + "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-module-transforms": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", + "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==", + "requires": { + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", + "@babel/helper-simple-access": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/template": "^7.8.6", + "@babel/types": "^7.9.0", + "lodash": "^4.17.13" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", + "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-replace-supers": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.9.6.tgz", + "integrity": "sha512-qX+chbxkbArLyCImk3bWV+jB5gTNU/rsze+JlcF6Nf8tVTigPJSI1o1oBow/9Resa1yehUO9lIipsmu9oG4RzA==", + "requires": { + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/traverse": "^7.9.6", + "@babel/types": "^7.9.6" + } + }, + "@babel/helper-simple-access": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", + "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", + "requires": { + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==" + }, + "@babel/helpers": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.6.tgz", + "integrity": "sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw==", + "requires": { + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.9.6", + "@babel/types": "^7.9.6" + } + }, + "@babel/highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.6.tgz", + "integrity": "sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q==" + }, + "@babel/template": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", + "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" + } + }, + "@babel/traverse": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.6.tgz", + "integrity": "sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.9.6", + "@babel/helper-function-name": "^7.9.5", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.9.6", + "@babel/types": "^7.9.6", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "@babel/types": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz", + "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==", + "requires": { + "@babel/helper-validator-identifier": "^7.9.5", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "@istanbuljs/load-nyc-config": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz", + "integrity": "sha512-ZR0rq/f/E4f4XcgnDvtMWXCUJpi8eO0rssVhmztsZqLIEFA9UUP9zmpE0VxlM+kv/E1ul2I876Fwil2ayptDVg==", + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + } + }, + "@istanbuljs/schema": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", + "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==" + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" + }, + "@types/minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=", + "dev": true + }, + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "dev": true + }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "acorn": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", + "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", + "dev": true + }, + "acorn-jsx": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "dev": true + }, + "add-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", + "integrity": "sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=", + "dev": true + }, + "aggregate-error": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ajv": { + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "any-path": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-path/-/any-path-1.3.0.tgz", + "integrity": "sha1-nHb+94IunqVs5snZMUX5cxfpvPk=", + "dev": true + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "append-transform": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "requires": { + "default-require-extensions": "^3.0.0" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", + "dev": true + }, + "array-includes": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", + "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0", + "is-string": "^1.0.5" + } + }, + "arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async-hook-domain": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/async-hook-domain/-/async-hook-domain-1.1.3.tgz", + "integrity": "sha512-ZovMxSbADV3+biB7oR1GL5lGyptI24alp0LWHlmz1OFc5oL47pz3EiIF6nXOkDW7yLqih4NtsiYduzdDW0i+Wg==", + "dev": true, + "requires": { + "source-map-support": "^0.5.11" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", + "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true + }, + "bind-obj-methods": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-2.0.0.tgz", + "integrity": "sha512-3/qRXczDi2Cdbz6jE+W3IflJOutRVica8frpBn14de1mBOkzDo+6tY33kNhvkw54Kn3PzRRD2VnGbGPcTAk4sw==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "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 + }, + "caching-transform": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "requires": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "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": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "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.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "chokidar": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", + "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.4.0" + } + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "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": { + "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.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "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.4", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.4.tgz", + "integrity": "sha512-sq2sWtrqKPkEXAC8tEJA1+BqAH9GbFkGBtUOqrUX57VSfwp8xyktctk+uLoRy5eccTdxzDcVIztlYDpKs3Jv1Q==", + "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": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.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": "3.1.18", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.18.tgz", + "integrity": "sha512-aN6a3rjgV8qwAJj3sC/Lme2kvswWO7fFSGQc32gREcwIOsaiqBaO6f2p0NomFaPDnTqZ+mMZFLL3hlzvEnZ0mQ==", + "dev": true, + "requires": { + "conventional-changelog-angular": "^5.0.6", + "conventional-changelog-atom": "^2.0.3", + "conventional-changelog-codemirror": "^2.0.3", + "conventional-changelog-conventionalcommits": "^4.2.3", + "conventional-changelog-core": "^4.1.4", + "conventional-changelog-ember": "^2.0.4", + "conventional-changelog-eslint": "^3.0.4", + "conventional-changelog-express": "^2.0.1", + "conventional-changelog-jquery": "^3.0.6", + "conventional-changelog-jshint": "^2.0.3", + "conventional-changelog-preset-loader": "^2.3.0" + } + }, + "conventional-changelog-angular": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.10.tgz", + "integrity": "sha512-k7RPPRs0vp8+BtPsM9uDxRl6KcgqtCJmzRD1wRtgqmhQ96g8ifBGo9O/TZBG23jqlXS/rg8BKRDELxfnQQGiaA==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "q": "^1.5.1" + } + }, + "conventional-changelog-atom": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-2.0.7.tgz", + "integrity": "sha512-7dOREZwzB+tCEMjRTDfen0OHwd7vPUdmU0llTy1eloZgtOP4iSLVzYIQqfmdRZEty+3w5Jz+AbhfTJKoKw1JeQ==", + "dev": true, + "requires": { + "q": "^1.5.1" + } + }, + "conventional-changelog-codemirror": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.7.tgz", + "integrity": "sha512-Oralk1kiagn3Gb5cR5BffenWjVu59t/viE6UMD/mQa1hISMPkMYhJIqX+CMeA1zXgVBO+YHQhhokEj99GP5xcg==", + "dev": true, + "requires": { + "q": "^1.5.1" + } + }, + "conventional-changelog-config-spec": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-config-spec/-/conventional-changelog-config-spec-2.1.0.tgz", + "integrity": "sha512-IpVePh16EbbB02V+UA+HQnnPIohgXvJRxHcS5+Uwk4AT5LjzCZJm5sp/yqs5C6KZJ1jMsV4paEV13BN1pvDuxQ==", + "dev": true + }, + "conventional-changelog-conventionalcommits": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.2.3.tgz", + "integrity": "sha512-atGa+R4vvEhb8N/8v3IoW59gCBJeeFiX6uIbPu876ENAmkMwsenyn0R21kdDHJFLQdy6zW4J6b4xN8KI3b9oww==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "lodash": "^4.17.15", + "q": "^1.5.1" + } + }, + "conventional-changelog-core": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.1.7.tgz", + "integrity": "sha512-UBvSrQR2RdKbSQKh7RhueiiY4ZAIOW3+CSWdtKOwRv+KxIMNFKm1rOcGBFx0eA8AKhGkkmmacoTWJTqyz7Q0VA==", + "dev": true, + "requires": { + "add-stream": "^1.0.0", + "conventional-changelog-writer": "^4.0.16", + "conventional-commits-parser": "^3.1.0", + "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": "^4.0.0", + "lodash": "^4.17.15", + "normalize-package-data": "^2.3.5", + "q": "^1.5.1", + "read-pkg": "^3.0.0", + "read-pkg-up": "^3.0.0", + "shelljs": "^0.8.3", + "through2": "^3.0.0" + }, + "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" + } + }, + "git-semver-tags": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-4.0.0.tgz", + "integrity": "sha512-LajaAWLYVBff+1NVircURJFL8TQ3EMIcLAfHisWYX/nPoMwnTYfWAznQDmMujlLqoD12VtLmoSrF1sQ5MhimEQ==", + "dev": true, + "requires": { + "meow": "^7.0.0", + "semver": "^6.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.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" + } + }, + "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 + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "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" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "conventional-changelog-ember": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.8.tgz", + "integrity": "sha512-JEMEcUAMg4Q9yxD341OgWlESQ4gLqMWMXIWWUqoQU8yvTJlKnrvcui3wk9JvnZQyONwM2g1MKRZuAjKxr8hAXA==", + "dev": true, + "requires": { + "q": "^1.5.1" + } + }, + "conventional-changelog-eslint": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.8.tgz", + "integrity": "sha512-5rTRltgWG7TpU1PqgKHMA/2ivjhrB+E+S7OCTvj0zM/QGg4vmnVH67Vq/EzvSNYtejhWC+OwzvDrLk3tqPry8A==", + "dev": true, + "requires": { + "q": "^1.5.1" + } + }, + "conventional-changelog-express": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-2.0.5.tgz", + "integrity": "sha512-pW2hsjKG+xNx/Qjof8wYlAX/P61hT5gQ/2rZ2NsTpG+PgV7Rc8RCfITvC/zN9K8fj0QmV6dWmUefCteD9baEAw==", + "dev": true, + "requires": { + "q": "^1.5.1" + } + }, + "conventional-changelog-jquery": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.6.tgz", + "integrity": "sha512-gHAABCXUNA/HjnZEm+vxAfFPJkgtrZvCDIlCKfdPVXtCIo/Q0lN5VKpx8aR5p8KdVRQFF3OuTlvv5kv6iPuRqA==", + "dev": true, + "requires": { + "q": "^1.5.1" + } + }, + "conventional-changelog-jshint": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.7.tgz", + "integrity": "sha512-qHA8rmwUnLiIxANJbz650+NVzqDIwNtc0TcpIa0+uekbmKHttidvQ1dGximU3vEDdoJVKFgR3TXFqYuZmYy9ZQ==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "q": "^1.5.1" + } + }, + "conventional-changelog-preset-loader": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz", + "integrity": "sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==", + "dev": true + }, + "conventional-changelog-writer": { + "version": "4.0.16", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.16.tgz", + "integrity": "sha512-jmU1sDJDZpm/dkuFxBeRXvyNcJQeKhGtVcFFkwTphUAzyYWcwz2j36Wcv+Mv2hU3tpvLMkysOPXJTLO55AUrYQ==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "conventional-commits-filter": "^2.0.6", + "dateformat": "^3.0.0", + "handlebars": "^4.7.6", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.15", + "meow": "^7.0.0", + "semver": "^6.0.0", + "split": "^1.0.0", + "through2": "^3.0.0" + } + }, + "conventional-commits-filter": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.6.tgz", + "integrity": "sha512-4g+sw8+KA50/Qwzfr0hL5k5NWxqtrOVw4DDk3/h6L85a9Gz0/Eqp3oP+CWCNfesBvZZZEFHF7OTEbRe+yYSyKw==", + "dev": true, + "requires": { + "lodash.ismatch": "^4.4.0", + "modify-values": "^1.0.0" + } + }, + "conventional-commits-parser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz", + "integrity": "sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA==", + "dev": true, + "requires": { + "JSONStream": "^1.0.4", + "is-text-path": "^1.0.1", + "lodash": "^4.17.15", + "meow": "^7.0.0", + "split2": "^2.0.0", + "through2": "^3.0.0", + "trim-off-newlines": "^1.0.0" + } + }, + "conventional-recommended-bump": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-6.0.5.tgz", + "integrity": "sha512-srkferrB4kACPEbKYltZwX1CQZAEqbQkabKN444mavLRVMetzwJFJf23/+pwvtMsWbd+cc4HaleV1nHke0f8Rw==", + "dev": true, + "requires": { + "concat-stream": "^2.0.0", + "conventional-changelog-preset-loader": "^2.3.0", + "conventional-commits-filter": "^2.0.2", + "conventional-commits-parser": "^3.0.8", + "git-raw-commits": "2.0.0", + "git-semver-tags": "^3.0.1", + "meow": "^5.0.0", + "q": "^1.5.1" + }, + "dependencies": { + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "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 + }, + "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" + } + }, + "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" + } + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.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" + } + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "meow": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", + "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0", + "yargs-parser": "^10.0.0" + } + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^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=", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "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" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "coveralls": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.0.tgz", + "integrity": "sha512-sHxOu2ELzW8/NC1UP5XVLbZDzO4S3VxfFye3XYCznopHy02YjNkHcj5bKaVw2O7hVaBdBjEdQGpie4II1mWhuQ==", + "dev": true, + "requires": { + "js-yaml": "^3.13.1", + "lcov-parse": "^1.0.0", + "log-driver": "^1.2.7", + "minimist": "^1.2.5", + "request": "^2.88.2" + } + }, + "cp-file": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", + "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", + "dev": true, + "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" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "cross-spawn": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", + "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "dargs": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", + "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "debug-log": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", + "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-require-extensions": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", + "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "requires": { + "strip-bom": "^4.0.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "deglob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/deglob/-/deglob-4.0.1.tgz", + "integrity": "sha512-/g+RDZ7yf2HvoW+E5Cy+K94YhgcFgr6C8LuHZD1O5HoNPkf3KY6RfXJ0DBGlB/NkLi5gml+G9zqRzk9S0mHZCg==", + "dev": true, + "requires": { + "find-root": "^1.0.0", + "glob": "^7.0.5", + "ignore": "^5.0.0", + "pkg-config": "^1.1.0", + "run-parallel": "^1.1.2", + "uniq": "^1.0.1" + }, + "dependencies": { + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "dev": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "detect-indent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.0.0.tgz", + "integrity": "sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA==", + "dev": true + }, + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "diff-frag": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/diff-frag/-/diff-frag-1.0.1.tgz", + "integrity": "sha512-6/v2PC/6UTGcWPPetb9acL8foberUg/CtPdALeJUdD1B/weHNvzftoo00gYznqHGRhHEbykUGzqfG9RWOSr5yw==", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dot-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", + "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "dotgitignore": { + "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": "^3.0.0", + "minimatch": "^3.0.4" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "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==", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "eslint-config-standard": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz", + "integrity": "sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg==", + "dev": true + }, + "eslint-config-standard-jsx": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-8.1.0.tgz", + "integrity": "sha512-ULVC8qH8qCqbU792ZOO6DaiaZyHNS/5CZt3hKqHkEhVlhPEPN3nfBqqxJCyp59XrjIBZPu1chMYe9T2DXZ7TMw==", + "dev": true + }, + "eslint-import-resolver-node": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz", + "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.13.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-module-utils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.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" + } + }, + "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" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "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 + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + } + } + }, + "eslint-plugin-es": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz", + "integrity": "sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ==", + "dev": true, + "requires": { + "eslint-utils": "^1.4.2", + "regexpp": "^3.0.0" + }, + "dependencies": { + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + } + } + }, + "eslint-plugin-import": { + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.2", + "eslint-module-utils": "^2.4.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.0", + "read-pkg-up": "^2.0.0", + "resolve": "^1.11.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-plugin-node": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz", + "integrity": "sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ==", + "dev": true, + "requires": { + "eslint-plugin-es": "^2.0.0", + "eslint-utils": "^1.4.2", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "dev": true + } + } + }, + "eslint-plugin-promise": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", + "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", + "dev": true + }, + "eslint-plugin-react": { + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz", + "integrity": "sha512-EzdyyBWC4Uz2hPYBiEJrKCUi2Fn+BJ9B/pJQcjw5X+x/H2Nm59S4MJIvL4O5NEE0+WbnQwEBxWY03oUk+Bc3FA==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.1.0", + "object.entries": "^1.1.0", + "object.fromentries": "^2.0.0", + "object.values": "^1.1.0", + "prop-types": "^15.7.2", + "resolve": "^1.10.1" + }, + "dependencies": { + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + } + } + }, + "eslint-plugin-standard": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", + "integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==", + "dev": true + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, + "esm": { + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "dev": true + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "events-to-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", + "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=", + "dev": true + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "findit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findit/-/findit-2.0.0.tgz", + "integrity": "sha1-ZQnwEmr0wXhVHPqZOU4DLhOk1W4=", + "dev": true + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "flow-parser": { + "version": "0.125.1", + "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.125.1.tgz", + "integrity": "sha512-vrnK98a85yyaPqcZTQmHlrzb4PAiF/WgkI8xZCmyn5sT6/bAKAFbUB+VQqfzTpnvq2VwZ5SThi/xuz3zMLTFRw==", + "dev": true + }, + "flow-remove-types": { + "version": "2.125.1", + "resolved": "https://registry.npmjs.org/flow-remove-types/-/flow-remove-types-2.125.1.tgz", + "integrity": "sha512-HLSXvccqHf6KRqxqm4rqa81i4GQWl+8gYvdgESEOjzpHTlN77t09ehmrP+0a6td9ZzQXg22lUMoeDmTlOd5JeA==", + "dev": true, + "requires": { + "flow-parser": "^0.125.1", + "pirates": "^3.0.2", + "vlq": "^0.2.1" + } + }, + "foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fromentries": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.0.tgz", + "integrity": "sha512-33X7H/wdfO99GdRLLgkjUrD4geAFdq/Uv0kl3HD4da6HDixd2GUg8Mw7dahLCV9r/EARkmtYBB6Tch4EEokFTQ==" + }, + "fs-access": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", + "dev": true, + "requires": { + "null-check": "^1.0.0" + } + }, + "fs-exists-cached": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz", + "integrity": "sha1-zyVVTKBQ3EmuZla0HeQiWJidy84=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "function-loop": { + "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": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==" + }, + "get-caller-file": { + "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-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==" + }, + "get-pkg-repo": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", + "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "meow": "^3.3.0", + "normalize-package-data": "^2.3.0", + "parse-github-repo-url": "^1.3.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" + } + }, + "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", + "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" + } + }, + "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" + } + }, + "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" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.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" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + } + } + }, + "get-stdin": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", + "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "git-raw-commits": { + "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", + "lodash.template": "^4.0.2", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0" + }, + "dependencies": { + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "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 + }, + "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" + } + }, + "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" + } + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.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" + } + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^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=", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "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" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + } + } + }, + "git-remote-origin-url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", + "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", + "dev": true, + "requires": { + "gitconfiglocal": "^1.0.0", + "pify": "^2.3.0" + } + }, + "git-semver-tags": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-3.0.1.tgz", + "integrity": "sha512-Hzd1MOHXouITfCasrpVJbRDg9uvW7LfABk3GQmXYZByerBDrfrEMP9HXpNT7RxAbieiocP6u+xq20DkvjwxnCA==", + "dev": true, + "requires": { + "meow": "^5.0.0", + "semver": "^6.0.0" + }, + "dependencies": { + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "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 + }, + "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" + } + }, + "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" + } + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.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" + } + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "meow": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", + "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0", + "yargs-parser": "^10.0.0" + } + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^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=", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "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" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "gitconfiglocal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", + "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", + "dev": true, + "requires": { + "ini": "^1.3.2" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "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" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + }, + "handlebars": { + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "hasha": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", + "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", + "requires": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + } + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inquirer": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", + "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^3.0.0", + "cli-cursor": "^3.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.5.3", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "dev": true, + "requires": { + "text-extensions": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==" + }, + "istanbul-lib-hook": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "requires": { + "append-transform": "^2.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "requires": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + } + }, + "istanbul-lib-processinfo": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", + "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "requires": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.0", + "istanbul-lib-coverage": "^3.0.0-alpha.1", + "make-dir": "^3.0.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^3.3.3" + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jackspeak": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-1.4.0.tgz", + "integrity": "sha512-VDcSunT+wcccoG46FtzuBAyQKlzhHjli4q31e1fIHGOsRspqNUFjVzGb+7eIFDlTvqLygxapDHPHS0ouT2o/tw==", + "dev": true, + "requires": { + "cliui": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "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==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "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" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.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 + }, + "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" + } + }, + "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" + } + }, + "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" + } + } + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "requires": { + "minimist": "^1.2.5" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jsx-ast-utils": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.2.3.tgz", + "integrity": "sha512-EdIHFMm+1BPynpKOpdPqiOsvnIrInRGJD7bzPZdPkjitQEqpdpUuFpq4T0npZFKTiB3RhWFdGN+oqOJIdhDhQA==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "object.assign": "^4.1.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "lcov-parse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", + "integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "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" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=" + }, + "lodash.ismatch": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", + "integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=", + "dev": true + }, + "lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0" + } + }, + "log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "requires": { + "semver": "^6.0.0" + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "map-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz", + "integrity": "sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g==", + "dev": true + }, + "meow": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-7.0.1.tgz", + "integrity": "sha512-tBKIQqVrAHqwit0vfuFPY3LlzJYkEOFyKa3bPgxzNl6q/RtN8KQ+ALYEASYuFayzSAsjlhXj/JZ10rH85Q6TUw==", + "dev": true, + "requires": { + "@types/minimist": "^1.2.0", + "arrify": "^2.0.1", + "camelcase": "^6.0.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "^4.0.2", + "normalize-package-data": "^2.5.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.13.1", + "yargs-parser": "^18.1.3" + }, + "dependencies": { + "camelcase": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.0.0.tgz", + "integrity": "sha512-8KMDF1Vz2gzOq54ONPJS65IvTUaB1cHJ2DMM7MbPmLZljDH1qpzzLsWdiN9pHh6qvkRVDTi/07+eNGch/oLU4w==", + "dev": true + }, + "parse-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", + "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1", + "lines-and-columns": "^1.1.6" + } + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "dev": true + } + } + }, + "merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "dev": true + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "dev": true, + "requires": { + "mime-db": "1.44.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "min-indent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.0.tgz", + "integrity": "sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "dependencies": { + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + } + } + }, + "minipass": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", + "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + }, + "dependencies": { + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "modify-values": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", + "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "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==", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true + }, + "node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "requires": { + "process-on-spawn": "^1.0.0" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "null-check": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", + "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nyc": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", + "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "caching-transform": "^3.0.2", + "convert-source-map": "^1.6.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.5", + "istanbul-lib-hook": "^2.0.7", + "istanbul-lib-instrument": "^3.3.0", + "istanbul-lib-report": "^2.0.8", + "istanbul-lib-source-maps": "^3.0.6", + "istanbul-reports": "^2.2.4", + "js-yaml": "^3.13.1", + "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.2.3", + "uuid": "^3.3.2", + "yargs": "^13.2.2", + "yargs-parser": "^13.0.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==", + "dev": true + }, + "append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + } + }, + "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==", + "dev": true, + "requires": { + "hasha": "^3.0.0", + "make-dir": "^2.0.0", + "package-hash": "^3.0.0", + "write-file-atomic": "^2.4.2" + } + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "foreground-child": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", + "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "dev": true, + "requires": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + } + }, + "hasha": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", + "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", + "dev": true, + "requires": { + "is-stream": "^1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", + "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", + "dev": true, + "requires": { + "append-transform": "^1.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", + "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "dev": true, + "requires": { + "@babel/generator": "^7.4.0", + "@babel/parser": "^7.4.3", + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.3", + "@babel/types": "^7.4.0", + "istanbul-lib-coverage": "^2.0.5", + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "istanbul-lib-report": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", + "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "supports-color": "^6.1.0" + } + }, + "istanbul-lib-source-maps": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", + "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "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=", + "dev": true + } + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "package-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", + "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "hasha": "^3.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "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=", + "dev": true + } + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "spawn-wrap": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.3.tgz", + "integrity": "sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw==", + "dev": true, + "requires": { + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" + } + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "test-exclude": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", + "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "dev": true, + "requires": { + "glob": "^7.1.3", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^2.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.entries": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.1.tgz", + "integrity": "sha512-ilqR7BgdyZetJutmDPfXCDffGa0/Yzl2ivVNpbx/g4UeWrCdRnFDUBrKJGLhGieRHDATnyZXWBeCb29k9CJysQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "object.fromentries": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.2.tgz", + "integrity": "sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "object.values": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", + "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opener": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", + "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", + "dev": true + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "own-or": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz", + "integrity": "sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw=", + "dev": true + }, + "own-or-env": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.1.tgz", + "integrity": "sha512-y8qULRbRAlL6x2+M0vIe7jJbJx/kmUTzYonRAa2ayesR2qWLswninkVyeJe4x3IEXhdgoNodzjQRKAoEs6Fmrw==", + "dev": true, + "requires": { + "own-or": "^1.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "p-try": { + "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": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "requires": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-github-repo-url": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", + "integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A=", + "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": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "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" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pirates": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-3.0.2.tgz", + "integrity": "sha512-c5CgUJq6H2k6MJz72Ak1F5sN9n9wlSlJyEnwvpm9/y3WB4E3pHBDT2c6PEiS1vyJvq2bUxUAIu0EGf8Cx4Ic7Q==", + "dev": true, + "requires": { + "node-modules-regexp": "^1.0.0" + } + }, + "pkg-conf": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", + "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "load-json-file": "^5.2.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "load-json-file": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", + "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "parse-json": "^4.0.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true + } + } + }, + "pkg-config": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", + "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", + "dev": true, + "requires": { + "debug-log": "^1.0.0", + "find-root": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "requires": { + "find-up": "^4.0.0" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "requires": { + "fromentries": "^1.2.0" + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true + }, + "react": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", + "integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "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" + }, + "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 + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "requires": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "requires": { + "es6-error": "^4.0.1" + } + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "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==" + }, + "requirejs": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz", + "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==", + "dev": true + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "run-parallel": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", + "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", + "dev": true + }, + "rxjs": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", + "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "spawn-wrap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", + "requires": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + } + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "dev": true, + "requires": { + "through": "2" + } + }, + "split2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", + "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "dev": true, + "requires": { + "through2": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz", + "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==", + "dev": true + }, + "standard": { + "version": "14.3.4", + "resolved": "https://registry.npmjs.org/standard/-/standard-14.3.4.tgz", + "integrity": "sha512-+lpOkFssMkljJ6eaILmqxHQ2n4csuEABmcubLTb9almFi1ElDzXb1819fjf/5ygSyePCq4kU2wMdb2fBfb9P9Q==", + "dev": true, + "requires": { + "eslint": "~6.8.0", + "eslint-config-standard": "14.1.1", + "eslint-config-standard-jsx": "8.1.0", + "eslint-plugin-import": "~2.18.0", + "eslint-plugin-node": "~10.0.0", + "eslint-plugin-promise": "~4.2.1", + "eslint-plugin-react": "~7.14.2", + "eslint-plugin-standard": "~4.0.0", + "standard-engine": "^12.0.0" + } + }, + "standard-engine": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-12.0.1.tgz", + "integrity": "sha512-XtR9NfoTqvHkWQCwL1aLMwXw1Qxy5s4rdSIqetgBNw+8faNbQ+BbB49hPhKXjxxfC4yg+fpH0lx/T5fuUbpDcQ==", + "dev": true, + "requires": { + "deglob": "^4.0.1", + "get-stdin": "^7.0.0", + "minimist": "^1.2.5", + "pkg-conf": "^3.1.0" + } + }, + "standard-version": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-8.0.0.tgz", + "integrity": "sha512-cS/U9yhYPHfyokFce6e/H3U8MaKwZKSGzH25J776sChrae/doDQjsl3vCQ0hW1MSzdrUTb7pir4ApjnbDt/TAg==", + "dev": true, + "requires": { + "chalk": "2.4.2", + "conventional-changelog": "3.1.18", + "conventional-changelog-config-spec": "2.1.0", + "conventional-changelog-conventionalcommits": "4.2.3", + "conventional-recommended-bump": "6.0.5", + "detect-indent": "6.0.0", + "detect-newline": "3.1.0", + "dotgitignore": "2.1.0", + "figures": "3.1.0", + "find-up": "4.1.0", + "fs-access": "1.0.1", + "git-semver-tags": "3.0.1", + "semver": "7.1.1", + "stringify-package": "1.0.1", + "yargs": "15.3.1" + }, + "dependencies": { + "figures": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", + "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "semver": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.1.1.tgz", + "integrity": "sha512-WfuG+fl6eh3eZ2qAf6goB7nhiCd7NPXhmyFxigB/TOkQyeLP8w8GsVehvtGNtnNmyboz4TgeK40B1Kbql/8c5A==", + "dev": true + } + } + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" + } + }, + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "stringify-package": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stringify-package/-/stringify-package-1.0.1.tgz", + "integrity": "sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==" + }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.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==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "tap": { + "version": "14.10.7", + "resolved": "https://registry.npmjs.org/tap/-/tap-14.10.7.tgz", + "integrity": "sha512-DVx00lfiMxFhofwFDP77pitRCruVQJn8Dcj/6auIU3dErJQWsKT94oG6Yj0MQRuYANhSec8ruIPyUjH/RI9Hrw==", + "dev": true, + "requires": { + "@types/react": "^16.9.16", + "async-hook-domain": "^1.1.3", + "bind-obj-methods": "^2.0.0", + "browser-process-hrtime": "^1.0.0", + "chokidar": "^3.3.0", + "color-support": "^1.1.0", + "coveralls": "^3.0.8", + "diff": "^4.0.1", + "esm": "^3.2.25", + "findit": "^2.0.0", + "flow-remove-types": "^2.112.0", + "foreground-child": "^1.3.3", + "fs-exists-cached": "^1.0.0", + "function-loop": "^1.0.2", + "glob": "^7.1.6", + "import-jsx": "^3.1.0", + "ink": "^2.6.0", + "isexe": "^2.0.0", + "istanbul-lib-processinfo": "^1.0.0", + "jackspeak": "^1.4.0", + "minipass": "^3.1.1", + "mkdirp": "^0.5.1", + "nyc": "^14.1.1", + "opener": "^1.5.1", + "own-or": "^1.0.0", + "own-or-env": "^1.0.1", + "react": "^16.12.0", + "rimraf": "^2.7.1", + "signal-exit": "^3.0.0", + "source-map-support": "^0.5.16", + "stack-utils": "^1.0.2", + "tap-mocha-reporter": "^5.0.0", + "tap-parser": "^10.0.1", + "tap-yaml": "^1.0.0", + "tcompare": "^3.0.0", + "treport": "^1.0.2", + "trivial-deferred": "^1.0.1", + "ts-node": "^8.5.2", + "typescript": "^3.7.2", + "which": "^2.0.2", + "write-file-atomic": "^3.0.1", + "yaml": "^1.7.2", + "yapool": "^1.0.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "bundled": true, + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/core": { + "version": "7.8.7", + "bundled": true, + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.7", + "@babel/helpers": "^7.8.4", + "@babel/parser": "^7.8.7", + "@babel/template": "^7.8.6", + "@babel/traverse": "^7.8.6", + "@babel/types": "^7.8.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.0", + "lodash": "^4.17.13", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "bundled": true, + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.8.8", + "bundled": true, + "dev": true, + "requires": { + "@babel/types": "^7.8.7", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "bundled": true, + "dev": true + } + } + }, + "@babel/helper-builder-react-jsx": { + "version": "7.8.3", + "bundled": true, + "dev": true, + "requires": { + "@babel/types": "^7.8.3", + "esutils": "^2.0.0" + } + }, + "@babel/helper-function-name": { + "version": "7.8.3", + "bundled": true, + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.8.3", + "bundled": true, + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "bundled": true, + "dev": true + }, + "@babel/helper-split-export-declaration": { + "version": "7.8.3", + "bundled": true, + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helpers": { + "version": "7.8.4", + "bundled": true, + "dev": true, + "requires": { + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.4", + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "bundled": true, + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.8.8", + "bundled": true, + "dev": true + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.8.3", + "bundled": true, + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0" + } + }, + "@babel/plugin-syntax-jsx": { + "version": "7.8.3", + "bundled": true, + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "bundled": true, + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.8.8", + "bundled": true, + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-react-jsx": { + "version": "7.8.3", + "bundled": true, + "dev": true, + "requires": { + "@babel/helper-builder-react-jsx": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-jsx": "^7.8.3" + } + }, + "@babel/runtime": { + "version": "7.8.7", + "bundled": true, + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.8.6", + "bundled": true, + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" + } + }, + "@babel/traverse": { + "version": "7.8.6", + "bundled": true, + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.6", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "@babel/types": { + "version": "7.8.7", + "bundled": true, + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "@types/color-name": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "@types/prop-types": { + "version": "15.7.3", + "bundled": true, + "dev": true + }, + "@types/react": { + "version": "16.9.23", + "bundled": true, + "dev": true, + "requires": { + "@types/prop-types": "*", + "csstype": "^2.2.0" + } + }, + "@types/yoga-layout": { + "version": "1.9.1", + "bundled": true, + "dev": true + }, + "ansi-escapes": { + "version": "4.3.1", + "bundled": true, + "dev": true, + "requires": { + "type-fest": "^0.11.0" + } + }, + "ansi-regex": { + "version": "5.0.0", + "bundled": true, + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "bundled": true, + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "ansicolors": { + "version": "0.3.2", + "bundled": true, + "dev": true + }, + "arrify": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "astral-regex": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "auto-bind": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "caller-callsite": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "callsites": "^2.0.0" + } + }, + "caller-path": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "caller-callsite": "^2.0.0" + } + }, + "callsites": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "cardinal": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" + } + }, + "chalk": { + "version": "2.4.2", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "ci-info": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-truncate": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + } + }, + "color-convert": { + "version": "1.9.3", + "bundled": true, + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "bundled": true, + "dev": true + }, + "convert-source-map": { + "version": "1.7.0", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true + } + } + }, + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + }, + "dependencies": { + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "csstype": { + "version": "2.6.9", + "bundled": true, + "dev": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "emoji-regex": { + "version": "8.0.0", + "bundled": true, + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "esprima": { + "version": "4.0.1", + "bundled": true, + "dev": true + }, + "esutils": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "events-to-array": { + "version": "1.1.2", + "bundled": true, + "dev": true + }, + "foreground-child": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", + "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "dev": true, + "requires": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + } + }, + "gensync": { + "version": "1.0.0-beta.1", + "bundled": true, + "dev": true + }, + "globals": { + "version": "11.12.0", + "bundled": true, + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "import-jsx": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "@babel/core": "^7.5.5", + "@babel/plugin-proposal-object-rest-spread": "^7.5.5", + "@babel/plugin-transform-destructuring": "^7.5.0", + "@babel/plugin-transform-react-jsx": "^7.3.0", + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + } + }, + "ink": { + "version": "2.7.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "arrify": "^2.0.1", + "auto-bind": "^4.0.0", + "chalk": "^3.0.0", + "cli-cursor": "^3.1.0", + "cli-truncate": "^2.1.0", + "is-ci": "^2.0.0", + "lodash.throttle": "^4.1.1", + "log-update": "^3.0.0", + "prop-types": "^15.6.2", + "react-reconciler": "^0.24.0", + "scheduler": "^0.18.0", + "signal-exit": "^3.0.2", + "slice-ansi": "^3.0.0", + "string-length": "^3.1.0", + "widest-line": "^3.1.0", + "wrap-ansi": "^6.2.0", + "yoga-layout-prebuilt": "^1.9.3" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "bundled": true, + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "bundled": true, + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "is-ci": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "istanbul-lib-processinfo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-1.0.0.tgz", + "integrity": "sha512-FY0cPmWa4WoQNlvB8VOcafiRoB5nB+l2Pz2xGuXHRSy1KM8QFOYfz/rN+bGMCAeejrY3mrpF5oJHcN0s/garCg==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "cross-spawn": "^6.0.5", + "istanbul-lib-coverage": "^2.0.3", + "rimraf": "^2.6.3", + "uuid": "^3.3.2" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "bundled": true, + "dev": true + }, + "json5": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "lodash": { + "version": "4.17.15", + "bundled": true, + "dev": true + }, + "lodash.throttle": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "log-update": { + "version": "3.4.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "cli-cursor": "^2.1.0", + "wrap-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.2.0", + "bundled": true, + "dev": true + }, + "ansi-regex": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "emoji-regex": { + "version": "7.0.3", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "mimic-fn": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "onetime": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "string-width": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + } + } + }, + "loose-envify": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "bundled": true, + "dev": true + }, + "minimist": { + "version": "1.2.5", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "3.1.1", + "bundled": true, + "dev": true, + "requires": { + "yallist": "^4.0.0" + }, + "dependencies": { + "yallist": { + "version": "4.0.0", + "bundled": true, + "dev": true + } + } + }, + "ms": { + "version": "2.1.2", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "onetime": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "bundled": true, + "dev": true + }, + "prop-types": { + "version": "15.7.2", + "bundled": true, + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "punycode": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "react-is": { + "version": "16.13.1", + "bundled": true, + "dev": true + }, + "react-reconciler": { + "version": "0.24.0", + "bundled": true, + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.18.0" + } + }, + "redeyed": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "esprima": "~4.0.0" + } + }, + "regenerator-runtime": { + "version": "0.13.5", + "bundled": true, + "dev": true + }, + "resolve": { + "version": "1.15.1", + "bundled": true, + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "restore-cursor": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "scheduler": { + "version": "0.18.0", + "bundled": true, + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "semver": { + "version": "5.7.1", + "bundled": true, + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "slice-ansi": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "bundled": true, + "dev": true + } + } + }, + "string-length": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "astral-regex": "^1.0.0", + "strip-ansi": "^5.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "string-width": { + "version": "4.2.0", + "bundled": true, + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "tap-parser": { + "version": "10.0.1", + "bundled": true, + "dev": true, + "requires": { + "events-to-array": "^1.0.1", + "minipass": "^3.0.0", + "tap-yaml": "^1.0.0" + } + }, + "tap-yaml": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "yaml": "^1.5.0" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "treport": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "cardinal": "^2.1.1", + "chalk": "^3.0.0", + "import-jsx": "^3.1.0", + "ink": "^2.6.0", + "ms": "^2.1.2", + "string-length": "^3.1.0", + "tap-parser": "^10.0.1", + "unicode-length": "^2.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "bundled": true, + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "bundled": true, + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "type-fest": { + "version": "0.11.0", + "bundled": true, + "dev": true + }, + "unicode-length": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "punycode": "^2.0.0", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "widest-line": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^4.0.0" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "bundled": true, + "dev": true + } + } + }, + "yaml": { + "version": "1.8.2", + "bundled": true, + "dev": true, + "requires": { + "@babel/runtime": "^7.8.7" + } + }, + "yoga-layout-prebuilt": { + "version": "1.9.5", + "bundled": true, + "dev": true, + "requires": { + "@types/yoga-layout": "1.9.1" + } + } + } + }, + "tap-mocha-reporter": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-5.0.1.tgz", + "integrity": "sha512-1knFWOwd4khx/7uSEnUeaP9IPW3w+sqTgJMhrwah6t46nZ8P25atOKAjSvVDsT67lOPu0nfdOqUwoyKn+3E5pA==", + "dev": true, + "requires": { + "color-support": "^1.1.0", + "debug": "^4.1.1", + "diff": "^4.0.1", + "escape-string-regexp": "^2.0.0", + "glob": "^7.0.5", + "tap-parser": "^10.0.0", + "tap-yaml": "^1.0.0", + "unicode-length": "^2.0.2" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } + } + }, + "tap-parser": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-10.0.1.tgz", + "integrity": "sha512-qdT15H0DoJIi7zOqVXDn9X0gSM68JjNy1w3VemwTJlDnETjbi6SutnqmBfjDJAwkFS79NJ97gZKqie00ZCGmzg==", + "dev": true, + "requires": { + "events-to-array": "^1.0.1", + "minipass": "^3.0.0", + "tap-yaml": "^1.0.0" + } + }, + "tap-yaml": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-1.0.0.tgz", + "integrity": "sha512-Rxbx4EnrWkYk0/ztcm5u3/VznbyFJpyXO12dDBHKWiDVxy7O2Qw6MRrwO5H6Ww0U5YhRY/4C/VzWmFPhBQc4qQ==", + "dev": true, + "requires": { + "yaml": "^1.5.0" + } + }, + "tcompare": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-3.0.4.tgz", + "integrity": "sha512-Q3TitMVK59NyKgQyFh+857wTAUE329IzLDehuPgU4nF5e8g+EUQ+yUbjUy1/6ugiNnXztphT+NnqlCXolv9P3A==", + "dev": true, + "requires": { + "diff-frag": "^1.0.1" + } + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, + "text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "dev": true, + "requires": { + "readable-stream": "2 || 3" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "trim-newlines": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.0.tgz", + "integrity": "sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA==", + "dev": true + }, + "trim-off-newlines": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", + "dev": true + }, + "trivial-deferred": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz", + "integrity": "sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM=", + "dev": true + }, + "ts-node": { + "version": "8.10.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.1.tgz", + "integrity": "sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + } + }, + "tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "typescript": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.2.tgz", + "integrity": "sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==", + "dev": true + }, + "uglify-js": { + "version": "3.9.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.9.3.tgz", + "integrity": "sha512-r5ImcL6QyzQGVimQoov3aL2ZScywrOgBXGndbWrdehKoSvGe/RmiE5Jpw/v+GvxODt6l2tpBXwA7n+qZVlHBMA==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.20.3" + } + }, + "unicode-length": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-2.0.2.tgz", + "integrity": "sha512-Ph/j1VbS3/r77nhoY2WU0GWGjVYOHL3xpKp0y/Eq2e5r0mT/6b649vm7KFO6RdAdrZkYLdxphYVgvODxPB+Ebg==", + "dev": true, + "requires": { + "punycode": "^2.0.0", + "strip-ansi": "^3.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 + }, + "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" + } + } + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vlq": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yaml": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", + "dev": true + }, + "yapool": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yapool/-/yapool-1.0.0.tgz", + "integrity": "sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o=", + "dev": true + }, + "yargs": { + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", + "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.1" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + } + } +} diff --git a/package.json b/package.json index 7b07afc2f..31478e759 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,18 @@ { "name": "nyc", - "version": "6.6.1", - "description": "a code coverage tool that works well with subprocesses.", + "version": "15.1.0", + "description": "the Istanbul command line interface", "main": "index.js", "scripts": { - "pretest": "standard", - "test": "npm run cover", - "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", + "lint": "standard", + "pretest": "npm run lint && npm run clean && npm run instrument", + "test": "tap", + "snap": "npm test -- --snapshot", + "posttest": "npm run report", + "clean": "node ./npm-run-clean.js", "instrument": "node ./build-self-coverage.js", - "run-tests": "tap -t120 --no-cov -b ./test/build/*.js ./test/src/source-map-cache.js ./test/src/nyc-bin.js", - "report": "istanbul report --include=./.self_coverage/*.json lcov text", - "cover": "npm run clean && npm run build && npm run instrument && npm run run-tests && npm run report", - "dev": "npm run clean && npm run build && npm run run-tests", - "version": "standard-version" + "report": "node ./bin/nyc report --temp-dir ./.self_coverage/ -r text -r lcov", + "release": "standard-version" }, "bin": { "nyc": "./bin/nyc.js" @@ -21,25 +20,11 @@ "files": [ "index.js", "bin/*.js", - "lib/*.js", - "lib/instrumenters/*.js", - "!**/*covered.js" + "lib/**/*.js" ], - "nyc": { - "exclude": [ - "node_modules", - "bin", - "coverage", - "test/fixtures/coverage.js", - "test/build/*", - "test/nyc-test.js", - "test/source-map-cache.js", - "index.covered.js", - "test/fixtures/_generateCoverage.js" - ] - }, "standard": { "ignore": [ + "/tap-snapshots/", "**/fixtures/**", "**/test/build/*" ] @@ -62,78 +47,61 @@ { "name": "James Talmage", "website": "https://twitter.com/jamestalmage" + }, + { + "name": "Krishnan Anantheswaran", + "website": "https://github.com/gotwarlost" } ], "author": "Ben Coe ", "license": "ISC", "dependencies": { - "append-transform": "^0.4.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.1.2", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^1.1.2", - "foreground-child": "^1.5.1", - "glob": "^7.0.3", - "istanbul": "^0.4.3", - "md5-hex": "^1.2.0", - "micromatch": "^2.3.7", - "mkdirp": "^0.5.0", - "pkg-up": "^1.0.0", - "resolve-from": "^2.0.0", - "rimraf": "^2.5.0", - "signal-exit": "^3.0.0", - "source-map": "^0.5.3", - "spawn-wrap": "^1.2.2", - "test-exclude": "^1.1.0", - "yargs": "^4.7.0" + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" }, "devDependencies": { "any-path": "^1.3.0", - "chai": "^3.0.0", - "coveralls": "^2.11.4", - "exists-sync": "0.0.3", - "forking-tap": "^0.1.1", - "is-windows": "^0.2.0", - "lodash": "^4.12.0", - "newline-regex": "^0.2.1", - "sanitize-filename": "^1.5.3", - "sinon": "^1.15.3", - "source-map-fixtures": "^2.1.0", - "source-map-support": "^0.4.0", - "split-lines": "^1.0.0", - "standard": "^7.0.1", - "standard-version": "^2.2.1", - "tap": "^5.7.1", - "which": "^1.2.4", - "zero-fill": "^2.2.3" + "coveralls": "^3.0.9", + "is-windows": "^1.0.2", + "requirejs": "^2.3.6", + "source-map-support": "^0.5.16", + "standard": "^14.3.1", + "standard-version": "^8.0.0", + "tap": "^14.10.5", + "which": "^2.0.2" + }, + "engines": { + "node": ">=8.9" }, + "homepage": "https://istanbul.js.org/", + "bugs": "https://github.com/istanbuljs/nyc/issues", "repository": { "type": "git", - "url": "git@github.com:bcoe/nyc.git" - }, - "bundledDependencies": [ - "append-transform", - "arrify", - "caching-transform", - "convert-source-map", - "default-require-extensions", - "find-cache-dir", - "find-up", - "foreground-child", - "glob", - "istanbul", - "md5-hex", - "micromatch", - "mkdirp", - "pkg-up", - "resolve-from", - "rimraf", - "signal-exit", - "source-map", - "spawn-wrap", - "test-exclude", - "yargs" - ] + "url": "git@github.com:istanbuljs/nyc.git" + } } diff --git a/self-coverage-helper.js b/self-coverage-helper.js new file mode 100644 index 000000000..2ef7e82e1 --- /dev/null +++ b/self-coverage-helper.js @@ -0,0 +1,31 @@ +'use strict' + +/* global ___NYC_SELF_COVERAGE___ */ + +const path = require('path') +const fs = require('fs') +const mkdirp = require('make-dir') +const onExit = require('signal-exit') + +module.exports = { + registered: false, + onExit () { + const coverage = ___NYC_SELF_COVERAGE___ + + const selfCoverageDir = path.join(__dirname, '.self_coverage') + mkdirp.sync(selfCoverageDir) + fs.writeFileSync( + path.join(selfCoverageDir, process.pid + '.json'), + JSON.stringify(coverage), + 'utf-8' + ) + } +} + +onExit(() => { + if (module.exports.registered) { + return + } + + module.exports.onExit() +}) diff --git a/tap-snapshots/test-config-override.js-TAP.test.js b/tap-snapshots/test-config-override.js-TAP.test.js new file mode 100644 index 000000000..50924b380 --- /dev/null +++ b/tap-snapshots/test-config-override.js-TAP.test.js @@ -0,0 +1,20 @@ +/* IMPORTANT + * This snapshot file is auto-generated, but designed for humans. + * It should be checked into source control and tracked carefully. + * Re-generate by setting TAP_SNAPSHOT=1 and running tests. + * Make sure to inspect the output below. Do not ignore changes! + */ +'use strict' +exports[`test/config-override.js TAP spawn that does config overriding > stdout 1`] = ` +in parent { include: 'conf-override-root.js' } +in child { include: 'conf-override-module.js' } +in module { include: 'conf-override-module.js' } +-------------------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-------------------------|---------|----------|---------|---------|------------------- +All files | 77.78 | 50 | 100 | 77.78 | + conf-override-module.js | 100 | 100 | 100 | 100 | + conf-override-root.js | 71.43 | 50 | 100 | 71.43 | 22-23 +-------------------------|---------|----------|---------|---------|------------------- + +` diff --git a/tap-snapshots/test-eager.js-TAP.test.js b/tap-snapshots/test-eager.js-TAP.test.js new file mode 100644 index 000000000..7949315f1 --- /dev/null +++ b/tap-snapshots/test-eager.js-TAP.test.js @@ -0,0 +1,16 @@ +/* IMPORTANT + * This snapshot file is auto-generated, but designed for humans. + * It should be checked into source control and tracked carefully. + * Re-generate by setting TAP_SNAPSHOT=1 and running tests. + * Make sure to inspect the output below. Do not ignore changes! + */ +'use strict' +exports[`test/eager.js TAP eager disabled by default > stdout 1`] = ` +0 + +` + +exports[`test/eager.js TAP eager enabled > stdout 1`] = ` +1 + +` diff --git a/tap-snapshots/test-instrument.js-TAP.test.js b/tap-snapshots/test-instrument.js-TAP.test.js new file mode 100644 index 000000000..a88a3c14d --- /dev/null +++ b/tap-snapshots/test-instrument.js-TAP.test.js @@ -0,0 +1,17 @@ +/* IMPORTANT + * This snapshot file is auto-generated, but designed for humans. + * It should be checked into source control and tracked carefully. + * Re-generate by setting TAP_SNAPSHOT=1 and running tests. + * Make sure to inspect the output below. Do not ignore changes! + */ +'use strict' +exports[`test/instrument.js TAP can write files in place with --in-place switch > stdout 1`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 0 | 100 | 0 | 0 | + file1.js | 0 | 100 | 0 | 0 | 2-5 + file2.js | 0 | 100 | 0 | 0 | 2-5 +----------|---------|----------|---------|---------|------------------- + +` diff --git a/tap-snapshots/test-nyc-integration.js-TAP.test.js b/tap-snapshots/test-nyc-integration.js-TAP.test.js new file mode 100644 index 000000000..f6563687b --- /dev/null +++ b/tap-snapshots/test-nyc-integration.js-TAP.test.js @@ -0,0 +1,992 @@ +/* IMPORTANT + * This snapshot file is auto-generated, but designed for humans. + * It should be checked into source control and tracked carefully. + * Re-generate by setting TAP_SNAPSHOT=1 and running tests. + * Make sure to inspect the output below. Do not ignore changes! + */ +'use strict' +exports[`test/nyc-integration.js TAP --all does not fail on ERR_REQUIRE_ESM > stdout 1`] = ` +------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +------------|---------|----------|---------|---------|------------------- +All files | 33.33 | 100 | 0 | 33.33 | + extra.mjs | 0 | 100 | 0 | 0 | 2 + index.js | 0 | 100 | 0 | 0 | 2 + script.cjs | 100 | 100 | 100 | 100 | +------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP --all includes files with both .map files and inline source-maps > stdout 1`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 44.44 | 100 | 33.33 | 44.44 | + s1.js | 80 | 100 | 50 | 80 | 7 + s2.js | 0 | 100 | 0 | 0 | 1-6 +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP --all instruments unknown extensions as js > stdout 1`] = ` +run +------------------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +------------------------|---------|----------|---------|---------|------------------- +All files | 11.11 | 100 | 0 | 11.11 | + check-instrumented.es6 | 0 | 100 | 0 | 0 | 5-6 + check-instrumented.js | 0 | 100 | 0 | 0 | 5-6 + not-loaded.es6 | 0 | 100 | 100 | 0 | 1-2 + not-loaded.js | 0 | 100 | 100 | 0 | 1-2 + run.js | 100 | 100 | 100 | 100 | +------------------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP --all uses source-maps to exclude original sources from reports > stdout 1`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 0 | 100 | 0 | 0 | + s2.js | 0 | 100 | 0 | 0 | 1-6 +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP --check-coverage fails in any case when the underlying test failed > stderr 1`] = ` +ERROR: Coverage for lines (33.33%) does not meet global threshold (49%) + +` + +exports[`test/nyc-integration.js TAP --check-coverage fails in any case when the underlying test failed > stdout 1`] = ` +-------------------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-------------------------|---------|----------|---------|---------|------------------- +All files | 33.33 | 0 | 100 | 33.33 | + half-covered-failing.js | 33.33 | 0 | 100 | 33.33 | 5-8 +-------------------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP --check-coverage fails when the expected coverage is below a threshold > stderr 1`] = ` +ERROR: Coverage for lines (50%) does not meet global threshold (51%) + +` + +exports[`test/nyc-integration.js TAP --check-coverage fails when the expected coverage is below a threshold > stdout 1`] = ` +-----------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-----------------|---------|----------|---------|---------|------------------- +All files | 50 | 50 | 100 | 50 | + half-covered.js | 50 | 50 | 100 | 50 | 6-8 +-----------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP --check-coverage fails when the expected file coverage is below a threshold > stderr 1`] = ` +ERROR: Coverage for lines (50%) does not meet threshold (51%) for ./half-covered.js + +` + +exports[`test/nyc-integration.js TAP --check-coverage fails when the expected file coverage is below a threshold > stdout 1`] = ` +-----------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-----------------|---------|----------|---------|---------|------------------- +All files | 50 | 50 | 100 | 50 | + half-covered.js | 50 | 50 | 100 | 50 | 6-8 +-----------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP --check-coverage succeeds when the expected coverage is above a threshold > stdout 1`] = ` +-----------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-----------------|---------|----------|---------|---------|------------------- +All files | 50 | 50 | 100 | 50 | + half-covered.js | 50 | 50 | 100 | 50 | 6-8 +-----------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP --exclude should allow default exclude rules to be overridden > stdout 1`] = ` +---------------------------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +---------------------------------|---------|----------|---------|---------|------------------- +All files | 0 | 0 | 0 | 0 | + cli | 0 | 0 | 0 | 0 | + args.js | 0 | 100 | 100 | 0 | 1 + by-arg2.js | 0 | 0 | 100 | 0 | 1-7 + classes.js | 0 | 100 | 0 | 0 | 5-15 + conf-override-module.js | 0 | 100 | 100 | 0 | 1-2 + conf-override-root.js | 0 | 0 | 100 | 0 | 1-23 + empty.js | 0 | 0 | 0 | 0 | + env.js | 0 | 100 | 100 | 0 | 1 + es6.js | 0 | 100 | 0 | 0 | 5-23 + external-instrumenter.js | 0 | 0 | 0 | 0 | 1 + gc.js | 0 | 100 | 100 | 0 | 2-3 + half-covered-failing.js | 0 | 0 | 100 | 0 | 1-8 + selfspawn-fibonacci.js | 0 | 0 | 0 | 0 | 2-30 + skip-full.js | 0 | 100 | 100 | 0 | 1-2 + test.js | 0 | 0 | 0 | 0 | + cli/fakebin | 0 | 100 | 100 | 0 | + npm-template.js | 0 | 100 | 100 | 0 | 2-9 + cli/instrument-inplace | 0 | 100 | 0 | 0 | + file1.js | 0 | 100 | 0 | 0 | 2-5 + file2.js | 0 | 100 | 0 | 0 | 2-5 + cli/nyc-config-js | 0 | 0 | 100 | 0 | + ignore.js | 0 | 100 | 100 | 0 | 1 + index.js | 0 | 0 | 100 | 0 | 1-10 + nyc.config.js | 0 | 100 | 100 | 0 | 1 + nycrc-config.js | 0 | 100 | 100 | 0 | 1 + cli/nycrc | 0 | 0 | 100 | 0 | + ignore.js | 0 | 100 | 100 | 0 | 1 + index.js | 0 | 0 | 100 | 0 | 1-10 + cli/subdir/input-dir | 0 | 100 | 100 | 0 | + index.js | 0 | 100 | 100 | 0 | 2 + cli/subdir/input-dir/exclude-me | 0 | 100 | 100 | 0 | + index.js | 0 | 100 | 100 | 0 | 2 + cli/subdir/input-dir/include-me | 0 | 100 | 100 | 0 | + exclude-me.js | 0 | 100 | 100 | 0 | 2 + include-me.js | 0 | 100 | 100 | 0 | 2 +---------------------------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP --ignore-class-method skips methods that match ignored name but still catches those that are not > stdout 1`] = ` +---------------------------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +---------------------------------|---------|----------|---------|---------|------------------- +All files | 1.44 | 0 | 5 | 1.87 | + cli | 2.06 | 0 | 5.56 | 3.08 | + args.js | 0 | 100 | 100 | 0 | 1 + by-arg2.js | 0 | 0 | 100 | 0 | 1-7 + classes.js | 66.67 | 100 | 50 | 66.67 | 6 + conf-override-module.js | 0 | 100 | 100 | 0 | 1-2 + conf-override-root.js | 0 | 0 | 100 | 0 | 1-23 + empty.js | 0 | 0 | 0 | 0 | + env.js | 0 | 100 | 100 | 0 | 1 + es6.js | 0 | 100 | 0 | 0 | 5-23 + external-instrumenter.js | 0 | 0 | 0 | 0 | 1 + gc.js | 0 | 100 | 100 | 0 | 2-3 + half-covered-failing.js | 0 | 0 | 100 | 0 | 1-8 + half-covered.js | 0 | 0 | 100 | 0 | 1-8 + selfspawn-fibonacci.js | 0 | 0 | 0 | 0 | 2-30 + skip-full.js | 0 | 100 | 100 | 0 | 1-2 + cli/fakebin | 0 | 100 | 100 | 0 | + npm-template.js | 0 | 100 | 100 | 0 | 2-9 + cli/instrument-inplace | 0 | 100 | 0 | 0 | + file1.js | 0 | 100 | 0 | 0 | 2-5 + file2.js | 0 | 100 | 0 | 0 | 2-5 + cli/nyc-config-js | 0 | 0 | 100 | 0 | + ignore.js | 0 | 100 | 100 | 0 | 1 + index.js | 0 | 0 | 100 | 0 | 1-10 + nycrc-config.js | 0 | 100 | 100 | 0 | 1 + cli/nycrc | 0 | 0 | 100 | 0 | + ignore.js | 0 | 100 | 100 | 0 | 1 + index.js | 0 | 0 | 100 | 0 | 1-10 + cli/run-npm-test | 0 | 0 | 100 | 0 | + half-covered.js | 0 | 0 | 100 | 0 | 1-8 + cli/run-npm-test-recursive | 0 | 0 | 100 | 0 | + half-covered.js | 0 | 0 | 100 | 0 | 1-8 + cli/subdir/input-dir | 0 | 100 | 100 | 0 | + index.js | 0 | 100 | 100 | 0 | 2 + cli/subdir/input-dir/exclude-me | 0 | 100 | 100 | 0 | + index.js | 0 | 100 | 100 | 0 | 2 + cli/subdir/input-dir/include-me | 0 | 100 | 100 | 0 | + exclude-me.js | 0 | 100 | 100 | 0 | 2 + include-me.js | 0 | 100 | 100 | 0 | 2 +---------------------------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP --include can be used to limit bin to instrumenting specific files > stdout 1`] = ` +-----------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-----------------|---------|----------|---------|---------|------------------- +All files | 50 | 50 | 100 | 50 | + half-covered.js | 50 | 50 | 100 | 50 | 6-8 +-----------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP --show-process-tree displays a tree of spawned processes > stdout 1`] = ` +3 +------------------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +------------------------|---------|----------|---------|---------|------------------- +All files | 91.3 | 70 | 100 | 100 | + selfspawn-fibonacci.js | 91.3 | 70 | 100 | 100 | 6,27-29 +------------------------|---------|----------|---------|---------|------------------- +nyc +│ 100 % Lines +└─┬ node ./selfspawn-fibonacci.js 5 + │ 100 % Lines + ├─┬ node ./selfspawn-fibonacci.js 4 + │ │ 100 % Lines + │ ├─┬ node ./selfspawn-fibonacci.js 3 + │ │ │ 100 % Lines + │ │ ├── node ./selfspawn-fibonacci.js 2 + │ │ │ 35 % Lines + │ │ └── node ./selfspawn-fibonacci.js 1 + │ │ 30 % Lines + │ └── node ./selfspawn-fibonacci.js 2 + │ 35 % Lines + └─┬ node ./selfspawn-fibonacci.js 3 + │ 100 % Lines + ├── node ./selfspawn-fibonacci.js 2 + │ 35 % Lines + └── node ./selfspawn-fibonacci.js 1 + 30 % Lines + + +` + +exports[`test/nyc-integration.js TAP --use-spawn-wrap=false is functional > stdout 1`] = ` +3 +------------------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +------------------------|---------|----------|---------|---------|------------------- +All files | 91.3 | 70 | 100 | 100 | + selfspawn-fibonacci.js | 91.3 | 70 | 100 | 100 | 6,27-29 +------------------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP --use-spawn-wrap=true is functional > stdout 1`] = ` +3 +------------------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +------------------------|---------|----------|---------|---------|------------------- +All files | 91.3 | 70 | 100 | 100 | + selfspawn-fibonacci.js | 91.3 | 70 | 100 | 100 | 6,27-29 +------------------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP allows .nycrc configuration to be overridden with command line args > stdout 1`] = ` +TN: +SF:ignore.js +FNF:0 +FNH:0 +DA:1,1 +LF:1 +LH:1 +BRF:0 +BRH:0 +end_of_record +TN: +SF:index.js +FNF:0 +FNH:0 +DA:1,1 +DA:3,1 +DA:5,1 +DA:7,1 +DA:8,0 +DA:9,0 +DA:10,0 +LF:7 +LH:4 +BRDA:7,0,0,0 +BRDA:7,0,1,1 +BRF:2 +BRH:1 +end_of_record + +` + +exports[`test/nyc-integration.js TAP allows alternative high and low watermarks to be configured > stdout 1`] = ` +-----------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-----------------|---------|----------|---------|---------|------------------- +All files  |  50 |  50 |  100 |  50 |   + half-covered.js |  50 |  50 |  100 |  50 | 6-8  +-----------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP allows an alternative cache folder to be specified > stdout 1`] = ` +-----------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-----------------|---------|----------|---------|---------|------------------- +All files | 50 | 50 | 100 | 50 | + half-covered.js | 50 | 50 | 100 | 50 | 6-8 +-----------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP allows nyc.config.js configuration to be overridden with command line args > stdout 1`] = ` +TN: +SF:ignore.js +FNF:0 +FNH:0 +DA:1,1 +LF:1 +LH:1 +BRF:0 +BRH:0 +end_of_record +TN: +SF:index.js +FNF:0 +FNH:0 +DA:1,1 +DA:3,1 +DA:5,1 +DA:7,1 +DA:8,0 +DA:9,0 +DA:10,0 +LF:7 +LH:4 +BRDA:7,0,0,0 +BRDA:7,0,1,1 +BRF:2 +BRH:1 +end_of_record +TN: +SF:nyc.config.js +FNF:0 +FNH:0 +DA:1,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +end_of_record +TN: +SF:nycrc-config.js +FNF:0 +FNH:0 +DA:1,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +end_of_record + +` + +exports[`test/nyc-integration.js TAP allows package.json configuration to be overridden with command line args > stdout 1`] = ` +TN: +SF:half-covered.js +FNF:0 +FNH:0 +DA:1,1 +DA:3,1 +DA:5,1 +DA:6,0 +DA:7,0 +DA:8,0 +LF:6 +LH:3 +BRDA:5,0,0,0 +BRDA:5,0,1,1 +BRF:2 +BRH:1 +end_of_record + +` + +exports[`test/nyc-integration.js TAP allows reserved word when es-modules is disabled > stdout 1`] = ` +---------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +---------------|---------|----------|---------|---------|------------------- +All files | 100 | 100 | 100 | 100 | + not-strict.js | 100 | 100 | 100 | 100 | +---------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP appropriately instruments file with corresponding .map file > stdout 1`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 80 | 100 | 50 | 80 | + s1.js | 80 | 100 | 50 | 80 | 7 +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP appropriately instruments file with inline source-map > stdout 1`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 100 | 100 | 100 | 100 | + s2.js | 100 | 100 | 100 | 100 | +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP caches inline source-maps > stdout 1`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 100 | 100 | 100 | 100 | + s2.js | 100 | 100 | 100 | 100 | +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP caches source-maps from .map files > stdout 1`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 80 | 100 | 50 | 80 | + s1.js | 80 | 100 | 50 | 80 | 7 +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP can run "npm test" which directly invokes a test file > stdout 1`] = ` + +> @ test . +> node ./half-covered.js + +-----------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-----------------|---------|----------|---------|---------|------------------- +All files | 50 | 50 | 100 | 50 | + half-covered.js | 50 | 50 | 100 | 50 | 6-8 +-----------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP can run "npm test" which indirectly invokes a test file > stdout 1`] = ` + +> @ test . +> npm run test:deeper + + +> @ test:deeper . +> npm run test:even-deeper + + +> @ test:even-deeper . +> node ./half-covered.js + +-----------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-----------------|---------|----------|---------|---------|------------------- +All files | 50 | 50 | 100 | 50 | + half-covered.js | 50 | 50 | 100 | 50 | 6-8 +-----------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP check-coverage command is equivalent to the flag > stderr 1`] = ` +ERROR: Coverage for lines (50%) does not meet global threshold (51%) + +` + +exports[`test/nyc-integration.js TAP check-coverage command is equivalent to the flag > stdout 1`] = ` +-----------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-----------------|---------|----------|---------|---------|------------------- +All files | 50 | 50 | 100 | 50 | + half-covered.js | 50 | 50 | 100 | 50 | 6-8 +-----------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP check-coverage command is equivalent to the flag > stdout 2`] = ` + +` + +exports[`test/nyc-integration.js TAP combines multiple coverage reports > stdout 1`] = ` +coverage files in ./merge-input merged into coverage.json + +` + +exports[`test/nyc-integration.js TAP does not create .cache folder if cache is "false" > stdout 1`] = ` +-----------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-----------------|---------|----------|---------|---------|------------------- +All files | 50 | 50 | 100 | 50 | + half-covered.js | 50 | 50 | 100 | 50 | 6-8 +-----------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP does not interpret args intended for instrumented bin > must match snapshot 1`] = ` +Array [ + "--help", + "--version", +] +` + +exports[`test/nyc-integration.js TAP execute with exclude-node-modules=false > stderr 1`] = ` +ERROR: Coverage for lines (0%) does not meet threshold (90%) for ./node_modules/@istanbuljs/fake-module-1/index.js + +` + +exports[`test/nyc-integration.js TAP execute with exclude-node-modules=false > stderr 2`] = ` +ERROR: Coverage for lines (0%) does not meet threshold (90%) for ./node_modules/@istanbuljs/fake-module-1/index.js + +` + +exports[`test/nyc-integration.js TAP execute with exclude-node-modules=false > stderr 3`] = ` +ERROR: Coverage for lines (0%) does not meet threshold (90%) for ./node_modules/@istanbuljs/fake-module-1/index.js + +` + +exports[`test/nyc-integration.js TAP execute with exclude-node-modules=false > stdout 1`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 0 | 100 | 100 | 0 | + index.js | 0 | 100 | 100 | 0 | 1 +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP execute with exclude-node-modules=false > stdout 2`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 0 | 100 | 100 | 0 | + index.js | 0 | 100 | 100 | 0 | 1 +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP execute with exclude-node-modules=false > stdout 3`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 0 | 100 | 100 | 0 | + index.js | 0 | 100 | 100 | 0 | 1 +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP execute with exclude-node-modules=false > stdout 4`] = ` + +` + +exports[`test/nyc-integration.js TAP extracts coverage headers from unexecuted files > must match snapshot 1`] = ` +[ + [ + "all", + true + ], + [ + "instrument", + false + ], + [ + "instrumenter", + "./lib/instrumenters/noop" + ], + [ + "silent", + true + ], + [ + "sourceMap", + false + ] +] +` + +exports[`test/nyc-integration.js TAP forbids reserved word when es-modules is not disabled > stderr 1`] = ` +Failed to instrument ./not-strict.js + +` + +exports[`test/nyc-integration.js TAP forbids reserved word when es-modules is not disabled > stdout 1`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 0 | 0 | 0 | 0 | +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP handles --clean / --no-clean properly > stdout 1`] = ` +1 +------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +------------|---------|----------|---------|---------|------------------- +All files | 50 | 25 | 100 | 50 | + by-arg2.js | 50 | 25 | 100 | 50 | 4-7 +------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP handles --clean / --no-clean properly > stdout 2`] = ` +2 +------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +------------|---------|----------|---------|---------|------------------- +All files | 83.33 | 75 | 100 | 83.33 | + by-arg2.js | 83.33 | 75 | 100 | 83.33 | 7 +------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP hooks provide coverage for requireJS and AMD modules > stdout 1`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 100 | 100 | 100 | 100 | + ipsum.js | 100 | 100 | 100 | 100 | + lorem.js | 100 | 100 | 100 | 100 | +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP interprets first args after -- as Node.js execArgv > stdout 1`] = ` +I’m still running +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 100 | 100 | 100 | 100 | + gc.js | 100 | 100 | 100 | 100 | +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP loads configuration from .nycrc.yaml > stdout 1`] = ` +TN: +SF:index.js +FNF:0 +FNH:0 +DA:1,1 +DA:3,1 +DA:5,1 +DA:7,1 +DA:8,0 +DA:9,0 +DA:10,0 +LF:7 +LH:4 +BRDA:7,0,0,0 +BRDA:7,0,1,1 +BRF:2 +BRH:1 +end_of_record + +` + +exports[`test/nyc-integration.js TAP loads configuration from .nycrc.yml > stdout 1`] = ` +TN: +SF:index.js +FNF:0 +FNH:0 +DA:1,1 +DA:3,1 +DA:5,1 +DA:7,1 +DA:8,0 +DA:9,0 +DA:10,0 +LF:7 +LH:4 +BRDA:7,0,0,0 +BRDA:7,0,1,1 +BRF:2 +BRH:1 +end_of_record + +` + +exports[`test/nyc-integration.js TAP loads configuration from different file rather than .nycrc > stderr 1`] = ` +ERROR: Coverage for lines (57.14%) does not meet threshold (100%) for ./index.js +ERROR: Coverage for branches (50%) does not meet threshold (100%) for ./index.js +ERROR: Coverage for statements (57.14%) does not meet threshold (100%) for ./index.js + +` + +exports[`test/nyc-integration.js TAP loads configuration from different file rather than .nycrc > stdout 1`] = ` +TN: +SF:ignore.js +FNF:0 +FNH:0 +DA:1,1 +LF:1 +LH:1 +BRF:0 +BRH:0 +end_of_record +TN: +SF:index.js +FNF:0 +FNH:0 +DA:1,1 +DA:3,1 +DA:5,1 +DA:7,1 +DA:8,0 +DA:9,0 +DA:10,0 +LF:7 +LH:4 +BRDA:7,0,0,0 +BRDA:7,0,1,1 +BRF:2 +BRH:1 +end_of_record + +` + +exports[`test/nyc-integration.js TAP loads configuration from different module rather than nyc.config.js > stderr 1`] = ` +ERROR: Coverage for lines (57.14%) does not meet threshold (100%) for ./index.js +ERROR: Coverage for branches (50%) does not meet threshold (100%) for ./index.js +ERROR: Coverage for statements (57.14%) does not meet threshold (100%) for ./index.js +ERROR: Coverage for lines (0%) does not meet threshold (100%) for ./nyc.config.js +ERROR: Coverage for statements (0%) does not meet threshold (100%) for ./nyc.config.js +ERROR: Coverage for lines (0%) does not meet threshold (100%) for ./nycrc-config.js +ERROR: Coverage for statements (0%) does not meet threshold (100%) for ./nycrc-config.js + +` + +exports[`test/nyc-integration.js TAP loads configuration from different module rather than nyc.config.js > stdout 1`] = ` +TN: +SF:ignore.js +FNF:0 +FNH:0 +DA:1,1 +LF:1 +LH:1 +BRF:0 +BRH:0 +end_of_record +TN: +SF:index.js +FNF:0 +FNH:0 +DA:1,1 +DA:3,1 +DA:5,1 +DA:7,1 +DA:8,0 +DA:9,0 +DA:10,0 +LF:7 +LH:4 +BRDA:7,0,0,0 +BRDA:7,0,1,1 +BRF:2 +BRH:1 +end_of_record +TN: +SF:nyc.config.js +FNF:0 +FNH:0 +DA:1,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +end_of_record +TN: +SF:nycrc-config.js +FNF:0 +FNH:0 +DA:1,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +end_of_record + +` + +exports[`test/nyc-integration.js TAP loads configuration from package.json and .nycrc > stdout 1`] = ` +TN: +SF:index.js +FNF:0 +FNH:0 +DA:1,1 +DA:3,1 +DA:5,1 +DA:7,1 +DA:8,0 +DA:9,0 +DA:10,0 +LF:7 +LH:4 +BRDA:7,0,0,0 +BRDA:7,0,1,1 +BRF:2 +BRH:1 +end_of_record + +` + +exports[`test/nyc-integration.js TAP loads configuration from package.json and nyc.config.js > stdout 1`] = ` +TN: +SF:index.js +FNF:0 +FNH:0 +DA:1,1 +DA:3,1 +DA:5,1 +DA:7,1 +DA:8,0 +DA:9,0 +DA:10,0 +LF:7 +LH:4 +BRDA:7,0,0,0 +BRDA:7,0,1,1 +BRF:2 +BRH:1 +end_of_record + +` + +exports[`test/nyc-integration.js TAP nyc instrument fails on file with \`package\` keyword when es-modules is enabled > stderr 1`] = ` +Failed to instrument ./not-strict.js + +` + +exports[`test/nyc-integration.js TAP nyc instrument fails on file with \`package\` keyword when es-modules is enabled > stdout 1`] = ` + +` + +exports[`test/nyc-integration.js TAP passes configuration via environment variables > must match snapshot 1`] = ` +[ + [ + "cache", + false + ], + [ + "cacheDir", + "/tmp" + ], + [ + "exclude", + "batman.js" + ], + [ + "extension", + ".js" + ], + [ + "include", + "env.js" + ], + [ + "instrumenter", + "./lib/instrumenters/istanbul" + ], + [ + "require", + "make-dir" + ], + [ + "silent", + true + ], + [ + "sourceMap", + true + ] +] +` + +exports[`test/nyc-integration.js TAP recursive run does not throw > stdout 1`] = ` + +` + +exports[`test/nyc-integration.js TAP report and check should show coverage check along with report > stderr 1`] = ` +ERROR: Coverage for lines (50%) does not meet global threshold (100%) + +` + +exports[`test/nyc-integration.js TAP report and check should show coverage check along with report > stdout 1`] = ` + +` + +exports[`test/nyc-integration.js TAP report and check should show coverage check along with report > stdout 2`] = ` +-----------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-----------------|---------|----------|---------|---------|------------------- +All files | 50 | 50 | 100 | 50 | + half-covered.js | 50 | 50 | 100 | 50 | 6-8 +-----------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP reports appropriate coverage information for es6 source files > stdout 1`] = ` +sup +do not hit +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +All files | 62.5 | 100 | 40 | 62.5 | + es6.js | 62.5 | 100 | 40 | 62.5 | 11-17 +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP reports error if input directory is missing > stderr 1`] = ` +failed access input directory ./DIRECTORY_THAT_IS_MISSING with error: + +ENOENT: no such file or directory, stat './DIRECTORY_THAT_IS_MISSING' + +` + +exports[`test/nyc-integration.js TAP reports error if input directory is missing > stdout 1`] = ` + +` + +exports[`test/nyc-integration.js TAP reports error if input is not a directory > stderr 1`] = ` +./package.json was not a directory + +` + +exports[`test/nyc-integration.js TAP reports error if input is not a directory > stdout 1`] = ` + +` + +exports[`test/nyc-integration.js TAP run-in-context provide coverage for vm.runInContext > stdout 1`] = ` +---------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +---------------|---------|----------|---------|---------|------------------- +All files | 100 | 100 | 100 | 100 | + in-context.js | 100 | 100 | 100 | 100 | +---------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP setting instrument to "false" configures noop instrumenter > must match snapshot 1`] = ` +[ + [ + "instrument", + false + ], + [ + "instrumenter", + "./lib/instrumenters/noop" + ], + [ + "silent", + true + ], + [ + "sourceMap", + false + ] +] +` + +exports[`test/nyc-integration.js TAP skip-empty does not display 0-line files > stdout 1`] = ` +----------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +----------|---------|----------|---------|---------|------------------- +----------|---------|----------|---------|---------|------------------- + +` + +exports[`test/nyc-integration.js TAP skip-full does not display files with 100% statement, branch, and function coverage > stdout 1`] = ` +-----------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +-----------------|---------|----------|---------|---------|------------------- +All files | 62.5 | 50 | 100 | 62.5 | + half-covered.js | 50 | 50 | 100 | 50 | 6-8 +-----------------|---------|----------|---------|---------|------------------- + +` diff --git a/tap-snapshots/test-tsc.js-TAP.test.js b/tap-snapshots/test-tsc.js-TAP.test.js new file mode 100644 index 000000000..fdbdb22bf --- /dev/null +++ b/tap-snapshots/test-tsc.js-TAP.test.js @@ -0,0 +1,26 @@ +/* IMPORTANT + * This snapshot file is auto-generated, but designed for humans. + * It should be checked into source control and tracked carefully. + * Re-generate by setting TAP_SNAPSHOT=1 and running tests. + * Make sure to inspect the output below. Do not ignore changes! + */ +'use strict' +exports[`test/tsc.js TAP ignore source-map > stdout 1`] = ` +------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +------------|---------|----------|---------|---------|------------------- +All files | 38.46 | 57.14 | 66.67 | 50 | + mapping.js | 38.46 | 57.14 | 66.67 | 50 | 3-8 +------------|---------|----------|---------|---------|------------------- + +` + +exports[`test/tsc.js TAP reads source-map > stdout 1`] = ` +------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +------------|---------|----------|---------|---------|------------------- +All files | 100 | 100 | 100 | 100 | + mapping.ts | 100 | 100 | 100 | 100 | +------------|---------|----------|---------|---------|------------------- + +` diff --git a/test/add-all-files.js b/test/add-all-files.js new file mode 100644 index 000000000..636947300 --- /dev/null +++ b/test/add-all-files.js @@ -0,0 +1,127 @@ +'use strict' + +const fs = require('../lib/fs-promises') +const path = require('path') + +const t = require('tap') +const ap = require('any-path') + +const NYC = require('../self-coverage') + +const { parseArgv, resetState } = require('./helpers') + +const fixtures = path.resolve(__dirname, 'fixtures') +const transpileHook = path.resolve(__dirname, 'fixtures/transpile-hook') + +t.beforeEach(resetState) + +t.test('outputs an empty coverage report for all files that are not excluded', async t => { + const nyc = new NYC(await parseArgv(fixtures)) + await nyc.reset() + await nyc.addAllFiles() + + const notLoadedPath = path.join(fixtures, './not-loaded.js') + const reports = (await nyc.coverageData()).filter(report => ap(report)[notLoadedPath]) + const report = reports[0][notLoadedPath] + + t.strictEqual(reports.length, 1) + t.strictEqual(report.s['0'], 0) + t.strictEqual(report.s['1'], 0) +}) + +t.test('outputs an empty coverage report for multiple configured extensions', async t => { + const cwd = path.resolve(fixtures, './conf-multiple-extensions') + const nyc = new NYC(await parseArgv(cwd)) + await nyc.reset() + await nyc.addAllFiles() + + const notLoadedPath1 = path.join(cwd, './not-loaded.es6') + const notLoadedPath2 = path.join(cwd, './not-loaded.js') + const reports = (await nyc.coverageData()).filter(report => { + const apr = ap(report) + return apr[notLoadedPath1] || apr[notLoadedPath2] + }) + + t.strictEqual(reports.length, 1) + + const report1 = reports[0][notLoadedPath1] + t.strictEqual(report1.s['0'], 0) + t.strictEqual(report1.s['1'], 0) + + const report2 = reports[0][notLoadedPath2] + t.strictEqual(report2.s['0'], 0) + t.strictEqual(report2.s['1'], 0) +}) + +t.test('transpiles .js files added via addAllFiles', async t => { + await fs.writeFile( + './test/fixtures/needs-transpile.js', + '--> pork chop sandwiches <--\nconst a = 99', + 'utf-8' + ) + + const nyc = new NYC(await parseArgv(fixtures, [ + '--use-spawn-wrap=true', + '--require', + transpileHook + ])) + await nyc.reset() + await nyc.addAllFiles() + + const needsTranspilePath = path.join(fixtures, './needs-transpile.js') + const reports = (await nyc.coverageData()).filter(report => ap(report)[needsTranspilePath]) + const report = reports[0][needsTranspilePath] + + t.strictEqual(reports.length, 1) + t.strictEqual(report.s['0'], 0) + + await fs.unlink(needsTranspilePath) +}) + +t.test('does not attempt to transpile files when they are excluded', async t => { + const notNeedTranspilePath = path.join(fixtures, './do-not-need-transpile.do-not-transpile') + await fs.writeFile( + notNeedTranspilePath, + '--> pork chop sandwiches <--\nconst a = 99', + 'utf-8' + ) + + const nyc = new NYC(await parseArgv(fixtures, [ + '--use-spawn-wrap=true', + `--require=${transpileHook}`, + '--extension=.do-not-transpile', + '--include=needs-transpile.do-not-transpile' + ])) + + await nyc.reset() + + // If this ran against *.do-not-transpile it would throw + await nyc.addAllFiles() + await fs.unlink(notNeedTranspilePath) +}) + +t.test('transpiles non-.js files added via addAllFiles', async t => { + await fs.writeFile( + './test/fixtures/needs-transpile.whatever', + '--> pork chop sandwiches <--\nconst a = 99', + 'utf-8' + ) + + const nyc = new NYC(await parseArgv(fixtures, [ + '--use-spawn-wrap=true', + `--require=${transpileHook}`, + '--extension=.whatever' + ])) + + await nyc.reset() + await nyc.addAllFiles() + + const needsTranspilePath = path.join(fixtures, './needs-transpile.whatever') + const reports = (await nyc.coverageData()).filter(report => ap(report)[needsTranspilePath]) + const report = reports[0][needsTranspilePath] + + t.strictEqual(reports.length, 1) + t.strictEqual(report.s['0'], 0) + + await fs.unlink(needsTranspilePath) +}) diff --git a/test/cache.js b/test/cache.js new file mode 100644 index 000000000..f8176fa87 --- /dev/null +++ b/test/cache.js @@ -0,0 +1,35 @@ +'use strict' + +const path = require('path') +const { promisify } = require('util') + +const t = require('tap') +const rimraf = promisify(require('rimraf')) + +const NYC = require('../self-coverage') + +const { parseArgv, resetState, runNYC } = require('./helpers') + +const fixtures = path.resolve(__dirname, './fixtures') + +t.beforeEach(resetState) + +async function cacheTest (t, script) { + const nyc = new NYC(await parseArgv(fixtures)) + await rimraf(nyc.cacheDirectory) + + const { status } = await runNYC({ + args: [ + process.execPath, + script + ], + cwd: fixtures, + env: {} + }) + + t.strictEqual(status, 0) +} + +t.test('cache handles collisions', t => cacheTest(t, './cache-collision-runner.js')) + +t.test('cache handles identical files', t => cacheTest(t, './identical-file-runner.js')) diff --git a/test/config-override.js b/test/config-override.js new file mode 100644 index 000000000..b7263ea11 --- /dev/null +++ b/test/config-override.js @@ -0,0 +1,15 @@ +'use strict' + +const t = require('tap') + +const { tempDirSetup, testSuccess } = require('./helpers') + +tempDirSetup(t, __filename) + +t.test('spawn that does config overriding', t => testSuccess(t, { + args: [ + '--exclude-after-remap=false', + '--include=conf-override-root.js', + process.execPath, 'conf-override-root.js' + ] +})) diff --git a/test/config.js b/test/config.js new file mode 100644 index 000000000..a1ec5bc40 --- /dev/null +++ b/test/config.js @@ -0,0 +1,85 @@ +'use strict' + +const path = require('path') + +const { test } = require('tap') + +const NYC = require('../self-coverage') + +const { parseArgv } = require('./helpers') + +test("loads 'exclude' patterns from package.json#nyc", async t => { + const nyc = new NYC(await parseArgv(path.resolve(__dirname, './fixtures'))) + + t.strictEqual(nyc.exclude.exclude.length, 8) +}) + +test("loads 'extension' patterns from package.json#nyc", async t => { + const nyc = new NYC(await parseArgv(path.resolve(__dirname, './fixtures/conf-multiple-extensions'))) + + t.strictEqual(nyc.extensions.length, 3) +}) + +test("ignores 'include' option if it's falsy or []", async t => { + const nyc1 = new NYC(await parseArgv(path.resolve(__dirname, './fixtures/conf-empty'))) + + t.strictEqual(nyc1.exclude.include, false) + + const nyc2 = new NYC({ + include: [] + }) + + t.strictEqual(nyc2.exclude.include, false) +}) + +test("ignores 'exclude' option if it's falsy", async t => { + const nyc = new NYC(await parseArgv(path.resolve(__dirname, './fixtures/conf-empty'))) + + t.strictEqual(nyc.exclude.exclude.length, 27) +}) + +test("allows for empty 'exclude'", async t => { + const nyc = new NYC({ exclude: [] }) + + // an empty exclude still has **/node_modules/**, node_modules/** and added. + t.strictEqual(nyc.exclude.exclude.length, 2) +}) + +test("allows for completely empty 'exclude' with exclude-node-modules", async t => { + const nyc = new NYC({ exclude: [], excludeNodeModules: false }) + + t.strictEqual(nyc.exclude.exclude.length, 0) +}) + +test('should resolve default cache folder to absolute path', async t => { + const nyc = new NYC({ + cache: true + }) + + t.strictEqual(path.isAbsolute(nyc.cacheDirectory), true) +}) + +test('should resolve custom cache folder to absolute path', async t => { + const nyc = new NYC({ + cacheDir: '.nyc_cache', + cache: true + }) + + t.strictEqual(path.isAbsolute(nyc.cacheDirectory), true) +}) + +test('if cache is false _disableCachingTransform is true', async t => { + const nycParent = new NYC({ cache: false, isChildProcess: false }) + const nycChild = new NYC({ cache: false, isChildProcess: true }) + + t.strictEqual(nycParent._disableCachingTransform(), true) + t.strictEqual(nycChild._disableCachingTransform(), true) +}) + +test('if cache is true _disableCachingTransform is equal to !isChildProcess', async t => { + const nycParent = new NYC({ cache: true, isChildProcess: false }) + const nycChild = new NYC({ cache: true, isChildProcess: true }) + + t.strictEqual(nycParent._disableCachingTransform(), true) + t.strictEqual(nycChild._disableCachingTransform(), false) +}) diff --git a/test/cwd.js b/test/cwd.js new file mode 100644 index 000000000..b079bf034 --- /dev/null +++ b/test/cwd.js @@ -0,0 +1,39 @@ +'use strict' + +const path = require('path') + +const t = require('tap') + +const NYC = require('../self-coverage') + +const { parseArgv } = require('./helpers') + +t.beforeEach(async () => { + delete process.env.NYC_CWD +}) + +t.test('sets cwd to process.cwd() if no environment variable is set', async t => { + const nyc = new NYC(await parseArgv()) + + t.strictEqual(nyc.cwd, process.cwd()) +}) + +t.test('uses NYC_CWD environment variable for cwd if it is set', async t => { + const fixtures = path.resolve(__dirname, './fixtures') + process.env.NYC_CWD = fixtures + const nyc = new NYC(await parseArgv()) + + t.strictEqual(nyc.cwd, fixtures) +}) + +t.test('will look upwards for package.json from cwd', async t => { + const nyc = new NYC(await parseArgv(__dirname)) + + t.strictEqual(nyc.cwd, path.join(__dirname, '..')) +}) + +t.test('uses --cwd for cwd if it is set (highest priority and does not look upwards for package.json) ', async t => { + const nyc = new NYC(await parseArgv(__dirname, ['--cwd', __dirname])) + + t.strictEqual(nyc.cwd, __dirname) +}) diff --git a/test/eager.js b/test/eager.js new file mode 100644 index 000000000..14ccddb7e --- /dev/null +++ b/test/eager.js @@ -0,0 +1,30 @@ +'use strict' + +const path = require('path') + +const t = require('tap') + +const { testSuccess } = require('./helpers') + +const cwd = path.resolve(__dirname, 'fixtures') + +t.test('eager disabled by default', t => testSuccess(t, { + args: [ + '--silent=true', + '--exclude=eager.js', + process.execPath, + './eager.js' + ], + cwd +})) + +t.test('eager enabled', t => testSuccess(t, { + args: [ + '--silent=true', + '--eager=true', + '--exclude=eager.js', + process.execPath, + './eager.js' + ], + cwd +})) diff --git a/test/fixtures/.istanbul.yml b/test/fixtures/.istanbul.yml deleted file mode 100644 index 0b54cadb9..000000000 --- a/test/fixtures/.istanbul.yml +++ /dev/null @@ -1,2 +0,0 @@ -instrumentation: - preserve-comments: true diff --git a/test/fixtures/_generateReport.js b/test/fixtures/_generateReport.js deleted file mode 100644 index 09b8b9683..000000000 --- a/test/fixtures/_generateReport.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict' - -// Generates the test/fixtures/report.js file, not otherwise used in the -// tests. - -var fs = require('fs') -var path = require('path') - -var _ = require('lodash') -var rimraf = require('rimraf') -var sourceMapFixtures = require('source-map-fixtures') - -var NYC = require('../../') - -// Load source map fixtures. -var fixtures = { - bundle: sourceMapFixtures.inline('bundle'), - inline: sourceMapFixtures.inline('branching'), - istanbulIgnore: sourceMapFixtures.inline('istanbul-ignore'), - istanbulIgnoreFn: sourceMapFixtures.inline('istanbul-ignore-fn'), - none: sourceMapFixtures.none('branching') -} - -require('istanbul') - -// Inject nyc into this process. -var nyc = new NYC({ - cwd: path.join(__dirname, '..', '..') -}) -// Override the exclude option, source-map-fixtures is inside node_modules but -// should not be excluded when generating the coverage report. -nyc.exclude = [] -// Monkey-patch _wrapExit(), it shouldn't run when generating the coverage -// report. -nyc._wrapExit = function () {} -// Now wrap the process. -nyc.wrap() - -// Require the fixture so nyc can instrument it, then run it so there's code -// coverage. -fixtures.bundle.require().branching() -fixtures.inline.require().run(42) -fixtures.istanbulIgnore.require().run(99) -fixtures.istanbulIgnoreFn.require().run(99) -fixtures.none.require().run() - -// Copy NYC#writeCoverageFile() behavior to get the coverage object, before -// source maps have been applied. -var coverage = global.__coverage__ -if (typeof __coverage__ === 'object') coverage = __coverage__ -if (!coverage) { - console.error('No coverage.') - process.exit(1) -} - -var reports = _.values(coverage) -if (reports.length !== 5) { - console.error('Expected 5 reports to be generated, got ' + reports.length) - process.exit(1) -} - -var out = fs.createWriteStream(path.join(__dirname, 'report.js')) -out.write('// Generated using node test/fixtures/_generateReport.js\n') -reports.forEach(function (coverage) { - coverage.path = path.relative(nyc.cwd, coverage.path) - out.write('exports[' + JSON.stringify(coverage.path) + '] = ' + JSON.stringify(coverage, null, 2) + '\n') -}) -out.end() -out.on('finish', function () { - console.log('Wrote coverage report.') -}) diff --git a/test/fixtures/all-type-module/extra.mjs b/test/fixtures/all-type-module/extra.mjs new file mode 100644 index 000000000..7c8308e6d --- /dev/null +++ b/test/fixtures/all-type-module/extra.mjs @@ -0,0 +1,3 @@ +export default function () { + return 'es module'; +} diff --git a/test/fixtures/all-type-module/index.js b/test/fixtures/all-type-module/index.js new file mode 100644 index 000000000..7c8308e6d --- /dev/null +++ b/test/fixtures/all-type-module/index.js @@ -0,0 +1,3 @@ +export default function () { + return 'es module'; +} diff --git a/test/fixtures/all-type-module/package.json b/test/fixtures/all-type-module/package.json new file mode 100644 index 000000000..5a3060c41 --- /dev/null +++ b/test/fixtures/all-type-module/package.json @@ -0,0 +1,10 @@ +{ + "name": "all-type-module", + "version": "0.1.0", + "description": "", + "main": "index.js", + "type": "module", + "nyc": { + "all": true + } +} diff --git a/test/fixtures/all-type-module/script.cjs b/test/fixtures/all-type-module/script.cjs new file mode 100755 index 000000000..55501a20c --- /dev/null +++ b/test/fixtures/all-type-module/script.cjs @@ -0,0 +1,5 @@ +#!/usr/bin/env node +'use strict'; + +// Not doing anything, we just want something to run with `nyc --all` +process.exit(0); diff --git a/test/fixtures/cache-collision-runner.js b/test/fixtures/cache-collision-runner.js index e3aedcb14..9b04f51cf 100755 --- a/test/fixtures/cache-collision-runner.js +++ b/test/fixtures/cache-collision-runner.js @@ -11,8 +11,8 @@ var workerPath = path.join(__dirname, './cache-collision-worker.js') function doFork (message) { spawn(process.execPath, [workerPath, String(time[0]), String(time[1]), message]) - .on('close', function (err) { - assert.ifError(err) + .on('close', function (code) { + assert.equal(code, 0, 'received non-zero exit code ' + code) }) } diff --git a/test/fixtures/check-instrumented.js b/test/fixtures/check-instrumented.js index 4e91f940d..b36853cbb 100644 --- a/test/fixtures/check-instrumented.js +++ b/test/fixtures/check-instrumented.js @@ -3,5 +3,5 @@ function probe () {} // When instrumented there will be references to variables like // __cov_pwkoI2PYHp3LJXkn_erl1Q in the probe() source. module.exports = function () { - return /\b__cov_\B/.test(probe + '') + return /\bcov_\B/.test(probe + '') } 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/args.js b/test/fixtures/cli/args.js new file mode 100644 index 000000000..29899ac75 --- /dev/null +++ b/test/fixtures/cli/args.js @@ -0,0 +1 @@ +console.log(JSON.stringify(process.argv)) diff --git a/test/fixtures/cli/by-arg2.js b/test/fixtures/cli/by-arg2.js new file mode 100644 index 000000000..d45cdefe7 --- /dev/null +++ b/test/fixtures/cli/by-arg2.js @@ -0,0 +1,8 @@ +const arg = process.argv[2]; +if (arg === '1') { + console.log('1') +} else if (arg === '2') { + console.log('2') +} else { + console.log('unexpected') +} diff --git a/test/fixtures/cli/classes.js b/test/fixtures/cli/classes.js new file mode 100644 index 000000000..e9157a63f --- /dev/null +++ b/test/fixtures/cli/classes.js @@ -0,0 +1,15 @@ +'use strict' + +class Funclass { + hit() { + const miss = () => { + console.log('This is intentionally uncovered'); + } + } + + skip() { + console.log('this will be skipped'); + } +} + +new Funclass().hit(); diff --git a/test/fixtures/cli/conf-override-module.js b/test/fixtures/cli/conf-override-module.js new file mode 100644 index 000000000..d949d3475 --- /dev/null +++ b/test/fixtures/cli/conf-override-module.js @@ -0,0 +1,2 @@ +const config = JSON.parse(process.env.NYC_CONFIG) +console.log('in module', {include: config.include}) diff --git a/test/fixtures/cli/conf-override-root.js b/test/fixtures/cli/conf-override-root.js new file mode 100755 index 000000000..a7a99f6ef --- /dev/null +++ b/test/fixtures/cli/conf-override-root.js @@ -0,0 +1,24 @@ +const config = JSON.parse(process.env.NYC_CONFIG) +const { include } = config + +if (process.argv[2] !== 'child') { + console.log('in parent', { include }) + require('child_process').spawn(process.execPath, [__filename, 'child'], { + cwd: __dirname, + env: Object.assign( + {}, + process.env, + { + NYC_CONFIG_OVERRIDE: JSON.stringify({ + include: 'conf-override-module.js' + }) + } + ), + stdio: 'inherit', + }) +} else { + // this should run, but not be covered, even though the shebang says to + // the child run ONLY covers the child file, not the dump-root.js + console.log('in child', { include }) + require('./conf-override-module.js') +} diff --git a/test/fixtures/cli/empty.js b/test/fixtures/cli/empty.js new file mode 100644 index 000000000..e69de29bb diff --git a/test/fixtures/cli/es6.js b/test/fixtures/cli/es6.js new file mode 100644 index 000000000..86c0c29ac --- /dev/null +++ b/test/fixtures/cli/es6.js @@ -0,0 +1,23 @@ +'use strict' + +class Yarsay { + constructor() { + console.log('sup') + } + + hit() { + console.log('do not hit') + let miss = () => { + console.log('do not hit') + } + } + + miss() { + let miss = () => { + console.log('do not hit') + } + } +} + +let y = new Yarsay() +y.hit() diff --git a/test/fixtures/cli/external-instrumenter.js b/test/fixtures/cli/external-instrumenter.js new file mode 100644 index 000000000..774472a3d --- /dev/null +++ b/test/fixtures/cli/external-instrumenter.js @@ -0,0 +1 @@ +'use strict';var cov_4mo0jj89z=function(){var path="./external-instrumenter.js";var hash="258f33c73dcdfdb232fbc4b001a43ae5dc7da182";var global=new Function("return this")();var gcv="__coverage__";var coverageData={path:"./external-instrumenter.js",statementMap:{"0":{start:{line:5,column:4},end:{line:5,column:22}},"1":{start:{line:9,column:4},end:{line:9,column:29}},"2":{start:{line:10,column:15},end:{line:12,column:5}},"3":{start:{line:11,column:6},end:{line:11,column:31}},"4":{start:{line:16,column:15},end:{line:18,column:5}},"5":{start:{line:17,column:6},end:{line:17,column:31}},"6":{start:{line:22,column:8},end:{line:22,column:20}},"7":{start:{line:23,column:0},end:{line:23,column:7}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:4,column:2},end:{line:4,column:3}},loc:{start:{line:4,column:16},end:{line:6,column:3}},line:4},"1":{name:"(anonymous_1)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:8},end:{line:13,column:3}},line:8},"2":{name:"(anonymous_2)",decl:{start:{line:10,column:15},end:{line:10,column:16}},loc:{start:{line:10,column:21},end:{line:12,column:5}},line:10},"3":{name:"(anonymous_3)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:9},end:{line:19,column:3}},line:15},"4":{name:"(anonymous_4)",decl:{start:{line:16,column:15},end:{line:16,column:16}},loc:{start:{line:16,column:21},end:{line:18,column:5}},line:16}},branchMap:{},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0},f:{"0":0,"1":0,"2":0,"3":0,"4":0},b:{},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"258f33c73dcdfdb232fbc4b001a43ae5dc7da182"};var coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}return coverage[path]=coverageData;}();class Yarsay{constructor(){cov_4mo0jj89z.f[0]++;cov_4mo0jj89z.s[0]++;console.log('sup');}hit(){cov_4mo0jj89z.f[1]++;cov_4mo0jj89z.s[1]++;console.log('do not hit');cov_4mo0jj89z.s[2]++;let miss=()=>{cov_4mo0jj89z.f[2]++;cov_4mo0jj89z.s[3]++;console.log('do not hit');};}miss(){cov_4mo0jj89z.f[3]++;cov_4mo0jj89z.s[4]++;let miss=()=>{cov_4mo0jj89z.f[4]++;cov_4mo0jj89z.s[5]++;console.log('do not hit');};}}let y=(cov_4mo0jj89z.s[6]++,new Yarsay());cov_4mo0jj89z.s[7]++;y.hit(); diff --git a/test/fixtures/cli/gc.js b/test/fixtures/cli/gc.js new file mode 100644 index 000000000..66ff95fb5 --- /dev/null +++ b/test/fixtures/cli/gc.js @@ -0,0 +1,3 @@ +'use strict'; +gc(); +console.log('I’m still running'); diff --git a/test/fixtures/cli/half-covered-failing.js b/test/fixtures/cli/half-covered-failing.js index 254a54f0b..026512b64 100644 --- a/test/fixtures/cli/half-covered-failing.js +++ b/test/fixtures/cli/half-covered-failing.js @@ -1,6 +1,6 @@ var a = 0 -throw new Error +process.exit(1) if (a === 0) { a++; diff --git a/test/fixtures/cli/instrument-inplace/file1.js b/test/fixtures/cli/instrument-inplace/file1.js new file mode 100644 index 000000000..d8c7ef465 --- /dev/null +++ b/test/fixtures/cli/instrument-inplace/file1.js @@ -0,0 +1,5 @@ +function test() { + return 'file1' +} + +module.exports = test diff --git a/test/fixtures/cli/instrument-inplace/file2.js b/test/fixtures/cli/instrument-inplace/file2.js new file mode 100644 index 000000000..5ca85a3f0 --- /dev/null +++ b/test/fixtures/cli/instrument-inplace/file2.js @@ -0,0 +1,5 @@ +function test() { + return 'file2' +} + +module.exports = test diff --git a/test/fixtures/cli/instrument-inplace/package.json b/test/fixtures/cli/instrument-inplace/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/test/fixtures/cli/instrument-inplace/package.json @@ -0,0 +1 @@ +{} diff --git a/test/fixtures/cli/merge-input/a.json b/test/fixtures/cli/merge-input/a.json new file mode 100644 index 000000000..81f0ba143 --- /dev/null +++ b/test/fixtures/cli/merge-input/a.json @@ -0,0 +1,200 @@ +{ + "/private/tmp/contrived/library.js": { + "path": "/private/tmp/contrived/library.js", + "statementMap": { + "0": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 15, + "column": 1 + } + }, + "1": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 16 + } + }, + "2": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 16 + } + }, + "3": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 13, + "column": 5 + } + }, + "4": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 14 + } + }, + "5": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + "fnMap": { + "0": { + "name": "(anonymous_0)", + "decl": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 4, + "column": 3 + } + }, + "line": 2 + }, + "1": { + "name": "(anonymous_1)", + "decl": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + }, + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 7, + "column": 3 + } + }, + "line": 5 + }, + "2": { + "name": "(anonymous_2)", + "decl": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + }, + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 14, + "column": 3 + } + }, + "line": 8 + } + }, + "branchMap": { + "0": { + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 13, + "column": 5 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 13, + "column": 5 + } + }, + { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 13, + "column": 5 + } + } + ], + "line": 9 + } + }, + "s": { + "0": 1, + "1": 1, + "2": 0, + "3": 1, + "4": 0, + "5": 1 + }, + "f": { + "0": 1, + "1": 0, + "2": 1 + }, + "b": { + "0": [ + 0, + 1 + ] + }, + "_coverageSchema": "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c", + "hash": "e86c0c0fa7c4fadac81e2479bfba3c0d59b657aa" + } +} \ No newline at end of file diff --git a/test/fixtures/cli/merge-input/b.json b/test/fixtures/cli/merge-input/b.json new file mode 100644 index 000000000..bbef81594 --- /dev/null +++ b/test/fixtures/cli/merge-input/b.json @@ -0,0 +1,200 @@ +{ + "/private/tmp/contrived/library.js": { + "path": "/private/tmp/contrived/library.js", + "statementMap": { + "0": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 15, + "column": 1 + } + }, + "1": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 16 + } + }, + "2": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 16 + } + }, + "3": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 13, + "column": 5 + } + }, + "4": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 14 + } + }, + "5": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + "fnMap": { + "0": { + "name": "(anonymous_0)", + "decl": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 4, + "column": 3 + } + }, + "line": 2 + }, + "1": { + "name": "(anonymous_1)", + "decl": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + }, + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 7, + "column": 3 + } + }, + "line": 5 + }, + "2": { + "name": "(anonymous_2)", + "decl": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + }, + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 14, + "column": 3 + } + }, + "line": 8 + } + }, + "branchMap": { + "0": { + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 13, + "column": 5 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 13, + "column": 5 + } + }, + { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 13, + "column": 5 + } + } + ], + "line": 9 + } + }, + "s": { + "0": 1, + "1": 0, + "2": 1, + "3": 1, + "4": 1, + "5": 0 + }, + "f": { + "0": 0, + "1": 1, + "2": 1 + }, + "b": { + "0": [ + 1, + 0 + ] + }, + "_coverageSchema": "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c", + "hash": "e86c0c0fa7c4fadac81e2479bfba3c0d59b657aa" + } +} \ No newline at end of file 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/not-strict.js b/test/fixtures/cli/not-strict.js new file mode 100644 index 000000000..75ddca0a9 --- /dev/null +++ b/test/fixtures/cli/not-strict.js @@ -0,0 +1,5 @@ +function package() { + return 1; +} + +package(); 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/nycrc/.nycrc b/test/fixtures/cli/nycrc/.nycrc new file mode 100644 index 000000000..b5b5a0a32 --- /dev/null +++ b/test/fixtures/cli/nycrc/.nycrc @@ -0,0 +1,3 @@ +{ + "exclude": ["ignore.js"] +} diff --git a/test/fixtures/cli/nycrc/.nycrc-config.json b/test/fixtures/cli/nycrc/.nycrc-config.json new file mode 100644 index 000000000..85b404dca --- /dev/null +++ b/test/fixtures/cli/nycrc/.nycrc-config.json @@ -0,0 +1,9 @@ +{ + "check-coverage": true, + "per-file": true, + "lines": 100, + "statements": 100, + "functions": 100, + "branches": 100, + "exclude": [] +} diff --git a/test/fixtures/cli/nycrc/.nycrc.yaml b/test/fixtures/cli/nycrc/.nycrc.yaml new file mode 100644 index 000000000..ad4f1b6cf --- /dev/null +++ b/test/fixtures/cli/nycrc/.nycrc.yaml @@ -0,0 +1,2 @@ +exclude: +- ignore.js diff --git a/test/fixtures/cli/nycrc/.nycrc.yml b/test/fixtures/cli/nycrc/.nycrc.yml new file mode 100644 index 000000000..ad4f1b6cf --- /dev/null +++ b/test/fixtures/cli/nycrc/.nycrc.yml @@ -0,0 +1,2 @@ +exclude: +- ignore.js diff --git a/test/fixtures/cli/nycrc/ignore.js b/test/fixtures/cli/nycrc/ignore.js new file mode 100644 index 000000000..2ace002b5 --- /dev/null +++ b/test/fixtures/cli/nycrc/ignore.js @@ -0,0 +1 @@ +var i = 2 diff --git a/test/fixtures/cli/nycrc/index.js b/test/fixtures/cli/nycrc/index.js new file mode 100644 index 000000000..8f4dfee22 --- /dev/null +++ b/test/fixtures/cli/nycrc/index.js @@ -0,0 +1,11 @@ +require('./ignore') + +var a = 0 + +a++ + +if (a === 0) { + a++; + a--; + a++; +} diff --git a/test/fixtures/cli/nycrc/package.json b/test/fixtures/cli/nycrc/package.json new file mode 100644 index 000000000..d73c43154 --- /dev/null +++ b/test/fixtures/cli/nycrc/package.json @@ -0,0 +1,5 @@ +{ + "nyc": { + "reporter": ["text-lcov"] + } +} diff --git a/test/fixtures/cli/package.json b/test/fixtures/cli/package.json index 352055cdf..d67ca669e 100644 --- a/test/fixtures/cli/package.json +++ b/test/fixtures/cli/package.json @@ -1,3 +1,6 @@ { - "private": true + "private": true, + "nyc": { + "reporter": ["text"] + } } diff --git a/test/fixtures/cli/selfspawn-fibonacci.js b/test/fixtures/cli/selfspawn-fibonacci.js new file mode 100644 index 000000000..8d983a68a --- /dev/null +++ b/test/fixtures/cli/selfspawn-fibonacci.js @@ -0,0 +1,32 @@ +'use strict'; +var cp = require('child_process'); + +process.env = {}; + +var index = +process.argv[2] || 0 +if (index <= 1) { + console.log(0) + return +} +if (index == 2) { + console.log(1) + return +} + +function getFromChild(n, cb) { + var proc = cp.spawn(process.execPath, [__filename, n]) + var stdout = '' + proc.stdout.on('data', function (data) { stdout += data }) + proc.on('close', function () { + cb(null, +stdout) + }) + proc.on('error', cb) +} + +getFromChild(index - 1, function(err, result1) { + if (err) throw err + getFromChild(index - 2, function(err, result2) { + if (err) throw err + console.log(result1 + result2) + }) +}) diff --git a/test/fixtures/cli/skip-full.js b/test/fixtures/cli/skip-full.js new file mode 100644 index 000000000..6fa00f726 --- /dev/null +++ b/test/fixtures/cli/skip-full.js @@ -0,0 +1,2 @@ +require('./empty') +require('./half-covered') \ No newline at end of file diff --git a/test/fixtures/cli/subdir/.gitignore b/test/fixtures/cli/subdir/.gitignore new file mode 100644 index 000000000..a5cb0329a --- /dev/null +++ b/test/fixtures/cli/subdir/.gitignore @@ -0,0 +1,2 @@ +output-dir +!node_modules diff --git a/test/fixtures/cli/subdir/input-dir/bad.js b/test/fixtures/cli/subdir/input-dir/bad.js new file mode 100644 index 000000000..d64a60cb1 --- /dev/null +++ b/test/fixtures/cli/subdir/input-dir/bad.js @@ -0,0 +1 @@ +generate async futurelet console.log('Hello, World!') // this isn't real JS. 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/index.js b/test/fixtures/cli/subdir/input-dir/index.js new file mode 100644 index 000000000..239a04e74 --- /dev/null +++ b/test/fixtures/cli/subdir/input-dir/index.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/conf-multiple-extensions/check-instrumented.es6 b/test/fixtures/conf-multiple-extensions/check-instrumented.es6 index 4e91f940d..b36853cbb 100644 --- a/test/fixtures/conf-multiple-extensions/check-instrumented.es6 +++ b/test/fixtures/conf-multiple-extensions/check-instrumented.es6 @@ -3,5 +3,5 @@ function probe () {} // When instrumented there will be references to variables like // __cov_pwkoI2PYHp3LJXkn_erl1Q in the probe() source. module.exports = function () { - return /\b__cov_\B/.test(probe + '') + return /\bcov_\B/.test(probe + '') } diff --git a/test/fixtures/conf-multiple-extensions/check-instrumented.foo.bar b/test/fixtures/conf-multiple-extensions/check-instrumented.foo.bar index 4e91f940d..b36853cbb 100644 --- a/test/fixtures/conf-multiple-extensions/check-instrumented.foo.bar +++ b/test/fixtures/conf-multiple-extensions/check-instrumented.foo.bar @@ -3,5 +3,5 @@ function probe () {} // When instrumented there will be references to variables like // __cov_pwkoI2PYHp3LJXkn_erl1Q in the probe() source. module.exports = function () { - return /\b__cov_\B/.test(probe + '') + return /\bcov_\B/.test(probe + '') } diff --git a/test/fixtures/conf-multiple-extensions/run.js b/test/fixtures/conf-multiple-extensions/run.js new file mode 100644 index 000000000..b63af05a6 --- /dev/null +++ b/test/fixtures/conf-multiple-extensions/run.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +'use strict'; + +console.log('run'); diff --git a/test/fixtures/eager.js b/test/fixtures/eager.js new file mode 100644 index 000000000..473b9ff56 --- /dev/null +++ b/test/fixtures/eager.js @@ -0,0 +1,5 @@ +#!/usr/bin/env node +'use strict' + +const lib = require.resolve('istanbul-lib-instrument') +console.log(Object.keys(require.cache).filter(s => s === lib).length) 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/hooks/index.js b/test/fixtures/hooks/index.js new file mode 100644 index 000000000..11a3d06c9 --- /dev/null +++ b/test/fixtures/hooks/index.js @@ -0,0 +1,16 @@ +// RequireJS uses `vm.runInThisContext` +// make sure we add hooks for it as well + +var rjs = require('requirejs'), + assert = require('assert'); + +rjs.config({ + baseUrl : __dirname, + nodeRequire : require +}); + +rjs(['./lib/lorem'], function(lorem){ + var result = lorem(1, 2, 3); + assert.equal(9, result); +}); + diff --git a/test/fixtures/hooks/lib/ipsum.js b/test/fixtures/hooks/lib/ipsum.js new file mode 100644 index 000000000..7711fc17d --- /dev/null +++ b/test/fixtures/hooks/lib/ipsum.js @@ -0,0 +1,11 @@ +define(function(){ + + function sum(a, b) { + return a + b; + } + + return { + sum : sum + }; + +}); diff --git a/test/fixtures/hooks/lib/lorem.js b/test/fixtures/hooks/lib/lorem.js new file mode 100644 index 000000000..8ed33a888 --- /dev/null +++ b/test/fixtures/hooks/lib/lorem.js @@ -0,0 +1,7 @@ +define(['./ipsum'], function (ipsum) { + + return function exec(a, b, c){ + return ipsum.sum(a, b) * c; + }; + +}); diff --git a/test/fixtures/hooks/package.json b/test/fixtures/hooks/package.json new file mode 100644 index 000000000..e0fb68583 --- /dev/null +++ b/test/fixtures/hooks/package.json @@ -0,0 +1,10 @@ +{ + "name": "hooktest", + "version": "1.1.1", + "description": "AMD/ requirejs test project", + "main": "index.js", + "dependencies": { + "requirejs": "^2.2.0" + }, + "private": true +} diff --git a/test/fixtures/hooks/run-in-context.js b/test/fixtures/hooks/run-in-context.js new file mode 100644 index 000000000..653a45dac --- /dev/null +++ b/test/fixtures/hooks/run-in-context.js @@ -0,0 +1,9 @@ +'use strict' +const path = require('path') +const vm = require('vm') + +vm.runInContext( + '(() => 10)();', + vm.createContext({}), + path.resolve(__dirname, 'in-context.js') +) diff --git a/test/fixtures/identical-file-runner.js b/test/fixtures/identical-file-runner.js new file mode 100755 index 000000000..3c35cae1b --- /dev/null +++ b/test/fixtures/identical-file-runner.js @@ -0,0 +1,14 @@ +const path = require('path') +const assert = require('assert') +const file1 = require('./identical-file1.js') +const file2 = require('./identical-file2.js') + +assert.equal(file1(), file2()) + +const cov = (new Function('return this.__coverage__'))() + +assert.deepEqual(Object.keys(cov).sort(), [ + __filename, + path.resolve('identical-file1.js'), + path.resolve('identical-file2.js') +]) diff --git a/test/fixtures/identical-file1.js b/test/fixtures/identical-file1.js new file mode 100644 index 000000000..f4c919dc1 --- /dev/null +++ b/test/fixtures/identical-file1.js @@ -0,0 +1,5 @@ +function identical() { + return 'identical' +} + +module.exports = identical diff --git a/test/fixtures/identical-file2.js b/test/fixtures/identical-file2.js new file mode 100644 index 000000000..f4c919dc1 --- /dev/null +++ b/test/fixtures/identical-file2.js @@ -0,0 +1,5 @@ +function identical() { + return 'identical' +} + +module.exports = identical diff --git a/test/fixtures/nyc.config.js b/test/fixtures/nyc.config.js new file mode 100644 index 000000000..f925162f5 --- /dev/null +++ b/test/fixtures/nyc.config.js @@ -0,0 +1,4 @@ +'use strict' + +// This just blocks fixtures from seeing the root nyc.config.js +module.exports = {} 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/fixtures/parser-plugins/no-plugins.json b/test/fixtures/parser-plugins/no-plugins.json new file mode 100644 index 000000000..e95c94f2e --- /dev/null +++ b/test/fixtures/parser-plugins/no-plugins.json @@ -0,0 +1,3 @@ +{ + "parser-plugins": [] +} diff --git a/test/fixtures/parser-plugins/package.json b/test/fixtures/parser-plugins/package.json new file mode 100644 index 000000000..d655f2ed8 --- /dev/null +++ b/test/fixtures/parser-plugins/package.json @@ -0,0 +1,7 @@ +{ + "nyc": { + "parser-plugins": [ + "v8intrinsic" + ] + } +} diff --git a/test/fixtures/parser-plugins/v8.js b/test/fixtures/parser-plugins/v8.js new file mode 100644 index 000000000..74c572a08 --- /dev/null +++ b/test/fixtures/parser-plugins/v8.js @@ -0,0 +1,2 @@ +function fn() {} +%GetOptimizationStatus(fn) diff --git a/test/fixtures/recursive-run/package.json b/test/fixtures/recursive-run/package.json new file mode 100644 index 000000000..ad0d28273 --- /dev/null +++ b/test/fixtures/recursive-run/package.json @@ -0,0 +1,5 @@ +{ + "nyc": { + "reporter": [] + } +} diff --git a/test/fixtures/report.js b/test/fixtures/report.js deleted file mode 100644 index 205e21d18..000000000 --- a/test/fixtures/report.js +++ /dev/null @@ -1,793 +0,0 @@ -// Generated using node test/fixtures/_generateReport.js -exports["node_modules/source-map-fixtures/fixtures/bundle-inline.js"] = { - "path": "node_modules/source-map-fixtures/fixtures/bundle-inline.js", - "s": { - "1": 1, - "2": 1, - "3": 1, - "4": 0, - "5": 1, - "6": 0, - "7": 0, - "8": 1, - "9": 0, - "10": 1, - "11": 0, - "12": 1, - "13": 1, - "14": 1, - "15": 1 - }, - "b": { - "1": [ - 0, - 1 - ], - "2": [ - 0, - 0 - ] - }, - "f": { - "1": 1, - "2": 0, - "3": 0, - "4": 0 - }, - "fnMap": { - "1": { - "name": "(anonymous_1)", - "line": 6, - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "2": { - "name": "(anonymous_2)", - "line": 12, - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "3": { - "name": "(anonymous_3)", - "line": 19, - "loc": { - "start": { - "line": 19, - "column": 8 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "4": { - "name": "(anonymous_4)", - "line": 23, - "loc": { - "start": { - "line": 23, - "column": 8 - }, - "end": { - "line": 23, - "column": 20 - } - } - } - }, - "statementMap": { - "1": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 5, - "column": 3 - } - }, - "2": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 10, - "column": 2 - } - }, - "3": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 9, - "column": 3 - } - }, - "4": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 16 - } - }, - "5": { - "start": { - "line": 12, - "column": 0 - }, - "end": { - "line": 17, - "column": 2 - } - }, - "6": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 16, - "column": 3 - } - }, - "7": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 16 - }, - "skip": true - }, - "8": { - "start": { - "line": 19, - "column": 0 - }, - "end": { - "line": 21, - "column": 2 - } - }, - "9": { - "start": { - "line": 20, - "column": 2 - }, - "end": { - "line": 20, - "column": 12 - } - }, - "10": { - "start": { - "line": 23, - "column": 0 - }, - "end": { - "line": 25, - "column": 2 - } - }, - "11": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 51 - } - }, - "12": { - "start": { - "line": 27, - "column": 0 - }, - "end": { - "line": 27, - "column": 22 - } - }, - "13": { - "start": { - "line": 28, - "column": 0 - }, - "end": { - "line": 28, - "column": 29 - } - }, - "14": { - "start": { - "line": 29, - "column": 0 - }, - "end": { - "line": 29, - "column": 19 - } - }, - "15": { - "start": { - "line": 30, - "column": 0 - }, - "end": { - "line": 30, - "column": 19 - } - } - }, - "branchMap": { - "1": { - "line": 7, - "type": "if", - "locations": [ - { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 2 - } - }, - { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 2 - } - } - ] - }, - "2": { - "line": 14, - "type": "if", - "locations": [ - { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 2 - }, - "skip": true - }, - { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 2 - } - } - ] - } - } -} -exports["node_modules/source-map-fixtures/fixtures/branching-inline.js"] = { - "path": "node_modules/source-map-fixtures/fixtures/branching-inline.js", - "s": { - "1": 1, - "2": 1, - "3": 1, - "4": 1, - "5": 1 - }, - "b": { - "1": [ - 1, - 0 - ] - }, - "f": { - "1": 1 - }, - "fnMap": { - "1": { - "name": "(anonymous_1)", - "line": 6, - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - }, - "statementMap": { - "1": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 5, - "column": 3 - } - }, - "2": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 10, - "column": 2 - } - }, - "3": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 9, - "column": 3 - } - }, - "4": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 16 - } - }, - "5": { - "start": { - "line": 11, - "column": 0 - }, - "end": { - "line": 11, - "column": 16 - } - } - }, - "branchMap": { - "1": { - "line": 7, - "type": "if", - "locations": [ - { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 2 - } - }, - { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 2 - } - } - ] - } - } -} -exports["node_modules/source-map-fixtures/fixtures/istanbul-ignore-inline.js"] = { - "path": "node_modules/source-map-fixtures/fixtures/istanbul-ignore-inline.js", - "s": { - "1": 1, - "2": 1, - "3": 1, - "4": 0, - "5": 1 - }, - "b": { - "1": [ - 0, - 1 - ] - }, - "f": { - "1": 1 - }, - "fnMap": { - "1": { - "name": "(anonymous_1)", - "line": 6, - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - }, - "statementMap": { - "1": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 5, - "column": 3 - } - }, - "2": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 11, - "column": 2 - } - }, - "3": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 10, - "column": 3 - } - }, - "4": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 16 - }, - "skip": true - }, - "5": { - "start": { - "line": 12, - "column": 0 - }, - "end": { - "line": 12, - "column": 16 - } - } - }, - "branchMap": { - "1": { - "line": 8, - "type": "if", - "locations": [ - { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 2 - }, - "skip": true - }, - { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 2 - } - } - ] - } - } -} -exports["node_modules/source-map-fixtures/fixtures/istanbul-ignore-fn-inline.js"] = { - "path": "node_modules/source-map-fixtures/fixtures/istanbul-ignore-fn-inline.js", - "s": { - "1": 1, - "2": 1, - "3": 1, - "4": 0, - "5": 1, - "6": 1 - }, - "b": { - "1": [ - 0, - 1 - ] - }, - "f": { - "1": 1, - "2": 0 - }, - "fnMap": { - "1": { - "name": "(anonymous_1)", - "line": 6, - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "2": { - "name": "(anonymous_2)", - "line": 15, - "loc": { - "start": { - "line": 15, - "column": 10 - }, - "end": { - "line": 15, - "column": 22 - } - }, - "skip": true - } - }, - "statementMap": { - "1": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 5, - "column": 3 - } - }, - "2": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 10, - "column": 2 - } - }, - "3": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 9, - "column": 3 - } - }, - "4": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 17 - } - }, - "5": { - "start": { - "line": 11, - "column": 0 - }, - "end": { - "line": 11, - "column": 16 - } - }, - "6": { - "start": { - "line": 15, - "column": 0 - }, - "end": { - "line": 15, - "column": 25 - }, - "skip": true - } - }, - "branchMap": { - "1": { - "line": 7, - "type": "if", - "locations": [ - { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 2 - } - }, - { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 2 - } - } - ] - } - } -} -exports["node_modules/source-map-fixtures/fixtures/branching-none.js"] = { - "path": "node_modules/source-map-fixtures/fixtures/branching-none.js", - "s": { - "1": 1, - "2": 1, - "3": 1, - "4": 0, - "5": 1 - }, - "b": { - "1": [ - 0, - 1 - ] - }, - "f": { - "1": 1 - }, - "fnMap": { - "1": { - "name": "(anonymous_1)", - "line": 6, - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - }, - "statementMap": { - "1": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 5, - "column": 3 - } - }, - "2": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 10, - "column": 2 - } - }, - "3": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 9, - "column": 3 - } - }, - "4": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 16 - } - }, - "5": { - "start": { - "line": 11, - "column": 0 - }, - "end": { - "line": 11, - "column": 16 - } - } - }, - "branchMap": { - "1": { - "line": 7, - "type": "if", - "locations": [ - { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 2 - } - }, - { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 2 - } - } - ] - } - } -} diff --git a/test/fixtures/source-maps/instrumented/s1.min.js b/test/fixtures/source-maps/instrumented/s1.min.js new file mode 100644 index 000000000..bdc3399c1 --- /dev/null +++ b/test/fixtures/source-maps/instrumented/s1.min.js @@ -0,0 +1,2 @@ +var apple=99;var banana=200;function add(item1,item2){return item1+item2}function multiply(item1,item2){return item1*item2}add(apple,banana); +//# sourceMappingURL=s1.min.js.map diff --git a/test/fixtures/source-maps/instrumented/s1.min.js.map b/test/fixtures/source-maps/instrumented/s1.min.js.map new file mode 100644 index 000000000..f7cc9a29a --- /dev/null +++ b/test/fixtures/source-maps/instrumented/s1.min.js.map @@ -0,0 +1 @@ +{"version":3, "sourceRoot": "../", "sources":["original/s1.js"],"names":["apple","banana","add","item1","item2","multiply"],"mappings":"AAAA,IAAIA,MAAQ,GACZ,IAAIC,OAAS,IACb,SAASC,IAAKC,MAAOC,OACnB,OAAOD,MAAQC,MAEjB,SAASC,SAAUF,MAAOC,OACxB,OAAOD,MAAQC,MAEjBF,IAAIF,MAAOC"} diff --git a/test/fixtures/source-maps/instrumented/s2.min.js b/test/fixtures/source-maps/instrumented/s2.min.js new file mode 100644 index 000000000..818a9926d --- /dev/null +++ b/test/fixtures/source-maps/instrumented/s2.min.js @@ -0,0 +1,2 @@ +var strawberry=99;var pineapple=200;function add(item1,item2){return item1+item2}add(strawberry,pineapple); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9yaWdpbmFsL3MyLmpzIl0sIm5hbWVzIjpbInN0cmF3YmVycnkiLCJwaW5lYXBwbGUiLCJhZGQiLCJpdGVtMSIsIml0ZW0yIl0sIm1hcHBpbmdzIjoiQUFBQSxJQUFJQSxXQUFhLEdBQ2pCLElBQUlDLFVBQVksSUFDaEIsU0FBU0MsSUFBS0MsTUFBT0MsT0FDbkIsT0FBT0QsTUFBUUMsTUFFakJGLElBQUlGLFdBQVlDIiwic291cmNlUm9vdCI6Ii4uLyJ9 \ No newline at end of file diff --git a/test/fixtures/source-maps/original/s1.js b/test/fixtures/source-maps/original/s1.js new file mode 100644 index 000000000..03dbd8a31 --- /dev/null +++ b/test/fixtures/source-maps/original/s1.js @@ -0,0 +1,9 @@ +var apple = 99 +var banana = 200 +function add (item1, item2) { + return item1 + item2 +} +function multiply (item1, item2) { + return item1 * item2 +} +add(apple, banana) diff --git a/test/fixtures/source-maps/original/s2.js b/test/fixtures/source-maps/original/s2.js new file mode 100644 index 000000000..372734f87 --- /dev/null +++ b/test/fixtures/source-maps/original/s2.js @@ -0,0 +1,6 @@ +var strawberry = 99 +var pineapple = 200 +function add (item1, item2) { + return item1 + item2 +} +add(strawberry, pineapple) diff --git a/test/fixtures/source-maps/package.json b/test/fixtures/source-maps/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/test/fixtures/source-maps/package.json @@ -0,0 +1 @@ +{} diff --git a/test/fixtures/stack-trace.js b/test/fixtures/stack-trace.js new file mode 100644 index 000000000..b356fb6c5 --- /dev/null +++ b/test/fixtures/stack-trace.js @@ -0,0 +1,16 @@ +'use strict'; + +function blah() { + throw new Error('Blarrh') +} + +var stack; +try { + blah(); +} catch(err) { + stack = err.stack; +} + +module.exports = function() { + return stack; +} diff --git a/test/fixtures/transpile-hook.js b/test/fixtures/transpile-hook.js index 86ac43d88..2d5d5bf94 100644 --- a/test/fixtures/transpile-hook.js +++ b/test/fixtures/transpile-hook.js @@ -4,3 +4,12 @@ require.extensions['.js'] = function (module, filename) { var content = fs.readFileSync(filename, 'utf8'); module._compile(content.replace('--> pork chop sandwiches <--', ''), filename); } + +require.extensions['.whatever'] = function (module, filename) { + var content = fs.readFileSync(filename, 'utf8'); + module._compile(content.replace('--> pork chop sandwiches <--', ''), filename); +} + +require.extensions['.do-not-transpile'] = function (module, filename) { + throw new Error(`Should not transpile ${filename}`) +} \ No newline at end of file diff --git a/test/fixtures/tsc/.npmrc b/test/fixtures/tsc/.npmrc new file mode 100644 index 000000000..43c97e719 --- /dev/null +++ b/test/fixtures/tsc/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/test/fixtures/tsc/mapping.js b/test/fixtures/tsc/mapping.js new file mode 100644 index 000000000..7abbab206 --- /dev/null +++ b/test/fixtures/tsc/mapping.js @@ -0,0 +1,16 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +function munge1(obj) { + return __assign({ name: 'munge1' }, obj); +} +munge1({}); +//# sourceMappingURL=mapping.js.map \ No newline at end of file diff --git a/test/fixtures/tsc/mapping.js.map b/test/fixtures/tsc/mapping.js.map new file mode 100644 index 000000000..e89dc7a6a --- /dev/null +++ b/test/fixtures/tsc/mapping.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapping.js","sourceRoot":"","sources":["mapping.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,SAAS,MAAM,CAAE,GAAW;IAC1B,kBACE,IAAI,EAAE,QAAQ,IACX,GAAG,EACN;AACJ,CAAC;AAED,MAAM,CAAC,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/test/fixtures/tsc/mapping.ts b/test/fixtures/tsc/mapping.ts new file mode 100644 index 000000000..bb37a9db1 --- /dev/null +++ b/test/fixtures/tsc/mapping.ts @@ -0,0 +1,8 @@ +function munge1 (obj: Object) { + return { + name: 'munge1', + ...obj + }; +} + +munge1({}) diff --git a/test/fixtures/tsc/package.json b/test/fixtures/tsc/package.json new file mode 100644 index 000000000..59eeac666 --- /dev/null +++ b/test/fixtures/tsc/package.json @@ -0,0 +1,15 @@ +{ + "private": true, + "scripts": { + "postinstall": "tsc" + }, + "devDependencies": { + "typescript": "^3.6.3" + }, + "nyc": { + "reporter": [ + "text", + "html" + ] + } +} diff --git a/test/fixtures/tsc/tsconfig.json b/test/fixtures/tsc/tsconfig.json new file mode 100644 index 000000000..f0e13c61b --- /dev/null +++ b/test/fixtures/tsc/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "sourceMap": true + }, + "files": [ + "mapping.ts" + ] +} diff --git a/test/helpers/env-check-config.js b/test/helpers/env-check-config.js new file mode 100644 index 000000000..150dd340e --- /dev/null +++ b/test/helpers/env-check-config.js @@ -0,0 +1,29 @@ +'use strict' + +const runNYC = require('./run-nyc') + +async function envCheckConfig (t, { configArgs, checkOptions }) { + const { stdout, stderr, status } = await runNYC({ + tempDir: t.tempDir, + leavePathSep: true, + args: [ + ...configArgs, + process.execPath, + './env.js' + ] + }) + + const config = JSON.parse(JSON.parse(stdout).NYC_CONFIG) + + t.is(status, 0) + t.is(stderr, '') + t.matchSnapshot( + JSON.stringify( + checkOptions.sort().map(option => [option, config[option]]), + null, + 2 + ) + ) +} + +module.exports = envCheckConfig diff --git a/test/helpers/index.js b/test/helpers/index.js new file mode 100644 index 000000000..4041a0fe5 --- /dev/null +++ b/test/helpers/index.js @@ -0,0 +1,16 @@ +'use strict' + +const { fixturesCLI, nycBin } = require('./paths') + +module.exports = { + fixturesCLI, + nycBin, + resetState: require('./reset-state'), + spawn: require('./spawn'), + testSuccess: require('./test-success'), + testFailure: require('./test-failure'), + runNYC: require('./run-nyc'), + tempDirSetup: require('./temp-dir-setup'), + envCheckConfig: require('./env-check-config'), + parseArgv: require('./parse-argv') +} diff --git a/test/helpers/parse-argv.js b/test/helpers/parse-argv.js new file mode 100644 index 000000000..68e874219 --- /dev/null +++ b/test/helpers/parse-argv.js @@ -0,0 +1,11 @@ +'use strict' + +const configUtil = require('../../self-coverage/lib/config-util') + +async function parseArgv (cwd, argv) { + const { yargs } = await configUtil(cwd) + + return yargs.parse(argv) +} + +module.exports = parseArgv diff --git a/test/helpers/paths.js b/test/helpers/paths.js new file mode 100644 index 000000000..0bca0156a --- /dev/null +++ b/test/helpers/paths.js @@ -0,0 +1,8 @@ +'use strict' + +const path = require('path') + +module.exports = { + nycBin: require.resolve('../../self-coverage/bin/nyc'), + fixturesCLI: path.resolve(__dirname, '../fixtures/cli') +} diff --git a/test/helpers/reset-state.js b/test/helpers/reset-state.js new file mode 100644 index 000000000..f11c5e8ec --- /dev/null +++ b/test/helpers/reset-state.js @@ -0,0 +1,32 @@ +'use strict' + +const { promisify } = require('util') + +// reset global state modified by nyc in non-integration tests. +const extensions = Object.assign({}, require.extensions) // eslint-disable-line + +const glob = promisify(require('glob')) +const rimraf = promisify(require('rimraf')) + +module.exports = async function () { + // nuke any temporary files created during test runs. + const files = await glob('test/**/*/{.nyc_output,.cache}') + await Promise.all(files.map(f => rimraf(f))) + + // 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/helpers/run-nyc.js b/test/helpers/run-nyc.js new file mode 100644 index 000000000..ca0adcecf --- /dev/null +++ b/test/helpers/run-nyc.js @@ -0,0 +1,55 @@ +'use strict' + +const { nycBin, fixturesCLI } = require('./paths') +const spawn = require('./spawn') + +const envPath = { + PATH: process.env.PATH +} + +// Work around a Windows issue with `APPDATA`, +// https://github.com/istanbuljs/nyc/issues/1248 +if ('APPDATA' in process.env) { + envPath.APPDATA = process.env.APPDATA +} + +function sanitizeString (str, cwd, leavePathSep) { + /* + * File paths are different on different systems: + * - make everything relative to cwd + * - replace full node path with 'node' + * - replace all Windows path separators ('\\') with POSIX path separators + */ + str = str + .split(cwd).join('.') + .split(process.execPath).join('node') + + if (!leavePathSep) { + str = str.replace(/\\/g, '/') + } + + return str +} + +async function runNYC ({ args, tempDir, leavePathSep, cwd = fixturesCLI, env = {} }) { + const runArgs = [nycBin].concat(tempDir ? ['--temp-dir', tempDir] : [], args) + const { status, stderr, stdout } = await spawn(process.execPath, runArgs, { + cwd: cwd, + env: { + ...envPath, + ...env + } + }) + + return { + status, + originalText: { + stderr, + stdout + }, + stderr: sanitizeString(stderr, cwd, leavePathSep), + stdout: sanitizeString(stdout, cwd, leavePathSep) + } +} + +module.exports = runNYC diff --git a/test/helpers/source-map-support.js b/test/helpers/source-map-support.js new file mode 100644 index 000000000..43ad83aeb --- /dev/null +++ b/test/helpers/source-map-support.js @@ -0,0 +1,3 @@ +'use strict' + +require('source-map-support').install({ hookRequire: true }) diff --git a/test/helpers/spawn.js b/test/helpers/spawn.js new file mode 100644 index 000000000..c24d484c8 --- /dev/null +++ b/test/helpers/spawn.js @@ -0,0 +1,25 @@ +'use strict' + +const cp = require('child_process') + +function spawn (exe, args, opts) { + return new Promise((resolve, reject) => { + const proc = cp.spawn(exe, args, opts) + const stdout = [] + const stderr = [] + + proc.stdout.on('data', buf => stdout.push(buf)) + proc.stderr.on('data', buf => stderr.push(buf)) + + proc.on('error', reject) + proc.on('close', status => { + resolve({ + status, + stdout: Buffer.concat(stdout).toString(), + stderr: Buffer.concat(stderr).toString() + }) + }) + }) +} + +module.exports = spawn diff --git a/test/helpers/temp-dir-setup.js b/test/helpers/temp-dir-setup.js new file mode 100644 index 000000000..df61807e1 --- /dev/null +++ b/test/helpers/temp-dir-setup.js @@ -0,0 +1,31 @@ +'use strict' + +const path = require('path') +const fs = require('fs') +const makeDir = require('make-dir') +const _rimraf = require('rimraf') +const { promisify } = require('util') + +const rimraf = promisify(_rimraf) +const mkdtemp = promisify(fs.mkdtemp) + +function tempDirSetup (t, testFile) { + const { dir, name } = path.parse(testFile) + const tempDirBase = path.resolve(dir, 'temp-dir-' + name) + + makeDir.sync(tempDirBase) + + // Do not use arrow function for beforeEach + // or afterEach, they need this from tap. + t.beforeEach(async function () { + this.tempDir = await mkdtemp(tempDirBase + '/') + }) + + t.afterEach(function () { + return rimraf(this.tempDir) + }) + + t.tearDown(() => rimraf(tempDirBase)) +} + +module.exports = tempDirSetup diff --git a/test/helpers/test-failure.js b/test/helpers/test-failure.js new file mode 100644 index 000000000..e99ecc566 --- /dev/null +++ b/test/helpers/test-failure.js @@ -0,0 +1,16 @@ +'use strict' + +const runNYC = require('./run-nyc') + +async function testFailure (t, opts) { + const { status, stderr, stdout } = await runNYC({ + tempDir: t.tempDir, + ...opts + }) + + t.equal(status, 1) + t.matchSnapshot(stderr, 'stderr') + t.matchSnapshot(stdout, 'stdout') +} + +module.exports = testFailure diff --git a/test/helpers/test-success.js b/test/helpers/test-success.js new file mode 100644 index 000000000..0841cbc3d --- /dev/null +++ b/test/helpers/test-success.js @@ -0,0 +1,16 @@ +'use strict' + +const runNYC = require('./run-nyc') + +async function testSuccess (t, opts) { + const { status, stderr, stdout } = await runNYC({ + tempDir: t.tempDir, + ...opts + }) + + t.equal(status, 0) + t.equal(stderr, '') + t.matchSnapshot(stdout, 'stdout') +} + +module.exports = testSuccess diff --git a/test/instrument.js b/test/instrument.js new file mode 100644 index 000000000..284c2f1cb --- /dev/null +++ b/test/instrument.js @@ -0,0 +1,355 @@ +'use strict' + +const fs = require('../lib/fs-promises') +const path = require('path') +const { promisify } = require('util') + +const t = require('tap') +const makeDir = require('make-dir') +const isWindows = require('is-windows')() +const rimraf = promisify(require('rimraf')) + +const { runNYC, testSuccess, fixturesCLI } = require('./helpers') + +const subdir = path.resolve(fixturesCLI, 'subdir') +const outputDir = path.resolve(subdir, './output-dir') +const removedByClean = path.resolve(outputDir, 'removed-by-clean') + +function cleanup () { + return Promise.all([ + rimraf(path.resolve(subdir, 'output-dir')), + rimraf(path.resolve(fixturesCLI, 'output-dir')) + ]) +} + +t.test('clean before', cleanup) +t.afterEach(cleanup) + +t.test('works in directories without a package.json', async t => { + const { status } = await runNYC({ + args: ['instrument', './input-dir', './output-dir'], + cwd: subdir + }) + + t.strictEqual(status, 0) + const target = path.resolve(subdir, 'output-dir', 'index.js') + t.match(await fs.readFile(target, 'utf8'), /console.log\('Hello, World!'\)/) +}) + +t.test('can be configured to exit on error', async t => { + const { status } = await runNYC({ + args: ['instrument', '--exit-on-error', './input-dir', './output-dir'], + cwd: subdir + }) + + t.strictEqual(status, 1) +}) + +t.test('allows a single file to be instrumented', async t => { + const inputPath = path.resolve(fixturesCLI, './half-covered.js') + const inputMode = (await fs.stat(inputPath)).mode & 0o7777 + const newMode = 0o775 + if (!isWindows) { + await fs.chmod(inputPath, newMode) + } + + const { status } = await runNYC({ + args: ['instrument', './half-covered.js', outputDir] + }) + + t.strictEqual(status, 0) + + const files = await fs.readdir(outputDir) + t.strictSame(files, ['half-covered.js']) + + if (!isWindows) { + const outputPath = path.resolve(outputDir, 'half-covered.js') + const outputMode = (await fs.stat(outputPath)).mode & 0o7777 + t.strictEqual(outputMode, newMode) + + await fs.chmod(inputPath, inputMode) + } +}) + +t.test('allows a directory of files to be instrumented', async t => { + const { status } = await runNYC({ + args: ['instrument', './nyc-config-js', outputDir] + }) + + t.strictEqual(status, 0) + + const files = fs.readdirSync(outputDir) + t.strictEqual(files.includes('index.js'), true) + t.strictEqual(files.includes('ignore.js'), true) + t.strictEqual(files.includes('package.json'), false) + t.strictEqual(files.includes('node_modules'), false) + + const includeTarget = path.resolve(outputDir, 'ignore.js') + t.match(await fs.readFile(includeTarget, 'utf8'), /function cov_/) +}) + +t.test('copies all files from to as well as those that have been instrumented', async t => { + // force node_modules to exist so we can verify that it is copied. + const nmDir = path.resolve(fixturesCLI, 'nyc-config-js', 'node_modules') + await makeDir(nmDir) + await fs.writeFile(path.join(nmDir, 'test-file'), '') + + const { status } = await runNYC({ + args: ['instrument', '--complete-copy', './nyc-config-js', outputDir] + }) + + t.strictEqual(status, 0) + + const files = await fs.readdir(outputDir) + t.strictEqual(files.includes('index.js'), true) + t.strictEqual(files.includes('ignore.js'), true) + t.strictEqual(files.includes('package.json'), true) + t.strictEqual(files.includes('node_modules'), true) + + const includeTarget = path.resolve(outputDir, 'ignore.js') + t.match(await fs.readFile(includeTarget, 'utf8'), /function cov_/) +}) + +t.test('can instrument the project directory', async t => { + const { status } = await runNYC({ + args: ['instrument', '.', outputDir] + }) + + t.strictEqual(status, 0) + + const files = await fs.readdir(outputDir) + t.strictEqual(files.includes('args.js'), true) + t.strictEqual(files.includes('subdir'), true) +}) + +t.test('allows a sub-directory of files to be instrumented', async t => { + const { status } = await runNYC({ + args: ['instrument', './subdir/input-dir', outputDir] + }) + + t.strictEqual(status, 0) + + const files = await fs.readdir(outputDir) + t.strictEqual(files.includes('index.js'), true) +}) + +t.test('allows a subdirectory to be excluded via .nycrc file', async t => { + const { status } = await runNYC({ + args: [ + 'instrument', + '--nycrc-path', + './.instrument-nycrc', + './subdir/input-dir', + outputDir + ] + }) + + t.strictEqual(status, 0) + + const files = fs.readdirSync(outputDir) + t.strictEqual(files.includes('exclude-me'), true) + t.strictEqual(files.includes('node_modules'), true) + t.strictEqual(files.includes('index.js'), true) + t.strictEqual(files.includes('bad.js'), true) + + const includeTarget = path.resolve(outputDir, 'index.js') + t.match(await fs.readFile(includeTarget, 'utf8'), /function cov_/) + + const excludeTarget = path.resolve(outputDir, 'exclude-me', 'index.js') + t.notMatch(await fs.readFile(excludeTarget, 'utf8'), /function cov_/) +}) + +t.test('allows a file to be excluded', async t => { + const { status } = await runNYC({ + args: [ + 'instrument', + '--complete-copy', + '--exclude', + 'exclude-me/index.js', + './subdir/input-dir', + outputDir + ] + }) + + t.strictEqual(status, 0) + + const files = await fs.readdir(outputDir) + t.strictEqual(files.includes('exclude-me'), true) + + const excludeTarget = path.resolve(outputDir, 'exclude-me', 'index.js') + t.notMatch(await fs.readFile(excludeTarget, 'utf8'), /function cov_/) +}) + +t.test('allows specifying a single sub-directory to be included', async t => { + const { status } = await runNYC({ + args: [ + 'instrument', + '--include', + '**/include-me/**', + './subdir/input-dir', + outputDir + ] + }) + + t.strictEqual(status, 0) + + const files = await fs.readdir(outputDir) + t.strictEqual(files.includes('include-me'), true) + const instrumented = path.resolve(outputDir, 'include-me', 'include-me.js') + t.match(await fs.readFile(instrumented, 'utf8'), /function cov_/) +}) + +t.test('allows a file to be excluded from an included directory', async t => { + const { status } = await runNYC({ + args: [ + 'instrument', + '--complete-copy', + '--exclude', + '**/exclude-me.js', + '--include', + '**/include-me/**', + './subdir/input-dir', + outputDir + ] + }) + + t.strictEqual(status, 0) + + const files = await fs.readdir(outputDir) + t.strictEqual(files.includes('include-me'), true) + + const includeMeFiles = await fs.readdir(path.resolve(outputDir, 'include-me')) + t.strictEqual(includeMeFiles.includes('include-me.js'), true) + t.strictEqual(includeMeFiles.includes('exclude-me.js'), true) + + const includeTarget = path.resolve(outputDir, 'include-me', 'include-me.js') + t.match(await fs.readFile(includeTarget, 'utf8'), /function cov_/) + + const excludeTarget = path.resolve(outputDir, 'exclude-me', 'index.js') + t.notMatch(await fs.readFile(excludeTarget, 'utf8'), /function cov_/) +}) + +t.test('aborts if trying to write files in place', async t => { + const { status, stderr } = await runNYC({ + args: ['instrument', './', './'] + }) + + t.strictEqual(status, 1) + t.match(stderr, /cannot instrument files in place/) +}) + +t.test('can write files in place with --in-place switch', async t => { + const sourceDir = path.resolve(fixturesCLI, 'instrument-inplace') + await makeDir(outputDir) + await Promise.all(['package.json', 'file1.js', 'file2.js'].map( + file => fs.copyFile(path.join(sourceDir, file), path.join(outputDir, file)) + )) + + const { status } = await runNYC({ + args: [ + 'instrument', + '--in-place', + '--include', + 'file1.js', + '.' + ], + cwd: outputDir + }) + + t.strictEqual(status, 0) + + const file1 = path.resolve(outputDir, 'file1.js') + t.match(await fs.readFile(file1, 'utf8'), /function cov_/) + + const file2 = path.resolve(outputDir, 'file2.js') + t.notMatch(await fs.readFile(file2, 'utf8'), /function cov_/) + + await testSuccess(t, { + args: ['--all', process.execPath, '-e', ''], + cwd: outputDir + }) +}) + +t.test('aborts if trying to delete while writing files in place', async t => { + const { status, stderr } = await runNYC({ + args: [ + 'instrument', + '--in-place', + '--delete', + '--include', + 'file1.js', + './instrument-inplace' + ] + }) + + t.strictEqual(status, 1) + t.match(stderr, /cannot use '--delete' when instrumenting files in place/) +}) + +t.test('aborts if trying to instrument files from outside the project root directory', async t => { + const { status, stderr } = await runNYC({ + args: [ + 'instrument', + '--delete', + '../', + './' + ] + }) + + t.strictEqual(status, 1) + t.match(stderr, /cannot instrument files outside project root directory/) +}) + +t.test('cleans the output directory if `--delete` is specified', async t => { + await makeDir(removedByClean) + const { status } = await runNYC({ + args: [ + 'instrument', + '--delete', + 'true', + './subdir/input-dir', + outputDir + ] + }) + + t.strictEqual(status, 0) + + const files = await fs.readdir(outputDir) + t.strictEqual(files.includes('removed-by-clean'), false) + t.strictEqual(files.includes('exclude-me'), true) +}) + +t.test('does not clean the output directory by default', async t => { + await makeDir(removedByClean) + + const { status } = await runNYC({ + args: [ + 'instrument', + './subdir/input-dir', + outputDir + ] + }) + + t.strictEqual(status, 0) + + const files = await fs.readdir(outputDir) + t.strictEqual(files.includes('removed-by-clean'), true) +}) + +t.test('aborts if trying to clean process.cwd()', async t => { + const { status, stderr } = await runNYC({ + args: ['instrument', '--delete', './src', './'] + }) + + t.strictEqual(status, 1) + t.match(stderr, /attempt to delete/) +}) + +t.test('aborts if trying to clean outside working directory', async t => { + const { status, stderr } = await runNYC({ + args: ['instrument', '--delete', './', '../'] + }) + + t.strictEqual(status, 1) + t.match(stderr, /attempt to delete/) +}) diff --git a/test/issue-190.js b/test/issue-190.js new file mode 100644 index 000000000..9e844e6af --- /dev/null +++ b/test/issue-190.js @@ -0,0 +1,58 @@ +'use strict' + +const fs = require('../lib/fs-promises') +const path = require('path') + +const t = require('tap') +const isWindows = require('is-windows')() + +const { spawn, fixturesCLI, nycBin } = require('./helpers') + +const fakebin = path.resolve(fixturesCLI, 'fakebin') + +const spawnOptions = { + cwd: path.resolve(fixturesCLI, 'run-npm-test-recursive'), + env: { + PATH: fakebin + ':' + process.env.PATH + } +} + +async function writeFakeNPM (shebang) { + const targetPath = path.resolve(fakebin, 'npm') + const source = await fs.readFile(path.resolve(fakebin, 'npm-template.js')) + await fs.writeFile(targetPath, '#!' + shebang + '\n' + source) + await fs.chmod(targetPath, 493) // 0o755 +} + +async function runFakeNPM (t) { + const args = [nycBin, 'npm', 'test'] + const { stderr, status } = await spawn(process.execPath, args, spawnOptions) + + t.strictEqual(status, 0) + t.strictEqual(stderr, '') +} + +t.beforeEach(() => Promise.all([ + fs.unlink(path.resolve(fakebin, 'node')).catch(() => {}), + fs.unlink(path.resolve(fakebin, 'npm')).catch(() => {}) +])) + +t.test('can run "npm test", absolute shebang edition', async t => { + if (isWindows) { + return + } + + await writeFakeNPM(process.execPath) + await runFakeNPM(t) +}) + +t.test('can run "npm test", weird bash+dirname shebang edition', async t => { + if (isWindows) { + return + } + + // This string is taken verbatim from tools/install.py in Node core v5.x + await writeFakeNPM('/bin/sh\n// 2>/dev/null; exec "`dirname "$0"`/node" "$0" "$@"') + await fs.symlink(process.execPath, path.resolve(fakebin, 'node')) + await runFakeNPM(t) +}) diff --git a/test/nyc-integration.js b/test/nyc-integration.js new file mode 100644 index 000000000..4d8e5fdd7 --- /dev/null +++ b/test/nyc-integration.js @@ -0,0 +1,678 @@ +'use strict' + +const path = require('path') +const fs = require('../lib/fs-promises') +const os = require('os') +const { promisify } = require('util') + +const t = require('tap') +const glob = promisify(require('glob')) +const rimraf = promisify(require('rimraf')) + +const { fixturesCLI, nycBin, runNYC, tempDirSetup, testSuccess, testFailure, envCheckConfig } = require('./helpers') + +const nycConfigJS = path.resolve(fixturesCLI, 'nyc-config-js') +const nycrcDir = path.resolve(fixturesCLI, 'nycrc') +const fixturesSourceMaps = path.resolve(fixturesCLI, '../source-maps') +const fixturesENM = path.resolve(fixturesCLI, '../exclude-node-modules') +const fixturesAllTypeModule = path.resolve(fixturesCLI, '../all-type-module') + +const executeNodeModulesArgs = [ + '--all=true', + '--cache=false', + '--per-file=true', + '--exclude-node-modules=false', + '--include=node_modules/@istanbuljs/fake-module-1/**' +] + +t.jobs = os.cpus().length + +tempDirSetup(t, __filename) + +t.test('--include can be used to limit bin to instrumenting specific files', t => testSuccess(t, { + args: ['--all', '--include', 'half-covered.js', process.execPath, './half-covered.js'] +})) + +t.test('--exclude should allow default exclude rules to be overridden', t => testSuccess(t, { + args: [ + '--all', + '--exclude=**/half-covered.js', + '--exclude=**/coverage', + process.execPath, + './half-covered.js' + ] +})) + +t.test('report and check should show coverage check along with report', async t => { + await testSuccess(t, { + args: ['--silent', process.execPath, './half-covered.js'] + }) + await testFailure(t, { + args: ['report', '--check-coverage', '--lines=100'] + }) +}) + +t.test('--ignore-class-method skips methods that match ignored name but still catches those that are not', t => testSuccess(t, { + args: ['--all', '--ignore-class-method', 'skip', process.execPath, './classes.js'] +})) + +t.test('--check-coverage fails when the expected coverage is below a threshold', t => testFailure(t, { + args: ['--check-coverage', '--lines', '51', process.execPath, './half-covered.js'] +})) + +// https://github.com/istanbuljs/nyc/issues/384 +t.test('check-coverage command is equivalent to the flag', async t => { + await testSuccess(t, { + args: [process.execPath, './half-covered.js'] + }) + + await testFailure(t, { + args: ['check-coverage', '--lines', '51'] + }) +}) + +t.test('--check-coverage succeeds when the expected coverage is above a threshold', t => testSuccess(t, { + args: ['--check-coverage', '--lines', '49', process.execPath, './half-covered.js'] +})) + +// https://github.com/bcoe/nyc/issues/209 +t.test('--check-coverage fails in any case when the underlying test failed', t => testFailure(t, { + args: ['--check-coverage', '--lines', '49', process.execPath, './half-covered-failing.js'] +})) + +t.test('--check-coverage fails when the expected file coverage is below a threshold', t => testFailure(t, { + args: ['--check-coverage', '--lines', '51', '--per-file', process.execPath, './half-covered.js'] +})) + +t.test('passes configuration via environment variables', t => envCheckConfig(t, { + configArgs: [ + '--silent', + '--require=make-dir', + '--include=env.js', + '--exclude=batman.js', + '--extension=.js', + '--cache=false', + '--cache-dir=/tmp', + '--source-map=true' + ], + checkOptions: [ + 'instrumenter', + 'silent', + 'cacheDir', + 'cache', + 'sourceMap', + 'require', + 'include', + 'exclude', + 'extension' + ] +})) + +t.test('allows package.json configuration to be overridden with command line args', t => testSuccess(t, { + args: ['--reporter=text-lcov', process.execPath, './half-covered.js'] +})) + +t.test('loads configuration from package.json and nyc.config.js', t => testSuccess(t, { + args: [process.execPath, './index.js'], + cwd: nycConfigJS +})) + +t.test('loads configuration from different module rather than nyc.config.js', t => testFailure(t, { + args: ['--all', '--nycrc-path', './nycrc-config.js', process.execPath, './index.js'], + cwd: nycConfigJS +})) + +t.test('allows nyc.config.js configuration to be overridden with command line args', t => testSuccess(t, { + args: ['--all', '--exclude=foo.js', process.execPath, './index.js'], + cwd: nycConfigJS +})) + +t.test('loads configuration from package.json and .nycrc', t => testSuccess(t, { + args: [process.execPath, './index.js'], + cwd: nycrcDir +})) + +t.test('loads configuration from different file rather than .nycrc', t => testFailure(t, { + args: ['--nycrc-path', './.nycrc-config.json', process.execPath, './index.js'], + cwd: nycrcDir +})) + +t.test('loads configuration from .nycrc.yml', t => testSuccess(t, { + args: ['--nycrc-path', './.nycrc.yml', process.execPath, './index.js'], + cwd: nycrcDir +})) + +t.test('loads configuration from .nycrc.yaml', t => testSuccess(t, { + args: ['--nycrc-path', './.nycrc.yaml', process.execPath, './index.js'], + cwd: nycrcDir +})) + +t.test('allows .nycrc configuration to be overridden with command line args', t => testSuccess(t, { + args: ['--exclude=foo.js', process.execPath, './index.js'], + cwd: nycrcDir +})) + +t.test('reports appropriate coverage information for es6 source files', t => testSuccess(t, { + args: ['--reporter=lcov', '--reporter=text', process.execPath, './es6.js'] +})) + +t.test('hooks provide coverage for requireJS and AMD modules', t => testSuccess(t, { + args: [ + /* This effectively excludes ./index.js, normalizing results before/after node.js 11.11.0 */ + '--include=lib/**', + '--hook-run-in-this-context', + '--hook-require=false', + process.execPath, + './index.js' + ], + cwd: path.resolve(__dirname, './fixtures/hooks') +})) + +t.test('run-in-context provide coverage for vm.runInContext', t => testSuccess(t, { + args: [ + '--hook-run-in-context', + '--hook-require=false', + process.execPath, + './run-in-context.js' + ], + cwd: path.resolve(__dirname, './fixtures/hooks') +})) + +t.test('does not interpret args intended for instrumented bin', async t => { + const { status, stderr, stdout } = await runNYC({ + tempDir: t.tempDir, + args: ['--silent', process.execPath, 'args.js', '--help', '--version'], + leavePathSep: true + }) + t.is(status, 0) + t.is(stderr, '') + t.matchSnapshot(JSON.parse(stdout).slice(2)) +}) + +t.test('interprets first args after -- as Node.js execArgv', t => testSuccess(t, { + args: ['--', '--expose-gc', path.resolve(fixturesCLI, 'gc.js')] +})) + +t.test('--show-process-tree displays a tree of spawned processes', t => testSuccess(t, { + args: ['--show-process-tree', process.execPath, 'selfspawn-fibonacci.js', '5'] +})) + +t.test('--use-spawn-wrap=true is functional', t => testSuccess(t, { + args: ['--use-spawn-wrap=true', process.execPath, 'selfspawn-fibonacci.js', '5'] +})) + +t.test('--use-spawn-wrap=false is functional', t => testSuccess(t, { + args: ['--use-spawn-wrap=false', process.execPath, 'selfspawn-fibonacci.js', '5'] +})) + +t.test('can run "npm test" which directly invokes a test file', t => testSuccess(t, { + args: ['npm', 'test'], + cwd: path.resolve(fixturesCLI, 'run-npm-test') +})) + +t.test('can run "npm test" which indirectly invokes a test file', t => testSuccess(t, { + args: ['npm', 'test'], + cwd: path.resolve(fixturesCLI, 'run-npm-test-recursive') +})) + +t.test('nyc instrument single file to console', async t => { + const { status, stderr, originalText } = await runNYC({ + tempDir: t.tempDir, + args: ['instrument', './half-covered.js'] + }) + + t.is(status, 0) + t.is(stderr, '') + t.match(originalText.stdout, `path:${JSON.stringify(path.resolve(fixturesCLI, 'half-covered.js'))}`) +}) + +t.test('nyc instrument disabled instrument', async t => { + const { status, stderr, stdout } = await runNYC({ + tempDir: t.tempDir, + args: ['instrument', '--instrument=false', 'half-covered.js'] + }) + + t.is(status, 0) + t.is(stderr, '') + t.match(stdout, 'var a = 0') + t.notMatch(stdout, 'cov_') +}) + +t.test('nyc instrument a directory of files', async t => { + const { status, stderr, originalText } = await runNYC({ + tempDir: t.tempDir, + args: ['instrument', './'] + }) + + t.is(status, 0) + t.is(stderr, '') + t.match(originalText.stdout, `path:${JSON.stringify(path.resolve(fixturesCLI, 'half-covered.js'))}`) + t.match(originalText.stdout, `path:${JSON.stringify(path.resolve(fixturesCLI, 'half-covered-failing.js'))}`) + t.notMatch(originalText.stdout, `path:${JSON.stringify(path.resolve(fixturesCLI, 'test.js'))}`) +}) + +t.test('nyc instrument returns unmodified source if there is no transform', async t => { + const { status, stderr, stdout } = await runNYC({ + tempDir: t.tempDir, + args: ['instrument', './no-transform/half-covered.xjs'] + }) + + t.is(status, 0) + t.is(stderr, '') + t.match(stdout, 'var a = 0') + t.notMatch(stdout, 'cov_') +}) + +t.test('nyc instrument on file with `package` keyword when es-modules is disabled', async t => { + const { status, stderr, originalText } = await runNYC({ + tempDir: t.tempDir, + args: ['instrument', '--no-es-modules', './not-strict.js'] + }) + + t.is(status, 0) + t.is(stderr, '') + t.match(originalText.stdout, `path:${JSON.stringify(path.resolve(fixturesCLI, 'not-strict.js'))}`) +}) + +t.test('nyc instrument fails on file with `package` keyword when es-modules is enabled', t => testFailure(t, { + args: ['instrument', '--exit-on-error', './not-strict.js'] +})) + +t.test('nyc displays help to stderr when it doesn\'t know what to do', async t => { + const help = await runNYC({ + tempDir: t.tempDir, + args: ['--help'] + }) + + t.is(help.status, 0) + t.is(help.stderr, '') + t.isNot(help.stdout, '') + + const { status, stderr, stdout } = await runNYC({ + tempDir: t.tempDir, + args: [] + }) + + t.equal(status, 1) + t.equal(stdout, '') + t.match(stderr, help.stdout) +}) + +t.test('handles --clean / --no-clean properly', async t => { + await testSuccess(t, { + args: [ + '--clean', + process.execPath, + './by-arg2.js', + '1' + ] + }) + + await testSuccess(t, { + args: [ + '--no-clean', + process.execPath, + './by-arg2.js', + '2' + ] + }) +}) + +t.test('setting instrument to "false" configures noop instrumenter', t => envCheckConfig(t, { + configArgs: [ + '--silent', + '--no-instrument', + '--no-source-map' + ], + checkOptions: [ + 'silent', + 'instrument', + 'sourceMap', + 'instrumenter' + ] +})) + +t.test('extracts coverage headers from unexecuted files', async t => { + await envCheckConfig(t, { + configArgs: [ + '--all', + '--silent', + '--no-instrument', + '--no-source-map' + ], + checkOptions: [ + 'all', + 'silent', + 'instrument', + 'sourceMap', + 'instrumenter' + ] + }) + + const files = await glob(path.join(t.tempDir, '*.json')) + const coverage = [] + await Promise.all(files.map(async file => { + const data = JSON.parse(await fs.readFile(file, 'utf-8')) + if (data['./external-instrumenter.js']) { + coverage.push(data['./external-instrumenter.js']) + } + })) + + t.true(coverage.length !== 0) + t.true(coverage.every(data => typeof data === 'object')) + // we should not have executed file, so all counts sould be 0. + t.true(coverage.every(data => Object.values(data.s).every(s => s === 0))) +}) + +t.test('allows an alternative cache folder to be specified', async t => { + const cacheDir = path.resolve(fixturesCLI, 'foo-cache') + + await testSuccess(t, { + args: [ + `--cache-dir=${cacheDir}`, + '--cache=true', + process.execPath, + './half-covered.js' + ] + }) + + // we should have created foo-cache rather + // than the default ./node_modules/.cache. + t.is(1, (await fs.readdir(cacheDir)).length) + + await rimraf(cacheDir) +}) + +// see: https://github.com/istanbuljs/nyc/issues/563 +t.test('does not create .cache folder if cache is "false"', async t => { + const cacheDir = path.resolve(fixturesCLI, './disabled-cache') + + await testSuccess(t, { + args: [ + `--cache-dir=${cacheDir}`, + '--cache=false', + process.execPath, + './half-covered.js' + ] + }) + + t.false(fs.existsSync(cacheDir)) +}) + +t.test('allows alternative high and low watermarks to be configured', t => testSuccess(t, { + args: [ + '--watermarks.lines=90', + '--watermarks.lines=100', + '--watermarks.statements=30', + '--watermarks.statements=40', + '--cache=true', + process.execPath, + './half-covered.js' + ], + env: { + FORCE_COLOR: true + } +})) + +t.test('--all includes files with both .map files and inline source-maps', t => testSuccess(t, { + args: [ + '--all', + '--cache=false', + '--exclude-after-remap=false', + '--exclude=original', + process.execPath, + './instrumented/s1.min.js' + ], + cwd: fixturesSourceMaps +})) + +t.test('--all uses source-maps to exclude original sources from reports', t => testSuccess(t, { + args: [ + '--all', + '--cache=false', + '--exclude=original/s1.js', + process.execPath, + './instrumented/s1.min.js' + ], + cwd: fixturesSourceMaps +})) + +t.test('--all does not fail on ERR_REQUIRE_ESM', t => testSuccess(t, { + args: [ + '--all', + process.execPath, + 'script.cjs' + ], + cwd: fixturesAllTypeModule +})) + +t.test('caches source-maps from .map files', async t => { + await testSuccess(t, { + args: [ + process.execPath, + './instrumented/s1.min.js' + ], + cwd: fixturesSourceMaps + }) + + const files = await fs.readdir(path.resolve(fixturesSourceMaps, 'node_modules/.cache/nyc')) + t.true(files.some(f => f.startsWith('s1.min-') && f.endsWith('.map'))) +}) + +t.test('caches inline source-maps', async t => { + await testSuccess(t, { + args: [ + process.execPath, + './instrumented/s2.min.js' + ], + cwd: fixturesSourceMaps + }) + + const files = await fs.readdir(path.resolve(fixturesSourceMaps, 'node_modules/.cache/nyc')) + t.true(files.some(f => f.startsWith('s2.min-') && f.endsWith('.map'))) +}) + +t.test('appropriately instruments file with corresponding .map file', t => testSuccess(t, { + args: [ + '--cache=false', + '--exclude-after-remap=false', + '--exclude=original', + process.execPath, + './instrumented/s1.min.js' + ], + cwd: fixturesSourceMaps +})) + +t.test('appropriately instruments file with inline source-map', t => testSuccess(t, { + args: [ + '--cache=false', + '--exclude-after-remap=false', + '--exclude=original', + process.execPath, + './instrumented/s2.min.js' + ], + cwd: fixturesSourceMaps +})) + +t.test('skip-empty does not display 0-line files', t => testSuccess(t, { + args: [ + '--cache=false', + '--skip-empty=true', + process.execPath, + './empty.js' + ] +})) + +t.test('skip-full does not display files with 100% statement, branch, and function coverage', t => testSuccess(t, { + args: [ + '--skip-full', + process.execPath, + './skip-full.js' + ] +})) + +t.test('allows reserved word when es-modules is disabled', t => testSuccess(t, { + args: [ + '--cache=false', + '--es-modules=false', + process.execPath, + './not-strict.js' + ] +})) + +t.test('forbids reserved word when es-modules is not disabled', t => testFailure(t, { + args: [ + '--cache=false', + '--exit-on-error=true', + process.execPath, + './not-strict.js' + ] +})) + +t.test('execute with exclude-node-modules=false', async t => { + await testFailure(t, { + args: [ + ...executeNodeModulesArgs, + '--check-coverage=true', + process.execPath, + './bin/do-nothing.js' + ], + cwd: fixturesENM + }) + + await testFailure(t, { + args: [ + ...executeNodeModulesArgs, + '--check-coverage=true', + 'report' + ], + cwd: fixturesENM + }) + + await testSuccess(t, { + args: [ + ...executeNodeModulesArgs, + '--check-coverage=false', + 'report' + ], + cwd: fixturesENM + }) + + await testFailure(t, { + args: [ + ...executeNodeModulesArgs, + 'check-coverage' + ], + cwd: fixturesENM + }) +}) + +t.test('instrument with exclude-node-modules=false', async t => { + const { status, stderr, stdout } = await runNYC({ + tempDir: t.tempDir, + args: [ + ...executeNodeModulesArgs, + 'instrument', + 'node_modules' + ], + cwd: fixturesENM + }) + + t.is(status, 0) + t.is(stderr, '') + t.match(stdout, 'fake-module-1') +}) + +t.test('recursive run does not throw', t => testSuccess(t, { + args: [ + process.execPath, + nycBin, + process.execPath, + nycBin, + process.execPath, + nycBin, + 'true' + ], + cwd: path.resolve(__dirname, 'fixtures/recursive-run') +})) + +t.test('combines multiple coverage reports', async t => { + await testSuccess(t, { + args: ['merge', './merge-input'] + }) + + const mergedCoverage = require('./fixtures/cli/coverage') + // the combined reports should have 100% function + // branch and statement coverage. + t.strictDeepEqual( + mergedCoverage['/private/tmp/contrived/library.js'].s, + { 0: 2, 1: 1, 2: 1, 3: 2, 4: 1, 5: 1 } + ) + t.strictDeepEqual( + mergedCoverage['/private/tmp/contrived/library.js'].f, + { 0: 1, 1: 1, 2: 2 } + ) + t.strictDeepEqual( + mergedCoverage['/private/tmp/contrived/library.js'].b, + { 0: [1, 1] } + ) + await rimraf(path.resolve(fixturesCLI, 'coverage.json')) +}) + +t.test('reports error if input directory is missing', t => testFailure(t, { + args: ['merge', './DIRECTORY_THAT_IS_MISSING'] +})) + +t.test('reports error if input is not a directory', t => testFailure(t, { + args: ['merge', './package.json'] +})) + +t.test('--all instruments unknown extensions as js', t => testSuccess(t, { + cwd: path.resolve(fixturesCLI, '../conf-multiple-extensions'), + args: ['--all', process.execPath, './run.js'] +})) + +t.test('instrument with invalid --require fails when using node-preload', async t => { + const { status, stderr, stdout } = await runNYC({ + tempDir: t.tempDir, + args: [ + '--require=@istanbuljs/this-module-does-not-exist', + 'instrument', + './skip-full.js' + ] + }) + + t.is(status, 1) + t.match(stderr, /Cannot find module '@istanbuljs\/this-module-does-not-exist'/) + t.is(stdout, '') +}) + +t.test('invalid --require fails when using node-preload', async t => { + const { status, stderr, stdout } = await runNYC({ + tempDir: t.tempDir, + args: [ + '--require=@istanbuljs/this-module-does-not-exist', + './skip-full.js' + ] + }) + + t.is(status, 1) + t.match(stderr, /Cannot find module '@istanbuljs\/this-module-does-not-exist'/) + t.is(stdout, '') +}) + +t.test('invalid --require fails when using spawn-wrap', async t => { + const { status, stderr, stdout } = await runNYC({ + tempDir: t.tempDir, + args: [ + '--use-spawn-wrap=true', + '--require=@istanbuljs/this-module-does-not-exist', + 'instrument', + './skip-full.js' + ] + }) + + t.is(status, 1) + t.match(stderr, /Cannot find module '@istanbuljs\/this-module-does-not-exist'/) + t.is(stdout, '') +}) diff --git a/test/parser-plugins.js b/test/parser-plugins.js new file mode 100644 index 000000000..c375e6121 --- /dev/null +++ b/test/parser-plugins.js @@ -0,0 +1,29 @@ +'use strict' + +const path = require('path') + +const t = require('tap') + +const { runNYC } = require('./helpers') + +const cwd = path.resolve(__dirname, './fixtures/parser-plugins') + +t.test('parser plugin set', async t => { + const { status, stdout, stderr } = await runNYC({ + args: ['instrument', 'v8.js'], + cwd + }) + t.strictEqual(status, 0) + t.strictEqual(stderr, '') + t.match(stdout, /function cov_/) +}) + +t.test('parser plugin unset', async t => { + const { status, stdout, stderr } = await runNYC({ + args: ['instrument', '--nycrc-path=no-plugins.json', 'v8.js'], + cwd + }) + t.strictEqual(status, 0) + t.strictEqual(stderr, '') + t.notMatch(stdout, /function cov_/) +}) diff --git a/test/process-args.js b/test/process-args.js new file mode 100644 index 000000000..ca3a37db5 --- /dev/null +++ b/test/process-args.js @@ -0,0 +1,79 @@ +'use strict' + +const { test } = require('tap') +const yargs = require('yargs/yargs') + +const processArgs = require('../self-coverage/lib/process-args') + +const nycBin = require.resolve('../self-coverage/bin/nyc.js') + +test('hideInstrumenterArgs removes dashed options that proceed bin', async t => { + process.argv = [ + process.execPath, + nycBin, + '--reporter', + 'lcov', + 'node', + 'test/nyc-tap.js' + ] + + const { argv } = yargs(process.argv.slice(2)) + const munged = processArgs.hideInstrumenterArgs(argv) + + t.strictSame(munged, ['node', 'test/nyc-tap.js']) +}) + +test('hideInstrumenterArgs parses extra args directly after -- as Node execArgv', async t => { + process.argv = [ + process.execPath, + nycBin, + '--', + '--expose-gc', + 'index.js' + ] + + const { argv } = yargs(process.argv.slice(2)) + const munged = processArgs.hideInstrumenterArgs(argv) + + t.strictSame(munged, [process.execPath, '--expose-gc', 'index.js']) +}) + +test('hideInstrumenteeArgs ignores arguments after the instrumented bin', async t => { + process.argv = [ + process.execPath, + nycBin, + '--reporter', + 'lcov', + 'node', + 'test/nyc-tap.js', + '--arg', + '--' + ] + + const munged = processArgs.hideInstrumenteeArgs() + t.strictSame(munged, ['--reporter', 'lcov', 'node']) +}) + +test('hideInstrumenteeArgs does not ignore arguments if command is recognized', async t => { + process.argv = [ + process.execPath, + nycBin, + 'report', + '--reporter', + 'lcov' + ] + + const munged = processArgs.hideInstrumenteeArgs() + t.strictSame(munged, ['report', '--reporter', 'lcov']) +}) + +test('hideInstrumenteeArgs does not ignore arguments if no command is provided', async t => { + process.argv = [ + process.execPath, + nycBin, + '--version' + ] + + const munged = processArgs.hideInstrumenteeArgs() + t.strictSame(munged, ['--version']) +}) diff --git a/test/processinfo.js b/test/processinfo.js new file mode 100644 index 000000000..30290234e --- /dev/null +++ b/test/processinfo.js @@ -0,0 +1,86 @@ +'use strict' + +const { resolve } = require('path') +const { promisify } = require('util') +const { spawn } = require('child_process') +const t = require('tap') +const rimraf = promisify(require('rimraf')) +const fs = require('../lib/fs-promises') + +const node = process.execPath +const bin = resolve(__dirname, '../self-coverage/bin/nyc') +const fixturesCLI = resolve(__dirname, './fixtures/cli') +const tmp = 'processinfo-test' +const resolvedJS = resolve(fixturesCLI, 'selfspawn-fibonacci.js') + +rimraf.sync(resolve(fixturesCLI, tmp)) +t.teardown(() => rimraf(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', async t => { + const covs = (await fs.readdir(resolve(fixturesCLI, tmp))) + .filter(f => f !== 'processinfo') + + await Promise.all(covs.map(async f => { + const covdata = JSON.parse(await fs.readFile(resolve(fixturesCLI, tmp, f), 'utf8')) + t.same(Object.keys(covdata), [resolvedJS]) + + // should have matching processinfo for each cov json + const procInfoFile = resolve(fixturesCLI, tmp, 'processinfo', f) + const procInfoData = JSON.parse(await fs.readFile(procInfoFile, 'utf8')) + t.match(procInfoData, { + pid: Number, + ppid: Number, + uuid: f.replace(/\.json$/, ''), + argv: [ + node, + resolvedJS, + /[1-5]/ + ], + execArgv: [], + cwd: fixturesCLI, + time: Number, + coverageFilename: resolve(fixturesCLI, tmp, f), + files: [resolvedJS] + }) + })) +}) + +t.test('check out the index', async t => { + const indexFile = resolve(fixturesCLI, tmp, 'processinfo', 'index.json') + const indexJson = await fs.readFile(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: { + children: [u, u, u, u, u, u, u, u] + } + } + }) +}) diff --git a/test/report.js b/test/report.js new file mode 100644 index 000000000..645cbb14b --- /dev/null +++ b/test/report.js @@ -0,0 +1,52 @@ +'use strict' + +const fs = require('fs') +const path = require('path') +const { promisify } = require('util') + +const t = require('tap') +const isWindows = require('is-windows')() +const rimraf = promisify(require('rimraf')) + +const NYC = require('../self-coverage') + +const { parseArgv, runNYC, resetState } = require('./helpers') + +const fixtures = path.resolve(__dirname, 'fixtures') + +t.beforeEach(resetState) + +async function testSignal (t, signal) { + if (isWindows) { + t.end() + + return + } + + const nyc = new NYC(await parseArgv(fixtures)) + await runNYC({ + args: [`./${signal}.js`], + cwd: fixtures + }) + + const checkFile = path.join(fixtures, `${signal}.js`) + const reports = (await nyc.coverageData()).filter(report => report[checkFile]) + + t.strictEqual(reports.length, 1) +} + +t.test('writes coverage report when process is killed with SIGTERM', t => testSignal(t, 'sigterm')) + +t.test('writes coverage report when process is killed with SIGINT', t => testSignal(t, 'sigint')) + +t.test('allows coverage report to be output in an alternative directory', async t => { + const nyc = new NYC(await parseArgv(undefined, [ + '--report-dir=./alternative-report', + '--reporter=lcov' + ])) + await nyc.reset() + + await nyc.report() + t.strictEqual(fs.existsSync('./alternative-report/lcov.info'), true) + await rimraf('./alternative-report') +}) diff --git a/test/should-instrument.js b/test/should-instrument.js new file mode 100644 index 000000000..5dde8e714 --- /dev/null +++ b/test/should-instrument.js @@ -0,0 +1,76 @@ +'use strict' + +const path = require('path') +const NYC = require('../self-coverage') + +const { parseArgv } = require('./helpers') + +const fixtures = path.resolve(__dirname, './fixtures') + +const t = require('tap') + +const rootDir = path.resolve('/') +t.test('should exclude appropriately with defaults', async t => { + const nyc = new NYC(await parseArgv(rootDir, [ + '--exclude=test/**', + '--exclude=test{,-*}.js', + '--exclude=**/*.test.js', + '--exclude=**/__tests__/**' + ])) + + // nyc always excludes "node_modules/**" + t.true(nyc.exclude.shouldInstrument(path.join(rootDir, 'foo.js'), 'foo.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'node_modules/bar.js'), 'node_modules/bar.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'foo/node_modules/bar.js'), 'foo/node_modules/bar.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'test.js'), 'test.js')) + t.true(nyc.exclude.shouldInstrument(path.join(rootDir, 'testfoo.js'), 'testfoo.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'test-foo.js'), 'test-foo.js')) + t.true(nyc.exclude.shouldInstrument(path.join(rootDir, 'lib/test.js'), 'lib/test.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'foo/bar/test.js'), './test.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'foo/bar/test.js'), '.\\test.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'foo/bar/foo.test.js'), './foo.test.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'foo/bar/__tests__/foo.js'), './__tests__/foo.js')) +}) + +t.test('should exclude appropriately with config.exclude', async t => { + const nyc = new NYC(await parseArgv(fixtures)) + + // fixtures/package.json configures excludes: "blarg", "blerg" + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'blarg.js'), 'blarg.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'blarg/foo.js'), 'blarg/foo.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'blerg.js'), 'blerg.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'blerg.js'), './blerg.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'blerg.js'), '.\\blerg.js')) +}) + +t.test('should exclude outside of the current working directory', async t => { + const nyc = new NYC(await parseArgv(path.join(rootDir, 'foo'))) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'bar.js'), '../bar.js')) +}) + +t.test('should not exclude if the current working directory is inside node_modules', async t => { + const cwd = path.join(rootDir, 'node_modules', 'foo') + const nyc = new NYC(await parseArgv(cwd)) + t.true(nyc.exclude.shouldInstrument(path.join(cwd, 'bar.js'), './bar.js')) + t.true(nyc.exclude.shouldInstrument(path.join(cwd, 'bar.js'), '.\\bar.js')) +}) + +t.test('allows files to be explicitly included, rather than excluded', async t => { + const nyc = new NYC(await parseArgv(rootDir, ['--include=foo.js'])) + + t.true(nyc.exclude.shouldInstrument(path.join(rootDir, 'foo.js'), 'foo.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'index.js'), 'index.js')) +}) + +t.test('exclude overrides include', async t => { + const nyc = new NYC(await parseArgv(rootDir, [ + '--include=foo.js', + '--include=test.js', + '--exclude=**/node_modules/**', + '--exclude=test/**', + '--exclude=test{,-*}.js' + ])) + + t.true(nyc.exclude.shouldInstrument(path.join(rootDir, 'foo.js'), 'foo.js')) + t.false(nyc.exclude.shouldInstrument(path.join(rootDir, 'test.js'), 'test.js')) +}) diff --git a/test/source-map-support.js b/test/source-map-support.js new file mode 100644 index 000000000..575dd46da --- /dev/null +++ b/test/source-map-support.js @@ -0,0 +1,36 @@ +'use strict' + +const t = require('tap') + +const NYC = require('../self-coverage') + +const { parseArgv, resetState } = require('./helpers') + +// we test exit handlers in nyc-integration.js. +NYC.prototype._wrapExit = () => {} + +require('source-map-support').install({ hookRequire: true }) + +t.beforeEach(resetState) + +t.test('handles stack traces', async t => { + const nyc = new NYC(await parseArgv(undefined, [ + '--produce-source-map=true' + ])) + await nyc.reset() + nyc.wrap() + + const check = require('./fixtures/stack-trace') + t.match(check(), /stack-trace.js:4:/) +}) + +t.test('does not handle stack traces when disabled', async t => { + const nyc = new NYC(await parseArgv(undefined, [ + '--produce-source-map=false' + ])) + await nyc.reset() + nyc.wrap() + + const check = require('./fixtures/stack-trace') + t.notMatch(check(), /stack-trace.js:4:/) +}) diff --git a/test/src/nyc-bin.js b/test/src/nyc-bin.js deleted file mode 100644 index aaaa34285..000000000 --- a/test/src/nyc-bin.js +++ /dev/null @@ -1,273 +0,0 @@ -/* global describe, it */ - -var path = require('path') -var fs = require('fs') -var spawn = require('child_process').spawn -var isWindows = require('is-windows')() -var fixturesCLI = path.resolve(__dirname, '../fixtures/cli') -var fakebin = path.resolve(fixturesCLI, 'fakebin') -var bin = path.resolve(__dirname, '../../bin/nyc') -var rimraf = require('rimraf') - -require('chai').should() -require('tap').mochaGlobals() - -// beforeEach -rimraf.sync(path.resolve(fakebin, 'node')) -rimraf.sync(path.resolve(fakebin, 'npm')) - -describe('the nyc cli', function () { - var env = { PATH: process.env.PATH } - - describe('--include', function () { - it('can be used to limit bin to instrumenting specific files', function (done) { - var args = [bin, '--all', '--include', 'half-covered.js', process.execPath, './half-covered.js'] - - var proc = spawn(process.execPath, args, { - cwd: fixturesCLI, - env: env - }) - - var stdout = '' - proc.stdout.on('data', function (chunk) { - stdout += chunk - }) - - proc.on('close', function (code) { - code.should.equal(0) - stdout.should.match(/half-covered\.js/) - stdout.should.not.match(/half-covered-failing\.js/) - stdout.should.not.match(/test\.js/) - done() - }) - }) - }) - - describe('--exclude', function () { - it('should allow default exclude rules to be overridden', function (done) { - var args = [bin, '--all', '--exclude', '**/half-covered.js', process.execPath, './half-covered.js'] - - var proc = spawn(process.execPath, args, { - cwd: fixturesCLI, - env: env - }) - - var stdout = '' - proc.stdout.on('data', function (chunk) { - stdout += chunk - }) - - proc.on('close', function (code) { - code.should.equal(0) - stdout.should.not.match(/half-covered\.js/) - stdout.should.match(/test\.js/) - done() - }) - }) - }) - - describe('--check-coverage', function () { - it('fails when the expected coverage is below a threshold', function (done) { - var args = [bin, '--check-coverage', '--lines', '51', process.execPath, './half-covered.js'] - var message = 'ERROR: Coverage for lines (50%) does not meet global threshold (51%)' - - var proc = spawn(process.execPath, args, { - cwd: fixturesCLI, - env: env - }) - - var stderr = '' - proc.stderr.on('data', function (chunk) { - stderr += chunk - }) - - proc.on('close', function (code) { - code.should.not.equal(0) - stderr.trim().should.equal(message) - done() - }) - }) - - it('succeeds when the expected coverage is above a threshold', function (done) { - var args = [bin, '--check-coverage', '--lines', '49', process.execPath, './half-covered.js'] - - var proc = spawn(process.execPath, args, { - cwd: fixturesCLI, - env: env - }) - - proc.on('close', function (code) { - code.should.equal(0) - done() - }) - }) - - // https://github.com/bcoe/nyc/issues/209 - it('fails in any case when the underlying test failed', function (done) { - var args = [bin, '--check-coverage', '--lines', '49', process.execPath, './half-covered-failing.js'] - - var proc = spawn(process.execPath, args, { - cwd: fixturesCLI, - env: env - }) - - proc.on('close', function (code) { - code.should.not.equal(0) - done() - }) - }) - }) - - // https://github.com/bcoe/nyc/issues/190 - describe('running "npm test"', function () { - it('can run "npm test" which directly invokes a test file', function (done) { - var args = [bin, 'npm', 'test'] - var directory = path.resolve(fixturesCLI, 'run-npm-test') - var proc = spawn(process.execPath, args, { - cwd: directory, - env: env - }) - - proc.on('close', function (code) { - code.should.equal(0) - done() - }) - }) - - it('can run "npm test" which indirectly invokes a test file', function (done) { - var args = [bin, 'npm', 'test'] - var directory = path.resolve(fixturesCLI, 'run-npm-test-recursive') - var proc = spawn(process.execPath, args, { - cwd: directory, - env: env - }) - - proc.on('close', function (code) { - code.should.equal(0) - done() - }) - }) - - function writeFakeNPM (shebang) { - var targetPath = path.resolve(fakebin, 'npm') - var source = fs.readFileSync(path.resolve(fakebin, 'npm-template.js')) - fs.writeFileSync(targetPath, '#!' + shebang + '\n' + source) - fs.chmodSync(targetPath, 493) // 0o755 - } - - it('can run "npm test", absolute shebang edition', function (done) { - if (isWindows) return done() - - writeFakeNPM(process.execPath) - - var args = [bin, 'npm', 'test'] - var directory = path.resolve(fixturesCLI, 'run-npm-test-recursive') - var proc = spawn(process.execPath, args, { - cwd: directory, - env: { - PATH: fakebin + ':' + env.PATH - } - }) - - proc.on('close', function (code) { - code.should.equal(0) - done() - }) - }) - - it('can run "npm test", weird bash+dirname shebang edition', function (done) { - if (isWindows) return done() - - // This string is taken verbatim from tools/install.py in Node core v5.x - writeFakeNPM('/bin/sh\n// 2>/dev/null; exec "`dirname "$0"`/node" "$0" "$@"') - fs.symlinkSync(process.execPath, path.resolve(fakebin, 'node')) - - var args = [bin, 'npm', 'test'] - var directory = path.resolve(fixturesCLI, 'run-npm-test-recursive') - var proc = spawn(process.execPath, args, { - cwd: directory, - env: { - PATH: fakebin + ':' + env.PATH - } - }) - - proc.on('close', function (code) { - code.should.equal(0) - done() - }) - }) - }) - - it('passes configuration via environment variables', function (done) { - var args = [ - bin, - '--silent', - '--require=mkdirp', - '--include=env.js', - '--exclude=batman.js', - '--extension=.js', - '--cache=true', - '--source-map=true', - process.execPath, - './env.js' - ] - var expected = { - NYC_REQUIRE: 'mkdirp', - NYC_INCLUDE: 'env.js', - NYC_EXCLUDE: 'batman.js', - NYC_EXTENSION: '.js', - NYC_CACHE: 'enable', - NYC_SOURCE_MAP: 'enable', - NYC_INSTRUMENTER: './lib/instrumenters/istanbul' - } - - var proc = spawn(process.execPath, args, { - cwd: fixturesCLI, - env: env - }) - - var stdout = '' - proc.stdout.on('data', function (chunk) { - stdout += chunk - }) - - proc.on('close', function (code) { - code.should.equal(0) - var env = JSON.parse(stdout) - env.should.include(expected) - done() - }) - }) - - it('setting instrument to "false" sets noop instrumenter', function (done) { - var args = [ - bin, - '--silent', - '--no-instrument', - '--no-source-map', - process.execPath, - './env.js' - ] - var expected = { - NYC_SOURCE_MAP: 'disable', - NYC_INSTRUMENTER: './lib/instrumenters/noop' - } - - var proc = spawn(process.execPath, args, { - cwd: fixturesCLI, - env: env - }) - - var stdout = '' - proc.stdout.on('data', function (chunk) { - stdout += chunk - }) - - proc.on('close', function (code) { - code.should.equal(0) - var env = JSON.parse(stdout) - env.should.include(expected) - done() - }) - }) -}) diff --git a/test/src/nyc-test.js b/test/src/nyc-test.js deleted file mode 100644 index b4d686e4b..000000000 --- a/test/src/nyc-test.js +++ /dev/null @@ -1,647 +0,0 @@ -/* global describe, it */ - -require('source-map-support').install() -var _ = require('lodash') -var ap = require('any-path') -var fs = require('fs') -var enableCache = false -var _NYC - -try { - _NYC = require('../../index.covered.js') -} catch (e) { - _NYC = require('../../') -} - -function NYC (opts) { - opts = opts || {} - if (!opts.hasOwnProperty('enableCache')) { - opts.enableCache = enableCache - } - return new _NYC(opts) -} - -var path = require('path') -var existsSync = require('exists-sync') -var glob = require('glob') -var rimraf = require('rimraf') -var sinon = require('sinon') -var isWindows = require('is-windows')() -var spawn = require('child_process').spawn -var fixtures = path.resolve(__dirname, '../fixtures') -var bin = path.resolve(__dirname, '../../bin/nyc') - -// beforeEach -glob.sync('**/*/{.nyc_output,.cache}').forEach(function (path) { - rimraf.sync(path) -}) - -delete process.env.NYC_CWD - -require('chai').should() -require('tap').mochaGlobals() - -describe('nyc', function () { - describe('cwd', function () { - it('sets cwd to process.cwd() if no environment variable is set', function () { - var nyc = new NYC() - - 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() - - nyc.cwd.should.equal(path.resolve(__dirname, '../fixtures')) - }) - - it('will look upwards for package.json from cwd', function () { - var nyc = new NYC({cwd: __dirname}) - nyc.cwd.should.eql(path.join(__dirname, '../..')) - }) - }) - - describe('config', function () { - it("loads 'exclude' patterns from package.json#nyc", function () { - var nyc = new NYC({ - cwd: path.resolve(__dirname, '../fixtures') - }) - - nyc.exclude.exclude.length.should.eql(5) - }) - - it("loads 'extension' patterns from package.json#nyc", function () { - var nyc = new NYC({ - cwd: path.resolve(__dirname, '../fixtures/conf-multiple-extensions') - }) - - nyc.extensions.length.should.eql(3) - }) - - it("ignores 'include' option if it's falsy or []", function () { - var nyc1 = new NYC({ - cwd: path.resolve(__dirname, '../fixtures/conf-empty') - }) - - nyc1.exclude.include.should.equal(false) - - var nyc2 = new NYC({ - cwd: path.resolve(__dirname, '../fixtures/conf-empty'), - include: [] - }) - - nyc2.exclude.include.should.equal(false) - }) - - it("ignores 'exclude' option if it's falsy or []", function () { - var nyc1 = new NYC({ - cwd: path.resolve(__dirname, '../fixtures/conf-empty') - }) - - nyc1.exclude.exclude.length.should.eql(7) - - var nyc2 = new NYC({ - cwd: path.resolve(__dirname, '../fixtures/conf-empty'), - exclude: [] - }) - - nyc2.exclude.exclude.length.should.eql(7) - }) - }) - - describe('shouldInstrumentFile', function () { - it('should exclude appropriately with defaults', function () { - var nyc = new NYC({ - cwd: '/cwd/', - exclude: [ - '**/node_modules/**', - 'test/**', - 'test{,-*}.js', - '**/*.test.js', - '**/__tests__/**' - ] - }) - - // nyc always excludes "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(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({ - cwd: fixtures - }) - - // fixtures/package.json configures excludes: "blarg", "blerg" - nyc.exclude.shouldInstrument('blarg', 'blarg').should.equal(false) - nyc.exclude.shouldInstrument('blarg/foo.js', 'blarg/foo.js').should.equal(false) - nyc.exclude.shouldInstrument('blerg', 'blerg').should.equal(false) - nyc.exclude.shouldInstrument('./blerg', './blerg').should.equal(false) - nyc.exclude.shouldInstrument('./blerg', '.\\blerg').should.equal(false) - }) - - it('should exclude outside of the current working directory', function () { - var nyc = new NYC({ - cwd: '/cwd/foo/' - }) - nyc.exclude.shouldInstrument('/cwd/bar', '../bar').should.equal(false) - }) - - it('should not exclude if the current working directory is inside node_modules', function () { - var nyc = new NYC({ - cwd: '/cwd/node_modules/foo/' - }) - nyc.exclude.shouldInstrument('/cwd/node_modules/foo/bar', './bar').should.equal(true) - nyc.exclude.shouldInstrument('/cwd/node_modules/foo/bar', '.\\bar').should.equal(true) - }) - - it('allows files to be explicitly included, rather than excluded', function () { - var nyc = new NYC({ - cwd: '/cwd/', - 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({ - cwd: '/cwd/', - include: [ - 'foo.js', - 'test.js' - ], - exclude: [ - '**/node_modules/**', - 'test/**', - '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({ - cwd: process.cwd() - }) - nyc.reset() - nyc.wrap() - - var check = require('../fixtures/check-instrumented') - check().should.be.true - }) - - describe('custom require hooks are installed', function () { - it('wraps modules with coverage counters when the custom require hook compiles them', function () { - var hook = sinon.spy(function (module, filename) { - module._compile(fs.readFileSync(filename, 'utf8'), filename) - }) - - // the `require` call to istanbul is deferred, loaded here so it doesn't mess with the hooks callCount - require('istanbul') - - var nyc = new NYC({ - cwd: process.cwd() - }) - nyc.reset() - nyc.wrap() - - // install the custom require hook - require.extensions['.js'] = hook - - var check = require('../fixtures/check-instrumented') - check().should.be.true - - // and the hook should have been called - hook.callCount.should.equal(1) - }) - }) - - describe('compile handlers for custom extensions are assigned', function () { - it('assigns a function to custom extensions', function () { - var nyc = new NYC({ - cwd: path.resolve(__dirname, '../fixtures/conf-multiple-extensions') - }) - nyc.reset() - nyc.wrap() - - require.extensions['.es6'].should.be.a.function - require.extensions['.foo.bar'].should.be.a.function - - // default should still exist - require.extensions['.js'].should.be.a.function - }) - - it('calls the `_handleJs` function for custom file extensions', function () { - // the `require` call to istanbul is deferred, loaded here so it doesn't mess with the hooks callCount - require('istanbul') - - var nyc = new NYC({ - cwd: path.resolve(__dirname, '../fixtures/conf-multiple-extensions') - }) - - sinon.spy(nyc, '_handleJs') - - nyc.reset() - nyc.wrap() - - var check1 = require('../fixtures/conf-multiple-extensions/check-instrumented.es6') - var check2 = require('../fixtures/conf-multiple-extensions/check-instrumented.foo.bar') - check1().should.be.true - check2().should.be.true - nyc._handleJs.callCount.should.equal(2) - }) - }) - - function testSignal (signal, done) { - var nyc = (new NYC({ - cwd: fixtures - })) - - 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({ - cwd: process.cwd() - })) - 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('runs reports for all JSON in output directory', function (done) { - var nyc = new NYC({ - cwd: fixtures - }) - - var proc = spawn(process.execPath, [bin, './spawn.js'], { - cwd: fixtures, - env: {}, - stdio: 'ignore' - }) - - proc.on('close', function () { - nyc.report( - null, - { - add: function (report) { - // the subprocess we ran should output reports - // for files in the fixtures directory. - var expected = [ - 'spawn.js', - 'child-1.js', - 'child-2.js' - ].map(function (relFile) { - return path.join(fixtures, relFile) - }) - expected.should.include.members(Object.keys(report)) - } - }, - { - add: function (reporter) { - // reporter defaults to 'text'/ - reporter.should.equal('text') - }, - write: function () { - // we should have output a report for the new subprocess. - var stop = fs.readdirSync(nyc.tempDirectory()).length - stop.should.be.eql(3) - return done() - } - } - ) - }) - }) - - it('handles corrupt JSON files', function (done) { - var nyc = new NYC({ - cwd: process.cwd() - }) - nyc.reset() - - fs.writeFileSync('./.nyc_output/bad.json', '}', 'utf-8') - - nyc.report( - null, - { - add: function (report) {} - }, - { - add: function (reporter) {}, - write: function () { - // we should get here without exception. - fs.unlinkSync('./.nyc_output/bad.json') - return done() - } - } - ) - }) - - it('handles multiple reporters', function (done) { - var reporters = ['text-summary', 'text-lcov'] - var incr = 0 - var nyc = new NYC({ - cwd: process.cwd(), - reporter: reporters - }) - 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( - null, - { - add: function (report) {} - }, - { - add: function (reporter) { - incr += !!~reporters.indexOf(reporter) - }, - write: function () { - incr.should.eql(reporters.length) - return done() - } - } - ) - }) - }) - - it('allows coverage report to be output in an alternative directory', function (done) { - var reporters = ['lcov'] - var nyc = new NYC({ - cwd: process.cwd(), - reporter: reporters, - reportDir: './alternative-report' - }) - 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() - existsSync('./alternative-report/lcov.info').should.equal(true) - rimraf.sync('./alternative-report') - return done() - }) - }) - }) - - describe('.istanbul.yml configuration', function () { - var istanbul = require('istanbul') - var configSpy = sinon.spy(istanbul.config, 'loadFile') - var instrumenterSpy = sinon.spy(istanbul, 'Instrumenter') - - function writeConfig () { - fs.writeFileSync('./.istanbul.yml', 'instrumentation:\n\tpreserve-comments: true', 'utf-8') - } - - function afterEach () { - configSpy.reset() - instrumenterSpy.reset() - rimraf.sync('./.istanbul.yml') - } - - it('it handles having no .istanbul.yml in the root directory', function (done) { - afterEach() - var nyc = new NYC() - nyc.wrap() - return done() - }) - - it('uses the values in .istanbul.yml to instantiate the instrumenter', function (done) { - writeConfig() - - var nyc = new NYC({ - istanbul: istanbul - }) - nyc.wrap() - - nyc.instrumenter() - - istanbul.config.loadFile.calledWithMatch('.istanbul.yml').should.equal(true) - istanbul.Instrumenter.calledWith({ - coverageVariable: '__coverage__', - embedSource: false, - noCompact: false, - preserveComments: false - }).should.equal(true) - - afterEach() - return done() - }) - - it('loads the .istanbul.yml configuration from NYC_CWD', function (done) { - var nyc = new NYC({ - istanbul: istanbul, - cwd: './test/fixtures' - }) - nyc.wrap() - - nyc.instrumenter() - - istanbul.config.loadFile.calledWithMatch(path.join('test', 'fixtures', '.istanbul.yml')).should.equal(true) - istanbul.Instrumenter.calledWith({ - coverageVariable: '__coverage__', - embedSource: false, - noCompact: false, - preserveComments: true - }).should.equal(true) - - afterEach() - return done() - }) - }) - - describe('mungeArgs', function () { - it('removes dashed options that proceed bin', function () { - process.argv = ['/Users/benjamincoe/bin/iojs', - '/Users/benjamincoe/bin/nyc.js', - '--reporter', - 'lcov', - 'node', - 'test/nyc-test.js' - ] - - var yargv = require('yargs/yargs')(process.argv.slice(2)).argv - - var munged = (new NYC()).mungeArgs(yargv) - - munged.should.eql(['node', 'test/nyc-test.js']) - }) - }) - - describe('addAllFiles', function () { - it('outputs an empty coverage report for all files that are not excluded', function (done) { - var nyc = new NYC({ - cwd: fixtures - }) - 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['1'].should.equal(0) - report.s['2'].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({ - cwd: cwd - }) - 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['1'].should.equal(0) - report1.s['2'].should.equal(0) - - var report2 = reports[0][notLoadedPath2] - report2.s['1'].should.equal(0) - report2.s['2'].should.equal(0) - - return done() - }) - - it('tracks coverage appropriately once the file is required', function (done) { - var nyc = (new NYC({ - cwd: fixtures - })) - 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['1'].should.equal(1) - report.s['2'].should.equal(1) - - return done() - }) - - it('transpiles 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({ - cwd: fixtures, - require: './test/fixtures/transpile-hook' - })) - - 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['1'].should.equal(0) - - fs.unlinkSync(needsTranspilePath) - return done() - }) - }) - - describe('cache', function () { - it('handles collisions', function (done) { - var nyc = new NYC({cwd: fixtures}) - 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() - }) - }) - }) -}) diff --git a/test/src/source-map-cache.js b/test/src/source-map-cache.js deleted file mode 100644 index 813bddb14..000000000 --- a/test/src/source-map-cache.js +++ /dev/null @@ -1,174 +0,0 @@ -/* global describe, it */ - -var _ = require('lodash') -var ap = require('any-path') -var expect = require('chai').expect -var path = require('path') - -var convertSourceMap = require('convert-source-map') -var sourceMapFixtures = require('source-map-fixtures') - -var nycDir = path.join(__dirname, '../..') - -// Load source map fixtures. -var covered = _.mapValues({ - bundle: sourceMapFixtures.inline('bundle'), - inline: sourceMapFixtures.inline('branching'), - istanbulIgnore: sourceMapFixtures.inline('istanbul-ignore'), - istanbulIgnoreFn: sourceMapFixtures.inline('istanbul-ignore-fn'), - none: sourceMapFixtures.none('branching') -}, function (fixture) { - return _.assign({ - // Coverage for the fixture is stored relative to the root directory. Here - // compute the path to the fixture file relative to the root directory. - absPath: path.resolve(nycDir, fixture.file), - // the sourcemap itself remaps the path. - mappedPath: path.resolve(nycDir, fixture.sourceFile), - // Compute the number of lines in the original source, excluding any line - // break at the end of the file. - maxLine: fixture.sourceContentSync().trimRight().split(/\r?\n/).length - }, fixture) -}) - -var SourceMapCache -try { - SourceMapCache = require('../../lib/source-map-cache.covered.js') - require('../../lib/self-coverage-helper.js') -} catch (e) { - SourceMapCache = require('../../lib/source-map-cache') -} - -var sourceMapCache = new SourceMapCache() -_.forOwn(covered, function (fixture) { - var source = fixture.contentSync() - var sourceMap = convertSourceMap.fromSource(source) || convertSourceMap.fromMapFileSource(source, fixture.absPath) - if (sourceMap) { - sourceMapCache.addMap(fixture.absPath, sourceMap.sourcemap) - } -}) - -var getReport = (function () { - var report = _.reduce(require('../fixtures/report'), function (result, fileReport, relpath) { - var absPath = path.resolve(nycDir, relpath) - fileReport.path = absPath - result[absPath] = fileReport - return result - }, {}) - - return function () { - return ap(_.cloneDeep(report)) - } -})() -var fixture = covered.inline - -require('chai').should() -require('tap').mochaGlobals() - -describe('source-map-cache', function () { - it('does not rewrite if there is no source map', function () { - var report = getReport() - sourceMapCache.applySourceMaps(report) - report.should.have.property(covered.none.absPath) - }) - - it('retains /* istanbul ignore … */ results', function () { - var report = getReport() - sourceMapCache.applySourceMaps(report) - report[covered.istanbulIgnore.mappedPath].statementMap['3'].should.have.property('skip', true) - report[covered.istanbulIgnoreFn.mappedPath].fnMap['2'].should.have.property('skip', true) - }) - - it('does not fail if istanbul returns illegal positions', function () { - var report = getReport() - sourceMapCache.applySourceMaps(report) - - var busted = getReport() - var start = busted[covered.inline.absPath].statementMap['1'].start - start.line = 0 - start.column = -2 - sourceMapCache.applySourceMaps(busted) - - expect(busted[covered.inline.mappedPath]).to.deep.equal(report[covered.inline.mappedPath]) - }) - - describe('path', function () { - it('does not rewrite path if the source map has more than one source', function () { - var report = getReport() - sourceMapCache.applySourceMaps(report) - expect(report[covered.bundle.absPath]).to.not.equal(undefined) - }) - - it('rewrites path if the source map has exactly one source', function () { - var report = ap(_.pick(getReport(), fixture.absPath)) - sourceMapCache.applySourceMaps(report) - expect(report[fixture.absPath]).to.equal(undefined) - report.should.have.property(fixture.mappedPath) - }) - }) - - describe('statements', function () { - it('drops statements that have no mapping back to the original source code', function () { - var report = getReport() - var originalS = report[fixture.absPath].s - sourceMapCache.applySourceMaps(report) - Object.keys(report[fixture.mappedPath].s) - .should.be.lt(originalS) - Object.keys(report[fixture.mappedPath].statementMap).length - .should.equal(Object.keys(report[fixture.mappedPath].s).length) - }) - - it('maps all statements back to their original loc', function () { - var report = getReport() - sourceMapCache.applySourceMaps(report) - var statements = _.values(report[fixture.mappedPath].statementMap) - var maxStatement = _.max(statements, function (s) { - return Math.max(s.start.line, s.end.line) - }) - Math.max(maxStatement.start.line, maxStatement.end.line).should.be.lte(fixture.maxLine) - }) - }) - - describe('functions', function () { - it('drops functions that have no mapping back to the original source code', function () { - var report = getReport() - var originalF = report[fixture.absPath].f - sourceMapCache.applySourceMaps(report) - Object.keys(report[fixture.mappedPath].f) - .should.be.lt(originalF) - Object.keys(report[fixture.mappedPath].fnMap).length - .should.equal(Object.keys(report[fixture.mappedPath].f).length) - }) - - it('maps all functions back to their original loc', function () { - var report = getReport() - sourceMapCache.applySourceMaps(report) - var functions = _.values(report[fixture.mappedPath].fnMap) - var maxFunction = _.max(functions, function (f) { - return f.line - }) - Math.max(maxFunction.line).should.be.lte(fixture.maxLine) - }) - }) - - describe('branches', function () { - it('drops branches that have no mapping back to the original source code', function () { - var report = getReport() - var originalB = report[fixture.absPath].b - sourceMapCache.applySourceMaps(report) - Object.keys(report[fixture.mappedPath].b) - .should.be.lt(originalB) - Object.keys(report[fixture.mappedPath].branchMap).length - .should.equal(Object.keys(report[fixture.mappedPath].b).length) - }) - - it('maps all branches back to their original loc', function () { - var report = getReport() - sourceMapCache.applySourceMaps(report) - var branches = _.values(report[fixture.mappedPath].branchMap) - var maxBranch = _.max(branches, function (b) { - return b.line - }) - Math.max(maxBranch.line).should.be.lte(fixture.maxLine) - }) - }) -}) diff --git a/test/temp-dir.js b/test/temp-dir.js new file mode 100644 index 000000000..3f1b489db --- /dev/null +++ b/test/temp-dir.js @@ -0,0 +1,81 @@ +'use strict' + +const fs = require('../lib/fs-promises') +const path = require('path') +const { promisify } = require('util') + +const t = require('tap') +const rimraf = promisify(require('rimraf')) + +const { runNYC, fixturesCLI } = require('./helpers') + +function cleanup () { + return Promise.all([ + rimraf(path.resolve(fixturesCLI, '.nyc_output')), + rimraf(path.resolve(fixturesCLI, '.temp_directory')), + rimraf(path.resolve(fixturesCLI, '.temp_dir')) + ]) +} + +t.beforeEach(cleanup) +t.teardown(cleanup) + +t.test('creates the default \'tempDir\' when none is specified', async t => { + const { status } = await runNYC({ + args: [process.execPath, './half-covered.js'] + }) + + t.strictEqual(status, 0) + + const cliFiles = await fs.readdir(path.resolve(fixturesCLI)) + t.strictEqual(cliFiles.includes('.nyc_output'), true) + t.strictEqual(cliFiles.includes('.temp_dir'), false) + t.strictEqual(cliFiles.includes('.temp_directory'), false) + + const tempFiles = await fs.readdir(path.resolve(fixturesCLI, '.nyc_output')) + t.strictEqual(tempFiles.length, 2) // the coverage file, and processinfo +}) + +t.test('prefers \'tempDirectory\' to \'tempDir\'', async t => { + const { status } = await runNYC({ + args: [ + '--tempDirectory', + '.temp_directory', + '--tempDir', + '.temp_dir', + process.execPath, + './half-covered.js' + ] + }) + + t.strictEqual(status, 0) + + const cliFiles = await fs.readdir(path.resolve(fixturesCLI)) + t.strictEqual(cliFiles.includes('.nyc_output'), false) + t.strictEqual(cliFiles.includes('.temp_dir'), false) + t.strictEqual(cliFiles.includes('.temp_directory'), true) + + const tempFiles = await fs.readdir(path.resolve(fixturesCLI, '.temp_directory')) + t.strictEqual(tempFiles.length, 2) +}) + +t.test('uses the \'tempDir\' option if \'tempDirectory\' is not set', async t => { + const { status } = await runNYC({ + args: [ + '--tempDir', + '.temp_dir', + process.execPath, + './half-covered.js' + ] + }) + + t.strictEqual(status, 0) + + const cliFiles = await fs.readdir(path.resolve(fixturesCLI)) + t.strictEqual(cliFiles.includes('.nyc_output'), false) + t.strictEqual(cliFiles.includes('.temp_dir'), true) + t.strictEqual(cliFiles.includes('.temp_directory'), false) + + const tempFiles = await fs.readdir(path.resolve(fixturesCLI, '.temp_dir')) + t.strictEqual(tempFiles.length, 2) +}) diff --git a/test/tsc.js b/test/tsc.js new file mode 100644 index 000000000..d61dafa53 --- /dev/null +++ b/test/tsc.js @@ -0,0 +1,28 @@ +'use strict' + +const path = require('path') +const t = require('tap') + +const { testSuccess } = require('./helpers') +const fixturesTSC = path.resolve(__dirname, 'fixtures/tsc') + +t.test('reads source-map', t => testSuccess(t, { + cwd: fixturesTSC, + args: [ + '--produce-source-map=true', + '--cache=false', + process.execPath, + 'mapping.js' + ] +})) + +t.test('ignore source-map', t => testSuccess(t, { + cwd: fixturesTSC, + args: [ + '--produce-source-map=true', + '--no-source-map', + '--cache=false', + process.execPath, + 'mapping.js' + ] +})) diff --git a/test/wrap.js b/test/wrap.js new file mode 100644 index 000000000..2d28c2a2b --- /dev/null +++ b/test/wrap.js @@ -0,0 +1,112 @@ +'use strict' + +const fs = require('fs') +const path = require('path') + +const t = require('tap') + +const NYC = require('../self-coverage') + +const { parseArgv, resetState } = require('./helpers') + +// we test exit handlers in nyc-integration.js. +NYC.prototype._wrapExit = () => {} + +const fixtures = path.resolve(__dirname, 'fixtures') +const configMultExt = path.resolve(fixtures, 'conf-multiple-extensions') + +t.beforeEach(resetState) + +t.test('wraps modules with coverage counters when they are required', async t => { + const nyc = new NYC(await parseArgv()) + await nyc.reset() + nyc.wrap() + + const check = require('./fixtures/check-instrumented') + t.strictEqual(check(), true) +}) + +t.test('wraps modules with coverage counters when the custom require hook compiles them', async t => { + let required = false + const hook = function (module, filename) { + if (filename.indexOf('check-instrumented.js') !== -1) { + required = true + } + module._compile(fs.readFileSync(filename, 'utf8'), filename) + } + + const nyc = new NYC(await parseArgv()) + await nyc.reset() + nyc.wrap() + + // install the custom require hook + require.extensions['.js'] = hook // eslint-disable-line + + const check = require('./fixtures/check-instrumented') + t.strictEqual(check(), true) + t.strictEqual(required, true) +}) + +t.test('assigns a function to custom extensions', async t => { + const nyc = new NYC(await parseArgv(configMultExt)) + await nyc.reset() + nyc.wrap() + + t.type(require.extensions['.es6'], 'function') // eslint-disable-line + t.type(require.extensions['.foo.bar'], 'function') // eslint-disable-line + + // default should still exist + t.type(require.extensions['.js'], 'function') // eslint-disable-line +}) + +t.test('calls the `_handleJs` function for custom file extensions', async t => { + const required = {} + const nyc = new NYC(await parseArgv(configMultExt)) + + nyc._handleJs = (code, options) => { + if (options.filename.includes('check-instrumented.es6')) { + required.es6 = true + } + + if (options.filename.includes('check-instrumented.foo.bar')) { + required.custom = true + } + + return code + } + + await nyc.reset() + nyc.wrap() + + require('./fixtures/conf-multiple-extensions/check-instrumented.es6') + require('./fixtures/conf-multiple-extensions/check-instrumented.foo.bar') + t.strictEqual(required.custom, true) + t.strictEqual(required.es6, true) +}) + +t.test('does not output coverage for files that have not been included, by default', async t => { + const nyc = new NYC(await parseArgv(process.cwd())) + nyc.wrap() + await nyc.reset() + + const reports = (await nyc.coverageData()).filter(report => report['./test/fixtures/not-loaded.js']) + t.strictEqual(reports.length, 0) +}) + +t.test('tracks coverage appropriately once the file is required', async t => { + const nyc = new NYC(await parseArgv(fixtures)) + await nyc.reset() + nyc.wrap() + + require('./fixtures/not-loaded') + + nyc.writeCoverageFile() + + const notLoadedPath = path.join(fixtures, './not-loaded.js') + const reports = (await nyc.coverageData()).filter(report => report[notLoadedPath]) + const report = reports[0][notLoadedPath] + + t.strictEqual(reports.length, 1) + t.strictEqual(report.s['0'], 1) + t.strictEqual(report.s['1'], 1) +})