mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix: add best-effort support for MacOS beta versions (#7003)
Similarly to how we provide best-effort support for non-LTS ubuntu versions, this patch adds support for beta versions of MacOS releases.
This commit is contained in:
parent
178489d091
commit
3c7d2aae6a
@ -186,9 +186,16 @@ export const hostPlatform = ((): BrowserPlatform => {
|
||||
stdio: ['ignore', 'pipe', 'ignore']
|
||||
}).toString().trim() === '1';
|
||||
}
|
||||
// We do not want to differentiate between minor big sur releases
|
||||
// since they don't change core APIs so far.
|
||||
const macVersion = major === 10 ? `${major}.${minor}` : `${major}`;
|
||||
const LAST_STABLE_MAC_MAJOR_VERSION = 11;
|
||||
// All new MacOS releases increase major version.
|
||||
let macVersion = `${major}`;
|
||||
if (major === 10) {
|
||||
// Pre-BigSur MacOS was increasing minor version every release.
|
||||
macVersion = `${major}.${minor}`;
|
||||
} else if (major > LAST_STABLE_MAC_MAJOR_VERSION) {
|
||||
// Best-effort support for MacOS beta versions.
|
||||
macVersion = LAST_STABLE_MAC_MAJOR_VERSION + '';
|
||||
}
|
||||
const archSuffix = arm64 ? '-arm64' : '';
|
||||
return `mac${macVersion}${archSuffix}` as BrowserPlatform;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user