Socket
Socket
Sign inDemoInstall

@testim/chrome-version

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@testim/chrome-version - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

26

index.js

@@ -29,2 +29,4 @@ 'use strict';

const chromeVersionRegex = /^(\d+\.){3}\d+$/g;
async function getChromeVersionWin(includeChromium) {

@@ -39,2 +41,12 @@

const powershell = await execAndAttemptExtractingChromeVersion(`powershell -command "&{(Get-Item '${chromePath}').VersionInfo.ProductVersion}"`);
if (powershell !== null) {
return powershell;
}
const registry = await execAndAttemptExtractingChromeVersion('reg query "HKEY_CURRENT_USER\\Software\\Google\\Chrome\\BLBeacon" /v version');
if (registry !== null) {
return registry;
}
const versionPath = path.dirname(chromePath);

@@ -44,3 +56,3 @@

const versions = contents.filter(a => /^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/g.test(a));
const versions = contents.filter(a => chromeVersionRegex.test(a));

@@ -53,2 +65,14 @@ // returning oldest in case there is an updated version and chrome still hasn't relaunched

async function execAndAttemptExtractingChromeVersion(command) {
try {
const { stdout } = await exec(command);
const version = extractChromeVersionNumer(stdout).trim();
if (chromeVersionRegex.test(version)) {
return version;
}
} catch (err) { ''; }
return null;
}
function getChromeVersionFromOsa(includeChromium) {

@@ -55,0 +79,0 @@

2

package.json
{
"name": "@testim/chrome-version",
"version": "1.1.3",
"version": "1.1.4",
"description": "Finds the version of Chrome that is installed on your machine",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc