Skip to content

Commit 4b484f7

Browse files
PFCMshibumi
authored andcommitted
Allow npm namespaces to be case-sensitive
1 parent d2bcda7 commit 4b484f7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packageurl.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,6 @@ func typeAdjustNamespace(purlType, ns string) string {
566566
TypeDebian,
567567
TypeGithub,
568568
TypeGolang,
569-
TypeNPM,
570569
TypeRPM,
571570
TypeQpkg:
572571
return strings.ToLower(ns)

packageurl_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,12 +515,12 @@ func TestNormalize(t *testing.T) {
515515
}, {
516516
name: "known type namespace adjustments",
517517
input: packageurl.PackageURL{
518-
Type: "npm",
518+
Type: "apk",
519519
Namespace: "NaMeSpAcE",
520520
Name: "pkg",
521521
},
522522
want: packageurl.PackageURL{
523-
Type: "npm",
523+
Type: "apk",
524524
Namespace: "namespace",
525525
Name: "pkg",
526526
Qualifiers: packageurl.Qualifiers{},

0 commit comments

Comments
 (0)