diff --git a/packageurl.go b/packageurl.go index 0dd89a7..5177228 100644 --- a/packageurl.go +++ b/packageurl.go @@ -586,8 +586,7 @@ func typeAdjustName(purlType, name string, qualifiers Qualifiers) string { TypeComposer, TypeDebian, TypeGithub, - TypeGolang, - TypeNPM: + TypeGolang: return strings.ToLower(name) case TypePyPi: return strings.ToLower(strings.ReplaceAll(name, "_", "-")) diff --git a/packageurl_test.go b/packageurl_test.go index db4151b..6fa8c8d 100644 --- a/packageurl_test.go +++ b/packageurl_test.go @@ -528,11 +528,11 @@ func TestNormalize(t *testing.T) { }, { name: "known type name adjustments", input: packageurl.PackageURL{ - Type: "npm", + Type: "alpm", Name: "nAmE", }, want: packageurl.PackageURL{ - Type: "npm", + Type: "alpm", Name: "name", Qualifiers: packageurl.Qualifiers{}, },