Skip to content

Commit 9b351fb

Browse files
committed
feat(supported-versions): add release date
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.
1 parent bb848c4 commit 9b351fb

File tree

6 files changed

+57
-15
lines changed

6 files changed

+57
-15
lines changed

supported-version/dist/index.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

supported-version/src/kind/get-currently-supported.spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,7 @@ describe('getCurrentlySupportedVersions', () => {
1111
// versions.
1212
['2023-01-01T00:00:00Z', 'First day of 2023', [
1313
'magento/project-community-edition:2.4.4-p2',
14-
'magento/project-community-edition:2.4.4-p3',
15-
'magento/project-community-edition:2.4.4-p4',
16-
'magento/project-community-edition:2.4.4-p5',
17-
'magento/project-community-edition:2.4.5-p1',
18-
'magento/project-community-edition:2.4.5-p2',
19-
'magento/project-community-edition:2.4.5-p3',
20-
'magento/project-community-edition:2.4.5-p4',
21-
'magento/project-community-edition:2.4.6',
22-
'magento/project-community-edition:2.4.6-p1',
23-
'magento/project-community-edition:2.4.6-p2',
14+
'magento/project-community-edition:2.4.5-p1',
2415
]],
2516
['2024-01-01T00:00:00Z', 'First day of 2024', [
2617
'magento/project-community-edition:2.4.4-p5',
@@ -36,6 +27,15 @@ describe('getCurrentlySupportedVersions', () => {
3627
'magento/project-community-edition:2.4.5-p4',
3728
'magento/project-community-edition:2.4.6-p2',
3829
]],
30+
['2023-03-14T00:00:00Z', 'Day of v2.4.6 Release', [
31+
'magento/project-community-edition:2.4.4-p2',
32+
'magento/project-community-edition:2.4.5-p1'
33+
]],
34+
['2023-03-15T00:00:00Z', 'Day after v2.4.6 Release', [
35+
'magento/project-community-edition:2.4.4-p3',
36+
'magento/project-community-edition:2.4.5-p2',
37+
'magento/project-community-edition:2.4.6'
38+
]],
3939
['2025-08-09T00:00:00Z', 'Day of v2.4.5 EoL', [
4040
'magento/project-community-edition:2.4.5-p4',
4141
'magento/project-community-edition:2.4.6-p2',

supported-version/src/kind/get-currently-supported.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ import allVersions from '../versions/individual.json';
33

44
export const getCurrentlySupportedVersions = (date: Date): string[] =>
55
Object.entries(<Record<string,MagentoMatrixVersion>>allVersions)
6-
.filter(([key, value]) => new Date(value.eol) >= date)
6+
.filter(([key, value]) => {
7+
const dayAfterRelease = new Date(value.release);
8+
dayAfterRelease.setDate(dayAfterRelease.getDate() + 1);
9+
return date >= dayAfterRelease && new Date(value.eol) >= date;
10+
})
711
.map(([key, value]) => key);

supported-version/src/matrix/matrix-type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface MagentoMatrixVersion {
99
varnish: string,
1010
nginx: string,
1111
os: string,
12+
release: string,
1213
eol: string
1314
}
1415

supported-version/src/versions/composite.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"varnish": "varnish:6.0",
1111
"nginx": "nginx:1.18",
1212
"os": "ubuntu-20.04",
13+
"release": "2018-11-28T00:00:00+0000",
1314
"eol": "2022-09-30T00:00:00+0000"
1415
},
1516
"magento/project-community-edition:>=2.4.0 <2.4.1": {
@@ -23,6 +24,7 @@
2324
"varnish": "varnish:6.0",
2425
"nginx": "nginx:1.18",
2526
"os": "ubuntu-20.04",
27+
"release": "2020-07-28T00:00:00+0000",
2628
"eol": "2022-11-28T00:00:00+0000"
2729
},
2830
"magento/project-community-edition:>=2.4.1 <2.4.2": {
@@ -36,6 +38,7 @@
3638
"varnish": "varnish:6.0",
3739
"nginx": "nginx:1.18",
3840
"os": "ubuntu-20.04",
41+
"release": "2020-10-15T00:00:00+0000",
3942
"eol": "2022-11-28T00:00:00+0000"
4043
},
4144
"magento/project-community-edition:>=2.4.2 <2.4.3": {
@@ -49,6 +52,7 @@
4952
"varnish": "varnish:6.0",
5053
"nginx": "nginx:1.18",
5154
"os": "ubuntu-20.04",
55+
"release": "2021-02-09T00:00:00+0000",
5256
"eol": "2022-11-28T00:00:00+0000"
5357
},
5458
"magento/project-community-edition:>=2.4.3 <2.4.4": {
@@ -62,6 +66,7 @@
6266
"varnish": "varnish:6.0",
6367
"nginx": "nginx:1.18",
6468
"os": "ubuntu-20.04",
69+
"release": "2021-08-10T00:00:00+0000",
6570
"eol": "2022-11-28T00:00:00+0000"
6671
},
6772
"magento/project-community-edition:>=2.4.4 <2.4.5": {
@@ -75,6 +80,7 @@
7580
"varnish": "varnish:7.3",
7681
"nginx": "nginx:1.22",
7782
"os": "ubuntu-latest",
83+
"release": "2022-04-12T00:00:00+0000",
7884
"eol": "2025-04-24T00:00:00+0000"
7985
},
8086
"magento/project-community-edition:>=2.4.5 <2.4.6": {
@@ -88,6 +94,7 @@
8894
"varnish": "varnish:7.1",
8995
"nginx": "nginx:1.22",
9096
"os": "ubuntu-latest",
97+
"release": "2023-08-08T00:00:00+0000",
9198
"eol": "2025-08-09T00:00:00+0000"
9299
},
93100
"magento/project-community-edition:>=2.4.6 <2.4.7": {
@@ -101,6 +108,7 @@
101108
"varnish": "varnish:7.3",
102109
"nginx": "nginx:1.22",
103110
"os": "ubuntu-latest",
111+
"release": "2023-03-14T00:00:00+0000",
104112
"eol": "2026-03-14T00:00:00+0000"
105113
},
106114
"magento/project-community-edition": {
@@ -114,6 +122,7 @@
114122
"varnish": "varnish:7.3",
115123
"nginx": "nginx:1.22",
116124
"os": "ubuntu-latest",
125+
"release": "2015-11-17T00:00:00+0000",
117126
"eol": "2026-03-14T00:00:00+0000"
118127
},
119128
"magento/project-community-edition:next": {
@@ -127,6 +136,7 @@
127136
"varnish": "varnish:7.3",
128137
"nginx": "nginx:1.22",
129138
"os": "ubuntu-latest",
139+
"release": "2015-11-17T00:00:00+0000",
130140
"eol": "2026-03-14T00:00:00+0000"
131141
}
132142
}

supported-version/src/versions/individual.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"varnish": "varnish:6.0",
1111
"nginx": "nginx:1.18",
1212
"os": "ubuntu-20.04",
13+
"release": "2022-04-12T00:00:00+0000",
1314
"eol": "2022-08-09T00:00:00+0000"
1415
},
1516
"magento/project-community-edition:2.3.7-p4": {
@@ -23,6 +24,7 @@
2324
"varnish": "varnish:6.0",
2425
"nginx": "nginx:1.18",
2526
"os": "ubuntu-20.04",
27+
"release": "2022-08-09T00:00:00+0000",
2628
"eol": "2022-09-30T00:00:00+0000"
2729
},
2830
"magento/project-community-edition:2.4.0": {
@@ -36,6 +38,7 @@
3638
"varnish": "varnish:6.0",
3739
"nginx": "nginx:1.18",
3840
"os": "ubuntu-20.04",
41+
"release": "2020-07-28T00:00:00+0000",
3942
"eol": "2020-10-15T00:00:00+0000"
4043
},
4144
"magento/project-community-edition:2.4.0-p1": {
@@ -49,6 +52,7 @@
4952
"varnish": "varnish:6.0",
5053
"nginx": "nginx:1.18",
5154
"os": "ubuntu-20.04",
55+
"release": "2020-10-15T00:00:00+0000",
5256
"eol": "2022-11-28T00:00:00+0000"
5357
},
5458
"magento/project-community-edition:2.4.1": {
@@ -62,6 +66,7 @@
6266
"varnish": "varnish:6.0",
6367
"nginx": "nginx:1.18",
6468
"os": "ubuntu-20.04",
69+
"release": "2020-10-15T00:00:00+0000",
6570
"eol": "2021-02-09T00:00:00+0000"
6671
},
6772
"magento/project-community-edition:2.4.1-p1": {
@@ -75,6 +80,7 @@
7580
"varnish": "varnish:6.0",
7681
"nginx": "nginx:1.18",
7782
"os": "ubuntu-20.04",
83+
"release": "2021-02-09T00:00:00+0000",
7884
"eol": "2022-11-28T00:00:00+0000"
7985
},
8086
"magento/project-community-edition:2.4.2": {
@@ -88,6 +94,7 @@
8894
"varnish": "varnish:6.0",
8995
"nginx": "nginx:1.18",
9096
"os": "ubuntu-20.04",
97+
"release": "2021-02-09T00:00:00+0000",
9198
"eol": "2021-05-11T00:00:00+0000"
9299
},
93100
"magento/project-community-edition:2.4.2-p1": {
@@ -101,6 +108,7 @@
101108
"varnish": "varnish:6.0",
102109
"nginx": "nginx:1.18",
103110
"os": "ubuntu-20.04",
111+
"release": "2021-05-11T00:00:00+0000",
104112
"eol": "2021-08-10T00:00:00+0000"
105113
},
106114
"magento/project-community-edition:2.4.2-p2": {
@@ -114,6 +122,7 @@
114122
"varnish": "varnish:6.0",
115123
"nginx": "nginx:1.18",
116124
"os": "ubuntu-20.04",
125+
"release": "2021-08-10T00:00:00+0000",
117126
"eol": "2022-11-28T00:00:00+0000"
118127
},
119128
"magento/project-community-edition:2.4.3": {
@@ -127,6 +136,7 @@
127136
"varnish": "varnish:6.0",
128137
"nginx": "nginx:1.18",
129138
"os": "ubuntu-20.04",
139+
"release": "2021-08-10T00:00:00+0000",
130140
"eol": "2021-10-12T00:00:00+0000"
131141
},
132142
"magento/project-community-edition:2.4.3-p1": {
@@ -140,6 +150,7 @@
140150
"varnish": "varnish:6.0",
141151
"nginx": "nginx:1.18",
142152
"os": "ubuntu-20.04",
153+
"release": "2021-10-12T00:00:00+0000",
143154
"eol": "2022-04-12T00:00:00+0000"
144155
},
145156
"magento/project-community-edition:2.4.3-p2": {
@@ -153,6 +164,7 @@
153164
"varnish": "varnish:6.0",
154165
"nginx": "nginx:1.18",
155166
"os": "ubuntu-20.04",
167+
"release": "2022-04-12T00:00:00+0000",
156168
"eol": "2022-08-09T00:00:00+0000"
157169
},
158170
"magento/project-community-edition:2.4.3-p3": {
@@ -166,6 +178,7 @@
166178
"varnish": "varnish:6.0",
167179
"nginx": "nginx:1.18",
168180
"os": "ubuntu-20.04",
181+
"release": "2022-08-09T00:00:00+0000",
169182
"eol": "2022-11-28T00:00:00+0000"
170183
},
171184
"magento/project-community-edition:2.4.4": {
@@ -179,6 +192,7 @@
179192
"varnish": "varnish:7.0",
180193
"nginx": "nginx:1.22",
181194
"os": "ubuntu-latest",
195+
"release": "2022-04-12T00:00:00+0000",
182196
"eol": "2022-08-09T00:00:00+0000"
183197
},
184198
"magento/project-community-edition:2.4.4-p1": {
@@ -192,6 +206,7 @@
192206
"varnish": "varnish:7.0",
193207
"nginx": "nginx:1.22",
194208
"os": "ubuntu-latest",
209+
"release": "2022-08-09T00:00:00+0000",
195210
"eol": "2022-10-11T00:00:00+0000"
196211
},
197212
"magento/project-community-edition:2.4.4-p2": {
@@ -205,6 +220,7 @@
205220
"varnish": "varnish:7.0",
206221
"nginx": "nginx:1.22",
207222
"os": "ubuntu-latest",
223+
"release": "2022-10-11T00:00:00+0000",
208224
"eol": "2023-03-14T00:00:00+0000"
209225
},
210226
"magento/project-community-edition:2.4.4-p3": {
@@ -218,6 +234,7 @@
218234
"varnish": "varnish:7.1",
219235
"nginx": "nginx:1.22",
220236
"os": "ubuntu-latest",
237+
"release": "2023-03-14T00:00:00+0000",
221238
"eol": "2023-06-13T00:00:00+0000"
222239
},
223240
"magento/project-community-edition:2.4.4-p4": {
@@ -231,6 +248,7 @@
231248
"varnish": "varnish:7.3",
232249
"nginx": "nginx:1.22",
233250
"os": "ubuntu-latest",
251+
"release": "2023-06-13T00:00:00+0000",
234252
"eol": "2023-08-08T00:00:00+0000"
235253
},
236254
"magento/project-community-edition:2.4.4-p5": {
@@ -244,6 +262,7 @@
244262
"varnish": "varnish:7.3",
245263
"nginx": "nginx:1.22",
246264
"os": "ubuntu-latest",
265+
"release": "2023-08-08T00:00:00+0000",
247266
"eol": "2025-04-24T00:00:00+0000"
248267
},
249268
"magento/project-community-edition:2.4.5": {
@@ -257,6 +276,7 @@
257276
"varnish": "varnish:7.0",
258277
"nginx": "nginx:1.22",
259278
"os": "ubuntu-latest",
279+
"release": "2022-08-09T00:00:00+0000",
260280
"eol": "2022-08-09T00:00:00+0000"
261281
},
262282
"magento/project-community-edition:2.4.5-p1": {
@@ -270,6 +290,7 @@
270290
"varnish": "varnish:7.0",
271291
"nginx": "nginx:1.22",
272292
"os": "ubuntu-latest",
293+
"release": "2022-10-11T00:00:00+0000",
273294
"eol": "2023-03-14T00:00:00+0000"
274295
},
275296
"magento/project-community-edition:2.4.5-p2": {
@@ -283,6 +304,7 @@
283304
"varnish": "varnish:7.1",
284305
"nginx": "nginx:1.22",
285306
"os": "ubuntu-latest",
307+
"release": "2023-03-14T00:00:00+0000",
286308
"eol": "2023-06-13T00:00:00+0000"
287309
},
288310
"magento/project-community-edition:2.4.5-p3": {
@@ -296,6 +318,7 @@
296318
"varnish": "varnish:7.1",
297319
"nginx": "nginx:1.22",
298320
"os": "ubuntu-latest",
321+
"release": "2023-06-13T00:00:00+0000",
299322
"eol": "2023-08-08T00:00:00+0000"
300323
},
301324
"magento/project-community-edition:2.4.5-p4": {
@@ -309,6 +332,7 @@
309332
"varnish": "varnish:7.1",
310333
"nginx": "nginx:1.22",
311334
"os": "ubuntu-latest",
335+
"release": "2023-08-08T00:00:00+0000",
312336
"eol": "2025-08-09T00:00:00+0000"
313337
},
314338
"magento/project-community-edition:2.4.6": {
@@ -322,6 +346,7 @@
322346
"varnish": "varnish:7.1",
323347
"nginx": "nginx:1.22",
324348
"os": "ubuntu-latest",
349+
"release": "2023-03-14T00:00:00+0000",
325350
"eol": "2023-06-13T00:00:00+0000"
326351
},
327352
"magento/project-community-edition:2.4.6-p1": {
@@ -335,6 +360,7 @@
335360
"varnish": "varnish:7.3",
336361
"nginx": "nginx:1.22",
337362
"os": "ubuntu-latest",
363+
"release": "2023-06-13T00:00:00+0000",
338364
"eol": "2023-08-08T00:00:00+0000"
339365
},
340366
"magento/project-community-edition:2.4.6-p2": {
@@ -348,6 +374,7 @@
348374
"varnish": "varnish:7.3",
349375
"nginx": "nginx:1.22",
350376
"os": "ubuntu-latest",
377+
"release": "2023-08-08T00:00:00+0000",
351378
"eol": "2026-03-14T00:00:00+0000"
352379
}
353380
}

0 commit comments

Comments
 (0)