fix: improve node classifier version matching (#3284)

Signed-off-by: witchcraze <witchcraze@gmail.com>
This commit is contained in:
witchcraze
2024-09-27 08:53:35 -04:00
committed by GitHub
parent 1a746b2c05
commit 2a3d171c10
6 changed files with 59 additions and 2 deletions
@@ -625,6 +625,36 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
Metadata: metadata("go-binary"),
},
},
{
logicalFixture: "node/0.10.48/linux-amd64",
expected: pkg.Package{
Name: "node",
Version: "0.10.48",
PURL: "pkg:generic/node@0.10.48",
Locations: locations("node"),
Metadata: metadata("nodejs-binary"),
},
},
{
logicalFixture: "node/0.12.18/linux-amd64",
expected: pkg.Package{
Name: "node",
Version: "0.12.18",
PURL: "pkg:generic/node@0.12.18",
Locations: locations("node"),
Metadata: metadata("nodejs-binary"),
},
},
{
logicalFixture: "node/4.9.1/linux-amd64",
expected: pkg.Package{
Name: "node",
Version: "4.9.1",
PURL: "pkg:generic/node@4.9.1",
Locations: locations("node"),
Metadata: metadata("nodejs-binary"),
},
},
{
logicalFixture: "node/19.2.0/linux-amd64",
expected: pkg.Package{