mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
feat(dart): Support for releaseTimestamp field (#6926)
This commit is contained in:
parent
bdee0ced39
commit
ac83f691db
3 changed files with 1915 additions and 547 deletions
File diff suppressed because it is too large
Load diff
|
@ -4,56 +4,181 @@ exports[`datasource/dart getReleases processes real data 1`] = `
|
||||||
Object {
|
Object {
|
||||||
"releases": Array [
|
"releases": Array [
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2017-05-09T18:25:24.268386Z",
|
||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2017-05-11T10:45:03.041329Z",
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2017-05-17T07:37:42.515247Z",
|
||||||
"version": "0.2.0+1",
|
"version": "0.2.0+1",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2017-06-03T14:12:51.183087Z",
|
||||||
"version": "0.2.3",
|
"version": "0.2.3",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2017-06-05T19:33:50.975143Z",
|
||||||
"version": "0.2.4",
|
"version": "0.2.4",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2017-06-05T19:59:16.090470Z",
|
||||||
"version": "0.2.4+1",
|
"version": "0.2.4+1",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2017-08-30T17:09:33.914520Z",
|
||||||
"version": "0.2.5",
|
"version": "0.2.5",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2017-12-20T15:38:21.917159Z",
|
||||||
"version": "0.3.0",
|
"version": "0.3.0",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2018-01-12T15:09:05.976855Z",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2018-02-05T20:57:27.104550Z",
|
||||||
"version": "0.3.2",
|
"version": "0.3.2",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2018-02-28T15:41:47.772896Z",
|
||||||
"version": "0.3.3",
|
"version": "0.3.3",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2018-03-09T16:12:39.663265Z",
|
||||||
"version": "0.4.0",
|
"version": "0.4.0",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2018-04-09T08:43:11.818712Z",
|
||||||
"version": "0.4.1",
|
"version": "0.4.1",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2018-06-01T19:14:21.586501Z",
|
||||||
"version": "0.4.2",
|
"version": "0.4.2",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2018-10-01T19:17:45.554499Z",
|
||||||
"version": "0.4.3",
|
"version": "0.4.3",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2019-01-24T23:22:56.870865Z",
|
||||||
"version": "0.5.0",
|
"version": "0.5.0",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"releaseTimestamp": "2019-02-08T02:03:10.911637Z",
|
||||||
"version": "0.5.1+1",
|
"version": "0.5.1+1",
|
||||||
},
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-03-15T15:44:55.382574Z",
|
||||||
|
"version": "0.5.1+2",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-04-09T15:32:00.113895Z",
|
||||||
|
"version": "0.5.2",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-05-22T16:11:30.917473Z",
|
||||||
|
"version": "0.5.2+1",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-05-30T00:37:40.912286Z",
|
||||||
|
"version": "0.5.2+2",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-05-31T22:52:25.471528Z",
|
||||||
|
"version": "0.5.3",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-06-04T00:34:04.927415Z",
|
||||||
|
"version": "0.5.3+1",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-07-08T01:27:57.932893Z",
|
||||||
|
"version": "0.5.3+2",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-07-16T01:25:26.525388Z",
|
||||||
|
"version": "0.5.3+3",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-07-16T12:32:40.229319Z",
|
||||||
|
"version": "0.5.3+4",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-10-16T22:49:22.744714Z",
|
||||||
|
"version": "0.5.3+5",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-10-22T00:00:44.785447Z",
|
||||||
|
"version": "0.5.4",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-10-25T22:47:57.255730Z",
|
||||||
|
"version": "0.5.4+1",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-10-28T22:44:38.107455Z",
|
||||||
|
"version": "0.5.4+3",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-11-13T01:12:51.650387Z",
|
||||||
|
"version": "0.5.4+5",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-11-25T22:46:39.167123Z",
|
||||||
|
"version": "0.5.4+6",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-12-03T22:28:49.437659Z",
|
||||||
|
"version": "0.5.4+8",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-12-10T04:45:58.964761Z",
|
||||||
|
"version": "0.5.4+9",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-12-10T21:43:54.946008Z",
|
||||||
|
"version": "0.5.5",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2019-12-11T00:12:47.456859Z",
|
||||||
|
"version": "0.5.6",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2020-01-23T21:53:34.756279Z",
|
||||||
|
"version": "0.5.6+1",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2020-02-20T23:57:05.213425Z",
|
||||||
|
"version": "0.5.6+2",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2020-03-10T17:55:26.669980Z",
|
||||||
|
"version": "0.5.6+3",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2020-04-21T04:36:13.482589Z",
|
||||||
|
"version": "0.5.7",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2020-05-06T02:25:58.787589Z",
|
||||||
|
"version": "0.5.7+1",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2020-05-12T03:51:13.065917Z",
|
||||||
|
"version": "0.5.7+2",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2020-05-21T19:52:19.756281Z",
|
||||||
|
"version": "0.5.7+3",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"releaseTimestamp": "2020-07-08T04:36:43.412063Z",
|
||||||
|
"version": "0.5.8",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
"sourceUrl": "http://example.com",
|
"sourceUrl": "http://example.com",
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ export async function getReleases({
|
||||||
interface DartResult {
|
interface DartResult {
|
||||||
versions?: {
|
versions?: {
|
||||||
version: string;
|
version: string;
|
||||||
|
published?: string;
|
||||||
}[];
|
}[];
|
||||||
latest?: {
|
latest?: {
|
||||||
pubspec?: { homepage?: string; repository?: string };
|
pubspec?: { homepage?: string; repository?: string };
|
||||||
|
@ -38,7 +39,10 @@ export async function getReleases({
|
||||||
const { versions, latest } = body;
|
const { versions, latest } = body;
|
||||||
if (versions && latest) {
|
if (versions && latest) {
|
||||||
result = {
|
result = {
|
||||||
releases: body.versions.map(({ version }) => ({ version })),
|
releases: body.versions.map(({ version, published }) => ({
|
||||||
|
version,
|
||||||
|
releaseTimestamp: published,
|
||||||
|
})),
|
||||||
};
|
};
|
||||||
|
|
||||||
const pubspec = latest.pubspec;
|
const pubspec = latest.pubspec;
|
||||||
|
|
Loading…
Reference in a new issue