Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

Commit

Permalink
Remove packageVersion from NpmPackageJson (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
jssblck authored Nov 10, 2021
1 parent 54808d4 commit 3bf3283
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Spectrometer Changelog

## v2.19.7

- Resolves a regression when parsing npm `package-lock.json` files that do not contain a `version` field ([#445](https://github.com/fossas/spectrometer/pull/445))

## v2.19.6

- Special cases scans with a single VSI only filter to skip other analysis strategies ([#407](https://github.com/fossas/spectrometer/pull/407))
Expand Down
2 changes: 0 additions & 2 deletions src/Strategy/Node/Npm/PackageLock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import Strategy.Node.PackageJson (FlatDeps (directDeps), NodePackage (pkgName),

data NpmPackageJson = NpmPackageJson
{ packageName :: Text
, packageVersion :: Text
, packageDependencies :: Map Text NpmDep
}
deriving (Eq, Ord, Show)
Expand All @@ -47,7 +46,6 @@ data NpmDep = NpmDep
instance FromJSON NpmPackageJson where
parseJSON = withObject "NpmPackageJson" $ \obj ->
NpmPackageJson <$> obj .: "name"
<*> obj .: "version"
<*> obj .: "dependencies"

instance FromJSON NpmDep where
Expand Down
1 change: 0 additions & 1 deletion test/Node/NpmLockSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ mockInput :: NpmPackageJson
mockInput =
NpmPackageJson
{ packageName = "example"
, packageVersion = "1.0.0"
, packageDependencies =
Map.fromList
[
Expand Down

0 comments on commit 3bf3283

Please sign in to comment.