chore: remove invalid device configurations (#16777)
Resolves #16622. - removes current invalid configurations - validates future changes
This commit is contained in:
Родитель
66b2641312
Коммит
aa23914659
|
@ -813,28 +813,6 @@
|
||||||
"hasTouch": true,
|
"hasTouch": true,
|
||||||
"defaultBrowserType": "webkit"
|
"defaultBrowserType": "webkit"
|
||||||
},
|
},
|
||||||
"JioPhone 2": {
|
|
||||||
"userAgent": "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:103.0) Gecko/48.0 Firefox/103.0 KAIOS/2.5",
|
|
||||||
"viewport": {
|
|
||||||
"width": 240,
|
|
||||||
"height": 320
|
|
||||||
},
|
|
||||||
"deviceScaleFactor": 1,
|
|
||||||
"isMobile": true,
|
|
||||||
"hasTouch": true,
|
|
||||||
"defaultBrowserType": "firefox"
|
|
||||||
},
|
|
||||||
"JioPhone 2 landscape": {
|
|
||||||
"userAgent": "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:103.0) Gecko/48.0 Firefox/103.0 KAIOS/2.5",
|
|
||||||
"viewport": {
|
|
||||||
"width": 320,
|
|
||||||
"height": 240
|
|
||||||
},
|
|
||||||
"deviceScaleFactor": 1,
|
|
||||||
"isMobile": true,
|
|
||||||
"hasTouch": true,
|
|
||||||
"defaultBrowserType": "firefox"
|
|
||||||
},
|
|
||||||
"Kindle Fire HDX": {
|
"Kindle Fire HDX": {
|
||||||
"userAgent": "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true",
|
"userAgent": "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true",
|
||||||
"viewport": {
|
"viewport": {
|
||||||
|
|
|
@ -16834,8 +16834,6 @@ type Devices = {
|
||||||
"iPhone 13 Pro Max landscape": DeviceDescriptor;
|
"iPhone 13 Pro Max landscape": DeviceDescriptor;
|
||||||
"iPhone 13 Mini": DeviceDescriptor;
|
"iPhone 13 Mini": DeviceDescriptor;
|
||||||
"iPhone 13 Mini landscape": DeviceDescriptor;
|
"iPhone 13 Mini landscape": DeviceDescriptor;
|
||||||
"JioPhone 2": DeviceDescriptor;
|
|
||||||
"JioPhone 2 landscape": DeviceDescriptor;
|
|
||||||
"Kindle Fire HDX": DeviceDescriptor;
|
"Kindle Fire HDX": DeviceDescriptor;
|
||||||
"Kindle Fire HDX landscape": DeviceDescriptor;
|
"Kindle Fire HDX landscape": DeviceDescriptor;
|
||||||
"LG Optimus L70": DeviceDescriptor;
|
"LG Optimus L70": DeviceDescriptor;
|
||||||
|
|
|
@ -141,6 +141,9 @@ async function run() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const invalidConfigurations = Object.entries(devicesDescriptors).filter(([_, deviceDescriptor]) => deviceDescriptor.isMobile && deviceDescriptor.defaultBrowserType === 'firefox').map(([deviceName, deviceDescriptor]) => deviceName);
|
||||||
|
if (invalidConfigurations.length > 0)
|
||||||
|
throw new Error(`Invalid Device Configurations. isMobile with Firefox not supported: ${invalidConfigurations.join(', ')}`);
|
||||||
writeAssumeNoop(devicesDescriptorsSourceFile, JSON.stringify(devicesDescriptors, null, 2), dirtyFiles);
|
writeAssumeNoop(devicesDescriptorsSourceFile, JSON.stringify(devicesDescriptors, null, 2), dirtyFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче