File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -70,15 +70,18 @@ export class JenkinsPluginsDatasource extends Datasource {
7070
7171 const versions : Record < string , Release [ ] > = { } ;
7272 for ( const name of Object . keys ( plugins ?? [ ] ) ) {
73- versions [ name ] = Object . keys ( plugins [ name ] ) . map ( ( version ) => ( {
74- version,
75- downloadUrl : plugins [ name ] [ version ] ?. url ,
76- releaseTimestamp : plugins [ name ] [ version ] ?. buildDate
77- ? // TODO: types (#7154)
78- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
79- new Date ( `${ plugins [ name ] [ version ] . buildDate } UTC` )
80- : null ,
81- } ) ) ;
73+ versions [ name ] = Object . keys ( plugins [ name ] ) . map ( ( version ) => {
74+ const downloadUrl = plugins [ name ] [ version ] ?. url ;
75+ const buildDate = plugins [ name ] [ version ] ?. buildDate ;
76+ const releaseTimestamp = buildDate
77+ ? new Date ( `${ buildDate } UTC` ) . toISOString ( )
78+ : null ;
79+ return {
80+ version,
81+ downloadUrl,
82+ releaseTimestamp,
83+ } ;
84+ } ) ;
8285 }
8386 return versions ;
8487 }
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export interface Release {
4646 gitRef ?: string ;
4747 isDeprecated ?: boolean ;
4848 isStable ?: boolean ;
49- releaseTimestamp ?: any ;
49+ releaseTimestamp ?: string | null ;
5050 version : string ;
5151 newDigest ?: string | undefined ;
5252 constraints ?: Record < string , string [ ] > ;
You can’t perform that action at this time.
0 commit comments