Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
case 'patch':
type = color.green(type)
break
}
}
const changelog = `https://github.com/npm/cli/releases/tag/v${latest}`
notifier.notify({
message: `New ${type} version of ${pkg.name} available! ${
useColor ? color.red(old) : old
} ${useUnicode ? '→' : '->'} ${
useColor ? color.green(latest) : latest
}\n` +
`${
useColor ? color.yellow('Changelog:') : 'Changelog:'
} ${
useColor ? color.cyan(changelog) : changelog
}\n` +
`Run ${
useColor
? color.green(`npm install -g ${pkg.name}`)
: `npm i -g ${pkg.name}`
} to update!`
})
}
}
npm.commands[npm.command](npm.argv, function (err) {
// https://genius.com/Lin-manuel-miranda-your-obedient-servant-lyrics
if (
!err &&
npm.config.get('ham-it-up') &&
!npm.config.get('json') &&
!npm.config.get('parseable') &&
case 'patch':
type = color.green(type)
break
}
}
const changelog = `https://github.com/npm/cli/releases/tag/v${latest}`
notifier.notify({
message: `New ${type} version of ${pkg.name} available! ${
useColor ? color.red(old) : old
} ${useUnicode ? '→' : '->'} ${
useColor ? color.green(latest) : latest
}\n` +
`${
useColor ? color.yellow('Changelog:') : 'Changelog:'
} ${
useColor ? color.cyan(changelog) : changelog
}\n` +
`Run ${
useColor
? color.green(`npm install -g ${pkg.name}`)
: `npm i -g ${pkg.name}`
} to update!`
})
}
}
npm.commands[npm.command](npm.argv, function (err) {
// https://genius.com/Lin-manuel-miranda-your-obedient-servant-lyrics
if (
!err &&
npm.config.get('ham-it-up') &&
!npm.config.get('json') &&
!npm.config.get('parseable') &&
}
if (info.license.toLowerCase().trim() === 'proprietary') {
info.license = style.bright(color.red(info.license))
} else {
info.license = color.green(info.license)
}
console.log('')
console.log(
style.underline(style.bright(`${info.name}@${info.version}`)) +
' | ' + info.license +
' | deps: ' + (info.deps.length ? color.cyan(info.deps.length) : color.green('none')) +
' | versions: ' + info.versions
)
info.description && console.log(info.description)
if (info.repo || info.site) {
info.site && console.log(color.cyan(info.site))
}
const warningSign = unicode ? ' ⚠️ ' : '!!'
info.deprecated && console.log(
`\n${style.bright(color.red('DEPRECATED'))}${
warningSign
} - ${info.deprecated}`
)
if (info.keywords.length) {
console.log('')
console.log('keywords:', info.keywords.join(', '))
}
if (info.bins.length) {
console.log('')
tarball: color.cyan(manifest.dist.tarball),
shasum: color.yellow(manifest.dist.shasum),
integrity: manifest.dist.integrity && color.yellow(manifest.dist.integrity),
fileCount: manifest.dist.fileCount && color.yellow(manifest.dist.fileCount),
unpackedSize: unpackedSize && color.yellow(unpackedSize.value) + ' ' + unpackedSize.unit
}
if (info.license.toLowerCase().trim() === 'proprietary') {
info.license = style.bright(color.red(info.license))
} else {
info.license = color.green(info.license)
}
console.log('')
console.log(
style.underline(style.bright(`${info.name}@${info.version}`)) +
' | ' + info.license +
' | deps: ' + (info.deps.length ? color.cyan(info.deps.length) : color.green('none')) +
' | versions: ' + info.versions
)
info.description && console.log(info.description)
if (info.repo || info.site) {
info.site && console.log(color.cyan(info.site))
}
const warningSign = unicode ? ' ⚠️ ' : '!!'
info.deprecated && console.log(
`\n${style.bright(color.red('DEPRECATED'))}${
warningSign
} - ${info.deprecated}`
)
if (info.keywords.length) {
console.log('')
modified: packument.time ? color.yellow(relativeDate(packument.time[packument.version])) : undefined,
maintainers: (packument.maintainers || []).map((u) => unparsePerson({
name: color.yellow(u.name),
email: color.cyan(u.email)
})),
repo: (
manifest.bugs && (manifest.bugs.url || manifest.bugs)
) || (
manifest.repository && (manifest.repository.url || manifest.repository)
),
site: (
manifest.homepage && (manifest.homepage.url || manifest.homepage)
),
stars: color.yellow('' + packument.users ? Object.keys(packument.users || {}).length : 0),
tags,
tarball: color.cyan(manifest.dist.tarball),
shasum: color.yellow(manifest.dist.shasum),
integrity: manifest.dist.integrity && color.yellow(manifest.dist.integrity),
fileCount: manifest.dist.fileCount && color.yellow(manifest.dist.fileCount),
unpackedSize: unpackedSize && color.yellow(unpackedSize.value) + ' ' + unpackedSize.unit
}
if (info.license.toLowerCase().trim() === 'proprietary') {
info.license = style.bright(color.red(info.license))
} else {
info.license = color.green(info.license)
}
console.log('')
console.log(
style.underline(style.bright(`${info.name}@${info.version}`)) +
' | ' + info.license +
' | deps: ' + (info.deps.length ? color.cyan(info.deps.length) : color.green('none')) +
' | versions: ' + info.versions
var enabledPlugins = config.plugins && typeof config.plugins === 'object'
? allPlugins.filter(pluginIsEnabled)
: allPlugins;
var specs = { cpus: Object.keys(os.cpus()).length, platform: os.platform(), host: os.hostname() }
, v = process.versions
, plugins = enabledPlugins.map(colors.yellow).join(' | ');
var msgs = [
''
, styles.underline(colors.brightRed('replpad')) + colors.yellow(' v' + pkg.version)
, ''
, format(colors.cyan('node') + ' %s', colors.yellow('v' + v.node))
+ format(' | %s | %s cpus | %s platform', colors.green(specs.host), colors.green(specs.cpus), colors.green(specs.platform))
+ format(colors.cyan(' | v8') + ' %s | ' + colors.cyan('uv') + ' %s', colors.yellow('v' + v.v8), colors.yellow('v' + v.uv))
, ''
, 'plugins: ' + plugins
, ''
, 'If in doubt, enter ' + colors.yellow('.help')
, ''
];
module.exports = function (output) {
//msgs.forEach(function (msg) { log.print(msg); });
msgs.forEach(function (msg) { output.write(msg + '\n'); });
};
maintainers: (packument.maintainers || []).map((u) => unparsePerson({
name: color.yellow(u.name),
email: color.cyan(u.email)
})),
repo: (
function formatResult(result, diffopts) {
return format('%s %s', colors.cyan('=>'), diffValues({}, result, diffopts));
}
return config.plugins[x] === undefined || config.plugins[x] === true;
}
var enabledPlugins = config.plugins && typeof config.plugins === 'object'
? allPlugins.filter(pluginIsEnabled)
: allPlugins;
var specs = { cpus: Object.keys(os.cpus()).length, platform: os.platform(), host: os.hostname() }
, v = process.versions
, plugins = enabledPlugins.map(colors.yellow).join(' | ');
var msgs = [
''
, styles.underline(colors.brightRed('replpad')) + colors.yellow(' v' + pkg.version)
, ''
, format(colors.cyan('node') + ' %s', colors.yellow('v' + v.node))
+ format(' | %s | %s cpus | %s platform', colors.green(specs.host), colors.green(specs.cpus), colors.green(specs.platform))
+ format(colors.cyan(' | v8') + ' %s | ' + colors.cyan('uv') + ' %s', colors.yellow('v' + v.v8), colors.yellow('v' + v.uv))
, ''
, 'plugins: ' + plugins
, ''
, 'If in doubt, enter ' + colors.yellow('.help')
, ''
];
module.exports = function (output) {
//msgs.forEach(function (msg) { log.print(msg); });
msgs.forEach(function (msg) { output.write(msg + '\n'); });
};