whyinstall 0.3.0 → 0.3.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/README.md CHANGED
@@ -24,6 +24,7 @@ whyinstall lodash
24
24
 
25
25
  - `-j, --json` - Output results as JSON
26
26
  - `-c, --cwd <path>` - Set working directory (default: current directory)
27
+ - `-s, --size-map` - Show bundle size impact breakdown
27
28
 
28
29
  ## Features
29
30
 
@@ -35,9 +36,14 @@ whyinstall lodash
35
36
  - Colored tree output for readability
36
37
  - JSON output for CI/CD
37
38
  - Actionable suggestions for optimization
39
+ - Bundle size impact breakdown
38
40
 
39
41
  ## Example Output
40
42
 
43
+ ```bash
44
+ whyinstall chalk
45
+ ```
46
+
41
47
  ```
42
48
  chalk v5.3.0 (43 KB)
43
49
  Terminal string styling done right
@@ -56,6 +62,33 @@ Suggested actions:
56
62
  1. Can be removed from direct dependencies - it's installed transitively
57
63
  ```
58
64
 
65
+ ### Size Map Output
66
+
67
+ ```bash
68
+ whyinstall next --size-map
69
+ ```
70
+
71
+ ```
72
+ Size map for: next
73
+
74
+ next total impact: 66.69 MB
75
+
76
+ Breakdown:
77
+ - next: 63.08 MB
78
+ - caniuse-lite: 2.19 MB
79
+ - styled-jsx: 971 KB
80
+ - @swc/helpers: 190 KB
81
+ - source-map-js: 104 KB
82
+ - postcss: 101 KB
83
+ - tslib: 60 KB
84
+ - nanoid: 20 KB
85
+ - @next/env: 10 KB
86
+ - picocolors: 3 KB
87
+ - client-only: 144 B
88
+
89
+ This package contributes 44.7% of your vendor bundle.
90
+ ```
91
+
59
92
  ## Development
60
93
 
61
94
  ```bash
package/dist/cli.js CHANGED
@@ -14,7 +14,7 @@ const program = new commander_1.Command();
14
14
  program
15
15
  .name('whyinstall')
16
16
  .description('Find why a dependency exists in your JS/TS project')
17
- .version('0.3.0')
17
+ .version('0.3.1')
18
18
  .argument('<package-name>', 'Package name to analyze')
19
19
  .option('-j, --json', 'Output as JSON')
20
20
  .option('-c, --cwd <path>', 'Working directory', process.cwd())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whyinstall",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "CLI tool to find why a dependency exists in your JS/TS project",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/src/cli.ts CHANGED
@@ -12,7 +12,7 @@ const program = new Command();
12
12
  program
13
13
  .name('whyinstall')
14
14
  .description('Find why a dependency exists in your JS/TS project')
15
- .version('0.3.0')
15
+ .version('0.3.1')
16
16
  .argument('<package-name>', 'Package name to analyze')
17
17
  .option('-j, --json', 'Output as JSON')
18
18
  .option('-c, --cwd <path>', 'Working directory', process.cwd())