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):
108
108
package_data = toml .load (location , _dict = dict )
109
109
core_package_data = package_data .get ('package' , {})
110
110
workspace = package_data .get ('workspace' , {})
111
+ extra_data = {}
111
112
112
113
name = core_package_data .get ('name' )
113
114
version = core_package_data .get ('version' )
114
115
if isinstance (version , dict ) and "workspace" in version :
115
- version = "workspace"
116
+ version = None
117
+ extra_data ["version" ] = "workspace"
116
118
117
119
description = core_package_data .get ('description' ) or ''
118
120
description = description .strip ()
@@ -144,7 +146,6 @@ def parse(cls, location):
144
146
repository_homepage_url = name and f'https://crates.io/crates/{ name } '
145
147
repository_download_url = name and version and f'https://crates.io/api/v1/crates/{ name } /{ version } /download'
146
148
api_data_url = name and f'https://crates.io/api/v1/crates/{ name } '
147
- extra_data = {}
148
149
if workspace :
149
150
extra_data ["workspace" ] = workspace
150
151
Original file line number Diff line number Diff line change 3
3
"type": "cargo",
4
4
"namespace": null,
5
5
"name": "core-api",
6
- "version": "workspace" ,
6
+ "version": null ,
7
7
"qualifiers": {},
8
8
"subpath": null,
9
9
"primary_language": "Rust",
33
33
"notice_text": null,
34
34
"source_packages": [],
35
35
"file_references": [],
36
- "extra_data": {},
36
+ "extra_data": {
37
+ "version": "workspace"
38
+ },
37
39
"dependencies": [],
38
40
"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 ,
40
42
"api_data_url": "https://crates.io/api/v1/crates/core-api",
41
43
"datasource_id": "cargo_toml",
42
- "purl": "pkg:cargo/core-api@workspace "
44
+ "purl": "pkg:cargo/core-api"
43
45
}
44
46
]
You can’t perform that action at this time.
0 commit comments