Skip to content

Commit

Permalink
feat(supported-versions): add release date (#100)
Browse files Browse the repository at this point in the history
Previously, we didn't take into account a release date, which meant
that @Vinai could not add MageOS or Magento releases before the actual
day of release.

With this, we can now add the releases to supported verisons before
a release comes out, allowing us to make a kind that allows testing
MageOS and Magento Mirror releases more quickly.
  • Loading branch information
damienwebdev committed Aug 16, 2023
1 parent c093834 commit 5599a0d
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 15 deletions.
8 changes: 4 additions & 4 deletions supported-version/dist/index.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions supported-version/src/kind/get-currently-supported.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,7 @@ describe('getCurrentlySupportedVersions', () => {
// versions.
['2023-01-01T00:00:00Z', 'First day of 2023', [
'magento/project-community-edition:2.4.4-p2',
'magento/project-community-edition:2.4.4-p3',
'magento/project-community-edition:2.4.4-p4',
'magento/project-community-edition:2.4.4-p5',
'magento/project-community-edition:2.4.5-p1',
'magento/project-community-edition:2.4.5-p2',
'magento/project-community-edition:2.4.5-p3',
'magento/project-community-edition:2.4.5-p4',
'magento/project-community-edition:2.4.6',
'magento/project-community-edition:2.4.6-p1',
'magento/project-community-edition:2.4.6-p2',
'magento/project-community-edition:2.4.5-p1',
]],
['2024-01-01T00:00:00Z', 'First day of 2024', [
'magento/project-community-edition:2.4.4-p5',
Expand All @@ -36,6 +27,15 @@ describe('getCurrentlySupportedVersions', () => {
'magento/project-community-edition:2.4.5-p4',
'magento/project-community-edition:2.4.6-p2',
]],
['2023-03-14T00:00:00Z', 'Day of v2.4.6 Release', [
'magento/project-community-edition:2.4.4-p2',
'magento/project-community-edition:2.4.5-p1'
]],
['2023-03-15T00:00:00Z', 'Day after v2.4.6 Release', [
'magento/project-community-edition:2.4.4-p3',
'magento/project-community-edition:2.4.5-p2',
'magento/project-community-edition:2.4.6'
]],
['2025-08-09T00:00:00Z', 'Day of v2.4.5 EoL', [
'magento/project-community-edition:2.4.5-p4',
'magento/project-community-edition:2.4.6-p2',
Expand Down
6 changes: 5 additions & 1 deletion supported-version/src/kind/get-currently-supported.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ 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)
.filter(([key, value]) => {
const dayAfterRelease = new Date(value.release);
dayAfterRelease.setDate(dayAfterRelease.getDate() + 1);
return date >= dayAfterRelease && new Date(value.eol) >= date;
})
.map(([key, value]) => key);
1 change: 1 addition & 0 deletions supported-version/src/matrix/matrix-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface MagentoMatrixVersion {
varnish: string,
nginx: string,
os: string,
release: string,
eol: string
}

Expand Down
10 changes: 10 additions & 0 deletions supported-version/src/versions/composite.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2018-11-28T00:00:00+0000",
"eol": "2022-09-30T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.0 <2.4.1": {
Expand All @@ -23,6 +24,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2020-07-28T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.1 <2.4.2": {
Expand All @@ -36,6 +38,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2020-10-15T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.2 <2.4.3": {
Expand All @@ -49,6 +52,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-02-09T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.3 <2.4.4": {
Expand All @@ -62,6 +66,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-08-10T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.4 <2.4.5": {
Expand All @@ -75,6 +80,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2022-04-12T00:00:00+0000",
"eol": "2025-04-24T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.5 <2.4.6": {
Expand All @@ -88,6 +94,7 @@
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-08-08T00:00:00+0000",
"eol": "2025-08-09T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.6 <2.4.7": {
Expand All @@ -101,6 +108,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-03-14T00:00:00+0000",
"eol": "2026-03-14T00:00:00+0000"
},
"magento/project-community-edition": {
Expand All @@ -114,6 +122,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2015-11-17T00:00:00+0000",
"eol": "2026-03-14T00:00:00+0000"
},
"magento/project-community-edition:next": {
Expand All @@ -127,6 +136,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2015-11-17T00:00:00+0000",
"eol": "2026-03-14T00:00:00+0000"
}
}
27 changes: 27 additions & 0 deletions supported-version/src/versions/individual.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2022-04-12T00:00:00+0000",
"eol": "2022-08-09T00:00:00+0000"
},
"magento/project-community-edition:2.3.7-p4": {
Expand All @@ -23,6 +24,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2022-08-09T00:00:00+0000",
"eol": "2022-09-30T00:00:00+0000"
},
"magento/project-community-edition:2.4.0": {
Expand All @@ -36,6 +38,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2020-07-28T00:00:00+0000",
"eol": "2020-10-15T00:00:00+0000"
},
"magento/project-community-edition:2.4.0-p1": {
Expand All @@ -49,6 +52,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2020-10-15T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:2.4.1": {
Expand All @@ -62,6 +66,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2020-10-15T00:00:00+0000",
"eol": "2021-02-09T00:00:00+0000"
},
"magento/project-community-edition:2.4.1-p1": {
Expand All @@ -75,6 +80,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-02-09T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:2.4.2": {
Expand All @@ -88,6 +94,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-02-09T00:00:00+0000",
"eol": "2021-05-11T00:00:00+0000"
},
"magento/project-community-edition:2.4.2-p1": {
Expand All @@ -101,6 +108,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-05-11T00:00:00+0000",
"eol": "2021-08-10T00:00:00+0000"
},
"magento/project-community-edition:2.4.2-p2": {
Expand All @@ -114,6 +122,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-08-10T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:2.4.3": {
Expand All @@ -127,6 +136,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-08-10T00:00:00+0000",
"eol": "2021-10-12T00:00:00+0000"
},
"magento/project-community-edition:2.4.3-p1": {
Expand All @@ -140,6 +150,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-10-12T00:00:00+0000",
"eol": "2022-04-12T00:00:00+0000"
},
"magento/project-community-edition:2.4.3-p2": {
Expand All @@ -153,6 +164,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2022-04-12T00:00:00+0000",
"eol": "2022-08-09T00:00:00+0000"
},
"magento/project-community-edition:2.4.3-p3": {
Expand All @@ -166,6 +178,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2022-08-09T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:2.4.4": {
Expand All @@ -179,6 +192,7 @@
"varnish": "varnish:7.0",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2022-04-12T00:00:00+0000",
"eol": "2022-08-09T00:00:00+0000"
},
"magento/project-community-edition:2.4.4-p1": {
Expand All @@ -192,6 +206,7 @@
"varnish": "varnish:7.0",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2022-08-09T00:00:00+0000",
"eol": "2022-10-11T00:00:00+0000"
},
"magento/project-community-edition:2.4.4-p2": {
Expand All @@ -205,6 +220,7 @@
"varnish": "varnish:7.0",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2022-10-11T00:00:00+0000",
"eol": "2023-03-14T00:00:00+0000"
},
"magento/project-community-edition:2.4.4-p3": {
Expand All @@ -218,6 +234,7 @@
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-03-14T00:00:00+0000",
"eol": "2023-06-13T00:00:00+0000"
},
"magento/project-community-edition:2.4.4-p4": {
Expand All @@ -231,6 +248,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-06-13T00:00:00+0000",
"eol": "2023-08-08T00:00:00+0000"
},
"magento/project-community-edition:2.4.4-p5": {
Expand All @@ -244,6 +262,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-08-08T00:00:00+0000",
"eol": "2025-04-24T00:00:00+0000"
},
"magento/project-community-edition:2.4.5": {
Expand All @@ -257,6 +276,7 @@
"varnish": "varnish:7.0",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2022-08-09T00:00:00+0000",
"eol": "2022-08-09T00:00:00+0000"
},
"magento/project-community-edition:2.4.5-p1": {
Expand All @@ -270,6 +290,7 @@
"varnish": "varnish:7.0",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2022-10-11T00:00:00+0000",
"eol": "2023-03-14T00:00:00+0000"
},
"magento/project-community-edition:2.4.5-p2": {
Expand All @@ -283,6 +304,7 @@
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-03-14T00:00:00+0000",
"eol": "2023-06-13T00:00:00+0000"
},
"magento/project-community-edition:2.4.5-p3": {
Expand All @@ -296,6 +318,7 @@
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-06-13T00:00:00+0000",
"eol": "2023-08-08T00:00:00+0000"
},
"magento/project-community-edition:2.4.5-p4": {
Expand All @@ -309,6 +332,7 @@
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-08-08T00:00:00+0000",
"eol": "2025-08-09T00:00:00+0000"
},
"magento/project-community-edition:2.4.6": {
Expand All @@ -322,6 +346,7 @@
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-03-14T00:00:00+0000",
"eol": "2023-06-13T00:00:00+0000"
},
"magento/project-community-edition:2.4.6-p1": {
Expand All @@ -335,6 +360,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-06-13T00:00:00+0000",
"eol": "2023-08-08T00:00:00+0000"
},
"magento/project-community-edition:2.4.6-p2": {
Expand All @@ -348,6 +374,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-08-08T00:00:00+0000",
"eol": "2026-03-14T00:00:00+0000"
}
}

0 comments on commit 5599a0d

Please sign in to comment.