yarn-lock-0.6.4: Represent and parse yarn.lock files
MaintainerProfpatsch
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Yarn.Lock.File

Contents

Description

After parsing yarn.lock files in Parse, you want to convert the AST to something with more information and ultimately get a Lockfile.

yarn.lock files don’t follow a structured approach (like for example sum types), so information like e.g. the remote type have to be inferred frome AST values.

Synopsis

Documentation

fromPackages :: [Keyed Package] -> Lockfile Source #

Press a list of packages into the lockfile structure.

It’s a dumb conversion, you should probably apply the decycle function afterwards.

astToPackage :: PackageFields -> Either (NonEmpty ConversionError) Package Source #

Parse an AST PackageFields to a Package, which has the needed fields resolved.

Errors

data ConversionError Source #

Possible errors when converting from AST.

Constructors

MissingField Text

field is missing

WrongType

this field has the wrong type

Fields

UnknownRemoteType

the remote (e.g. git, tar archive) could not be determined

Instances

Instances details
Eq ConversionError Source # 
Instance details

Defined in Yarn.Lock.File

Show ConversionError Source # 
Instance details

Defined in Yarn.Lock.File