chromedriver
Advanced tools
Comparing version 97.0.3 to 97.0.4
@@ -89,8 +89,10 @@ 'use strict'; | ||
} else if (thePlatform === 'darwin' || thePlatform === 'freebsd') { | ||
if (process.arch === 'x64' || process.arch === 'arm64') { | ||
thePlatform = 'mac64'; | ||
} else { | ||
const osxPlatform = getMacOsRealArch(); | ||
if (!osxPlatform) { | ||
console.log('Only Mac 64 bits supported.'); | ||
process.exit(1); | ||
} | ||
thePlatform = osxPlatform; | ||
} else if (thePlatform !== 'win32') { | ||
@@ -100,2 +102,3 @@ console.log('Unexpected platform or architecture:', process.platform, process.arch); | ||
} | ||
return thePlatform; | ||
@@ -341,2 +344,28 @@ } | ||
function getMacOsRealArch() { | ||
if (process.arch === 'arm64' || isEmulatedRosettaEnvironment()) { | ||
return 'mac64_m1'; | ||
} | ||
if (process.arch === 'x64') { | ||
return 'mac64'; | ||
} | ||
return null; | ||
} | ||
function isEmulatedRosettaEnvironment() { | ||
const archName = child_process.spawnSync('uname', ['-m']).stdout.toString().trim(); | ||
if (archName === 'x86_64') { | ||
const processTranslated = child_process.spawnSync('sysctl', ['-in', 'sysctl.proc_translated']) | ||
.stdout.toString() | ||
.trim(); | ||
return processTranslated === '1'; | ||
} | ||
return false; | ||
} | ||
function Deferred() { | ||
@@ -343,0 +372,0 @@ this.resolve = null; |
{ | ||
"name": "chromedriver", | ||
"version": "97.0.3", | ||
"version": "97.0.4", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "chromedriver", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37228
387
29