0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-05-12 23:51:55 +00:00
renovatebot_renovate/lib/modules/versioning/lambda-node/index.ts
Gareth Parker 224fa799cc
feat(versioning): Add a NodeJS Lambda Versioning module (#32480)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-05-06 21:51:26 +00:00

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;