fix: Update node binary package name (#1375)

This commit is contained in:
Keith Zantow 2022-11-30 10:30:57 -05:00 committed by GitHub
parent 4f39287216
commit 9e43725951
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

View file

@ -65,6 +65,18 @@ func TestClassifierCataloger_DefaultClassifiers_PositiveCases(t *testing.T) {
},
},
},
{
name: "positive-node",
fixtureDir: "test-fixtures/classifiers/positive",
expected: pkg.Package{
Name: "node",
Version: "19.2.1",
Locations: singleLocation("node"),
Metadata: pkg.BinaryMetadata{
Classifier: "nodejs-binary",
},
},
},
{
name: "positive-go-hint",
fixtureDir: "test-fixtures/classifiers/positive",

View file

@ -38,7 +38,7 @@ var defaultClassifiers = []classifier{
FileGlob: "**/node",
EvidenceMatcher: fileContentsVersionMatcher(
`(?m)node\.js\/v(?P<version>[0-9]+\.[0-9]+\.[0-9]+)`),
Package: "node.js",
Package: "node",
Language: pkg.JavaScript,
PURL: mustPURL("pkg:generic/node@version"),
CPEs: singleCPE("cpe:2.3:a:nodejs:node.js:*:*:*:*:*:*:*:*"),

View file

@ -0,0 +1,2 @@
# this should match node 19.2.1
node.js/v19.2.1