mirror of
https://github.com/renovatebot/renovate.git
synced 2025-05-12 23:51:55 +00:00
30 lines
714 B
TypeScript
30 lines
714 B
TypeScript
import { DateTime } from 'luxon';
|
|
import { api as nodeApi } from '../node';
|
|
import type { VersioningApi } from '../types';
|
|
import { findLambdaScheduleForVersion } from './schedule';
|
|
|
|
export const id = 'lambda-node';
|
|
export const displayName = 'Lambda Node.js Runtime';
|
|
export const urls = [];
|
|
export const supportsRanges = false;
|
|
|
|
export function isStable(version: string): boolean {
|
|
const schedule = findLambdaScheduleForVersion(version);
|
|
|
|
if (schedule === null) {
|
|
return false;
|
|
}
|
|
|
|
if (typeof schedule.support === 'string') {
|
|
return DateTime.local() < DateTime.fromISO(schedule.support);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
export const api: VersioningApi = {
|
|
...nodeApi,
|
|
isStable,
|
|
};
|
|
|
|
export default api;
|