{"name":"coverage","version":"0.3.2","description":"A command-line tool to collect and report code coverage of a JavaScript program","author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"git+https://github.com/shinnn/coverage.git"},"license":"ISC","scripts":{"pretest":"eslint .","test":"node . node . test.js"},"bin":{"coverage":"index.js"},"keywords":["code","coverage","quality","report","analysis","ecmascript","command","command-line","cli","travis-ci","github-actions","appveyor","circleci","codecov"],"dependencies":{"c8":"^4.1.4","foreground-child":"^1.5.6","normalize-package-data":"^2.5.0","slash":"^3.0.0","test-exclude":"^5.2.3","which":"^1.3.1","yargs-parser":"^13.1.0"},"devDependencies":{"@shinnn/eslint-config":"^6.10.3","eslint":"^5.16.0","lodash":"^4.17.11","rmfr":"^2.0.0","tape":"^4.10.1"},"eslintConfig":{"extends":"@shinnn"},"gitHead":"aa818780ff6861b6a45bceb5127f1eecc44e7f2a","bugs":{"url":"https://github.com/shinnn/coverage/issues"},"homepage":"https://github.com/shinnn/coverage#readme","_id":"coverage@0.3.2","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"email":"snnskwtnb@gmail.com","name":"shinnn"}],"dist":{"integrity":"sha512-07fDmFEO90WvceNkNvuoGh1sLg3N/9dW5janmSVWRII0CIxSQCJmCDYK9Su5Mfz/RBfc41ZLW5o9U+TubGi4bg==","shasum":"8aeb867a17e5be9b05c12e8d65eeb3dbebc353c5","tarball":"http://registry-npm.ywwl.com/coverage/download/coverage-0.3.2.tgz","fileCount":4,"unpackedSize":13386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6mTmCRA9TVsSAnZWagAA3/kP/jQPta/TkdKIX5rC5pPQ\nVBaZN7LQyPX9s4DWP9RhtApJ5LrZvoRsE0CKjuBkhstNAJG0A/Jv8rXcD5YT\n3XfWRyxpgNUD8OkPuBHne4d73m9HCd8ctddMUCeiPrb78FTw7rSNLWHvmW38\nVa7IvXd02OmjnDJX0Cfa2JjX7KIDTEh/A1oMTd+iWsV5kx8gP4nQ+uz0A//N\np3ensWQpRdUikLKyhjmVHnTwwaJRy+oi6VfWF8T+QHtgbL2zVWVYN3BivGv4\nGd1eAgjVXtzPsdTyD9lLoJvKWOswYf8aU/7X4x9KJEDcasKHl55wwvnuGXud\nnl3uY4/DwK04zWSehNG9J49lDEkdbnVv44T7KBrBg6s1WRs1jg/MmcqaQjU1\nIfsbT2Pk9tKExxJKiACyfUfAeT/fZvtQxvqoHRNeIX/A6kH34RMQlvP++9QO\nRxA4bV1FxRQlyx1qCb8Bg1aY1lXUwj0mJl6xREPlL9cJWHAjxmAuxCuHmW97\nYiPBJy+NeGxeXvDudq5YdJqWujXVYhtK8fg7H2sGjd5VC7I4dbDZi8fHO0o6\nKZd7aMqLO4s4w0+cWrAJKzResxrxcg4UJJ2S3m0tutgoLi1Qvv/Ybp70yWmk\nF3T7B2Y+GbSds1GMd/mrCSIzhIOrbzMt/TtB0FQHr0SvEVw0uO9iJgMlFFTb\noqag\r\n=TgF7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfjkZ//ypabAy2IoEo0OATy7FIgNFHNrf2jprH0TgetQIgUhsOLf7RoxdhMeiL3NS46OCs4836jzX18u5y05b3g7Y="}],"size":5260,"noattachment":false,"key":"/coverage/-/coverage-0.3.2.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/coverage_0.3.2_1558865126123_0.33234095348064363"},"_hasShrinkwrap":false,"readme":"# coverage\n\n[![npm version](https://img.shields.io/npm/v/coverage.svg)](https://www.npmjs.com/package/coverage)\n[![Github Actions](https://action-badges.now.sh/shinnn/coverage)](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/shinnn/coverage)\n[![Build Status](https://travis-ci.com/shinnn/coverage.svg?branch=master)](https://travis-ci.com/shinnn/coverage)\n[![Build status](https://ci.appveyor.com/api/projects/status/x5huttqwjqfpl05q/branch/master?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/coverage/branch/master)\n[![CircleCI](https://circleci.com/gh/shinnn/coverage/tree/master.svg?style=shield)](https://circleci.com/gh/shinnn/coverage/tree/master)\n[![codecov](https://codecov.io/gh/shinnn/coverage/branch/master/graph/badge.svg)](https://codecov.io/gh/shinnn/coverage)\n\nA command-line tool to collect and report code coverage of a JavaScript program\n\n```console\n$ coverage test.js\n\n✔ write a file\n✔ create directories as needed\n✔ validate arguments\n\n3 of 3 passed.\n\n----------|----------|----------|----------|----------|-------------------|\nFile      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |\n----------|----------|----------|----------|----------|-------------------|\nAll files |    95.15 |    79.52 |      100 |    95.09 |                   |\n index.js |     90.6 |    75.38 |      100 |    90.52 |... 44,148,152,156 |\n lib.js   |      100 |    94.44 |      100 |      100 |               107 |\n----------|----------|----------|----------|----------|-------------------|\n```\n\nThis is an opinionated wrapper of [c8](https://github.com/bcoe/c8), different in the following points:\n\n* Runs both [`html` and `text` reporter](https://github.com/istanbuljs/nyc#running-reports) by default\n* Automatically enables [ECMAScript module](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) support for `.mjs` files\n* The first argument can be a JavaScript file path instead of a command\n* Built-in [Codecov](https://codecov.io) support\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install coverage\n```\n\nOnce this package is installed to the project directory, users can execute `coverage` command inside [npm scripts](https://docs.npmjs.com/misc/scripts#description).\n\n## CLI\n\n### `coverage [options] <file|command> [args]`\n\n<img alt=\"An example of the HTML report\" src=\"screenshot.png\" width=\"330px\" align=\"right\">\n\nExecute the command, print code coverage to the stdout and write [HTML reports](https://istanbul.js.org/docs/advanced/alternative-reporters/#html) under the `./coverage` directory.\n\n`<file|command>` can be either a JavaScript file path or a command. If a path is provided, the file is run with the `node` command.\n\n```console\n$ coverage /path/to/entry-point.js # is the same as ↓\n$ coverage node /path/to/entry-point.js\n```\n\nIf the provided JavaScript path ends with `.mjs`,\n\n* [ECMAScript module mode](https://nodejs.org/api/esm.html) is automatically [enabled](https://nodejs.org/api/esm.html#esm_enabling).\n* [`--es-module-specifier-resolution`](https://nodejs.org/api/esm.html#esm_customizing_esm_specifier_resolution_algorithm) is automatically set to `node`.\n\n#### Reporters\n\nUsers can override the default format of reports with `--reporter` option.\n\n```console\n$ coverage example.js\n------------|----------|----------|----------|----------|-------------------|\nFile        |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |\n------------|----------|----------|----------|----------|-------------------|\nAll files   |      100 |      100 |      100 |      100 |                   |\n example.js |      100 |      100 |      100 |      100 |                   |\n------------|----------|----------|----------|----------|-------------------|\n\n$ coverage --reporter=text-summary example.js\n\n=============================== Coverage summary ===============================\nStatements   : 100% ( 1/1 )\nBranches     : 100% ( 1/1 )\nFunctions    : 100% ( 0/0 )\nLines        : 100% ( 1/1 )\n================================================================================\n\n$ coverage --reporter=none example.js # No reports\n```\n\n#### Codecov integration\n\nWhen the execution exits with code `0` on a CI service or [GitHub Actions](https://github.com/features/actions), it automatically uploads the generated coverage to [Codecov](https://docs.codecov.io/docs). Whether `CODECOV_TOKEN` environment variable is required or not varies between [services](https://github.com/codecov/codecov-bash#ci-providers).\n\n```console\n$ coverage test.js\n\n[... test results and coverage ...]\n\n==> Travis CI detected.\n==> Reading reports\n    + /home/travis/build/shinnn/coverage/coverage/lcov.info bytes=1399\n==> Gzipping contents\n==> Uploading reports\n    -> Uploading\n    -> View reports at https://codecov.io/github/shinnn/coverage/commit/e4f5880b8ec5885e6a0b79030df5871e19d6de1d\n```\n\n`c8` command-line [options](https://github.com/bcoe/c8/blob/v3.4.0/lib/parse-args.js#L13-L74) are supported. Run `npx coverage --help` to show the detailed reference for them.\n\n### `coverage report`\n\nOutput a report in the format specified in `--reporter` option.\n\nThis subcommand is only available after `coverage` has already been run.\n\n## License\n\n[ISC License](./LICENSE) © 2019 Shinnosuke Watanabe\n","publish_time":1558865126239,"_cnpm_publish_time":1558865126239,"dist-tags":{"latest":"0.4.1"}}