devcompass 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +116 -21
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ajay Thorat
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,41 +1,136 @@
|
|
|
1
|
-
# DevCompass
|
|
1
|
+
# 🧭 DevCompass
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Dependency health checker for JavaScript/TypeScript projects**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/devcompass)
|
|
6
|
+
[](https://www.npmjs.com/package/devcompass)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
npx devcompass analyze
|
|
10
|
-
```
|
|
9
|
+
Analyze your JavaScript projects to find unused dependencies, outdated packages, and get a health score.
|
|
11
10
|
|
|
12
11
|
## ✨ Features
|
|
13
12
|
|
|
14
|
-
- 🔍
|
|
15
|
-
- 📦 Check for outdated packages
|
|
16
|
-
- 📊
|
|
17
|
-
-
|
|
18
|
-
- ⚡ Fast analysis
|
|
13
|
+
- 🔍 **Detect unused dependencies** - Find packages you're not actually using
|
|
14
|
+
- 📦 **Check for outdated packages** - See what needs updating
|
|
15
|
+
- 📊 **Project health score** - Get a 0-10 rating for your dependencies
|
|
16
|
+
- 🎨 **Beautiful terminal UI** - Colored output with clear sections
|
|
17
|
+
- ⚡ **Fast analysis** - Scans projects in seconds
|
|
18
|
+
- 🔧 **Framework-aware** - Handles React, Next.js, Angular, NestJS
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## 🚀 Installation
|
|
21
|
+
```bash
|
|
22
|
+
npm install -g devcompass
|
|
23
|
+
```
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
## 📖 Usage
|
|
26
|
+
|
|
27
|
+
Navigate to your project directory and run:
|
|
23
28
|
```bash
|
|
24
|
-
|
|
29
|
+
devcompass analyze
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Example Output
|
|
33
|
+
```
|
|
34
|
+
🔍 DevCompass v1.0.0 - Analyzing your project...
|
|
35
|
+
✔ Scanned 15 dependencies in project
|
|
36
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
37
|
+
|
|
38
|
+
🔴 UNUSED DEPENDENCIES (2)
|
|
39
|
+
● lodash
|
|
40
|
+
● moment
|
|
41
|
+
|
|
42
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
43
|
+
|
|
44
|
+
🟡 OUTDATED PACKAGES (3)
|
|
45
|
+
react 18.2.0 → ^19.0.0 (major update)
|
|
46
|
+
axios 1.4.0 → ^1.6.0 (minor update)
|
|
47
|
+
express 4.18.0 → ^4.19.0 (patch update)
|
|
48
|
+
|
|
49
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
50
|
+
|
|
51
|
+
📊 PROJECT HEALTH
|
|
52
|
+
Overall Score: 6.5/10
|
|
53
|
+
Total Dependencies: 15
|
|
54
|
+
Unused: 2
|
|
55
|
+
Outdated: 3
|
|
56
|
+
|
|
57
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
58
|
+
|
|
59
|
+
💡 QUICK WIN
|
|
60
|
+
Clean up unused dependencies:
|
|
61
|
+
npm uninstall lodash moment
|
|
62
|
+
|
|
63
|
+
Expected impact:
|
|
64
|
+
✓ Remove 2 unused packages
|
|
65
|
+
✓ Reduce node_modules size
|
|
66
|
+
✓ Improve health score → 7.5/10
|
|
25
67
|
```
|
|
26
68
|
|
|
27
|
-
|
|
69
|
+
## 🎯 What It Detects
|
|
70
|
+
|
|
71
|
+
### Unused Dependencies
|
|
72
|
+
- Uses AST parsing via [depcheck](https://github.com/depcheck/depcheck)
|
|
73
|
+
- Scans all `.js`, `.jsx`, `.ts`, `.tsx` files
|
|
74
|
+
- Excludes `node_modules`, `dist`, `build` folders
|
|
75
|
+
- Framework-aware (won't flag React, Next.js core packages)
|
|
76
|
+
|
|
77
|
+
### Outdated Packages
|
|
78
|
+
- Checks against npm registry
|
|
79
|
+
- Shows current vs latest versions
|
|
80
|
+
- Indicates update type (major/minor/patch)
|
|
81
|
+
|
|
82
|
+
### Health Score
|
|
83
|
+
- Calculated from 0-10 based on:
|
|
84
|
+
- Percentage of unused dependencies (-4 points per 100%)
|
|
85
|
+
- Percentage of outdated packages (-3 points per 100%)
|
|
86
|
+
- Higher score = healthier project
|
|
87
|
+
|
|
88
|
+
## ⚙️ Options
|
|
28
89
|
```bash
|
|
29
|
-
|
|
90
|
+
# Analyze current directory
|
|
30
91
|
devcompass analyze
|
|
92
|
+
|
|
93
|
+
# Show version
|
|
94
|
+
devcompass --version
|
|
95
|
+
|
|
96
|
+
# Show help
|
|
97
|
+
devcompass --help
|
|
31
98
|
```
|
|
32
99
|
|
|
33
100
|
## 🛠️ Requirements
|
|
34
101
|
|
|
35
|
-
- Node.js >=
|
|
36
|
-
- npm
|
|
37
|
-
|
|
102
|
+
- Node.js >= 14.0.0
|
|
103
|
+
- npm or yarn
|
|
104
|
+
|
|
105
|
+
## 🤝 Contributing
|
|
106
|
+
|
|
107
|
+
Contributions are welcome! Feel free to:
|
|
108
|
+
|
|
109
|
+
1. Fork the repository
|
|
110
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
111
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
112
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
113
|
+
5. Open a Pull Request
|
|
38
114
|
|
|
39
115
|
## 📝 License
|
|
40
116
|
|
|
41
|
-
MIT
|
|
117
|
+
MIT © [Ajay Thorat](https://github.com/AjayBThorat-20)
|
|
118
|
+
|
|
119
|
+
## 🔗 Links
|
|
120
|
+
|
|
121
|
+
- [npm Package](https://www.npmjs.com/package/devcompass)
|
|
122
|
+
- [GitHub Repository](https://github.com/AjayBThorat-20/devcompass)
|
|
123
|
+
- [Report Issues](https://github.com/AjayBThorat-20/devcompass/issues)
|
|
124
|
+
|
|
125
|
+
## 🙏 Acknowledgments
|
|
126
|
+
|
|
127
|
+
Built with:
|
|
128
|
+
- [depcheck](https://github.com/depcheck/depcheck) - Dependency checker
|
|
129
|
+
- [npm-check-updates](https://github.com/raineorshine/npm-check-updates) - Package updater
|
|
130
|
+
- [chalk](https://github.com/chalk/chalk) - Terminal colors
|
|
131
|
+
- [ora](https://github.com/sindresorhus/ora) - Spinners
|
|
132
|
+
- [commander](https://github.com/tj/commander.js) - CLI framework
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
**Made with ❤️ by [Ajay Thorat](https://github.com/AjayBThorat-20)**
|