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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +116 -21
  3. 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
- > Health check for your JavaScript project
3
+ **Dependency health checker for JavaScript/TypeScript projects**
4
4
 
5
- Find unused dependencies, outdated packages, and calculate your project's health score in seconds.
5
+ [![npm version](https://img.shields.io/npm/v/devcompass.svg)](https://www.npmjs.com/package/devcompass)
6
+ [![npm downloads](https://img.shields.io/npm/dm/devcompass.svg)](https://www.npmjs.com/package/devcompass)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
8
 
7
- ## 🚀 Quick Start
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
- - 🔍 Find unused dependencies
15
- - 📦 Check for outdated packages
16
- - 📊 Calculate health score (0-10)
17
- - 💡 Get actionable recommendations
18
- - ⚡ Fast analysis (2-3 seconds)
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
- ## 📦 Installation
20
+ ## 🚀 Installation
21
+ ```bash
22
+ npm install -g devcompass
23
+ ```
21
24
 
22
- ### Option 1: npx (Recommended)
25
+ ## 📖 Usage
26
+
27
+ Navigate to your project directory and run:
23
28
  ```bash
24
- npx devcompass analyze
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
- ### Option 2: Global Installation
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
- npm install -g devcompass
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 >= 16.0.0
36
- - npm >= 7.0.0
37
- - A project with `package.json`
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)**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devcompass",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Analyze your JavaScript projects for unused dependencies and outdated packages",
5
5
  "main": "src/index.js",
6
6
  "bin": {