diff --git a/lib/datasource/crate/__snapshots__/index.spec.ts.snap b/lib/datasource/crate/__snapshots__/index.spec.ts.snap index b16d093225e8b9cbd3711ec1aed628c39f0364ee..12358777c1acce48cc547820d960c77ce2e8661e 100644 --- a/lib/datasource/crate/__snapshots__/index.spec.ts.snap +++ b/lib/datasource/crate/__snapshots__/index.spec.ts.snap @@ -2,6 +2,7 @@ exports[`datasource/crate getReleases processes real data: amethyst 1`] = ` Object { + "dependencyUrl": "https://crates.io/crates/amethyst", "releases": Array [ Object { "version": "0.1.0", @@ -144,6 +145,7 @@ Array [ exports[`datasource/crate getReleases processes real data: libc 1`] = ` Object { + "dependencyUrl": "https://crates.io/crates/libc", "releases": Array [ Object { "version": "0.1.0", diff --git a/lib/datasource/crate/index.ts b/lib/datasource/crate/index.ts index 324dad6e0065f8731535a961e0de8d38e09fcd5b..9e52e7f79d3380a053b99a603292f351b0fcfccd 100644 --- a/lib/datasource/crate/index.ts +++ b/lib/datasource/crate/index.ts @@ -38,6 +38,7 @@ export async function getReleases({ const baseUrl = 'https://raw.githubusercontent.com/rust-lang/crates.io-index/master/'; const crateUrl = baseUrl + path; + const dependencyUrl = `https://crates.io/crates/${lookupName}`; try { const lines = (await http.get(crateUrl)).body .split('\n') // break into lines @@ -45,6 +46,7 @@ export async function getReleases({ .filter((line) => line.length !== 0) // remove empty lines .map((line) => JSON.parse(line)); // parse const result: ReleaseResult = { + dependencyUrl, releases: [], }; result.releases = lines