Skip to content
Snippets Groups Projects
Unverified Commit b05844bc authored by Sergei Zharinov's avatar Sergei Zharinov Committed by GitHub
Browse files

refactor(datasource/hex): Enable strict null checks (#13983)

parent 8e3478e6
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,11 @@ export class HexDatasource extends Datasource { ...@@ -27,6 +27,11 @@ export class HexDatasource extends Datasource {
lookupName, lookupName,
registryUrl, registryUrl,
}: GetReleasesConfig): Promise<ReleaseResult | null> { }: GetReleasesConfig): Promise<ReleaseResult | null> {
// istanbul ignore if
if (!registryUrl) {
return null;
}
// Get dependency name from lookupName. // Get dependency name from lookupName.
// If the dependency is private lookupName contains organization name as following: // If the dependency is private lookupName contains organization name as following:
// hexPackageName:organizationName // hexPackageName:organizationName
...@@ -75,7 +80,7 @@ export class HexDatasource extends Datasource { ...@@ -75,7 +80,7 @@ export class HexDatasource extends Datasource {
} }
if (meta?.links?.Github) { if (meta?.links?.Github) {
result.sourceUrl = hexRelease.meta.links.Github; result.sourceUrl = meta?.links?.Github;
} }
return result; return result;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
"lib/datasource/dart", "lib/datasource/dart",
"lib/datasource/gitlab-tags/util.ts", "lib/datasource/gitlab-tags/util.ts",
"lib/datasource/helm/common.ts", "lib/datasource/helm/common.ts",
"lib/datasource/hex",
"lib/datasource/metadata.ts", "lib/datasource/metadata.ts",
"lib/datasource/sbt-plugin/util.ts", "lib/datasource/sbt-plugin/util.ts",
"lib/globals.d.ts", "lib/globals.d.ts",
...@@ -81,6 +82,7 @@ ...@@ -81,6 +82,7 @@
"lib/datasource/go/common.ts", "lib/datasource/go/common.ts",
"lib/datasource/go/types.ts", "lib/datasource/go/types.ts",
"lib/datasource/helm/common.ts", "lib/datasource/helm/common.ts",
"lib/datasource/hex/**/*.spec.ts",
"lib/logger/err-serializer.spec.ts", "lib/logger/err-serializer.spec.ts",
"lib/util/cache/**/*.spec.ts", "lib/util/cache/**/*.spec.ts",
"lib/util/exec/buildpack.spec.ts", "lib/util/exec/buildpack.spec.ts",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment