
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
(see also licenses for dev. deps.)
If you need png export, run:
npm i -D coveradge convert-svg-to-png
Otherwise, just this:
npm i -D coveradge
reporter
in your package.json
:{
"nyc": {
"reporter": [
"json-summary"
]
}
}
You may optionally set coverage thresholds and/or watermarks:
{
"nyc": {
"reporter": [
"json-summary"
],
"branches": 80,
"lines": 80,
"functions": 80,
"statements": 80,
"watermarks": {
"lines": [80, 95],
"functions": [80, 95],
"branches": [80, 95],
"statements": [80, 95]
}
}
}
The watermarks, if present, will be given precedence over the regular thresholds for determining color (though not as high of a precedence as command-line thresholds).
Add --reporter coveradge
at the beginning of the nyc
call.
Alternatively, e.g., if you need to build a coveradge badge after testing has
already finished for a merged coverage file, add a call to coveradge
in your
package.json
scripts
at some point after running nyc
.
Add any desired options. If using as an nyc --reporter
, then add the
options to package.json
instead of a coveradgeOptions
property. Otherwise,
pass as CLI or programmatic options. (See below for the choices.)
Add the badge to your README (e.g.,
[](coverage-badge.svg)
)
or for a link that will also work on npmjs.com:
[](coverage-badge.svg)
That's it!
FAQs
Generate coverage badges during local nyc/istanbul execution
We found that coveradge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.