Skip to content

Commit

Permalink
remove lockfileVersion from pnpm-lock tactic
Browse files Browse the repository at this point in the history
  • Loading branch information
saramaebee committed Jul 12, 2023
1 parent 7101b27 commit d2309e8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Strategy/Node/Pnpm/PnpmLock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,13 @@ import Path (Abs, File, Path)
-- - [pnpm](https://pnpm.io/)
-- - [pnpm-lockfile](https:/pnpm/pnpm/blob/5cfd6d01946edcce86f62580bddc788d02f93ed6/packages/lockfile-types/src/index.ts)
data PnpmLockfile = PnpmLockfile
{ lockFileVersion :: Float
, importers :: Map Text ProjectMap
{ importers :: Map Text ProjectMap
, packages :: Map Text PackageData
}
deriving (Show, Eq, Ord)

instance FromJSON PnpmLockfile where
parseJSON = Yaml.withObject "pnpm-lock content" $ \obj -> do
lockFileVersion <- obj .: "lockfileVersion"
importers <- obj .:? "importers" .!= mempty
packages <- obj .:? "packages" .!= mempty

Expand All @@ -109,7 +107,7 @@ instance FromJSON PnpmLockfile where
then Map.insert "." virtualRootWs importers
else importers

pure $ PnpmLockfile lockFileVersion refinedImporters packages
pure $ PnpmLockfile refinedImporters packages

data ProjectMap = ProjectMap
{ directDependencies :: Map Text Text
Expand Down

0 comments on commit d2309e8

Please sign in to comment.