resolve-package-versions

Resolve version ranges in a dependency stream using an npm-compatible registry

npm install resolve-package-versions
2 downloads in the last week
4 downloads in the last month

resolve-package-versions

Synopsis

var resolvePackageVersions = require('resolve-package-versions')

var resolver = resolvePackageVersions();
var dependency = {
  name: 'request',
  versionRange: '2.x'
};

resolver.resolve(dependency, function (err) {
  console.log(dependency.version) //=> 2.21.0
})

// Or use as a through stream

var createDependencyStream = require('create-dependency-stream');
var dependencies = createDependencyStream('/path/to/package.json');
dependencies.pipe(resolver);

Description

This package uses a remote registry to determine the version of a package that will satisfy a requested version range.

License

MIT

npm loves you