Gathering detailed insights and metrics for @penovicp/typescript-coverage-report
Gathering detailed insights and metrics for @penovicp/typescript-coverage-report
Gathering detailed insights and metrics for @penovicp/typescript-coverage-report
Gathering detailed insights and metrics for @penovicp/typescript-coverage-report
Node command tool to generate TypeScript coverage report
npm install @penovicp/typescript-coverage-report
Typescript
Module System
Node Version
NPM Version
TypeScript (72.98%)
JavaScript (25.45%)
CSS (1.58%)
Total Downloads
2,026
Last Day
25
Last Week
134
Last Month
354
Last Year
2,026
MIT License
230 Commits
6 Branches
1 Contributors
Updated on Jun 30, 2024
Latest Version
1.0.0-beta.2
Package Id
@penovicp/typescript-coverage-report@1.0.0-beta.2
Unpacked Size
67.50 kB
Size
17.55 kB
File Count
13
NPM Version
10.8.1
Node Version
20.14.0
Published on
Jul 01, 2024
Cumulative downloads
Total Downloads
Last Day
-40.5%
25
Compared to previous day
Last Week
52.3%
134
Compared to previous week
Last Month
-21.7%
354
Compared to previous month
Last Year
0%
2,026
Compared to previous year
6
1
25
Node command line tool for generating TypeScript coverage reports ✨
This package fills the gap of a missing type coverage reporting tool which is present in the Flow ecosystem, strongly inspired by the amazing work done by flow-coverage-report
and using data generated by type-coverage
.
See an example of the coverage report.
To learn more about the reasoning behind this project and its roadmap, please refer to the following article: How I built a TS coverage report tool
typescript-coverage-report
can be installed locally or globally.
Users are advised to install it as a project (dev) dependency and create a script in package.json
.
1$ yarn add --dev typescript-coverage-report 2 3# OR 4 5$ npm install --save-dev typescript-coverage-report
If installed locally, add the following to the scripts section of package.json
.
1"scripts": { 2 "ts-coverage": "typescript-coverage-report" 3}
Then run:
1$ yarn ts-coverage 2 3# OR 4 5$ npm run ts-coverage
To set the minimum threshold (80% by default), use the --threshold
option.
1$ yarn ts-coverage --threshold=99
As an alternative, options may be provided through the type-coverage
configuration, specified in package.json
.
1"typeCoverage": { 2 "atLeast": 90 3}
The CLI accepts a list of arguments:
Option | Description | Default value |
---|---|---|
-t, --threshold [number] | The minimum percentage of coverage required. | 80 |
-o, --outputDir [string] | The output directory where to generate the report. | coverage-ts |
-s, --strict [boolean] | Run the check in strict mode. | false |
-d, --debug [boolean] | Show debug information. | false |
-c, --cache [boolean] | Save and reuse type check result from cache. | false |
-p, --project [string] | File path to tsconfig file, eg: --project "./app/tsconfig.app.json" | . |
-i, --ignore-files [boolean] | Ignore specified files, eg: --ignore-files "demo1/*.ts" --ignore-files "demo2/foo.ts" | false |
-u, --ignore-unread [boolean] | Allow writes to variables with implicit any types | false |
Feel free to dive in! Open an issue or submit PRs.
On this project we follow the Contributor Covenant Code of Conduct.
Thanks for contributing!
Remember to run the following commands to link your version of this package and build the TypeScript files.
1# Link the package globally, so you'll be able to test it in other projects. 2$ yarn link 3# Builds the TypeScript files and watches for changes 4$ yarn build --watch
This project follows the Angular commit messages, but it's very open to emojis 🤯.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
MIT @ Alessandro Canessa
No vulnerabilities found.
No security vulnerabilities found.