Allow slashes in purl package names

This commit is contained in:
Justin Holguín
2024-05-02 19:11:08 +00:00
committed by GitHub
parent 0c155c5e85
commit 432d8e7efe
4 changed files with 37 additions and 4 deletions
+24
View File
@@ -44,6 +44,30 @@ test('parsePURL table test', () => {
error: null
}
},
{
purl: 'pkg:golang/gopkg.in/DataDog/[email protected]',
// Note: this purl is technically invalid, but we can still parse it
expected: {
type: 'golang',
namespace: 'gopkg.in',
name: 'DataDog/dd-trace-go.v1',
version: '1.63.1',
original: 'pkg:golang/gopkg.in/DataDog/[email protected]',
error: null
}
},
{
purl: 'pkg:golang/github.com/pelletier/go-toml/v2',
// Note: this purl is technically invalid, but we can still parse it
expected: {
type: 'golang',
namespace: 'github.com',
name: 'pelletier/go-toml/v2',
version: null,
original: 'pkg:golang/github.com/pelletier/go-toml/v2',
error: null
}
},
{
purl: 'pkg:npm/%40ns%20foo/n%40me@1.%2f2.3',
expected: {