@@ -47,6 +47,7 @@ function updateLatestVersions (deskPlatforms) {
4747 */
4848function 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