You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
425 B

var log = require('npmlog')
var fetchPackageMetadata = require('../fetch-package-metadata')
function getLatestNpmVersion (cb) {
var tracker = log.newItem('getLatestNpmVersion', 1)
tracker.info('getLatestNpmVersion', 'Getting npm package information')
fetchPackageMetadata('npm@latest', '.', {fullMetadata: true}, function (e, d) {
tracker.finish()
cb(e, d.version)
})
}
module.exports = getLatestNpmVersion