0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-05-17 17:42:10 +00:00
renovatebot_renovate/lib/modules/versioning/lambda-node/index.ts

31 lines
714 B
TypeScript
Raw Normal View History

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;