1.0.2 • Published 5 years ago

get-all-dependencies v1.0.2

Weekly downloads
55
License
MIT
Repository
github
Last release
5 years ago

get-all-dependencies

TODO: description

Usage

const getAllDependencies = require('get-all-dependencies');

// TODO: DEMONSTRATE API

Documentation

Table of Contents

reduceDependencies

reduceDependencies takes a package name and a dependency hash map to give you an in depth dependency chain (upstream or downstream dependent on the hash)

Parameters

  • pkgName String A package name in th dependency map
  • dependencyMap Object A dependency map with keys of pkgNames with value as arrays of pkgNames

Returns Array A reduced array of pkgNames

getAllDependencies

getDependencies takes a list of packages, a list of localPackages and a logger to give you a hashMap of packages with upstream and downstream dependencies

Parameters

  • pkgNames Array An array of package names from a monorepo
  • localPackages Array A list of all the package.jsons in the same monorepo
  • logger Object An option logger with the same methods as console
    • logger.logger (optional, default console)
    • logger.verbose

Returns Object A hashMap of key value pairs with downstream and upstream arrays {pkgName: String:{ upstream: Array, downstream: Array }}