refactor: remove SkipVersion.UnsupportedValue

This commit is contained in:
Rhys Arkins 2021-02-18 08:24:08 +01:00
parent 586a83ec8f
commit c34e54c5d3
5 changed files with 6 additions and 7 deletions

View file

@ -345,7 +345,7 @@ Object {
"skipReason": "invalid-dependency-specification",
},
Object {
"skipReason": "unsupported-value",
"skipReason": "invalid-value",
},
],
}

View file

@ -107,7 +107,7 @@ export function analyseTerraformResource(
break;
default:
dep.skipReason = SkipReason.UnsupportedValue;
dep.skipReason = SkipReason.InvalidValue;
break;
}
/* eslint-enable no-param-reassign */

View file

@ -36,7 +36,6 @@ export enum SkipReason {
UnsupportedChartType = 'unsupported-chart-type',
UnsupportedRemote = 'unsupported-remote',
UnsupportedUrl = 'unsupported-url',
UnsupportedValue = 'unsupported-value',
UnsupportedVersion = 'unsupported-version',
Unsupported = 'unsupported',
UnversionedReference = 'unversioned-reference',

View file

@ -1354,7 +1354,7 @@ Object {
exports[`workers/repository/process/lookup .lookupUpdates() skips undefined values 1`] = `
Object {
"skipReason": "unsupported-value",
"skipReason": "invalid-value",
"updates": Array [],
"warnings": Array [],
}
@ -1362,7 +1362,7 @@ Object {
exports[`workers/repository/process/lookup .lookupUpdates() skips unsupported values 1`] = `
Object {
"skipReason": "unsupported-value",
"skipReason": "invalid-value",
"updates": Array [],
"warnings": Array [],
}

View file

@ -401,11 +401,11 @@ export async function lookupUpdates(
res.updates.push(update);
}
} else if (!currentValue) {
res.skipReason = SkipReason.UnsupportedValue;
res.skipReason = SkipReason.InvalidValue;
} else {
logger.debug(`Dependency ${depName} has unsupported value ${currentValue}`);
if (!config.pinDigests && !config.currentDigest) {
res.skipReason = SkipReason.UnsupportedValue;
res.skipReason = SkipReason.InvalidValue;
} else {
delete res.skipReason;
}