yarn-lock-0.6.2: Represent and parse yarn.lock files

MaintainerProfpatsch
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

Yarn.Lock.Types

Description

 
Synopsis

Documentation

type Lockfile = MKMap PackageKey Package Source #

Yarn lockfile.

It is a multi-keyed map (each value can be referenced by multiple keys). This is achieved by using an intermediate key ik.

Attention: Might be changed to a newtype in a future release.

lockfileIkProxy :: Proxy Int Source #

Proxy type for our MKMap intermediate key

data PackageKey Source #

Key that indexes package for a specific version.

Constructors

PackageKey 

Fields

data PackageKeyName Source #

The name of a package. They can be scoped, see | https://docs.npmjs.com/misc/scope for an explanation.

Constructors

SimplePackageKey Text

just a package name

ScopedPackageKey Text Text

a scope and a package name (e.g. @types/foobar)

parsePackageKeyName :: Text -> Maybe PackageKeyName Source #

Try to parse a string into a package key name (scoped or not).

data Keyed a Source #

Something with a list of PackageKeys pointing to it.

Constructors

Keyed (NonEmpty PackageKey) a 
Instances
Functor Keyed Source # 
Instance details

Defined in Yarn.Lock.Types

Methods

fmap :: (a -> b) -> Keyed a -> Keyed b #

(<$) :: a -> Keyed b -> Keyed a #

Eq a => Eq (Keyed a) Source # 
Instance details

Defined in Yarn.Lock.Types

Methods

(==) :: Keyed a -> Keyed a -> Bool #

(/=) :: Keyed a -> Keyed a -> Bool #

Ord a => Ord (Keyed a) Source # 
Instance details

Defined in Yarn.Lock.Types

Methods

compare :: Keyed a -> Keyed a -> Ordering #

(<) :: Keyed a -> Keyed a -> Bool #

(<=) :: Keyed a -> Keyed a -> Bool #

(>) :: Keyed a -> Keyed a -> Bool #

(>=) :: Keyed a -> Keyed a -> Bool #

max :: Keyed a -> Keyed a -> Keyed a #

min :: Keyed a -> Keyed a -> Keyed a #

Show a => Show (Keyed a) Source # 
Instance details

Defined in Yarn.Lock.Types

Methods

showsPrec :: Int -> Keyed a -> ShowS #

show :: Keyed a -> String #

showList :: [Keyed a] -> ShowS #

data Package Source #

The actual npm package with dependencies and a way to download.

Constructors

Package 

Fields

Instances
Eq Package Source # 
Instance details

Defined in Yarn.Lock.Types

Methods

(==) :: Package -> Package -> Bool #

(/=) :: Package -> Package -> Bool #

Show Package Source # 
Instance details

Defined in Yarn.Lock.Types

data Remote Source #

Information on where to download the package.

Constructors

FileRemote 

Fields

FileRemoteNoIntegrity 

Fields

GitRemote 

Fields

FileLocal 

Fields

FileLocalNoIntegrity 

Fields

Instances
Eq Remote Source # 
Instance details

Defined in Yarn.Lock.Types

Methods

(==) :: Remote -> Remote -> Bool #

(/=) :: Remote -> Remote -> Bool #

Show Remote Source # 
Instance details

Defined in Yarn.Lock.Types