yarn2nix-0.8.0: Convert yarn.lock files to nix expressions

Safe HaskellNone
LanguageHaskell2010

Distribution.Nodejs.Package

Contents

Description

They are documented on https://docs.npmjs.com/files/package.json and have a few gotchas. Luckily plain JSON, but the interpretation of certain fields is non-trivial (since they contain a lot of “sugar”).

Synopsis

Parsing package.json

newtype LoggingPackage Source #

Package with a potential bunch of parsing warnings. Note the FromJson instance.

Constructors

LoggingPackage 
Instances
FromJSON LoggingPackage Source #

See https://github.com/npm/normalize-package-data for normalization steps used by npm itself.

Instance details

Defined in Distribution.Nodejs.Package

decode :: ByteString -> Either Text LoggingPackage Source #

Convenience decoding function.

data Warning Source #

Possible warnings from parsing.

Constructors

WrongType 

Fields

PlainWarning Text 

formatWarning :: Warning -> Text Source #

Convert a package.json parsing warning to plain text.

package.json data

data Bin Source #

The package’s executable files.

Constructors

BinFiles (HashMap Text FilePath)

map of files from name to their file path (relative to package path)

BinFolder FilePath

a folder containing all executable files of the project (also relative)

Instances
Eq Bin Source # 
Instance details

Defined in Distribution.Nodejs.Package

Methods

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

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

Show Bin Source # 
Instance details

Defined in Distribution.Nodejs.Package

Methods

showsPrec :: Int -> Bin -> ShowS #

show :: Bin -> String #

showList :: [Bin] -> ShowS #

data Man Source #

The package’s manual files.

Constructors

ManFiles (HashMap Text FilePath)

map of files from name to their file path (relative to package path)

Instances
Eq Man Source # 
Instance details

Defined in Distribution.Nodejs.Package

Methods

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

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

Show Man Source # 
Instance details

Defined in Distribution.Nodejs.Package

Methods

showsPrec :: Int -> Man -> ShowS #

show :: Man -> String #

showList :: [Man] -> ShowS #

type Dependencies = HashMap Text Text Source #

Dependencies of a package.