feat(supported-version): dynamically compute (#120)

Previously, I maintained supported versions by revising a file of versions. This was monotonous, like time.

Now, these are just based upon the documented EoL dates of the versions published by Magento.
This commit is contained in:
Damien Retzinger
2023-01-09 13:09:24 -05:00
committed by GitHub
parent c0390c8abd
commit dbc889f7ce
8 changed files with 95 additions and 46 deletions
@@ -0,0 +1,7 @@
import { MagentoMatrixVersion } from '../matrix/matrix-type';
import allVersions from '../versions/individual.json';
export const getCurrentlySupportedVersions = (date: Date): string[] =>
Object.entries(<Record<string,MagentoMatrixVersion>>allVersions)
.filter(([key, value]) => new Date(value.eol) >= date)
.map(([key, value]) => key);