Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ecosystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@ var osvEcosystemNames = map[string]string{
"npm": "npm",
"pypi": "PyPI",
"cargo": "crates.io",
"conan": "ConanCenter",
"cran": "CRAN",
"golang": "Go",
"hackage": "Hackage",
ecosystemMaven: "Maven",
"julia": "Julia",
"nuget": "NuGet",
"opam": "opam",
"composer": "Packagist",
"hex": "Hex",
"pub": "Pub",
"cocoapods": "CocoaPods",
"swift": "SwiftURL",
"githubactions": "GitHub Actions",
}

Expand Down
16 changes: 14 additions & 2 deletions ecosystem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,21 @@ func TestEcosystemToOSV(t *testing.T) {
{"gem", "RubyGems"},
{"pypi", "PyPI"},
{"cargo", "crates.io"},
{"conan", "ConanCenter"},
{"cran", "CRAN"},
{"golang", "Go"},
{"go", "Go"},
{"hackage", "Hackage"},
{"maven", "Maven"},
{"julia", "Julia"},
{"nuget", "NuGet"},
{"opam", "opam"},
{"packagist", "Packagist"},
{"composer", "Packagist"},
{"hex", "Hex"},
{"pub", "Pub"},
{"cocoapods", "CocoaPods"},
{"cocoapods", "cocoapods"}, // falls through: OSV rejects CocoaPods
{"swift", "SwiftURL"},
{"github-actions", "GitHub Actions"},
{"unknown", "unknown"}, // falls through
}
Expand All @@ -123,13 +129,19 @@ func TestPURLTypeToOSV(t *testing.T) {
{"npm", "npm", true},
{"pypi", "PyPI", true},
{"cargo", "crates.io", true},
{"conan", "ConanCenter", true},
{"cran", "CRAN", true},
{"golang", "Go", true},
{"hackage", "Hackage", true},
{"maven", "Maven", true},
{"julia", "Julia", true},
{"nuget", "NuGet", true},
{"opam", "opam", true},
{"composer", "Packagist", true},
{"hex", "Hex", true},
{"pub", "Pub", true},
{"cocoapods", "CocoaPods", true},
{"cocoapods", "", false},
{"swift", "SwiftURL", true},
{"githubactions", "GitHub Actions", true},
// Unknown types report ok=false with an empty string, unlike
// EcosystemToOSV which passes the input through.
Expand Down