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", "skipReason": "invalid-dependency-specification",
}, },
Object { Object {
"skipReason": "unsupported-value", "skipReason": "invalid-value",
}, },
], ],
} }

View file

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

View file

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

View file

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

View file

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