Skip to content

Commit

Permalink
fix(datasource): better check for null releases lookups
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Jun 19, 2020
1 parent 3d8e3ad commit 7e51c90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/datasource/index.ts
@@ -1,4 +1,5 @@
import is from '@sindresorhus/is';
import _ from 'lodash';
import { logger } from '../logger';
import * as runCache from '../util/cache/run';
import { clone } from '../util/clone';
Expand Down Expand Up @@ -168,7 +169,7 @@ async function fetchReleases(
registryUrls,
});
}
if (!dep?.releases?.length) {
if (!dep || _.isEqual(dep, { releases: [] })) {
return null;
}
addMetaData(dep, datasourceName, config.lookupName);
Expand Down
4 changes: 4 additions & 0 deletions lib/datasource/maven/index.ts
Expand Up @@ -278,6 +278,10 @@ export async function getReleases({
logger.debug(`Found ${availableVersions.length} new versions for ${dependency.display} in repository ${repoUrl}`); // prettier-ignore
}

if (!versions?.length) {
return null;
}

let dependencyInfo = {};
const latestVersion = getLatestStableVersion(versions);
if (latestVersion) {
Expand Down

0 comments on commit 7e51c90

Please sign in to comment.