refactor: lower bazel and semver warnings to info logs

This commit is contained in:
Rhys Arkins 2018-01-23 13:00:05 +01:00
parent 516142b687
commit ef17430d7a
2 changed files with 4 additions and 4 deletions

View file

@ -36,11 +36,11 @@ async function getPackageUpdates(config) {
const { remote, currentVersion } = config; const { remote, currentVersion } = config;
const githubHost = 'https://github.com/'; const githubHost = 'https://github.com/';
if (!remote.startsWith(githubHost)) { if (!remote.startsWith(githubHost)) {
logger.info({ remote }, 'Unsupported bazel remote'); logger.info({ remote }, 'Bazel warning: Unsupported remote');
return []; return [];
} }
if (!semver.valid(currentVersion)) { if (!semver.valid(currentVersion)) {
logger.warn({ currentVersion }, 'Unsupported bazel tag'); logger.info({ currentVersion }, 'Bazel warning: Unsupported tag');
return []; return [];
} }
const repo = remote.substring(githubHost.length).replace(/.git$/, ''); const repo = remote.substring(githubHost.length).replace(/.git$/, '');
@ -61,7 +61,7 @@ async function getPackageUpdates(config) {
} else if (config.depType === 'http_archive') { } else if (config.depType === 'http_archive') {
const { repo, currentVersion } = config; const { repo, currentVersion } = config;
if (!semver.valid(currentVersion)) { if (!semver.valid(currentVersion)) {
logger.warn({ currentVersion }, 'Unsupported bazel tag'); logger.info({ currentVersion }, 'Bazel warning: Unsupported tag');
return []; return [];
} }
const releases = await getRepoReleases(repo); const releases = await getRepoReleases(repo);

View file

@ -165,7 +165,7 @@ function determineUpgrades(npmDep, config) {
if (semverParsed.length > 1) { if (semverParsed.length > 1) {
// We don't know how to support complex semver ranges, so don't upgrade // We don't know how to support complex semver ranges, so don't upgrade
result.message = `Complex semver ranges such as "${currentVersion}" are not yet supported so won't ever be upgraded`; result.message = `Complex semver ranges such as "${currentVersion}" are not yet supported so won't ever be upgraded`;
logger.warn(result.message); logger.info('Semver warning: ' + result.message);
return [result]; return [result];
} }
// We know we have a simple semver, now check which operator it is // We know we have a simple semver, now check which operator it is