geckodriver
Advanced tools
Comparing version 4.3.1 to 4.3.2
@@ -1,2 +0,2 @@ | ||
export declare const GECKODRIVER_RELEASES = "https://api.github.com/repos/mozilla/geckodriver/releases/latest"; | ||
export declare const GECKODRIVER_CARGO_YAML = "https://raw.githubusercontent.com/mozilla/geckodriver/release/Cargo.toml"; | ||
export declare const BASE_CDN_URL: string; | ||
@@ -3,0 +3,0 @@ export declare const GECKODRIVER_DOWNLOAD_PATH: string; |
import os from 'node:os'; | ||
export const GECKODRIVER_RELEASES = 'https://api.github.com/repos/mozilla/geckodriver/releases/latest'; | ||
export const GECKODRIVER_CARGO_YAML = 'https://raw.githubusercontent.com/mozilla/geckodriver/release/Cargo.toml'; | ||
export const BASE_CDN_URL = process.env.GECKODRIVER_CDNURL || process.env.npm_config_geckodriver_cdnurl || 'https://github.com/mozilla/geckodriver/releases/download'; | ||
@@ -4,0 +4,0 @@ // e.g. https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-macos-aarch64.tar.gz |
@@ -14,3 +14,3 @@ import os from 'node:os'; | ||
import unzipper from 'unzipper'; | ||
import { BINARY_FILE, GECKODRIVER_RELEASES } from './constants.js'; | ||
import { BINARY_FILE, GECKODRIVER_CARGO_YAML } from './constants.js'; | ||
import { hasAccess, getDownloadUrl, retryFetch } from './utils.js'; | ||
@@ -35,8 +35,9 @@ const log = logger('geckodriver'); | ||
if (!geckodriverVersion) { | ||
const res = await retryFetch(GECKODRIVER_RELEASES, fetchOpts); | ||
const releases = await res.json(); | ||
geckodriverVersion = releases.name; | ||
if (!geckodriverVersion) { | ||
throw new Error(`Couldn't find version name in releases: ${JSON.stringify(releases)}`); | ||
const res = await retryFetch(GECKODRIVER_CARGO_YAML, fetchOpts); | ||
const toml = await res.text(); | ||
const version = toml.split('\n').find((l) => l.startsWith('version = ')); | ||
if (!version) { | ||
throw new Error(`Couldn't find version property in Cargo.toml file: ${JSON.stringify(toml)}`); | ||
} | ||
geckodriverVersion = version.split(' = ').pop().slice(1, -1); | ||
log.info(`Detected Geckodriver v${geckodriverVersion} to be latest`); | ||
@@ -84,5 +85,5 @@ } | ||
*/ | ||
if (process.argv[1] && process.argv[1].endsWith('/dist/install.js') && Boolean(process.env.GECKODRIVER_AUTO_INSTALL || '1')) { | ||
if (process.argv[1] && process.argv[1].endsWith('/dist/install.js') && process.env.GECKODRIVER_AUTO_INSTALL) { | ||
await download().then(() => log.info('Success!'), (err) => log.error(`Failed to install Geckodriver: ${err.stack}`)); | ||
} | ||
//# sourceMappingURL=install.js.map |
{ | ||
"name": "geckodriver", | ||
"version": "4.3.1", | ||
"version": "4.3.2", | ||
"description": "Mozilla's Geckodriver for Node.js", | ||
@@ -54,8 +54,8 @@ "homepage": "https://github.com/webdriverio-community/node-geckodriver#readme", | ||
"devDependencies": { | ||
"@types/node": "^20.10.5", | ||
"@types/node": "^20.11.16", | ||
"@types/tar-fs": "^2.0.4", | ||
"@types/unzipper": "^0.10.9", | ||
"@typescript-eslint/eslint-plugin": "^6.16.0", | ||
"@typescript-eslint/parser": "^6.16.0", | ||
"@vitest/coverage-v8": "^1.1.0", | ||
"@typescript-eslint/eslint-plugin": "^6.20.0", | ||
"@typescript-eslint/parser": "^6.20.0", | ||
"@vitest/coverage-v8": "^1.2.2", | ||
"eslint": "^8.56.0", | ||
@@ -65,14 +65,14 @@ "eslint-plugin-import": "^2.29.1", | ||
"geckodriver": ".", | ||
"husky": "^8.0.3", | ||
"husky": "^9.0.10", | ||
"npm-run-all": "^4.1.5", | ||
"octokit": "^3.1.2", | ||
"release-it": "^17.0.1", | ||
"release-it": "^17.0.3", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.3.3", | ||
"vitest": "^1.1.0", | ||
"vitest": "^1.2.2", | ||
"wait-port": "^1.1.0", | ||
"webdriverio": "^8.27.0" | ||
"webdriverio": "^8.29.3" | ||
}, | ||
"dependencies": { | ||
"@wdio/logger": "^8.24.12", | ||
"@wdio/logger": "^8.28.0", | ||
"decamelize": "^6.0.0", | ||
@@ -79,0 +79,0 @@ "http-proxy-agent": "^7.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
51691
307
Updated@wdio/logger@^8.28.0