@vinean/dependency-analyzer 0.1.0 → 0.1.2
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/README.md +37 -11
- package/bin/dependency-analyzer.js +1 -0
- package/dist/dependency-analyzer-darwin-amd64 +0 -0
- package/dist/dependency-analyzer-darwin-arm64 +0 -0
- package/dist/dependency-analyzer-linux-amd64 +0 -0
- package/dist/dependency-analyzer-linux-arm64 +0 -0
- package/dist/dependency-analyzer-windows-amd64.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# 🛡️ @vinean/dependency-analyzer
|
|
2
2
|
|
|
3
|
-
A high-performance CLI for analyzing the **Replaceability** of your project's dependencies. Supports both **NPM** and **Go Modules**.
|
|
3
|
+
A high-performance CLI for analyzing the **Replaceability**, **Maintenance**, and **Health** of your project's dependencies. Supports both **NPM** and **Go Modules**.
|
|
4
4
|
|
|
5
5
|
## 🚀 Usage
|
|
6
6
|
|
|
7
|
-
Run it directly via `npx
|
|
7
|
+
Run it directly via `npx` in your project root directory:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npx @vinean/dependency-analyzer
|
|
@@ -20,22 +20,48 @@ npm install -g @vinean/dependency-analyzer
|
|
|
20
20
|
## ⚙️ Options
|
|
21
21
|
|
|
22
22
|
- `--project <path>`: Path to the project root (default: current directory).
|
|
23
|
+
- `--ecosystem <type>`: Force ecosystem detection (`npm` or `go`). Auto-detected by default.
|
|
23
24
|
- `--open=false`: Disable auto-opening the generated HTML report.
|
|
24
25
|
- `--json`: Print the raw analysis summary (JSON) to stdout.
|
|
25
26
|
|
|
26
|
-
## 📊
|
|
27
|
+
## 📊 Key Features
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
### 1. Replaceability Score (0-100)
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
2. **Code Volume**: Measures physical size and SLOC.
|
|
32
|
-
3. **API Surface**: Evaluates the breadth and complexity of the public interface.
|
|
33
|
-
4. **Entanglement**: Tracks dependency chains and OS-level integrations.
|
|
34
|
-
5. **Logic Complexity**: Proxies cognitive load and concurrency features.
|
|
31
|
+
`@vinean/dependency-analyzer` deep-dives into your project's source code to calculate how difficult it would be to replace a dependency.
|
|
35
32
|
|
|
36
|
-
|
|
33
|
+
- **Easy (0-30)**: Minimal logic, easy to replace or implement yourself.
|
|
34
|
+
- **Medium (31-70)**: Moderate complexity and coupling.
|
|
35
|
+
- **Hard (71-100)**: Deeply integrated, native code, or massive API surface.
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
The score is derived from 5 critical metrics:
|
|
38
|
+
|
|
39
|
+
- **Native Presence**: Detects C++/CGO/Unsafe code.
|
|
40
|
+
- **Code Volume**: Measures physical size and SLOC.
|
|
41
|
+
- **API Surface**: Evaluates the breadth and complexity of the interface.
|
|
42
|
+
- **Entanglement**: Tracks dependency chains and OS-level integrations.
|
|
43
|
+
- **Logic Complexity**: Proxies cognitive load and concurrency features.
|
|
44
|
+
|
|
45
|
+
### 2. Maintenance & Health
|
|
46
|
+
|
|
47
|
+
Identify abandoned or deprecated packages before they become a liability.
|
|
48
|
+
|
|
49
|
+
- **Maintenance Status**: Track if a package is active (Yes), stale (Unlikely), or deprecated (No).
|
|
50
|
+
- **Update Recency**: See exactly how long ago the last version was released.
|
|
51
|
+
- **Popularity**: Weekly download counts (NPM) provide context on package trust.
|
|
52
|
+
|
|
53
|
+
### 3. Ecosystem Specifics
|
|
54
|
+
|
|
55
|
+
- **React Native**: Detects native module usage and "New Architecture" (TurboModule/Fabric) support.
|
|
56
|
+
- **Go Support**: Deep analysis of module internals and proxy metadata.
|
|
57
|
+
|
|
58
|
+
## 📑 Interactive Dashboard
|
|
59
|
+
|
|
60
|
+
The tool generates a `dependency-report.html` interactive dashboard in your project directory:
|
|
61
|
+
|
|
62
|
+
- **Sortable Metrics**: Rank dependencies by complexity, downloads, or update age.
|
|
63
|
+
- **Export Capabilities**: Download the full analysis as a JSON for CI/CD or internal tools.
|
|
64
|
+
- **Offline First**: The report is self-contained and can be viewed without an internet connection.
|
|
39
65
|
|
|
40
66
|
---
|
|
41
67
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|