Gathering detailed insights and metrics for istanbul-slack-notify
Gathering detailed insights and metrics for istanbul-slack-notify
npm install istanbul-slack-notify
Typescript
Module System
Node Version
NPM Version
72.5
Supply Chain
96.1
Quality
76.2
Maintenance
100
Vulnerability
97.9
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
7,966,039
Last Day
1,438
Last Week
10,275
Last Month
39,136
Last Year
1,322,884
MIT License
5 Stars
60 Commits
9 Forks
2 Watchers
2 Branches
5 Contributors
Updated on Dec 04, 2024
Minified
Minified + Gzipped
Latest Version
2.0.2
Package Id
istanbul-slack-notify@2.0.2
Unpacked Size
281.51 kB
Size
216.71 kB
File Count
26
NPM Version
10.5.0
Node Version
21.7.3
Published on
Dec 04, 2024
Cumulative downloads
Total Downloads
Last Day
7.9%
1,438
Compared to previous day
Last Week
16.1%
10,275
Compared to previous week
Last Month
12.9%
39,136
Compared to previous month
Last Year
-76.4%
1,322,884
Compared to previous year
4
Version 2.0: See CHANGELOG.md for breaking changes. Moved to support
nyc
and Node 20+
Sends nyc (formally istanbul) coverage summary and git build details to Slack, with support for a pass/fail threshold for project coverage.
If SLACK_WEBHOOK is not provided it prints total coverage info to console instead
npm i --save-dev istanbul-slack-notify@2
Do not share incoming webhook URLs in public code repositories.
You will need to configure a webhook for your Slack team: https://api.slack.com/incoming-webhooks
You must define SLACK_WEBHOOK
as an environment variable.
You can override other default settings in your package.json
by adding the following section:
1{ 2 "coverage": { 3 "threshold": 100, 4 "projectName": "Test Slack Notify", 5 "repositoryUrl": "https://github.com/mattyboy/test-slack-notifier", 6 "coveragePath": "./coverage", 7 "username": "coverage-bot", 8 "channel": "#random", 9 "haltOnFailure": true 10 } 11}
Make sure that nyc coverage json report for your project must be generated first (coverage/coverage-final.json
)
Passing SLACK_WEBHOOK at runtime
Define a couple of npm tasks in package.json
, assuming you only want slack notify from you CI server.
1{ 2 "scripts": { 3 "test": "./node_modules/.bin/jest --coverage", 4 "test-ci": "npm test && ./node_modules/.bin/test-slack-notifier" 5 } 6}
Then run tests on your CI server as follows.
1export SLACK_WEBHOOK=https://hooks.slack.com/xxxxx 2npm run test-ci
Note: If you don't set the SLACK_WEBHOOK it will print totals coverage to console instead
Defining SLACK_WEBHOOK in package.json
Make sure to set your SLACK_WEBHOOK environment variable and relevant settings if you want to send a Slack message
1{ 2 "scripts": { 3 "test": "./node_modules/.bin/jest --coverage && ./node_modules/.bin/istanbul-slack-notify", 4 "test-ci": "npm test && ./node_modules/.bin/istanbul-slack-notify" 5 } 6}
1# use to test process or called via a CICD script 2export SLACK_WEBHOOK=https://hooks.slack.com/xxxxx 3./node_modules/.bin/istanbul-slack-notify
If you have any feedback or suggestions please let me know. We use this package as part of our CI process and are open to changes that would be valuable to us and others.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
2 existing vulnerabilities detected
Details
Reason
4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 2/14 approved changesets -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More