| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.Npm.Project
Contents
Description
Project npm metadata into the shared package model. Version-map keys identify artifacts independently of their filenames.
Synopsis
- versionListParser :: Limits -> Parser VersionListItem
- projectVersionEntryResult :: PackageName -> Version -> Maybe UTCTime -> Value -> Either String PackageDetails
- projectName :: Text -> Either ParseError PackageName
- projectScope :: Text -> Either ParseError Scope
- npmNameLeadChars :: [Char]
Projection
versionListParser :: Limits -> Parser VersionListItem Source #
Recognise usable versions with only VersionEntry's discriminating fields and return sorted identifiers.
projectVersionEntryResult :: PackageName -> Version -> Maybe UTCTime -> Value -> Either String PackageDetails Source #
Project a compact release while retaining the decoder reason for the invalid-entry report.
Name validation
projectName :: Text -> Either ParseError PackageName Source #
Parse an npm package name into the domain PackageName: the one splitter every npm entry
point reads a name through. A bare @foo is a malformed scoped name, never an unscoped one.
projectScope :: Text -> Either ParseError Scope Source #
Parse an npm scope, with or without its leading @ (@myorg and myorg both give the
scope myorg).
npmNameLeadChars :: [Char] Source #
Every character an npm package name may begin with, sieved out of ASCII by the grammar above so the store walk's bucket alphabet cannot drift from what this module parses.