npm/libnpm-resolve-module-tree

Name: libnpm-resolve-module-tree

Owner: npm

Description: Given a set of dependencies return a fully realized logical tree using only the most recent package versions.

Created: 2018-01-06 00:36:09.0

Updated: 2018-01-06 00:40:01.0

Pushed: 2018-01-08 13:47:00.0

Homepage: null

Size: 20

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

resolve package tree

Given a set of dependencies return a fully realized logical tree using only the most recent package versions.

Optionally you may provide an existing tree and the nodes from that tree will be reused when they are available.

WIP
resolvePackageTree(deps, fetchManifestCB) ? Promise
resolvePackageTree(deps, existingTree, fetchManifestCB) ? Promise
t resolvePackageTree = require('libnpm-resolve-package-tree')

t npa = require('npm-package-arg')
t pacote = require('pacote')
tion fetchManifest (name, ver) {
cote.manifest(npa.resolve(name, range))


lvePackageTree({'lru-cache': '^4.0.0'}, fetchManifest).then(newTree => {
 tree.requires contains `lru-cache` and its dependencies


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.