npm-dependency-visualizer 0.0.0-stage → 0.1.0
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 +101 -3
- package/cli.js +126 -0
- package/docs/designs/SPEC.md +439 -0
- package/examples/npm-cli-arborist.md +496 -0
- package/examples/npm-cli-focus-filter.md +189 -0
- package/examples/npm-cli-focus-highlight.md +722 -0
- package/examples/npm-cli.md +689 -0
- package/package.json +20 -6
- package/src/errors.js +6 -0
- package/src/graph.js +409 -0
- package/src/input.js +135 -0
- package/src/output.js +72 -0
- package/src/render.js +227 -0
- package/src/select.js +66 -0
- package/test/cli.test.js +326 -0
- package/test/fixtures/complex/package-lock.json +116 -0
- package/test/fixtures/complex/package.json +33 -0
- package/test/fixtures/npm-cli/LICENSE +235 -0
- package/test/fixtures/npm-cli/README.md +19 -0
- package/test/fixtures/npm-cli/package-lock.json +15235 -0
- package/test/fixtures/npm-cli/package.json +267 -0
- package/test/graph.test.js +400 -0
- package/test/mermaid.test.js +141 -0
- package/test/output.test.js +32 -0
- package/test-support/fixtures.js +19 -0
- package/test-support/offline-guard.js +25 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Dependency graph: npm
|
|
2
|
+
|
|
3
|
+
- Inputs: package.json, package-lock.json; lockfile version 3.
|
|
4
|
+
- Dependency selection: production, optional, and peer dependencies.
|
|
5
|
+
- Filters: focus glob; depth unlimited.
|
|
6
|
+
- Displayed: 27 nodes, 70 relationships.
|
|
7
|
+
- Omitted by filters: 122 nodes, 289 relationships.
|
|
8
|
+
- Excluded boundaries: 0 relationships; excluded non-node_modules project records: 0.
|
|
9
|
+
- Workspaces: included; reached 12 of 16 workspace projects.
|
|
10
|
+
- Focus mode: filter; matching instances: 1.
|
|
11
|
+
|
|
12
|
+
## Warnings
|
|
13
|
+
|
|
14
|
+
- optional-not-recorded: node_modules/proxy-agent-negotiate declares optional peer dependency kerberos (^2.0.0), but no eligible package is recorded.
|
|
15
|
+
|
|
16
|
+
## Legend
|
|
17
|
+
|
|
18
|
+
- Arrows point from the declaring package to its resolved dependency.
|
|
19
|
+
- Node versions are selected versions; edge labels show the dependency role, declared name, and original specification.
|
|
20
|
+
- `prod`, `dev`, `optional`, `peer`, and `optional peer` identify dependency roles.
|
|
21
|
+
- Unresolved and unrecorded optional dependencies have placeholder nodes.
|
|
22
|
+
- Workspace projects use double-bordered (subroutine) nodes labeled `(workspace)`.
|
|
23
|
+
- Focus (Sunset Boulevard): coral nodes with thick borders are matches; warm-sand nodes are ancestors; thick burnt-orange arrows trace the ancestor subgraph. Unrelated branches keep their normal style.
|
|
24
|
+
- The node index identifies matches and ancestors without relying on color.
|
|
25
|
+
|
|
26
|
+
## Dependency graph
|
|
27
|
+
|
|
28
|
+
```mermaid
|
|
29
|
+
flowchart LR
|
|
30
|
+
n0["npm@12.2.2"]
|
|
31
|
+
n13["@npmcli/map-workspaces@6.0.0"]
|
|
32
|
+
n14["@npmcli/metavuln-calculator@10.0.0"]
|
|
33
|
+
n17["@npmcli/package-json@8.0.0"]
|
|
34
|
+
n21["@npmcli/run-script@11.0.0"]
|
|
35
|
+
n25["@sigstore/sign@5.0.0"]
|
|
36
|
+
n40["cacache@21.0.1"]
|
|
37
|
+
n53["glob@13.0.6"]
|
|
38
|
+
n59["init-package-json@9.0.0"]
|
|
39
|
+
n69["make-fetch-happen@16.0.1"]
|
|
40
|
+
n88["npm-packlist@11.3.0"]
|
|
41
|
+
n92["npm-profile@13.0.1"]
|
|
42
|
+
n93["npm-registry-fetch@20.0.1"]
|
|
43
|
+
n96["pacote@22.0.1"]
|
|
44
|
+
n112["sigstore@5.0.0"]
|
|
45
|
+
n137[["@npmcli/arborist@10.0.4 (workspace)"]]
|
|
46
|
+
n138[["@npmcli/config@11.2.0 (workspace)"]]
|
|
47
|
+
n139[["libnpmaccess@11.0.0 (workspace)"]]
|
|
48
|
+
n140[["libnpmdiff@9.0.4 (workspace)"]]
|
|
49
|
+
n141[["libnpmexec@11.0.5 (workspace)"]]
|
|
50
|
+
n142[["libnpmfund@8.0.4 (workspace)"]]
|
|
51
|
+
n143[["libnpmorg@9.0.0 (workspace)"]]
|
|
52
|
+
n144[["libnpmpack@10.0.4 (workspace)"]]
|
|
53
|
+
n145[["libnpmpublish@12.0.1 (workspace)"]]
|
|
54
|
+
n146[["libnpmsearch@10.0.0 (workspace)"]]
|
|
55
|
+
n147[["libnpmteam@9.0.0 (workspace)"]]
|
|
56
|
+
n148[["libnpmversion@9.0.0 (workspace)"]]
|
|
57
|
+
n0 -->|"prod: @npmcli/map-workspaces @ ^6.0.0"| n13
|
|
58
|
+
n0 -->|"prod: @npmcli/metavuln-calculator @ ^10.0.0"| n14
|
|
59
|
+
n0 -->|"prod: @npmcli/package-json @ ^8.0.0"| n17
|
|
60
|
+
n0 -->|"prod: @npmcli/run-script @ ^11.0.0"| n21
|
|
61
|
+
n0 -->|"prod: cacache @ ^21.0.1"| n40
|
|
62
|
+
n0 -->|"prod: glob @ ^13.0.6"| n53
|
|
63
|
+
n0 -->|"prod: init-package-json @ ^9.0.0"| n59
|
|
64
|
+
n0 -->|"prod: make-fetch-happen @ ^16.0.1"| n69
|
|
65
|
+
n0 -->|"prod: npm-profile @ ^13.0.1"| n92
|
|
66
|
+
n0 -->|"prod: npm-registry-fetch @ ^20.0.1"| n93
|
|
67
|
+
n0 -->|"prod: pacote @ ^22.0.1"| n96
|
|
68
|
+
n0 -->|"prod: @npmcli/arborist @ ^10.0.4"| n137
|
|
69
|
+
n0 -->|"prod: @npmcli/config @ ^11.2.0"| n138
|
|
70
|
+
n0 -->|"prod: libnpmaccess @ ^11.0.0"| n139
|
|
71
|
+
n0 -->|"prod: libnpmdiff @ ^9.0.4"| n140
|
|
72
|
+
n0 -->|"prod: libnpmexec @ ^11.0.5"| n141
|
|
73
|
+
n0 -->|"prod: libnpmfund @ ^8.0.4"| n142
|
|
74
|
+
n0 -->|"prod: libnpmorg @ ^9.0.0"| n143
|
|
75
|
+
n0 -->|"prod: libnpmpack @ ^10.0.4"| n144
|
|
76
|
+
n0 -->|"prod: libnpmpublish @ ^12.0.1"| n145
|
|
77
|
+
n0 -->|"prod: libnpmsearch @ ^10.0.0"| n146
|
|
78
|
+
n0 -->|"prod: libnpmteam @ ^9.0.0"| n147
|
|
79
|
+
n0 -->|"prod: libnpmversion @ ^9.0.0"| n148
|
|
80
|
+
n13 -->|"prod: @npmcli/package-json @ ^8.0.0"| n17
|
|
81
|
+
n13 -->|"prod: glob @ ^13.0.0"| n53
|
|
82
|
+
n14 -->|"prod: cacache @ ^21.0.1"| n40
|
|
83
|
+
n14 -->|"prod: pacote @ ^22.0.0"| n96
|
|
84
|
+
n17 -->|"prod: glob @ ^13.0.0"| n53
|
|
85
|
+
n21 -->|"prod: @npmcli/package-json @ ^8.0.0"| n17
|
|
86
|
+
n25 -->|"prod: make-fetch-happen @ ^16.0.0"| n69
|
|
87
|
+
n40 -->|"prod: glob @ ^13.0.0"| n53
|
|
88
|
+
n59 -->|"prod: @npmcli/package-json @ ^8.0.0"| n17
|
|
89
|
+
n69 -->|"prod: cacache @ ^21.0.0"| n40
|
|
90
|
+
n88 -->|"prod: glob @ ^13.0.6"| n53
|
|
91
|
+
n92 -->|"prod: npm-registry-fetch @ ^20.0.0"| n93
|
|
92
|
+
n93 -->|"prod: make-fetch-happen @ ^16.0.0"| n69
|
|
93
|
+
n96 -->|"prod: @npmcli/package-json @ ^8.0.0"| n17
|
|
94
|
+
n96 -->|"prod: @npmcli/run-script @ ^11.0.0"| n21
|
|
95
|
+
n96 -->|"prod: cacache @ ^21.0.1"| n40
|
|
96
|
+
n96 -->|"prod: npm-packlist @ ^11.2.0"| n88
|
|
97
|
+
n96 -->|"prod: npm-registry-fetch @ ^20.0.1"| n93
|
|
98
|
+
n96 -->|"prod: sigstore @ ^5.0.0"| n112
|
|
99
|
+
n112 -->|"prod: @sigstore/sign @ ^5.0.0"| n25
|
|
100
|
+
n137 -->|"prod: @npmcli/map-workspaces @ ^6.0.0"| n13
|
|
101
|
+
n137 -->|"prod: @npmcli/metavuln-calculator @ ^10.0.0"| n14
|
|
102
|
+
n137 -->|"prod: @npmcli/package-json @ ^8.0.0"| n17
|
|
103
|
+
n137 -->|"prod: @npmcli/run-script @ ^11.0.0"| n21
|
|
104
|
+
n137 -->|"prod: cacache @ ^21.0.1"| n40
|
|
105
|
+
n137 -->|"prod: npm-registry-fetch @ ^20.0.1"| n93
|
|
106
|
+
n137 -->|"prod: pacote @ ^22.0.0"| n96
|
|
107
|
+
n138 -->|"prod: @npmcli/map-workspaces @ ^6.0.0"| n13
|
|
108
|
+
n138 -->|"prod: @npmcli/package-json @ ^8.0.0"| n17
|
|
109
|
+
n139 -->|"prod: npm-registry-fetch @ ^20.0.1"| n93
|
|
110
|
+
n140 -->|"prod: pacote @ ^22.0.0"| n96
|
|
111
|
+
n140 -->|"prod: @npmcli/arborist @ ^10.0.4"| n137
|
|
112
|
+
n141 -->|"prod: @npmcli/package-json @ ^8.0.0"| n17
|
|
113
|
+
n141 -->|"prod: @npmcli/run-script @ ^11.0.0"| n21
|
|
114
|
+
n141 -->|"prod: pacote @ ^22.0.0"| n96
|
|
115
|
+
n141 -->|"prod: @npmcli/arborist @ ^10.0.4"| n137
|
|
116
|
+
n142 -->|"prod: @npmcli/arborist @ ^10.0.4"| n137
|
|
117
|
+
n143 -->|"prod: npm-registry-fetch @ ^20.0.1"| n93
|
|
118
|
+
n144 -->|"prod: @npmcli/run-script @ ^11.0.0"| n21
|
|
119
|
+
n144 -->|"prod: pacote @ ^22.0.0"| n96
|
|
120
|
+
n144 -->|"prod: @npmcli/arborist @ ^10.0.4"| n137
|
|
121
|
+
n145 -->|"prod: @npmcli/package-json @ ^8.0.0"| n17
|
|
122
|
+
n145 -->|"prod: npm-registry-fetch @ ^20.0.1"| n93
|
|
123
|
+
n145 -->|"prod: sigstore @ ^5.0.0"| n112
|
|
124
|
+
n146 -->|"prod: npm-registry-fetch @ ^20.0.1"| n93
|
|
125
|
+
n147 -->|"prod: npm-registry-fetch @ ^20.0.1"| n93
|
|
126
|
+
n148 -->|"prod: @npmcli/run-script @ ^11.0.0"| n21
|
|
127
|
+
classDef focusMatch fill:#f4a261,stroke:#264653,color:#264653,stroke-width:3px,font-family:DejaVu Sans
|
|
128
|
+
classDef focusAncestor fill:#e9c46a,stroke:#264653,color:#264653,stroke-width:1.5px,font-family:DejaVu Sans
|
|
129
|
+
class n0 focusAncestor
|
|
130
|
+
class n13 focusAncestor
|
|
131
|
+
class n14 focusAncestor
|
|
132
|
+
class n17 focusAncestor
|
|
133
|
+
class n21 focusAncestor
|
|
134
|
+
class n25 focusAncestor
|
|
135
|
+
class n40 focusAncestor
|
|
136
|
+
class n53 focusMatch
|
|
137
|
+
class n59 focusAncestor
|
|
138
|
+
class n69 focusAncestor
|
|
139
|
+
class n88 focusAncestor
|
|
140
|
+
class n92 focusAncestor
|
|
141
|
+
class n93 focusAncestor
|
|
142
|
+
class n96 focusAncestor
|
|
143
|
+
class n112 focusAncestor
|
|
144
|
+
class n137 focusAncestor
|
|
145
|
+
class n138 focusAncestor
|
|
146
|
+
class n139 focusAncestor
|
|
147
|
+
class n140 focusAncestor
|
|
148
|
+
class n141 focusAncestor
|
|
149
|
+
class n142 focusAncestor
|
|
150
|
+
class n143 focusAncestor
|
|
151
|
+
class n144 focusAncestor
|
|
152
|
+
class n145 focusAncestor
|
|
153
|
+
class n146 focusAncestor
|
|
154
|
+
class n147 focusAncestor
|
|
155
|
+
class n148 focusAncestor
|
|
156
|
+
linkStyle 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69 stroke:#e76f51,stroke-width:3px
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Node index
|
|
160
|
+
|
|
161
|
+
| ID | Name | Selected version | Lockfile location | Focus |
|
|
162
|
+
| --- | --- | --- | --- | --- |
|
|
163
|
+
| n0 | npm | 12.2.2 | (root) | Ancestor |
|
|
164
|
+
| n13 | @npmcli/map-workspaces | 6.0.0 | node_modules/@npmcli/map-workspaces | Ancestor |
|
|
165
|
+
| n14 | @npmcli/metavuln-calculator | 10.0.0 | node_modules/@npmcli/metavuln-calculator | Ancestor |
|
|
166
|
+
| n17 | @npmcli/package-json | 8.0.0 | node_modules/@npmcli/package-json | Ancestor |
|
|
167
|
+
| n21 | @npmcli/run-script | 11.0.0 | node_modules/@npmcli/run-script | Ancestor |
|
|
168
|
+
| n25 | @sigstore/sign | 5.0.0 | node_modules/@sigstore/sign | Ancestor |
|
|
169
|
+
| n40 | cacache | 21.0.1 | node_modules/cacache | Ancestor |
|
|
170
|
+
| n53 | glob | 13.0.6 | node_modules/glob | Match |
|
|
171
|
+
| n59 | init-package-json | 9.0.0 | node_modules/init-package-json | Ancestor |
|
|
172
|
+
| n69 | make-fetch-happen | 16.0.1 | node_modules/make-fetch-happen | Ancestor |
|
|
173
|
+
| n88 | npm-packlist | 11.3.0 | node_modules/npm-packlist | Ancestor |
|
|
174
|
+
| n92 | npm-profile | 13.0.1 | node_modules/npm-profile | Ancestor |
|
|
175
|
+
| n93 | npm-registry-fetch | 20.0.1 | node_modules/npm-registry-fetch | Ancestor |
|
|
176
|
+
| n96 | pacote | 22.0.1 | node_modules/pacote | Ancestor |
|
|
177
|
+
| n112 | sigstore | 5.0.0 | node_modules/sigstore | Ancestor |
|
|
178
|
+
| n137 | @npmcli/arborist (workspace) | 10.0.4 | workspaces/arborist | Ancestor |
|
|
179
|
+
| n138 | @npmcli/config (workspace) | 11.2.0 | workspaces/config | Ancestor |
|
|
180
|
+
| n139 | libnpmaccess (workspace) | 11.0.0 | workspaces/libnpmaccess | Ancestor |
|
|
181
|
+
| n140 | libnpmdiff (workspace) | 9.0.4 | workspaces/libnpmdiff | Ancestor |
|
|
182
|
+
| n141 | libnpmexec (workspace) | 11.0.5 | workspaces/libnpmexec | Ancestor |
|
|
183
|
+
| n142 | libnpmfund (workspace) | 8.0.4 | workspaces/libnpmfund | Ancestor |
|
|
184
|
+
| n143 | libnpmorg (workspace) | 9.0.0 | workspaces/libnpmorg | Ancestor |
|
|
185
|
+
| n144 | libnpmpack (workspace) | 10.0.4 | workspaces/libnpmpack | Ancestor |
|
|
186
|
+
| n145 | libnpmpublish (workspace) | 12.0.1 | workspaces/libnpmpublish | Ancestor |
|
|
187
|
+
| n146 | libnpmsearch (workspace) | 10.0.0 | workspaces/libnpmsearch | Ancestor |
|
|
188
|
+
| n147 | libnpmteam (workspace) | 9.0.0 | workspaces/libnpmteam | Ancestor |
|
|
189
|
+
| n148 | libnpmversion (workspace) | 9.0.0 | workspaces/libnpmversion | Ancestor |
|