Skip to content

Commit 28419b8

Browse files
authored
chore: Exclude ios beta version from browser support list (#1541)
1 parent 3e3ca33 commit 28419b8

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"chrome": 138,
33
"edge": 138,
4-
"firefox": 140,
4+
"firefox": 141,
55
"safari": 19,
66
"safari_min": 17
77
}

tools/browsers-lists/lt-mobile-supported.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"ios": [
33
{
4-
"device_name": "iPhone 16 Pro",
5-
"version": "26.0",
4+
"device_name": "iPhone 16",
5+
"version": "18.1",
66
"platformName": "ios"
77
},
88
{

tools/browsers-lists/lt-update-supported.mjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ function updateLatestVersions (deskPlatforms) {
4747
*/
4848
function updateMobileVersions (mobilePlatforms) {
4949
const MIN_SUPPORTED_IOS = Math.floor(browserslistMinVersion('last 10 iOS versions')) // LT ios versions don't align exactly with browserlist
50+
const STABLE_FULL_IOS = browserslistMaxVersion('last 10 iOS versions') // get the latest stable full release (not beta)
5051
const testedMobileVersionsJson = {}
5152

5253
const iosDevices = mobilePlatforms.find(p => p.platform === 'ios')?.devices
@@ -62,9 +63,8 @@ function updateMobileVersions (mobilePlatforms) {
6263
if (!iosDevices || !androidDevices) throw new Error('iOS or Android mobile could not be found in API response.')
6364

6465
// iOS versions should already be sorted in descending; the built list should also be in desc order.
65-
const latestiOSVersion = Number(iosDevices[0].version)
6666
const testediOSVersions = [
67-
iosDevices.find(spec => Number(spec.version) === latestiOSVersion),
67+
iosDevices.find(spec => Number(spec.version) <= STABLE_FULL_IOS),
6868
iosDevices.findLast(spec => Number(spec.version) >= MIN_SUPPORTED_IOS)
6969
]
7070
testediOSVersions.forEach(ltFormatSpec => { ltFormatSpec.platformName = 'ios' })
@@ -95,3 +95,9 @@ const browserslistMinVersion = query => {
9595
const version = list[list.length - 1].split(' ')[1] // browserslist returns id version pairs like 'ios_saf 16.1'
9696
return Number(version.split('-')[0]) // versions might be a range (e.g. 14.0-14.4), and we want the low end.
9797
}
98+
99+
const browserslistMaxVersion = query => {
100+
const list = browserslist(query)
101+
const version = list[0].split(' ')[1] // browserslist returns id version pairs like 'ios_saf 16.1'
102+
return Number(version.split('-')[0])
103+
}

0 commit comments

Comments
 (0)