Skip to content

Commit

Permalink
Allow npm namespaces to be case-sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
PFCM authored and shibumi committed Dec 15, 2024
1 parent d2bcda7 commit 4b484f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion packageurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ func typeAdjustNamespace(purlType, ns string) string {
TypeDebian,
TypeGithub,
TypeGolang,
TypeNPM,
TypeRPM,
TypeQpkg:
return strings.ToLower(ns)
Expand Down
4 changes: 2 additions & 2 deletions packageurl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,12 +515,12 @@ func TestNormalize(t *testing.T) {
}, {
name: "known type namespace adjustments",
input: packageurl.PackageURL{
Type: "npm",
Type: "apk",
Namespace: "NaMeSpAcE",
Name: "pkg",
},
want: packageurl.PackageURL{
Type: "npm",
Type: "apk",
Namespace: "namespace",
Name: "pkg",
Qualifiers: packageurl.Qualifiers{},
Expand Down

0 comments on commit 4b484f7

Please sign in to comment.