@@ -11,8 +11,10 @@ The dependency-resolver outputs a unified JSON structure that aggregates all pac
1111 "source" : { ... },
1212 "project" : {
1313 "packages" : [... ],
14- "pip" : { ... },
15- "npm" : { ... }
14+ "package-management" : {
15+ "pip" : { ... },
16+ "npm" : { ... }
17+ }
1618 },
1719 "system" : {
1820 "packages" : [... ]
@@ -63,13 +65,15 @@ Project-specific packages from all package managers are aggregated in a single a
6365 "type" : " npm"
6466 }
6567 ],
66- "pip" : {
67- "location" : " /path/to/venv/lib/python3.12/site-packages" ,
68- "hash" : " def456..."
69- },
70- "npm" : {
71- "location" : " /app/node_modules" ,
72- "hash" : " abc123..."
68+ "package-management" : {
69+ "pip" : {
70+ "location" : " /path/to/venv/lib/python3.12/site-packages" ,
71+ "hash" : " def456..."
72+ },
73+ "npm" : {
74+ "location" : " /app/node_modules" ,
75+ "hash" : " abc123..."
76+ }
7377 }
7478 }
7579}
@@ -142,9 +146,11 @@ For project-scoped package managers, a location hash is provided in the metadata
142146{
143147 "project" : {
144148 "packages" : [... ],
145- "pip" : {
146- "location" : " /path/to/venv/lib/python3.12/site-packages" ,
147- "hash" : " sha256:location-based-hash"
149+ "package-management" : {
150+ "pip" : {
151+ "location" : " /path/to/venv/lib/python3.12/site-packages" ,
152+ "hash" : " sha256:location-based-hash"
153+ }
148154 }
149155 }
150156}
@@ -197,13 +203,15 @@ Here's a complete example showing the new unified structure:
197203 "type" : " npm"
198204 }
199205 ],
200- "pip" : {
201- "location" : " /app/venv/lib/python3.12/site-packages" ,
202- "hash" : " sha256:xyz789..."
203- },
204- "npm" : {
205- "location" : " /app/node_modules" ,
206- "hash" : " sha256:npm456..."
206+ "package-management" : {
207+ "pip" : {
208+ "location" : " /app/venv/lib/python3.12/site-packages" ,
209+ "hash" : " sha256:xyz789..."
210+ },
211+ "npm" : {
212+ "location" : " /app/node_modules" ,
213+ "hash" : " sha256:npm456..."
214+ }
207215 }
208216 },
209217 "system" : {
@@ -250,8 +258,9 @@ if "project" in deps:
250258 print (f " { name} : { version} ( { pkg_type} ) { ' ✓' if has_hash else ' ' } " )
251259
252260 # Show metadata for each package manager
253- for key, value in project.items():
254- if key != " packages" and isinstance (value, dict ):
261+ package_management = project.get(" package-management" , {})
262+ for key, value in package_management.items():
263+ if isinstance (value, dict ):
255264 location = value.get(" location" , " N/A" )
256265 has_hash = " hash" in value
257266 print (f " { key.upper()} location: { location} { ' ✓' if has_hash else ' ' } " )
0 commit comments