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

MaintainerProfpatsch
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

Yarn.Lock.Helpers

Description

Freshly parsed Lockfiles are often not directly usable e.g. because they still can contain cycles. This module provides helpers for modifying them.

Synopsis

Documentation

decycle :: HasCallStack => Lockfile -> Lockfile Source #

Takes a Lockfile and removes dependency cycles.

Node packages often contain those and the yarn lockfile does not yet eliminate them, which may lead to infinite recursions.

Invariant: Every dependency entry in each package in the Lockfile *must* point to an existing key, otherwise the function crashes.