Repository: G-Rath/osv-detector
Pull request #62 (2022-03-12 22:33:25)

refactor: rename `parsers` package to `lockfile`
Apparently the style in go is to not have plurals, and I think `lockfile` works better anyway since it's `lockfile.TryParse` & co.


Patch:
diff --git a/.prettierignore b/.prettierignore
index 2b6e117..fd96816 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,1 +1,1 @@
-detector/parsers/fixtures/pnpm/*.yaml
+detector/*/fixtures/pnpm/*.yaml
diff --git a/detector/database/osv.go b/detector/database/osv.go
index d1898c5..25ada09 100644
--- a/detector/database/osv.go
+++ b/detector/database/osv.go
@@ -4,7 +4,7 @@ import (
 	"fmt"
 	"os"
 	"osv-detector/detector"
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"osv-detector/detector/semver"
 	"regexp"
 	"strings"
@@ -36,7 +36,7 @@ type Package struct {
 //
 // In the future, it's hoped that this can be improved.
 func (p Package) NormalizedName() string {
-	if p.Ecosystem != parsers.PipEcosystem {
+	if p.Ecosystem != lockfile.PipEcosystem {
 		return p.Name
 	}
 
diff --git a/detector/parsers/parse-cargo-lock.go b/detector/lockfile/parse-cargo-lock.go
similarity index 98%
rename from detector/parsers/parse-cargo-lock.go
rename to detector/lockfile/parse-cargo-lock.go
index 9cb5824..df5da07 100644
--- a/detector/parsers/parse-cargo-lock.go
+++ b/detector/lockfile/parse-cargo-lock.go
@@ -1,4 +1,4 @@
-package parsers
+package lockfile
 
 import (
 	"fmt"
diff --git a/detector/parsers/parse-composer-lock.go b/detector/lockfile/parse-composer-lock.go
similarity index 98%
rename from detector/parsers/parse-composer-lock.go
rename to detector/lockfile/parse-composer-lock.go
index 3bedc22..400e206 100644
--- a/detector/parsers/parse-composer-lock.go
+++ b/detector/lockfile/parse-composer-lock.go
@@ -1,4 +1,4 @@
-package parsers
+package lockfile
 
 import (
 	"encoding/json"
diff --git a/detector/parsers/parse-gemfile-lock.go b/detector/lockfile/parse-gemfile-lock.go
similarity index 99%
rename from detector/parsers/parse-gemfile-lock.go
rename to detector/lockfile/parse-gemfile-lock.go
index b103505..90f5176 100644
--- a/detector/parsers/parse-gemfile-lock.go
+++ b/detector/lockfile/parse-gemfile-lock.go
@@ -1,4 +1,4 @@
-package parsers
+package lockfile
 
 import (
 	"fmt"
diff --git a/detector/parsers/parse-go-lock.go b/detector/lockfile/parse-go-lock.go
similarity index 98%
rename from detector/parsers/parse-go-lock.go
rename to detector/lockfile/parse-go-lock.go
index cf051f6..eb8b1db 100644
--- a/detector/parsers/parse-go-lock.go
+++ b/detector/lockfile/parse-go-lock.go
@@ -1,4 +1,4 @@
-package parsers
+package lockfile
 
 import (
 	"fmt"
diff --git a/detector/parsers/parse-npm-lock.go b/detector/lockfile/parse-npm-lock.go
similarity index 99%
rename from detector/parsers/parse-npm-lock.go
rename to detector/lockfile/parse-npm-lock.go
index 1416457..6289eb5 100644
--- a/detector/parsers/parse-npm-lock.go
+++ b/detector/lockfile/parse-npm-lock.go
@@ -1,4 +1,4 @@
-package parsers
+package lockfile
 
 import (
 	"encoding/json"
diff --git a/detector/parsers/parse-pnpm-lock.go b/detector/lockfile/parse-pnpm-lock.go
similarity index 99%
rename from detector/parsers/parse-pnpm-lock.go
rename to detector/lockfile/parse-pnpm-lock.go
index cdf47db..753c255 100644
--- a/detector/parsers/parse-pnpm-lock.go
+++ b/detector/lockfile/parse-pnpm-lock.go
@@ -1,4 +1,4 @@
-package parsers
+package lockfile
 
 import (
 	"fmt"
diff --git a/detector/parsers/parse-requirements-txt.go b/detector/lockfile/parse-requirements-txt.go
similarity index 99%
rename from detector/parsers/parse-requirements-txt.go
rename to detector/lockfile/parse-requirements-txt.go
index bbffe62..3e3ecbf 100644
--- a/detector/parsers/parse-requirements-txt.go
+++ b/detector/lockfile/parse-requirements-txt.go
@@ -1,4 +1,4 @@
-package parsers
+package lockfile
 
 import (
 	"bufio"
diff --git a/detector/parsers/parse-yarn-lock.go b/detector/lockfile/parse-yarn-lock.go
similarity index 99%
rename from detector/parsers/parse-yarn-lock.go
rename to detector/lockfile/parse-yarn-lock.go
index 2de4cd1..7b69090 100644
--- a/detector/parsers/parse-yarn-lock.go
+++ b/detector/lockfile/parse-yarn-lock.go
@@ -1,4 +1,4 @@
-package parsers
+package lockfile
 
 import (
 	"bufio"
diff --git a/detector/parsers/parsers.go b/detector/lockfile/parsers.go
similarity index 98%
rename from detector/parsers/parsers.go
rename to detector/lockfile/parsers.go
index 5b6a627..4523400 100644
--- a/detector/parsers/parsers.go
+++ b/detector/lockfile/parsers.go
@@ -1,4 +1,4 @@
-package parsers
+package lockfile
 
 import (
 	"errors"
diff --git a/detector/parsers/types.go b/detector/lockfile/types.go
similarity index 92%
rename from detector/parsers/types.go
rename to detector/lockfile/types.go
index 5fe3701..4e40b2a 100644
--- a/detector/parsers/types.go
+++ b/detector/lockfile/types.go
@@ -1,4 +1,4 @@
-package parsers
+package lockfile
 
 import "osv-detector/detector"
 
diff --git a/main.go b/main.go
index 77ce39f..bf0f214 100644
--- a/main.go
+++ b/main.go
@@ -8,7 +8,7 @@ import (
 	"os"
 	"osv-detector/detector"
 	"osv-detector/detector/database"
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"path"
 )
 
@@ -125,7 +125,7 @@ func main() {
 
 	pathToLockOrDirectory := flag.Arg(0)
 
-	packages, err := parsers.TryParse(pathToLockOrDirectory, *parseAs)
+	packages, err := lockfile.TryParse(pathToLockOrDirectory, *parseAs)
 
 	if err != nil {
 		_, _ = fmt.Fprintf(os.Stderr, "Error, %s\n", err)


Test patch:
diff --git a/detector/database/osv_test.go b/detector/database/osv_test.go
index 7ecf90d..4ecc965 100644
--- a/detector/database/osv_test.go
+++ b/detector/database/osv_test.go
@@ -3,7 +3,7 @@ package database_test
 import (
 	"osv-detector/detector"
 	"osv-detector/detector/database"
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"testing"
 	"time"
 )
@@ -19,7 +19,7 @@ func expectOSVDescription(t *testing.T, expected string, osv database.OSV) {
 func expectIsAffected(t *testing.T, osv database.OSV, version string, expectAffected bool) {
 	t.Helper()
 
-	pkg := detector.PackageDetails{Name: "my-package", Version: version, Ecosystem: parsers.NpmEcosystem}
+	pkg := detector.PackageDetails{Name: "my-package", Version: version, Ecosystem: lockfile.NpmEcosystem}
 
 	if osv.IsAffected(pkg) != expectAffected {
 		if expectAffected {
@@ -67,7 +67,7 @@ func TestPackage_NormalizedName_PipEcosystem(t *testing.T) {
 	}
 
 	for _, strings := range x {
-		name := database.Package{Name: strings[0], Ecosystem: parsers.PipEcosystem}.NormalizedName()
+		name := database.Package{Name: strings[0], Ecosystem: lockfile.PipEcosystem}.NormalizedName()
 
 		if name != strings[1] {
 			t.Errorf(
@@ -91,7 +91,7 @@ func TestPackage_NormalizedName_NotPipEcosystem(t *testing.T) {
 	}
 
 	for _, na := range x {
-		name := database.Package{Name: na, Ecosystem: parsers.NpmEcosystem}.NormalizedName()
+		name := database.Package{Name: na, Ecosystem: lockfile.NpmEcosystem}.NormalizedName()
 
 		if name != na {
 			t.Errorf(
@@ -183,7 +183,7 @@ func TestOSV_IsAffected_AffectsWithEcosystem_DifferentEcosystem(t *testing.T) {
 
 	osv := buildOSVWithAffected(
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.PipEcosystem, Name: "my-package"},
+			Package: database.Package{Ecosystem: lockfile.PipEcosystem, Name: "my-package"},
 			Ranges: []database.AffectsRange{
 				buildEcosystemAffectsRange(database.RangeEvent{Introduced: "0"}),
 			},
@@ -203,7 +203,7 @@ func TestOSV_IsAffected_AffectsWithEcosystem_SingleAffected(t *testing.T) {
 	// "Introduced: 0" means everything is affected
 	osv = buildOSVWithAffected(
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.NpmEcosystem, Name: "my-package"},
+			Package: database.Package{Ecosystem: lockfile.NpmEcosystem, Name: "my-package"},
 			Ranges: []database.AffectsRange{
 				buildEcosystemAffectsRange(database.RangeEvent{Introduced: "0"}),
 			},
@@ -217,7 +217,7 @@ func TestOSV_IsAffected_AffectsWithEcosystem_SingleAffected(t *testing.T) {
 	// "Fixed: 1" means all versions after this are not vulnerable
 	osv = buildOSVWithAffected(
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.NpmEcosystem, Name: "my-package"},
+			Package: database.Package{Ecosystem: lockfile.NpmEcosystem, Name: "my-package"},
 			Ranges: []database.AffectsRange{
 				buildEcosystemAffectsRange(
 					database.RangeEvent{Introduced: "0"},
@@ -238,7 +238,7 @@ func TestOSV_IsAffected_AffectsWithEcosystem_SingleAffected(t *testing.T) {
 	// multiple fixes and introduced
 	osv = buildOSVWithAffected(
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.NpmEcosystem, Name: "my-package"},
+			Package: database.Package{Ecosystem: lockfile.NpmEcosystem, Name: "my-package"},
 			Ranges: []database.AffectsRange{
 				buildEcosystemAffectsRange(
 					database.RangeEvent{Introduced: "0"},
@@ -272,7 +272,7 @@ func TestOSV_IsAffected_AffectsWithEcosystem_MultipleAffected(t *testing.T) {
 
 	osv := buildOSVWithAffected(
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.NpmEcosystem, Name: "my-package"},
+			Package: database.Package{Ecosystem: lockfile.NpmEcosystem, Name: "my-package"},
 			Ranges: []database.AffectsRange{
 				buildEcosystemAffectsRange(
 					database.RangeEvent{Introduced: "0"},
@@ -281,7 +281,7 @@ func TestOSV_IsAffected_AffectsWithEcosystem_MultipleAffected(t *testing.T) {
 			},
 		},
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.NpmEcosystem, Name: "my-package"},
+			Package: database.Package{Ecosystem: lockfile.NpmEcosystem, Name: "my-package"},
 			Ranges: []database.AffectsRange{
 				buildEcosystemAffectsRange(
 					database.RangeEvent{Introduced: "2.1.0"},
@@ -316,7 +316,7 @@ func TestOSV_IsAffected_AffectsWithEcosystem_PipNamesAreNormalised(t *testing.T)
 
 	osv = buildOSVWithAffected(
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.PipEcosystem, Name: "Pillow"},
+			Package: database.Package{Ecosystem: lockfile.PipEcosystem, Name: "Pillow"},
 			Ranges: []database.AffectsRange{
 				buildEcosystemAffectsRange(
 					database.RangeEvent{Introduced: "0"},
@@ -326,7 +326,7 @@ func TestOSV_IsAffected_AffectsWithEcosystem_PipNamesAreNormalised(t *testing.T)
 		},
 	)
 
-	pkg = detector.PackageDetails{Name: "pillow", Version: "0.5", Ecosystem: parsers.PipEcosystem}
+	pkg = detector.PackageDetails{Name: "pillow", Version: "0.5", Ecosystem: lockfile.PipEcosystem}
 
 	if !osv.IsAffected(pkg) {
 		t.Errorf("Expected OSV to normalize names of pip packages, but did not")
@@ -334,7 +334,7 @@ func TestOSV_IsAffected_AffectsWithEcosystem_PipNamesAreNormalised(t *testing.T)
 
 	osv = buildOSVWithAffected(
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.NpmEcosystem, Name: "Pillow"},
+			Package: database.Package{Ecosystem: lockfile.NpmEcosystem, Name: "Pillow"},
 			Ranges: []database.AffectsRange{
 				buildEcosystemAffectsRange(
 					database.RangeEvent{Introduced: "0"},
@@ -344,7 +344,7 @@ func TestOSV_IsAffected_AffectsWithEcosystem_PipNamesAreNormalised(t *testing.T)
 		},
 	)
 
-	pkg = detector.PackageDetails{Name: "pillow", Version: "0.5", Ecosystem: parsers.NpmEcosystem}
+	pkg = detector.PackageDetails{Name: "pillow", Version: "0.5", Ecosystem: lockfile.NpmEcosystem}
 
 	if osv.IsAffected(pkg) {
 		t.Errorf("Expected OSV not to normalize names of non-pip packages, but it did")
@@ -356,7 +356,7 @@ func TestOSV_IsAffected_AffectsWithSemver_DifferentEcosystem(t *testing.T) {
 
 	osv := buildOSVWithAffected(
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.PipEcosystem, Name: "my-package"},
+			Package: database.Package{Ecosystem: lockfile.PipEcosystem, Name: "my-package"},
 			Ranges: []database.AffectsRange{
 				buildSemverAffectsRange(database.RangeEvent{Introduced: "0"}),
 			},
@@ -376,7 +376,7 @@ func TestOSV_IsAffected_AffectsWithSemver_SingleAffected(t *testing.T) {
 	// "Introduced: 0" means everything is affected
 	osv = buildOSVWithAffected(
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.NpmEcosystem, Name: "my-package"},
+			Package: database.Package{Ecosystem: lockfile.NpmEcosystem, Name: "my-package"},
 			Ranges: []database.AffectsRange{
 				buildSemverAffectsRange(database.RangeEvent{Introduced: "0"}),
 			},
@@ -390,7 +390,7 @@ func TestOSV_IsAffected_AffectsWithSemver_SingleAffected(t *testing.T) {
 	// "Fixed: 1" means all versions after this are not vulnerable
 	osv = buildOSVWithAffected(
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.NpmEcosystem, Name: "my-package"},
+			Package: database.Package{Ecosystem: lockfile.NpmEcosystem, Name: "my-package"},
 			Ranges: []database.AffectsRange{
 				buildSemverAffectsRange(
 					database.RangeEvent{Introduced: "0"},
@@ -411,7 +411,7 @@ func TestOSV_IsAffected_AffectsWithSemver_SingleAffected(t *testing.T) {
 	// multiple fixes and introduced
 	osv = buildOSVWithAffected(
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.NpmEcosystem, Name: "my-package"},
+			Package: database.Package{Ecosystem: lockfile.NpmEcosystem, Name: "my-package"},
 			Ranges: []database.AffectsRange{
 				buildSemverAffectsRange(
 					database.RangeEvent{Introduced: "0"},
@@ -445,7 +445,7 @@ func TestOSV_IsAffected_AffectsWithSemver_MultipleAffected(t *testing.T) {
 
 	osv := buildOSVWithAffected(
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.NpmEcosystem, Name: "my-package"},
+			Package: database.Package{Ecosystem: lockfile.NpmEcosystem, Name: "my-package"},
 			Ranges: []database.AffectsRange{
 				buildSemverAffectsRange(
 					database.RangeEvent{Introduced: "0"},
@@ -454,7 +454,7 @@ func TestOSV_IsAffected_AffectsWithSemver_MultipleAffected(t *testing.T) {
 			},
 		},
 		database.Affected{
-			Package: database.Package{Ecosystem: parsers.NpmEcosystem, Name: "my-package"},
+			Package: database.Package{Ecosystem: lockfile.NpmEcosystem, Name: "my-package"},
 			Ranges: []database.AffectsRange{
 				buildSemverAffectsRange(
 					database.RangeEvent{Introduced: "2.1.0"},
@@ -486,7 +486,7 @@ func TestOSV_IsAffected_OnlyVersions(t *testing.T) {
 
 	osv := buildOSVWithAffected(
 		database.Affected{
-			Package:  database.Package{Ecosystem: parsers.NpmEcosystem, Name: "my-package"},
+			Package:  database.Package{Ecosystem: lockfile.NpmEcosystem, Name: "my-package"},
 			Versions: []string{"1.0.0"},
 		},
 	)
diff --git a/detector/parsers/fixtures/bundler/has-local-gem.lock b/detector/lockfile/fixtures/bundler/has-local-gem.lock
similarity index 100%
rename from detector/parsers/fixtures/bundler/has-local-gem.lock
rename to detector/lockfile/fixtures/bundler/has-local-gem.lock
diff --git a/detector/parsers/fixtures/bundler/multiple-gems.lock b/detector/lockfile/fixtures/bundler/multiple-gems.lock
similarity index 100%
rename from detector/parsers/fixtures/bundler/multiple-gems.lock
rename to detector/lockfile/fixtures/bundler/multiple-gems.lock
diff --git a/detector/parsers/fixtures/bundler/no-gem-section.lock b/detector/lockfile/fixtures/bundler/no-gem-section.lock
similarity index 100%
rename from detector/parsers/fixtures/bundler/no-gem-section.lock
rename to detector/lockfile/fixtures/bundler/no-gem-section.lock
diff --git a/detector/parsers/fixtures/bundler/no-gems.lock b/detector/lockfile/fixtures/bundler/no-gems.lock
similarity index 100%
rename from detector/parsers/fixtures/bundler/no-gems.lock
rename to detector/lockfile/fixtures/bundler/no-gems.lock
diff --git a/detector/parsers/fixtures/bundler/no-spec-section.lock b/detector/lockfile/fixtures/bundler/no-spec-section.lock
similarity index 100%
rename from detector/parsers/fixtures/bundler/no-spec-section.lock
rename to detector/lockfile/fixtures/bundler/no-spec-section.lock
diff --git a/detector/parsers/fixtures/bundler/one-gem.lock b/detector/lockfile/fixtures/bundler/one-gem.lock
similarity index 100%
rename from detector/parsers/fixtures/bundler/one-gem.lock
rename to detector/lockfile/fixtures/bundler/one-gem.lock
diff --git a/detector/parsers/fixtures/bundler/rails.lock b/detector/lockfile/fixtures/bundler/rails.lock
similarity index 100%
rename from detector/parsers/fixtures/bundler/rails.lock
rename to detector/lockfile/fixtures/bundler/rails.lock
diff --git a/detector/parsers/fixtures/bundler/rubocop.lock b/detector/lockfile/fixtures/bundler/rubocop.lock
similarity index 100%
rename from detector/parsers/fixtures/bundler/rubocop.lock
rename to detector/lockfile/fixtures/bundler/rubocop.lock
diff --git a/detector/parsers/fixtures/bundler/some-gems.lock b/detector/lockfile/fixtures/bundler/some-gems.lock
similarity index 100%
rename from detector/parsers/fixtures/bundler/some-gems.lock
rename to detector/lockfile/fixtures/bundler/some-gems.lock
diff --git a/detector/parsers/fixtures/cargo/empty.lock b/detector/lockfile/fixtures/cargo/empty.lock
similarity index 100%
rename from detector/parsers/fixtures/cargo/empty.lock
rename to detector/lockfile/fixtures/cargo/empty.lock
diff --git a/detector/parsers/fixtures/cargo/not-toml.txt b/detector/lockfile/fixtures/cargo/not-toml.txt
similarity index 100%
rename from detector/parsers/fixtures/cargo/not-toml.txt
rename to detector/lockfile/fixtures/cargo/not-toml.txt
diff --git a/detector/parsers/fixtures/cargo/one-package.lock b/detector/lockfile/fixtures/cargo/one-package.lock
similarity index 100%
rename from detector/parsers/fixtures/cargo/one-package.lock
rename to detector/lockfile/fixtures/cargo/one-package.lock
diff --git a/detector/parsers/fixtures/cargo/package-with-build-string.lock b/detector/lockfile/fixtures/cargo/package-with-build-string.lock
similarity index 100%
rename from detector/parsers/fixtures/cargo/package-with-build-string.lock
rename to detector/lockfile/fixtures/cargo/package-with-build-string.lock
diff --git a/detector/parsers/fixtures/cargo/two-packages.lock b/detector/lockfile/fixtures/cargo/two-packages.lock
similarity index 100%
rename from detector/parsers/fixtures/cargo/two-packages.lock
rename to detector/lockfile/fixtures/cargo/two-packages.lock
diff --git a/detector/parsers/fixtures/composer/empty.json b/detector/lockfile/fixtures/composer/empty.json
similarity index 100%
rename from detector/parsers/fixtures/composer/empty.json
rename to detector/lockfile/fixtures/composer/empty.json
diff --git a/detector/parsers/fixtures/composer/not-json.txt b/detector/lockfile/fixtures/composer/not-json.txt
similarity index 100%
rename from detector/parsers/fixtures/composer/not-json.txt
rename to detector/lockfile/fixtures/composer/not-json.txt
diff --git a/detector/parsers/fixtures/composer/one-package-dev.json b/detector/lockfile/fixtures/composer/one-package-dev.json
similarity index 100%
rename from detector/parsers/fixtures/composer/one-package-dev.json
rename to detector/lockfile/fixtures/composer/one-package-dev.json
diff --git a/detector/parsers/fixtures/composer/one-package.json b/detector/lockfile/fixtures/composer/one-package.json
similarity index 100%
rename from detector/parsers/fixtures/composer/one-package.json
rename to detector/lockfile/fixtures/composer/one-package.json
diff --git a/detector/parsers/fixtures/composer/two-packages-alt.json b/detector/lockfile/fixtures/composer/two-packages-alt.json
similarity index 100%
rename from detector/parsers/fixtures/composer/two-packages-alt.json
rename to detector/lockfile/fixtures/composer/two-packages-alt.json
diff --git a/detector/parsers/fixtures/composer/two-packages.json b/detector/lockfile/fixtures/composer/two-packages.json
similarity index 100%
rename from detector/parsers/fixtures/composer/two-packages.json
rename to detector/lockfile/fixtures/composer/two-packages.json
diff --git a/detector/parsers/fixtures/go/empty.mod b/detector/lockfile/fixtures/go/empty.mod
similarity index 100%
rename from detector/parsers/fixtures/go/empty.mod
rename to detector/lockfile/fixtures/go/empty.mod
diff --git a/detector/parsers/fixtures/go/indirect-packages.mod b/detector/lockfile/fixtures/go/indirect-packages.mod
similarity index 100%
rename from detector/parsers/fixtures/go/indirect-packages.mod
rename to detector/lockfile/fixtures/go/indirect-packages.mod
diff --git a/detector/parsers/fixtures/go/not-go-mod.txt b/detector/lockfile/fixtures/go/not-go-mod.txt
similarity index 100%
rename from detector/parsers/fixtures/go/not-go-mod.txt
rename to detector/lockfile/fixtures/go/not-go-mod.txt
diff --git a/detector/parsers/fixtures/go/one-package.mod b/detector/lockfile/fixtures/go/one-package.mod
similarity index 100%
rename from detector/parsers/fixtures/go/one-package.mod
rename to detector/lockfile/fixtures/go/one-package.mod
diff --git a/detector/parsers/fixtures/go/two-packages.mod b/detector/lockfile/fixtures/go/two-packages.mod
similarity index 100%
rename from detector/parsers/fixtures/go/two-packages.mod
rename to detector/lockfile/fixtures/go/two-packages.mod
diff --git a/detector/parsers/fixtures/npm/empty.v1.json b/detector/lockfile/fixtures/npm/empty.v1.json
similarity index 100%
rename from detector/parsers/fixtures/npm/empty.v1.json
rename to detector/lockfile/fixtures/npm/empty.v1.json
diff --git a/detector/parsers/fixtures/npm/empty.v2.json b/detector/lockfile/fixtures/npm/empty.v2.json
similarity index 100%
rename from detector/parsers/fixtures/npm/empty.v2.json
rename to detector/lockfile/fixtures/npm/empty.v2.json
diff --git a/detector/parsers/fixtures/npm/nested-dependencies-dup.v1.json b/detector/lockfile/fixtures/npm/nested-dependencies-dup.v1.json
similarity index 100%
rename from detector/parsers/fixtures/npm/nested-dependencies-dup.v1.json
rename to detector/lockfile/fixtures/npm/nested-dependencies-dup.v1.json
diff --git a/detector/parsers/fixtures/npm/nested-dependencies-dup.v2.json b/detector/lockfile/fixtures/npm/nested-dependencies-dup.v2.json
similarity index 100%
rename from detector/parsers/fixtures/npm/nested-dependencies-dup.v2.json
rename to detector/lockfile/fixtures/npm/nested-dependencies-dup.v2.json
diff --git a/detector/parsers/fixtures/npm/nested-dependencies.v1.json b/detector/lockfile/fixtures/npm/nested-dependencies.v1.json
similarity index 100%
rename from detector/parsers/fixtures/npm/nested-dependencies.v1.json
rename to detector/lockfile/fixtures/npm/nested-dependencies.v1.json
diff --git a/detector/parsers/fixtures/npm/nested-dependencies.v2.json b/detector/lockfile/fixtures/npm/nested-dependencies.v2.json
similarity index 100%
rename from detector/parsers/fixtures/npm/nested-dependencies.v2.json
rename to detector/lockfile/fixtures/npm/nested-dependencies.v2.json
diff --git a/detector/parsers/fixtures/npm/not-json.txt b/detector/lockfile/fixtures/npm/not-json.txt
similarity index 100%
rename from detector/parsers/fixtures/npm/not-json.txt
rename to detector/lockfile/fixtures/npm/not-json.txt
diff --git a/detector/parsers/fixtures/npm/one-package-dev.v1.json b/detector/lockfile/fixtures/npm/one-package-dev.v1.json
similarity index 100%
rename from detector/parsers/fixtures/npm/one-package-dev.v1.json
rename to detector/lockfile/fixtures/npm/one-package-dev.v1.json
diff --git a/detector/parsers/fixtures/npm/one-package-dev.v2.json b/detector/lockfile/fixtures/npm/one-package-dev.v2.json
similarity index 100%
rename from detector/parsers/fixtures/npm/one-package-dev.v2.json
rename to detector/lockfile/fixtures/npm/one-package-dev.v2.json
diff --git a/detector/parsers/fixtures/npm/one-package.v1.json b/detector/lockfile/fixtures/npm/one-package.v1.json
similarity index 100%
rename from detector/parsers/fixtures/npm/one-package.v1.json
rename to detector/lockfile/fixtures/npm/one-package.v1.json
diff --git a/detector/parsers/fixtures/npm/one-package.v2.json b/detector/lockfile/fixtures/npm/one-package.v2.json
similarity index 100%
rename from detector/parsers/fixtures/npm/one-package.v2.json
rename to detector/lockfile/fixtures/npm/one-package.v2.json
diff --git a/detector/parsers/fixtures/npm/scoped-packages.v1.json b/detector/lockfile/fixtures/npm/scoped-packages.v1.json
similarity index 100%
rename from detector/parsers/fixtures/npm/scoped-packages.v1.json
rename to detector/lockfile/fixtures/npm/scoped-packages.v1.json
diff --git a/detector/parsers/fixtures/npm/scoped-packages.v2.json b/detector/lockfile/fixtures/npm/scoped-packages.v2.json
similarity index 100%
rename from detector/parsers/fixtures/npm/scoped-packages.v2.json
rename to detector/lockfile/fixtures/npm/scoped-packages.v2.json
diff --git a/detector/parsers/fixtures/npm/two-packages.v1.json b/detector/lockfile/fixtures/npm/two-packages.v1.json
similarity index 100%
rename from detector/parsers/fixtures/npm/two-packages.v1.json
rename to detector/lockfile/fixtures/npm/two-packages.v1.json
diff --git a/detector/parsers/fixtures/npm/two-packages.v2.json b/detector/lockfile/fixtures/npm/two-packages.v2.json
similarity index 100%
rename from detector/parsers/fixtures/npm/two-packages.v2.json
rename to detector/lockfile/fixtures/npm/two-packages.v2.json
diff --git a/detector/parsers/fixtures/pip/empty.txt b/detector/lockfile/fixtures/pip/empty.txt
similarity index 100%
rename from detector/parsers/fixtures/pip/empty.txt
rename to detector/lockfile/fixtures/pip/empty.txt
diff --git a/detector/parsers/fixtures/pip/file-format-example.txt b/detector/lockfile/fixtures/pip/file-format-example.txt
similarity index 100%
rename from detector/parsers/fixtures/pip/file-format-example.txt
rename to detector/lockfile/fixtures/pip/file-format-example.txt
diff --git a/detector/parsers/fixtures/pip/multiple-requirements-constrained.txt b/detector/lockfile/fixtures/pip/multiple-requirements-constrained.txt
similarity index 100%
rename from detector/parsers/fixtures/pip/multiple-requirements-constrained.txt
rename to detector/lockfile/fixtures/pip/multiple-requirements-constrained.txt
diff --git a/detector/parsers/fixtures/pip/multiple-requirements-mixed.txt b/detector/lockfile/fixtures/pip/multiple-requirements-mixed.txt
similarity index 100%
rename from detector/parsers/fixtures/pip/multiple-requirements-mixed.txt
rename to detector/lockfile/fixtures/pip/multiple-requirements-mixed.txt
diff --git a/detector/parsers/fixtures/pip/non-normalized-names.txt b/detector/lockfile/fixtures/pip/non-normalized-names.txt
similarity index 100%
rename from detector/parsers/fixtures/pip/non-normalized-names.txt
rename to detector/lockfile/fixtures/pip/non-normalized-names.txt
diff --git a/detector/parsers/fixtures/pip/one-requirement-constrained.txt b/detector/lockfile/fixtures/pip/one-requirement-constrained.txt
similarity index 100%
rename from detector/parsers/fixtures/pip/one-requirement-constrained.txt
rename to detector/lockfile/fixtures/pip/one-requirement-constrained.txt
diff --git a/detector/parsers/fixtures/pip/one-requirement-unconstrained.txt b/detector/lockfile/fixtures/pip/one-requirement-unconstrained.txt
similarity index 100%
rename from detector/parsers/fixtures/pip/one-requirement-unconstrained.txt
rename to detector/lockfile/fixtures/pip/one-requirement-unconstrained.txt
diff --git a/detector/parsers/fixtures/pip/only-comments.txt b/detector/lockfile/fixtures/pip/only-comments.txt
similarity index 100%
rename from detector/parsers/fixtures/pip/only-comments.txt
rename to detector/lockfile/fixtures/pip/only-comments.txt
diff --git a/detector/parsers/fixtures/pip/with-added-support.txt b/detector/lockfile/fixtures/pip/with-added-support.txt
similarity index 100%
rename from detector/parsers/fixtures/pip/with-added-support.txt
rename to detector/lockfile/fixtures/pip/with-added-support.txt
diff --git a/detector/parsers/fixtures/pnpm/empty.yaml b/detector/lockfile/fixtures/pnpm/empty.yaml
similarity index 100%
rename from detector/parsers/fixtures/pnpm/empty.yaml
rename to detector/lockfile/fixtures/pnpm/empty.yaml
diff --git a/detector/parsers/fixtures/pnpm/exotic.yaml b/detector/lockfile/fixtures/pnpm/exotic.yaml
similarity index 100%
rename from detector/parsers/fixtures/pnpm/exotic.yaml
rename to detector/lockfile/fixtures/pnpm/exotic.yaml
diff --git a/detector/parsers/fixtures/pnpm/multiple-packages.yaml b/detector/lockfile/fixtures/pnpm/multiple-packages.yaml
similarity index 100%
rename from detector/parsers/fixtures/pnpm/multiple-packages.yaml
rename to detector/lockfile/fixtures/pnpm/multiple-packages.yaml
diff --git a/detector/parsers/fixtures/pnpm/multiple-versions.yaml b/detector/lockfile/fixtures/pnpm/multiple-versions.yaml
similarity index 100%
rename from detector/parsers/fixtures/pnpm/multiple-versions.yaml
rename to detector/lockfile/fixtures/pnpm/multiple-versions.yaml
diff --git a/detector/parsers/fixtures/pnpm/not-yaml.txt b/detector/lockfile/fixtures/pnpm/not-yaml.txt
similarity index 100%
rename from detector/parsers/fixtures/pnpm/not-yaml.txt
rename to detector/lockfile/fixtures/pnpm/not-yaml.txt
diff --git a/detector/parsers/fixtures/pnpm/one-package-dev.yaml b/detector/lockfile/fixtures/pnpm/one-package-dev.yaml
similarity index 100%
rename from detector/parsers/fixtures/pnpm/one-package-dev.yaml
rename to detector/lockfile/fixtures/pnpm/one-package-dev.yaml
diff --git a/detector/parsers/fixtures/pnpm/one-package.yaml b/detector/lockfile/fixtures/pnpm/one-package.yaml
similarity index 100%
rename from detector/parsers/fixtures/pnpm/one-package.yaml
rename to detector/lockfile/fixtures/pnpm/one-package.yaml
diff --git a/detector/parsers/fixtures/pnpm/peer-dependencies-advanced.yaml b/detector/lockfile/fixtures/pnpm/peer-dependencies-advanced.yaml
similarity index 100%
rename from detector/parsers/fixtures/pnpm/peer-dependencies-advanced.yaml
rename to detector/lockfile/fixtures/pnpm/peer-dependencies-advanced.yaml
diff --git a/detector/parsers/fixtures/pnpm/peer-dependencies.yaml b/detector/lockfile/fixtures/pnpm/peer-dependencies.yaml
similarity index 100%
rename from detector/parsers/fixtures/pnpm/peer-dependencies.yaml
rename to detector/lockfile/fixtures/pnpm/peer-dependencies.yaml
diff --git a/detector/parsers/fixtures/pnpm/scoped-packages.yaml b/detector/lockfile/fixtures/pnpm/scoped-packages.yaml
similarity index 100%
rename from detector/parsers/fixtures/pnpm/scoped-packages.yaml
rename to detector/lockfile/fixtures/pnpm/scoped-packages.yaml
diff --git a/detector/parsers/fixtures/yarn/empty.v1.lock b/detector/lockfile/fixtures/yarn/empty.v1.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/empty.v1.lock
rename to detector/lockfile/fixtures/yarn/empty.v1.lock
diff --git a/detector/parsers/fixtures/yarn/empty.v2.lock b/detector/lockfile/fixtures/yarn/empty.v2.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/empty.v2.lock
rename to detector/lockfile/fixtures/yarn/empty.v2.lock
diff --git a/detector/parsers/fixtures/yarn/metadata-only.v2.lock b/detector/lockfile/fixtures/yarn/metadata-only.v2.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/metadata-only.v2.lock
rename to detector/lockfile/fixtures/yarn/metadata-only.v2.lock
diff --git a/detector/parsers/fixtures/yarn/multiple-constraints.v1.lock b/detector/lockfile/fixtures/yarn/multiple-constraints.v1.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/multiple-constraints.v1.lock
rename to detector/lockfile/fixtures/yarn/multiple-constraints.v1.lock
diff --git a/detector/parsers/fixtures/yarn/multiple-versions.v1.lock b/detector/lockfile/fixtures/yarn/multiple-versions.v1.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/multiple-versions.v1.lock
rename to detector/lockfile/fixtures/yarn/multiple-versions.v1.lock
diff --git a/detector/parsers/fixtures/yarn/multiple-versions.v2.lock b/detector/lockfile/fixtures/yarn/multiple-versions.v2.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/multiple-versions.v2.lock
rename to detector/lockfile/fixtures/yarn/multiple-versions.v2.lock
diff --git a/detector/parsers/fixtures/yarn/one-package.v1.lock b/detector/lockfile/fixtures/yarn/one-package.v1.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/one-package.v1.lock
rename to detector/lockfile/fixtures/yarn/one-package.v1.lock
diff --git a/detector/parsers/fixtures/yarn/one-package.v2.lock b/detector/lockfile/fixtures/yarn/one-package.v2.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/one-package.v2.lock
rename to detector/lockfile/fixtures/yarn/one-package.v2.lock
diff --git a/detector/parsers/fixtures/yarn/scoped-packages.v1.lock b/detector/lockfile/fixtures/yarn/scoped-packages.v1.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/scoped-packages.v1.lock
rename to detector/lockfile/fixtures/yarn/scoped-packages.v1.lock
diff --git a/detector/parsers/fixtures/yarn/scoped-packages.v2.lock b/detector/lockfile/fixtures/yarn/scoped-packages.v2.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/scoped-packages.v2.lock
rename to detector/lockfile/fixtures/yarn/scoped-packages.v2.lock
diff --git a/detector/parsers/fixtures/yarn/two-packages.v1.lock b/detector/lockfile/fixtures/yarn/two-packages.v1.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/two-packages.v1.lock
rename to detector/lockfile/fixtures/yarn/two-packages.v1.lock
diff --git a/detector/parsers/fixtures/yarn/two-packages.v2.lock b/detector/lockfile/fixtures/yarn/two-packages.v2.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/two-packages.v2.lock
rename to detector/lockfile/fixtures/yarn/two-packages.v2.lock
diff --git a/detector/parsers/fixtures/yarn/versions-with-build-strings.v1.lock b/detector/lockfile/fixtures/yarn/versions-with-build-strings.v1.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/versions-with-build-strings.v1.lock
rename to detector/lockfile/fixtures/yarn/versions-with-build-strings.v1.lock
diff --git a/detector/parsers/fixtures/yarn/versions-with-build-strings.v2.lock b/detector/lockfile/fixtures/yarn/versions-with-build-strings.v2.lock
similarity index 100%
rename from detector/parsers/fixtures/yarn/versions-with-build-strings.v2.lock
rename to detector/lockfile/fixtures/yarn/versions-with-build-strings.v2.lock
diff --git a/detector/parsers/helpers_test.go b/detector/lockfile/helpers_test.go
similarity index 71%
rename from detector/parsers/helpers_test.go
rename to detector/lockfile/helpers_test.go
index cd258b1..52a38ba 100644
--- a/detector/parsers/helpers_test.go
+++ b/detector/lockfile/helpers_test.go
@@ -1,8 +1,8 @@
-package parsers_test
+package lockfile_test
 
 import (
 	"fmt"
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"strings"
 	"testing"
 )
@@ -19,11 +19,11 @@ func expectErrContaining(t *testing.T, err error, str string) {
 	}
 }
 
-func packageToString(pkg parsers.PackageDetails) string {
+func packageToString(pkg lockfile.PackageDetails) string {
 	return fmt.Sprintf("%s@%s (%s)", pkg.Name, pkg.Version, pkg.Ecosystem)
 }
 
-func hasPackage(packages []parsers.PackageDetails, pkg parsers.PackageDetails) bool {
+func hasPackage(packages []lockfile.PackageDetails, pkg lockfile.PackageDetails) bool {
 	for _, details := range packages {
 		if details == pkg {
 			return true
@@ -33,7 +33,7 @@ func hasPackage(packages []parsers.PackageDetails, pkg parsers.PackageDetails) b
 	return false
 }
 
-func expectPackage(t *testing.T, packages []parsers.PackageDetails, pkg parsers.PackageDetails) {
+func expectPackage(t *testing.T, packages []lockfile.PackageDetails, pkg lockfile.PackageDetails) {
 	t.Helper()
 
 	if !hasPackage(packages, pkg) {
@@ -46,8 +46,8 @@ func expectPackage(t *testing.T, packages []parsers.PackageDetails, pkg parsers.
 	}
 }
 
-func findMissingPackages(actualPackages []parsers.PackageDetails, expectedPackages []parsers.PackageDetails) []parsers.PackageDetails {
-	var missingPackages []parsers.PackageDetails
+func findMissingPackages(actualPackages []lockfile.PackageDetails, expectedPackages []lockfile.PackageDetails) []lockfile.PackageDetails {
+	var missingPackages []lockfile.PackageDetails
 
 	for _, pkg := range actualPackages {
 		if !hasPackage(expectedPackages, pkg) {
@@ -58,7 +58,7 @@ func findMissingPackages(actualPackages []parsers.PackageDetails, expectedPackag
 	return missingPackages
 }
 
-func expectPackages(t *testing.T, actualPackages []parsers.PackageDetails, expectedPackages []parsers.PackageDetails) {
+func expectPackages(t *testing.T, actualPackages []lockfile.PackageDetails, expectedPackages []lockfile.PackageDetails) {
 	t.Helper()
 
 	if len(expectedPackages) != len(actualPackages) {
diff --git a/detector/parsers/parse-cargo-lock_test.go b/detector/lockfile/parse-cargo-lock_test.go
similarity index 51%
rename from detector/parsers/parse-cargo-lock_test.go
rename to detector/lockfile/parse-cargo-lock_test.go
index 953d2a4..88725c6 100644
--- a/detector/parsers/parse-cargo-lock_test.go
+++ b/detector/lockfile/parse-cargo-lock_test.go
@@ -1,54 +1,54 @@
-package parsers_test
+package lockfile_test
 
 import (
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"testing"
 )
 
 func TestParseCargoLock_FileDoesNotExist(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseCargoLock("fixtures/cargo/does-not-exist")
+	packages, err := lockfile.ParseCargoLock("fixtures/cargo/does-not-exist")
 
 	expectErrContaining(t, err, "could not read")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseCargoLock_InvalidJson(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseCargoLock("fixtures/cargo/not-toml.txt")
+	packages, err := lockfile.ParseCargoLock("fixtures/cargo/not-toml.txt")
 
 	expectErrContaining(t, err, "could not parse")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseCargoLock_NoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseCargoLock("fixtures/cargo/empty.lock")
+	packages, err := lockfile.ParseCargoLock("fixtures/cargo/empty.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseCargoLock_OnePackage(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseCargoLock("fixtures/cargo/one-package.lock")
+	packages, err := lockfile.ParseCargoLock("fixtures/cargo/one-package.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "addr2line",
 			Version:   "0.15.2",
-			Ecosystem: parsers.CargoEcosystem,
+			Ecosystem: lockfile.CargoEcosystem,
 		},
 	})
 }
@@ -56,22 +56,22 @@ func TestParseCargoLock_OnePackage(t *testing.T) {
 func TestParseCargoLock_TwoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseCargoLock("fixtures/cargo/two-packages.lock")
+	packages, err := lockfile.ParseCargoLock("fixtures/cargo/two-packages.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "addr2line",
 			Version:   "0.15.2",
-			Ecosystem: parsers.CargoEcosystem,
+			Ecosystem: lockfile.CargoEcosystem,
 		},
 		{
 			Name:      "syn",
 			Version:   "1.0.73",
-			Ecosystem: parsers.CargoEcosystem,
+			Ecosystem: lockfile.CargoEcosystem,
 		},
 	})
 }
@@ -79,17 +79,17 @@ func TestParseCargoLock_TwoPackages(t *testing.T) {
 func TestParseCargoLock_PackageWithBuildString(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseCargoLock("fixtures/cargo/package-with-build-string.lock")
+	packages, err := lockfile.ParseCargoLock("fixtures/cargo/package-with-build-string.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "wasi",
 			Version:   "0.10.2+wasi-snapshot-preview1",
-			Ecosystem: parsers.CargoEcosystem,
+			Ecosystem: lockfile.CargoEcosystem,
 		},
 	})
 }
diff --git a/detector/parsers/parse-composer-lock_test.go b/detector/lockfile/parse-composer-lock_test.go
similarity index 51%
rename from detector/parsers/parse-composer-lock_test.go
rename to detector/lockfile/parse-composer-lock_test.go
index 9cc4c0a..49c4cd1 100644
--- a/detector/parsers/parse-composer-lock_test.go
+++ b/detector/lockfile/parse-composer-lock_test.go
@@ -1,54 +1,54 @@
-package parsers_test
+package lockfile_test
 
 import (
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"testing"
 )
 
 func TestParseComposerLock_FileDoesNotExist(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseComposerLock("fixtures/composer/does-not-exist")
+	packages, err := lockfile.ParseComposerLock("fixtures/composer/does-not-exist")
 
 	expectErrContaining(t, err, "could not read")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseComposerLock_InvalidJson(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseComposerLock("fixtures/composer/not-json.txt")
+	packages, err := lockfile.ParseComposerLock("fixtures/composer/not-json.txt")
 
 	expectErrContaining(t, err, "could not parse")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseComposerLock_NoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseComposerLock("fixtures/composer/empty.json")
+	packages, err := lockfile.ParseComposerLock("fixtures/composer/empty.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseComposerLock_OnePackage(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseComposerLock("fixtures/composer/one-package.json")
+	packages, err := lockfile.ParseComposerLock("fixtures/composer/one-package.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "sentry/sdk",
 			Version:   "2.0.4",
-			Ecosystem: parsers.ComposerEcosystem,
+			Ecosystem: lockfile.ComposerEcosystem,
 		},
 	})
 }
@@ -56,17 +56,17 @@ func TestParseComposerLock_OnePackage(t *testing.T) {
 func TestParseComposerLock_OnePackageDev(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseComposerLock("fixtures/composer/one-package-dev.json")
+	packages, err := lockfile.ParseComposerLock("fixtures/composer/one-package-dev.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "sentry/sdk",
 			Version:   "2.0.4",
-			Ecosystem: parsers.ComposerEcosystem,
+			Ecosystem: lockfile.ComposerEcosystem,
 		},
 	})
 }
@@ -74,22 +74,22 @@ func TestParseComposerLock_OnePackageDev(t *testing.T) {
 func TestParseComposerLock_TwoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseComposerLock("fixtures/composer/two-packages.json")
+	packages, err := lockfile.ParseComposerLock("fixtures/composer/two-packages.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "sentry/sdk",
 			Version:   "2.0.4",
-			Ecosystem: parsers.ComposerEcosystem,
+			Ecosystem: lockfile.ComposerEcosystem,
 		},
 		{
 			Name:      "theseer/tokenizer",
 			Version:   "1.1.3",
-			Ecosystem: parsers.ComposerEcosystem,
+			Ecosystem: lockfile.ComposerEcosystem,
 		},
 	})
 }
@@ -97,22 +97,22 @@ func TestParseComposerLock_TwoPackages(t *testing.T) {
 func TestParseComposerLock_TwoPackagesAlt(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseComposerLock("fixtures/composer/two-packages-alt.json")
+	packages, err := lockfile.ParseComposerLock("fixtures/composer/two-packages-alt.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "sentry/sdk",
 			Version:   "2.0.4",
-			Ecosystem: parsers.ComposerEcosystem,
+			Ecosystem: lockfile.ComposerEcosystem,
 		},
 		{
 			Name:      "theseer/tokenizer",
 			Version:   "1.1.3",
-			Ecosystem: parsers.ComposerEcosystem,
+			Ecosystem: lockfile.ComposerEcosystem,
 		},
 	})
 }
diff --git a/detector/parsers/parse-gemfile-lock_test.go b/detector/lockfile/parse-gemfile-lock_test.go
similarity index 56%
rename from detector/parsers/parse-gemfile-lock_test.go
rename to detector/lockfile/parse-gemfile-lock_test.go
index 8f3ad01..c6ac94d 100644
--- a/detector/parsers/parse-gemfile-lock_test.go
+++ b/detector/lockfile/parse-gemfile-lock_test.go
@@ -1,81 +1,81 @@
-package parsers_test
+package lockfile_test
 
 import (
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"testing"
 )
 
 func TestParseGemfileLock_FileDoesNotExist(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGemfileLock("fixtures/bundler/does-not-exist")
+	packages, err := lockfile.ParseGemfileLock("fixtures/bundler/does-not-exist")
 
 	expectErrContaining(t, err, "could not read")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseGemfileLock_InvalidJson(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGemfileLock("fixtures/bundler/not-json.txt")
+	packages, err := lockfile.ParseGemfileLock("fixtures/bundler/not-json.txt")
 
 	if err == nil {
 		t.Errorf("Expected to get error, but did not")
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseGemfileLock_NoSpecSection(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGemfileLock("fixtures/bundler/no-spec-section.lock")
+	packages, err := lockfile.ParseGemfileLock("fixtures/bundler/no-spec-section.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseGemfileLock_NoGemSection(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGemfileLock("fixtures/bundler/no-gem-section.lock")
+	packages, err := lockfile.ParseGemfileLock("fixtures/bundler/no-gem-section.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseGemfileLock_NoGems(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGemfileLock("fixtures/bundler/no-gems.lock")
+	packages, err := lockfile.ParseGemfileLock("fixtures/bundler/no-gems.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseGemfileLock_OneGem(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGemfileLock("fixtures/bundler/one-gem.lock")
+	packages, err := lockfile.ParseGemfileLock("fixtures/bundler/one-gem.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "ast",
 			Version:   "2.4.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 	})
 }
@@ -83,27 +83,27 @@ func TestParseGemfileLock_OneGem(t *testing.T) {
 func TestParseGemfileLock_SomeGems(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGemfileLock("fixtures/bundler/some-gems.lock")
+	packages, err := lockfile.ParseGemfileLock("fixtures/bundler/some-gems.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "coderay",
 			Version:   "1.1.3",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "method_source",
 			Version:   "1.0.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "pry",
 			Version:   "0.14.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 	})
 }
@@ -111,42 +111,42 @@ func TestParseGemfileLock_SomeGems(t *testing.T) {
 func TestParseGemfileLock_MultipleGems(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGemfileLock("fixtures/bundler/multiple-gems.lock")
+	packages, err := lockfile.ParseGemfileLock("fixtures/bundler/multiple-gems.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "bundler-audit",
 			Version:   "0.9.0.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "coderay",
 			Version:   "1.1.3",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "dotenv",
 			Version:   "2.7.6",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "method_source",
 			Version:   "1.0.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "pry",
 			Version:   "0.14.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "thor",
 			Version:   "1.2.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 	})
 }
@@ -154,242 +154,242 @@ func TestParseGemfileLock_MultipleGems(t *testing.T) {
 func TestParseGemfileLock_Rails(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGemfileLock("fixtures/bundler/rails.lock")
+	packages, err := lockfile.ParseGemfileLock("fixtures/bundler/rails.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "actioncable",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "actionmailbox",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "actionmailer",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "actionpack",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "actiontext",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "actionview",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "activejob",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "activemodel",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "activerecord",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "activestorage",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "activesupport",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "builder",
 			Version:   "3.2.4",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "concurrent-ruby",
 			Version:   "1.1.9",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "crass",
 			Version:   "1.0.6",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "digest",
 			Version:   "3.1.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "erubi",
 			Version:   "1.10.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "globalid",
 			Version:   "1.0.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "i18n",
 			Version:   "1.10.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "io-wait",
 			Version:   "0.2.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "loofah",
 			Version:   "2.14.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "mail",
 			Version:   "2.7.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "marcel",
 			Version:   "1.0.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "method_source",
 			Version:   "1.0.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "mini_mime",
 			Version:   "1.1.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "minitest",
 			Version:   "5.15.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "net-imap",
 			Version:   "0.2.3",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "net-pop",
 			Version:   "0.1.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "net-protocol",
 			Version:   "0.1.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "net-smtp",
 			Version:   "0.3.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "nio4r",
 			Version:   "2.5.8",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "racc",
 			Version:   "1.6.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rack",
 			Version:   "2.2.3",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rack-test",
 			Version:   "1.1.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rails",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rails-dom-testing",
 			Version:   "2.0.3",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rails-html-sanitizer",
 			Version:   "1.4.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "railties",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rake",
 			Version:   "13.0.6",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "strscan",
 			Version:   "3.0.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "thor",
 			Version:   "1.2.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "timeout",
 			Version:   "0.2.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "tzinfo",
 			Version:   "2.0.4",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "websocket-driver",
 			Version:   "0.7.5",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "websocket-extensions",
 			Version:   "0.1.5",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "zeitwerk",
 			Version:   "2.5.4",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "nokogiri",
 			Version:   "1.13.3",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 	})
 }
@@ -397,62 +397,62 @@ func TestParseGemfileLock_Rails(t *testing.T) {
 func TestParseGemfileLock_Rubocop(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGemfileLock("fixtures/bundler/rubocop.lock")
+	packages, err := lockfile.ParseGemfileLock("fixtures/bundler/rubocop.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "ast",
 			Version:   "2.4.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "parallel",
 			Version:   "1.21.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "parser",
 			Version:   "3.1.1.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rainbow",
 			Version:   "3.1.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "regexp_parser",
 			Version:   "2.2.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rexml",
 			Version:   "3.2.5",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rubocop",
 			Version:   "1.25.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rubocop-ast",
 			Version:   "1.16.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "ruby-progressbar",
 			Version:   "1.11.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "unicode-display_width",
 			Version:   "2.1.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 	})
 }
@@ -460,162 +460,162 @@ func TestParseGemfileLock_Rubocop(t *testing.T) {
 func TestParseGemfileLock_HasLocalGem(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGemfileLock("fixtures/bundler/has-local-gem.lock")
+	packages, err := lockfile.ParseGemfileLock("fixtures/bundler/has-local-gem.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "backbone-on-rails",
 			Version:   "1.2.0.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "actionpack",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "actionview",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "activesupport",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "builder",
 			Version:   "3.2.4",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "coffee-script",
 			Version:   "2.4.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "coffee-script-source",
 			Version:   "1.12.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "concurrent-ruby",
 			Version:   "1.1.9",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "crass",
 			Version:   "1.0.6",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "eco",
 			Version:   "1.0.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "ejs",
 			Version:   "1.1.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "erubi",
 			Version:   "1.10.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "execjs",
 			Version:   "2.8.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "i18n",
 			Version:   "1.10.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "jquery-rails",
 			Version:   "4.4.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "loofah",
 			Version:   "2.14.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "method_source",
 			Version:   "1.0.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "minitest",
 			Version:   "5.15.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "racc",
 			Version:   "1.6.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rack",
 			Version:   "2.2.3",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rack-test",
 			Version:   "1.1.0",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rails-dom-testing",
 			Version:   "2.0.3",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rails-html-sanitizer",
 			Version:   "1.4.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "railties",
 			Version:   "7.0.2.2",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "rake",
 			Version:   "13.0.6",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "thor",
 			Version:   "1.2.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "tzinfo",
 			Version:   "2.0.4",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "zeitwerk",
 			Version:   "2.5.4",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "nokogiri",
 			Version:   "1.13.3",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 		{
 			Name:      "eco-source",
 			Version:   "1.1.0.rc.1",
-			Ecosystem: parsers.BundlerEcosystem,
+			Ecosystem: lockfile.BundlerEcosystem,
 		},
 	})
 }
diff --git a/detector/parsers/parse-go-lock_test.go b/detector/lockfile/parse-go-lock_test.go
similarity index 56%
rename from detector/parsers/parse-go-lock_test.go
rename to detector/lockfile/parse-go-lock_test.go
index c106883..d5b7af4 100644
--- a/detector/parsers/parse-go-lock_test.go
+++ b/detector/lockfile/parse-go-lock_test.go
@@ -1,54 +1,54 @@
-package parsers_test
+package lockfile_test
 
 import (
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"testing"
 )
 
 func TestParseGoLock_FileDoesNotExist(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGoLock("fixtures/go/does-not-exist")
+	packages, err := lockfile.ParseGoLock("fixtures/go/does-not-exist")
 
 	expectErrContaining(t, err, "could not read")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseGoLock_Invalid(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGoLock("fixtures/go/not-go-mod.txt")
+	packages, err := lockfile.ParseGoLock("fixtures/go/not-go-mod.txt")
 
 	expectErrContaining(t, err, "could not parse")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseGoLock_NoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGoLock("fixtures/go/empty.mod")
+	packages, err := lockfile.ParseGoLock("fixtures/go/empty.mod")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseGoLock_OnePackage(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGoLock("fixtures/go/one-package.mod")
+	packages, err := lockfile.ParseGoLock("fixtures/go/one-package.mod")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "github.com/BurntSushi/toml",
 			Version:   "1.0.0",
-			Ecosystem: parsers.GoEcosystem,
+			Ecosystem: lockfile.GoEcosystem,
 		},
 	})
 }
@@ -56,22 +56,22 @@ func TestParseGoLock_OnePackage(t *testing.T) {
 func TestParseGoLock_TwoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGoLock("fixtures/go/two-packages.mod")
+	packages, err := lockfile.ParseGoLock("fixtures/go/two-packages.mod")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "github.com/BurntSushi/toml",
 			Version:   "1.0.0",
-			Ecosystem: parsers.GoEcosystem,
+			Ecosystem: lockfile.GoEcosystem,
 		},
 		{
 			Name:      "gopkg.in/yaml.v2",
 			Version:   "2.4.0",
-			Ecosystem: parsers.GoEcosystem,
+			Ecosystem: lockfile.GoEcosystem,
 		},
 	})
 }
@@ -79,37 +79,37 @@ func TestParseGoLock_TwoPackages(t *testing.T) {
 func TestParseGoLock_IndirectPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseGoLock("fixtures/go/indirect-packages.mod")
+	packages, err := lockfile.ParseGoLock("fixtures/go/indirect-packages.mod")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "github.com/BurntSushi/toml",
 			Version:   "1.0.0",
-			Ecosystem: parsers.GoEcosystem,
+			Ecosystem: lockfile.GoEcosystem,
 		},
 		{
 			Name:      "gopkg.in/yaml.v2",
 			Version:   "2.4.0",
-			Ecosystem: parsers.GoEcosystem,
+			Ecosystem: lockfile.GoEcosystem,
 		},
 		{
 			Name:      "github.com/mattn/go-colorable",
 			Version:   "0.1.9",
-			Ecosystem: parsers.GoEcosystem,
+			Ecosystem: lockfile.GoEcosystem,
 		},
 		{
 			Name:      "github.com/mattn/go-isatty",
 			Version:   "0.0.14",
-			Ecosystem: parsers.GoEcosystem,
+			Ecosystem: lockfile.GoEcosystem,
 		},
 		{
 			Name:      "golang.org/x/sys",
 			Version:   "0.0.0-20210630005230-0f9fa26af87c",
-			Ecosystem: parsers.GoEcosystem,
+			Ecosystem: lockfile.GoEcosystem,
 		},
 	})
 }
diff --git a/detector/parsers/parse-npm-lock-v1_test.go b/detector/lockfile/parse-npm-lock-v1_test.go
similarity index 54%
rename from detector/parsers/parse-npm-lock-v1_test.go
rename to detector/lockfile/parse-npm-lock-v1_test.go
index 5cd8826..3115516 100644
--- a/detector/parsers/parse-npm-lock-v1_test.go
+++ b/detector/lockfile/parse-npm-lock-v1_test.go
@@ -1,54 +1,54 @@
-package parsers_test
+package lockfile_test
 
 import (
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"testing"
 )
 
 func TestParseNpmLock_v1_FileDoesNotExist(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/does-not-exist")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/does-not-exist")
 
 	expectErrContaining(t, err, "could not read")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseNpmLock_v1_InvalidJson(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/not-json.txt")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/not-json.txt")
 
 	expectErrContaining(t, err, "could not parse")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseNpmLock_v1_NoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/empty.v1.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/empty.v1.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseNpmLock_v1_OnePackage(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/one-package.v1.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/one-package.v1.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "wrappy",
 			Version:   "1.0.2",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 	})
 }
@@ -56,17 +56,17 @@ func TestParseNpmLock_v1_OnePackage(t *testing.T) {
 func TestParseNpmLock_v1_OnePackageDev(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/one-package-dev.v1.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/one-package-dev.v1.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "wrappy",
 			Version:   "1.0.2",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 	})
 }
@@ -74,22 +74,22 @@ func TestParseNpmLock_v1_OnePackageDev(t *testing.T) {
 func TestParseNpmLock_v1_TwoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/two-packages.v1.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/two-packages.v1.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "wrappy",
 			Version:   "1.0.2",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "supports-color",
 			Version:   "5.5.0",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 	})
 }
@@ -97,22 +97,22 @@ func TestParseNpmLock_v1_TwoPackages(t *testing.T) {
 func TestParseNpmLock_v1_ScopedPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/scoped-packages.v1.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/scoped-packages.v1.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "wrappy",
 			Version:   "1.0.2",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "@babel/code-frame",
 			Version:   "7.0.0",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 	})
 }
@@ -120,37 +120,37 @@ func TestParseNpmLock_v1_ScopedPackages(t *testing.T) {
 func TestParseNpmLock_v1_NestedDependencies(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/nested-dependencies.v1.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/nested-dependencies.v1.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "postcss",
 			Version:   "6.0.23",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "postcss",
 			Version:   "7.0.16",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "postcss-calc",
 			Version:   "7.0.1",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "supports-color",
 			Version:   "6.1.0",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "supports-color",
 			Version:   "5.5.0",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 	})
 }
@@ -158,7 +158,7 @@ func TestParseNpmLock_v1_NestedDependencies(t *testing.T) {
 func TestParseNpmLock_v1_NestedDependenciesDup(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/nested-dependencies-dup.v1.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/nested-dependencies-dup.v1.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
@@ -169,21 +169,21 @@ func TestParseNpmLock_v1_NestedDependenciesDup(t *testing.T) {
 		t.Errorf("Expected to get two packages, but got %d", len(packages))
 	}
 
-	expectPackage(t, packages, parsers.PackageDetails{
+	expectPackage(t, packages, lockfile.PackageDetails{
 		Name:      "supports-color",
 		Version:   "6.1.0",
-		Ecosystem: parsers.NpmEcosystem,
+		Ecosystem: lockfile.NpmEcosystem,
 	})
 
-	expectPackage(t, packages, parsers.PackageDetails{
+	expectPackage(t, packages, lockfile.PackageDetails{
 		Name:      "supports-color",
 		Version:   "5.5.0",
-		Ecosystem: parsers.NpmEcosystem,
+		Ecosystem: lockfile.NpmEcosystem,
 	})
 
-	expectPackage(t, packages, parsers.PackageDetails{
+	expectPackage(t, packages, lockfile.PackageDetails{
 		Name:      "supports-color",
 		Version:   "2.0.0",
-		Ecosystem: parsers.NpmEcosystem,
+		Ecosystem: lockfile.NpmEcosystem,
 	})
 }
diff --git a/detector/parsers/parse-npm-lock-v2_test.go b/detector/lockfile/parse-npm-lock-v2_test.go
similarity index 54%
rename from detector/parsers/parse-npm-lock-v2_test.go
rename to detector/lockfile/parse-npm-lock-v2_test.go
index 1417822..1d400da 100644
--- a/detector/parsers/parse-npm-lock-v2_test.go
+++ b/detector/lockfile/parse-npm-lock-v2_test.go
@@ -1,54 +1,54 @@
-package parsers_test
+package lockfile_test
 
 import (
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"testing"
 )
 
 func TestParseNpmLock_v2_FileDoesNotExist(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/does-not-exist")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/does-not-exist")
 
 	expectErrContaining(t, err, "could not read")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseNpmLock_v2_InvalidJson(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/not-json.txt")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/not-json.txt")
 
 	expectErrContaining(t, err, "could not parse")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseNpmLock_v2_NoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/empty.v2.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/empty.v2.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseNpmLock_v2_OnePackage(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/one-package.v2.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/one-package.v2.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "wrappy",
 			Version:   "1.0.2",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 	})
 }
@@ -56,17 +56,17 @@ func TestParseNpmLock_v2_OnePackage(t *testing.T) {
 func TestParseNpmLock_v2_OnePackageDev(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/one-package-dev.v2.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/one-package-dev.v2.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "wrappy",
 			Version:   "1.0.2",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 	})
 }
@@ -74,22 +74,22 @@ func TestParseNpmLock_v2_OnePackageDev(t *testing.T) {
 func TestParseNpmLock_v2_TwoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/two-packages.v2.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/two-packages.v2.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "wrappy",
 			Version:   "1.0.2",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "supports-color",
 			Version:   "5.5.0",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 	})
 }
@@ -97,22 +97,22 @@ func TestParseNpmLock_v2_TwoPackages(t *testing.T) {
 func TestParseNpmLock_v2_ScopedPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/scoped-packages.v2.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/scoped-packages.v2.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "wrappy",
 			Version:   "1.0.2",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "@babel/code-frame",
 			Version:   "7.0.0",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 	})
 }
@@ -120,37 +120,37 @@ func TestParseNpmLock_v2_ScopedPackages(t *testing.T) {
 func TestParseNpmLock_v2_NestedDependencies(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/nested-dependencies.v2.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/nested-dependencies.v2.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "postcss",
 			Version:   "6.0.23",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "postcss",
 			Version:   "7.0.16",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "postcss-calc",
 			Version:   "7.0.1",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "supports-color",
 			Version:   "6.1.0",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "supports-color",
 			Version:   "5.5.0",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 	})
 }
@@ -158,22 +158,22 @@ func TestParseNpmLock_v2_NestedDependencies(t *testing.T) {
 func TestParseNpmLock_v2_NestedDependenciesDup(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseNpmLock("fixtures/npm/nested-dependencies-dup.v2.json")
+	packages, err := lockfile.ParseNpmLock("fixtures/npm/nested-dependencies-dup.v2.json")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "supports-color",
 			Version:   "6.1.0",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 		{
 			Name:      "supports-color",
 			Version:   "2.0.0",
-			Ecosystem: parsers.NpmEcosystem,
+			Ecosystem: lockfile.NpmEcosystem,
 		},
 	})
 }
diff --git a/detector/parsers/parse-pnpm-lock_test.go b/detector/lockfile/parse-pnpm-lock_test.go
similarity index 56%
rename from detector/parsers/parse-pnpm-lock_test.go
rename to detector/lockfile/parse-pnpm-lock_test.go
index 45eba8b..7e251b7 100644
--- a/detector/parsers/parse-pnpm-lock_test.go
+++ b/detector/lockfile/parse-pnpm-lock_test.go
@@ -1,54 +1,54 @@
-package parsers_test
+package lockfile_test
 
 import (
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"testing"
 )
 
 func TestParsePnpmLock_FileDoesNotExist(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParsePnpmLock("fixtures/pnpm/does-not-exist")
+	packages, err := lockfile.ParsePnpmLock("fixtures/pnpm/does-not-exist")
 
 	expectErrContaining(t, err, "could not read")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParsePnpmLock_InvalidYaml(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParsePnpmLock("fixtures/pnpm/not-yaml.txt")
+	packages, err := lockfile.ParsePnpmLock("fixtures/pnpm/not-yaml.txt")
 
 	expectErrContaining(t, err, "could not parse")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParsePnpmLock_NoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParsePnpmLock("fixtures/pnpm/empty.yaml")
+	packages, err := lockfile.ParsePnpmLock("fixtures/pnpm/empty.yaml")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParsePnpmLock_OnePackage(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParsePnpmLock("fixtures/pnpm/one-package.yaml")
+	packages, err := lockfile.ParsePnpmLock("fixtures/pnpm/one-package.yaml")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "acorn",
 			Version:   "8.7.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 	})
 }
@@ -56,17 +56,17 @@ func TestParsePnpmLock_OnePackage(t *testing.T) {
 func TestParsePnpmLock_OnePackageDev(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParsePnpmLock("fixtures/pnpm/one-package-dev.yaml")
+	packages, err := lockfile.ParsePnpmLock("fixtures/pnpm/one-package-dev.yaml")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "acorn",
 			Version:   "8.7.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 	})
 }
@@ -74,17 +74,17 @@ func TestParsePnpmLock_OnePackageDev(t *testing.T) {
 func TestParsePnpmLock_ScopedPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParsePnpmLock("fixtures/pnpm/scoped-packages.yaml")
+	packages, err := lockfile.ParsePnpmLock("fixtures/pnpm/scoped-packages.yaml")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "@typescript-eslint/types",
 			Version:   "5.13.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 	})
 }
@@ -92,22 +92,22 @@ func TestParsePnpmLock_ScopedPackages(t *testing.T) {
 func TestParsePnpmLock_PeerDependencies(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParsePnpmLock("fixtures/pnpm/peer-dependencies.yaml")
+	packages, err := lockfile.ParsePnpmLock("fixtures/pnpm/peer-dependencies.yaml")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "acorn-jsx",
 			Version:   "5.3.2",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "acorn",
 			Version:   "8.7.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 	})
 }
@@ -115,57 +115,57 @@ func TestParsePnpmLock_PeerDependencies(t *testing.T) {
 func TestParsePnpmLock_PeerDependenciesAdvanced(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParsePnpmLock("fixtures/pnpm/peer-dependencies-advanced.yaml")
+	packages, err := lockfile.ParsePnpmLock("fixtures/pnpm/peer-dependencies-advanced.yaml")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "@typescript-eslint/eslint-plugin",
 			Version:   "5.13.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "@typescript-eslint/parser",
 			Version:   "5.13.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "@typescript-eslint/type-utils",
 			Version:   "5.13.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "@typescript-eslint/types",
 			Version:   "5.13.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "@typescript-eslint/typescript-estree",
 			Version:   "5.13.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "@typescript-eslint/utils",
 			Version:   "5.13.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "eslint-utils",
 			Version:   "3.0.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "eslint",
 			Version:   "8.10.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "tsutils",
 			Version:   "3.21.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 	})
 }
@@ -173,82 +173,82 @@ func TestParsePnpmLock_PeerDependenciesAdvanced(t *testing.T) {
 func TestParsePnpmLock_MultiplePackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParsePnpmLock("fixtures/pnpm/multiple-packages.yaml")
+	packages, err := lockfile.ParsePnpmLock("fixtures/pnpm/multiple-packages.yaml")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "aws-sdk",
 			Version:   "2.1087.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "base64-js",
 			Version:   "1.5.1",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "buffer",
 			Version:   "4.9.2",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "events",
 			Version:   "1.1.1",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "ieee754",
 			Version:   "1.1.13",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "isarray",
 			Version:   "1.0.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "jmespath",
 			Version:   "0.16.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "punycode",
 			Version:   "1.3.2",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "querystring",
 			Version:   "0.2.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "sax",
 			Version:   "1.2.1",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "url",
 			Version:   "0.10.3",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "uuid",
 			Version:   "3.3.2",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "xml2js",
 			Version:   "0.4.19",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "xmlbuilder",
 			Version:   "9.0.7",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 	})
 }
@@ -256,27 +256,27 @@ func TestParsePnpmLock_MultiplePackages(t *testing.T) {
 func TestParsePnpmLock_MultipleVersions(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParsePnpmLock("fixtures/pnpm/multiple-versions.yaml")
+	packages, err := lockfile.ParsePnpmLock("fixtures/pnpm/multiple-versions.yaml")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "uuid",
 			Version:   "3.3.2",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "uuid",
 			Version:   "8.3.2",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "xmlbuilder",
 			Version:   "9.0.7",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 	})
 }
@@ -284,47 +284,47 @@ func TestParsePnpmLock_MultipleVersions(t *testing.T) {
 func TestParsePnpmLock_Exotic(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParsePnpmLock("fixtures/pnpm/exotic.yaml")
+	packages, err := lockfile.ParsePnpmLock("fixtures/pnpm/exotic.yaml")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "foo",
 			Version:   "1.0.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "@foo/bar",
 			Version:   "1.0.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "foo",
 			Version:   "1.1.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "@foo/bar",
 			Version:   "1.1.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "foo",
 			Version:   "1.2.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "foo",
 			Version:   "1.3.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 		{
 			Name:      "foo",
 			Version:   "1.4.0",
-			Ecosystem: parsers.PnpmEcosystem,
+			Ecosystem: lockfile.PnpmEcosystem,
 		},
 	})
 }
diff --git a/detector/parsers/parse-requirements-txt_test.go b/detector/lockfile/parse-requirements-txt_test.go
similarity index 56%
rename from detector/parsers/parse-requirements-txt_test.go
rename to detector/lockfile/parse-requirements-txt_test.go
index eae8ce0..628275d 100644
--- a/detector/parsers/parse-requirements-txt_test.go
+++ b/detector/lockfile/parse-requirements-txt_test.go
@@ -1,57 +1,57 @@
-package parsers_test
+package lockfile_test
 
 import (
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"testing"
 )
 
 func TestParseRequirementsTxt_FileDoesNotExist(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseRequirementsTxt("fixtures/pip/does-not-exist")
+	packages, err := lockfile.ParseRequirementsTxt("fixtures/pip/does-not-exist")
 
 	expectErrContaining(t, err, "could not open")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseRequirementsTxt_Empty(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseRequirementsTxt("fixtures/pip/empty.txt")
+	packages, err := lockfile.ParseRequirementsTxt("fixtures/pip/empty.txt")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseRequirementsTxt_CommentsOnly(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseRequirementsTxt("fixtures/pip/only-comments.txt")
+	packages, err := lockfile.ParseRequirementsTxt("fixtures/pip/only-comments.txt")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestParseRequirementsTxt_OneRequirementUnconstrained(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseRequirementsTxt("fixtures/pip/one-requirement-unconstrained.txt")
+	packages, err := lockfile.ParseRequirementsTxt("fixtures/pip/one-requirement-unconstrained.txt")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "flask",
 			Version:   "0.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 	})
 }
@@ -59,17 +59,17 @@ func TestParseRequirementsTxt_OneRequirementUnconstrained(t *testing.T) {
 func TestParseRequirementsTxt_OneRequirementConstrained(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseRequirementsTxt("fixtures/pip/one-requirement-constrained.txt")
+	packages, err := lockfile.ParseRequirementsTxt("fixtures/pip/one-requirement-constrained.txt")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "django",
 			Version:   "2.2.24",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 	})
 }
@@ -77,77 +77,77 @@ func TestParseRequirementsTxt_OneRequirementConstrained(t *testing.T) {
 func TestParseRequirementsTxt_MultipleRequirementsConstrained(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseRequirementsTxt("fixtures/pip/multiple-requirements-constrained.txt")
+	packages, err := lockfile.ParseRequirementsTxt("fixtures/pip/multiple-requirements-constrained.txt")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "astroid",
 			Version:   "2.5.1",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "beautifulsoup4",
 			Version:   "4.9.3",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "boto3",
 			Version:   "1.17.19",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "botocore",
 			Version:   "1.20.19",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "certifi",
 			Version:   "2020.12.5",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "chardet",
 			Version:   "4.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "circus",
 			Version:   "0.17.1",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "click",
 			Version:   "7.1.2",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "django-debug-toolbar",
 			Version:   "3.2.1",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "django-filter",
 			Version:   "2.4.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "django-nose",
 			Version:   "1.4.7",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "django-storages",
 			Version:   "1.11.1",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "django",
 			Version:   "2.2.24",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 	})
 }
@@ -155,52 +155,52 @@ func TestParseRequirementsTxt_MultipleRequirementsConstrained(t *testing.T) {
 func TestParseRequirementsTxt_MultipleRequirementsMixed(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseRequirementsTxt("fixtures/pip/multiple-requirements-mixed.txt")
+	packages, err := lockfile.ParseRequirementsTxt("fixtures/pip/multiple-requirements-mixed.txt")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "flask",
 			Version:   "0.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "flask-cors",
 			Version:   "0.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "pandas",
 			Version:   "0.23.4",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "numpy",
 			Version:   "1.16.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "scikit-learn",
 			Version:   "0.20.1",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "sklearn",
 			Version:   "0.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "requests",
 			Version:   "0.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "gevent",
 			Version:   "0.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 	})
 }
@@ -208,57 +208,57 @@ func TestParseRequirementsTxt_MultipleRequirementsMixed(t *testing.T) {
 func TestParseRequirementsTxt_FileFormatExample(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseRequirementsTxt("fixtures/pip/file-format-example.txt")
+	packages, err := lockfile.ParseRequirementsTxt("fixtures/pip/file-format-example.txt")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "pytest",
 			Version:   "0.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "pytest-cov",
 			Version:   "0.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "beautifulsoup4",
 			Version:   "0.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "docopt",
 			Version:   "0.6.1",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "keyring",
 			Version:   "4.1.1",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "coverage",
 			Version:   "0.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "mopidy-dirble",
 			Version:   "1.1",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "rejected",
 			Version:   "0.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "green",
 			Version:   "0.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 	})
 }
@@ -266,17 +266,17 @@ func TestParseRequirementsTxt_FileFormatExample(t *testing.T) {
 func TestParseRequirementsTxt_WithAddedSupport(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseRequirementsTxt("fixtures/pip/with-added-support.txt")
+	packages, err := lockfile.ParseRequirementsTxt("fixtures/pip/with-added-support.txt")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "twisted",
 			Version:   "20.3.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 	})
 }
@@ -284,27 +284,27 @@ func TestParseRequirementsTxt_WithAddedSupport(t *testing.T) {
 func TestParseRequirementsTxt_NonNormalizedNames(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseRequirementsTxt("fixtures/pip/non-normalized-names.txt")
+	packages, err := lockfile.ParseRequirementsTxt("fixtures/pip/non-normalized-names.txt")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "zope-interface",
 			Version:   "5.4.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "pillow",
 			Version:   "1.0.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 		{
 			Name:      "twisted",
 			Version:   "20.3.0",
-			Ecosystem: parsers.PipEcosystem,
+			Ecosystem: lockfile.PipEcosystem,
 		},
 	})
 }
diff --git a/detector/parsers/parse-yarn-lock-v1_test.go b/detector/lockfile/parse-yarn-lock-v1_test.go
similarity index 55%
rename from detector/parsers/parse-yarn-lock-v1_test.go
rename to detector/lockfile/parse-yarn-lock-v1_test.go
index 043157a..c5039d1 100644
--- a/detector/parsers/parse-yarn-lock-v1_test.go
+++ b/detector/lockfile/parse-yarn-lock-v1_test.go
@@ -1,45 +1,45 @@
-package parsers_test
+package lockfile_test
 
 import (
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"testing"
 )
 
 func TestParseYarnLock_v1_FileDoesNotExist(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/does-not-exist")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/does-not-exist")
 
 	expectErrContaining(t, err, "could not open")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestYarnLock_v1_NoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/empty.v1.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/empty.v1.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestYarnLock_v1_OnePackage(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/one-package.v1.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/one-package.v1.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "balanced-match",
 			Version:   "1.0.2",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 	})
 }
@@ -47,22 +47,22 @@ func TestYarnLock_v1_OnePackage(t *testing.T) {
 func TestYarnLock_v1_TwoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/two-packages.v1.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/two-packages.v1.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "concat-stream",
 			Version:   "1.6.2",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "concat-map",
 			Version:   "0.0.1",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 	})
 }
@@ -70,32 +70,32 @@ func TestYarnLock_v1_TwoPackages(t *testing.T) {
 func TestYarnLock_v1_MultipleVersions(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/multiple-versions.v1.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/multiple-versions.v1.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "define-properties",
 			Version:   "1.1.3",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "define-property",
 			Version:   "0.2.5",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "define-property",
 			Version:   "1.0.0",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "define-property",
 			Version:   "2.0.2",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 	})
 }
@@ -103,22 +103,22 @@ func TestYarnLock_v1_MultipleVersions(t *testing.T) {
 func TestYarnLock_v1_MultipleConstraints(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/multiple-constraints.v1.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/multiple-constraints.v1.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "@babel/code-frame",
 			Version:   "7.12.13",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "domelementtype",
 			Version:   "1.3.1",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 	})
 }
@@ -126,22 +126,22 @@ func TestYarnLock_v1_MultipleConstraints(t *testing.T) {
 func TestYarnLock_v1_ScopedPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/scoped-packages.v1.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/scoped-packages.v1.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "@babel/code-frame",
 			Version:   "7.12.11",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "@babel/compat-data",
 			Version:   "7.14.0",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 	})
 }
@@ -149,37 +149,37 @@ func TestYarnLock_v1_ScopedPackages(t *testing.T) {
 func TestYarnLock_v1_VersionsWithBuildString(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/versions-with-build-strings.v1.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/versions-with-build-strings.v1.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "css-tree",
 			Version:   "1.0.0-alpha.37",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "gensync",
 			Version:   "1.0.0-beta.2",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "node-fetch",
 			Version:   "3.0.0-beta.9",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "resolve",
 			Version:   "1.20.0",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "resolve",
 			Version:   "2.0.0-next.3",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 	})
 }
diff --git a/detector/parsers/parse-yarn-lock-v2_test.go b/detector/lockfile/parse-yarn-lock-v2_test.go
similarity index 54%
rename from detector/parsers/parse-yarn-lock-v2_test.go
rename to detector/lockfile/parse-yarn-lock-v2_test.go
index 7928268..dff507c 100644
--- a/detector/parsers/parse-yarn-lock-v2_test.go
+++ b/detector/lockfile/parse-yarn-lock-v2_test.go
@@ -1,45 +1,45 @@
-package parsers_test
+package lockfile_test
 
 import (
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"testing"
 )
 
 func TestParseYarnLock_v2_FileDoesNotExist(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/does-not-exist")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/does-not-exist")
 
 	expectErrContaining(t, err, "could not open")
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestYarnLock_v2_NoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/empty.v2.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/empty.v2.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{})
+	expectPackages(t, packages, []lockfile.PackageDetails{})
 }
 
 func TestYarnLock_v2_OnePackage(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/one-package.v2.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/one-package.v2.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "balanced-match",
 			Version:   "1.0.2",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 	})
 }
@@ -47,22 +47,22 @@ func TestYarnLock_v2_OnePackage(t *testing.T) {
 func TestYarnLock_v2_TwoPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/two-packages.v2.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/two-packages.v2.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "compare-func",
 			Version:   "2.0.0",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "concat-map",
 			Version:   "0.0.1",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 	})
 }
@@ -70,27 +70,27 @@ func TestYarnLock_v2_TwoPackages(t *testing.T) {
 func TestYarnLock_v2_MultipleVersions(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/multiple-versions.v2.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/multiple-versions.v2.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "debug",
 			Version:   "4.3.3",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "debug",
 			Version:   "2.6.9",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "debug",
 			Version:   "3.2.7",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 	})
 }
@@ -98,27 +98,27 @@ func TestYarnLock_v2_MultipleVersions(t *testing.T) {
 func TestYarnLock_v2_ScopedPackages(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/scoped-packages.v2.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/scoped-packages.v2.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "@babel/cli",
 			Version:   "7.16.8",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "@babel/code-frame",
 			Version:   "7.16.7",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "@babel/compat-data",
 			Version:   "7.16.8",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 	})
 }
@@ -126,27 +126,27 @@ func TestYarnLock_v2_ScopedPackages(t *testing.T) {
 func TestYarnLock_v2_VersionsWithBuildString(t *testing.T) {
 	t.Parallel()
 
-	packages, err := parsers.ParseYarnLock("fixtures/yarn/versions-with-build-strings.v2.lock")
+	packages, err := lockfile.ParseYarnLock("fixtures/yarn/versions-with-build-strings.v2.lock")
 
 	if err != nil {
 		t.Errorf("Got unexpected error: %v", err)
 	}
 
-	expectPackages(t, packages, []parsers.PackageDetails{
+	expectPackages(t, packages, []lockfile.PackageDetails{
 		{
 			Name:      "@nicolo-ribaudo/chokidar-2",
 			Version:   "2.1.8-no-fsevents.3",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "gensync",
 			Version:   "1.0.0-beta.2",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 		{
 			Name:      "eslint-plugin-jest",
 			Version:   "0.0.0-use.local",
-			Ecosystem: parsers.YarnEcosystem,
+			Ecosystem: lockfile.YarnEcosystem,
 		},
 	})
 }
diff --git a/detector/parsers/parsers_test.go b/detector/lockfile/parsers_test.go
similarity index 78%
rename from detector/parsers/parsers_test.go
rename to detector/lockfile/parsers_test.go
index 7bf2c92..797b15f 100644
--- a/detector/parsers/parsers_test.go
+++ b/detector/lockfile/parsers_test.go
@@ -1,9 +1,9 @@
-package parsers_test
+package lockfile_test
 
 import (
 	"errors"
 	"io/ioutil"
-	"osv-detector/detector/parsers"
+	"osv-detector/detector/lockfile"
 	"strings"
 	"testing"
 )
@@ -51,11 +51,11 @@ func TestTryParse_FindsExpectedParsers(t *testing.T) {
 
 	count := 0
 
-	for _, lockfile := range lockfiles {
-		_, err := parsers.TryParse("/path/to/my/"+lockfile, "")
+	for _, file := range lockfiles {
+		_, err := lockfile.TryParse("/path/to/my/"+file, "")
 
-		if errors.Is(err, parsers.ErrParserNotFound) {
-			t.Errorf("No parser was found for %s", lockfile)
+		if errors.Is(err, lockfile.ErrParserNotFound) {
+			t.Errorf("No parser was found for %s", file)
 		}
 
 		count++