Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getVersions (shop, callback) {
var path = require('path')
var pkgFile = path.resolve(shop.options.appDir, 'package.json')
try {
var pkg = require(pkgFile)
} catch (e) {
return callback(e)
}
require('latest-version')(pkg.name).then(function (latestVersion) {
exports.info = {
version: latestVersion
}
callback(null, pkg.name, pkg.version, latestVersion)
}).catch(function (err) {
console.log(err)
callback(err)
})
}
exports.filter = function (shop) {