File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
tests/packagedcode/data/cargo/cargo_toml/tauri-examples Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -108,11 +108,13 @@ def parse(cls, location):
108108 package_data = toml .load (location , _dict = dict )
109109 core_package_data = package_data .get ('package' , {})
110110 workspace = package_data .get ('workspace' , {})
111+ extra_data = {}
111112
112113 name = core_package_data .get ('name' )
113114 version = core_package_data .get ('version' )
114115 if isinstance (version , dict ) and "workspace" in version :
115- version = "workspace"
116+ version = None
117+ extra_data ["version" ] = "workspace"
116118
117119 description = core_package_data .get ('description' ) or ''
118120 description = description .strip ()
@@ -144,7 +146,6 @@ def parse(cls, location):
144146 repository_homepage_url = name and f'https://crates.io/crates/{ name } '
145147 repository_download_url = name and version and f'https://crates.io/api/v1/crates/{ name } /{ version } /download'
146148 api_data_url = name and f'https://crates.io/api/v1/crates/{ name } '
147- extra_data = {}
148149 if workspace :
149150 extra_data ["workspace" ] = workspace
150151
Original file line number Diff line number Diff line change 33 "type": "cargo",
44 "namespace": null,
55 "name": "core-api",
6- "version": "workspace" ,
6+ "version": null ,
77 "qualifiers": {},
88 "subpath": null,
99 "primary_language": "Rust",
3333 "notice_text": null,
3434 "source_packages": [],
3535 "file_references": [],
36- "extra_data": {},
36+ "extra_data": {
37+ "version": "workspace"
38+ },
3739 "dependencies": [],
3840 "repository_homepage_url": "https://crates.io/crates/core-api",
39- "repository_download_url": "https://crates.io/api/v1/crates/core-api/workspace/download" ,
41+ "repository_download_url": null ,
4042 "api_data_url": "https://crates.io/api/v1/crates/core-api",
4143 "datasource_id": "cargo_toml",
42- "purl": "pkg:cargo/core-api@workspace "
44+ "purl": "pkg:cargo/core-api"
4345 }
4446]
You can’t perform that action at this time.
0 commit comments