This commit is contained in:
2018-11-08 09:54:06 +01:00
parent 429a8d1098
commit 1622a30e05
4 changed files with 256 additions and 55 deletions

View File

@ -44,8 +44,8 @@ export class SmartUpdate {
}
let npmPackage = await this.getNpmPackageFromRegistry(npmnameArg);
if (!npmPackage) {
plugins.smartlog.defaultLogger.warn('failed to retrieve package information...');
plugins.smartlog.defaultLogger.info('npms.io might be down');
plugins.smartlog.defaultLogger.log('warn', 'failed to retrieve package information...');
plugins.smartlog.defaultLogger.log('info', 'npms.io might be down');
return;
}
newData.latestVersion = npmPackage.version;
@ -86,10 +86,12 @@ export class SmartUpdate {
);
return false;
} else {
plugins.smartlog.defaultLogger.warn(
plugins.smartlog.defaultLogger.log(
'warn',
`There is a newer version of ${npmPackage.name} available on npm.`
);
plugins.smartlog.defaultLogger.warn(
plugins.smartlog.defaultLogger.log(
'warn',
`Your version: ${versionLocal.versionString} | version on npm: ${versionNpm.versionString}`
);
if (!process.env.CI && changelogUrlArg) {