project-health
v1.0.4
Published
A CLI tool to analyze Node.js project health and generate reports.
Downloads
9
Maintainers
Readme
Project Health
Analyze your Node.js project and generate a comprehensive health report.
Features
- Detect outdated dependencies
- Find security vulnerabilities
- Identify unused dependencies
- Scan for large files (>1MB)
- Check for missing or present test files (
*.test.js,*.spec.js) - Output results as:
- Styled CLI summary
reports/project-health.jsonreports/project-health.md
Installation
npm install -g project-healthOr use with npx (no install):
npx project-health --allUsage
Run in your project root:
project-health --all # Run all checks (default)
project-health --outdated # Only check outdated dependencies
project-health --security # Only check for vulnerabilities
project-health --unused # Only check for unused dependencies
project-health --large-files # Only check for large files
project-health --tests # Only check for test files
project-health --help # Show help
project-health --version # Show versionUsage Examples
Run in your project root:
project-health --all # Run all checks (default)
project-health --outdated # Only check outdated dependencies
project-health --security # Only check for vulnerabilities
project-health --unused # Only check for unused dependencies
project-health --large-files # Only check for large files
project-health --tests # Only check for test files
project-health --help # Show help
project-health --version # Show versionExample Output
📦 Outdated dependencies: 2
- lodash: current 4.17.0, latest 4.17.21
- marked: current 0.3.6, latest 16.1.1
Suggestion: Run "npm update" to update dependencies.
🔐 Vulnerabilities: 4 found
Suggestion: Run "npm audit fix" to address vulnerabilities.
📦 Unused dependencies: 3
- left-pad
- lodash
- marked
Suggestion: Remove unused packages with "npm uninstall <package>".
📁 Large file: some-large-file.zip (2.86 MB)
Suggestion: Remove or compress large files if not needed.
🧪 Test files found: 2
- dummy2.spec.js
- dummy.test.js
Summary:
📦 Dependencies: 2 outdated, 3 unused
🔐 Vulnerabilities: 4 found
🧪 Tests: 2 test files found
📁 Large file: some-large-file.zip (2.86 MB)
✅ Report saved: reports/project-health.md
Some issues were found. See above for details and suggestions.Contributing
Pull requests and issues are welcome! Please open an issue to discuss your idea or bug before submitting a PR.
License
MIT License
Copyright (c) 2024 Avishek Devnath [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
