firefox-profile
Advanced tools
Comparing version 4.2.1 to 4.2.2
@@ -0,1 +1,5 @@ | ||
# 4.2.2 | ||
- another fix for cleanOnExit | ||
# 4.2.1 | ||
@@ -2,0 +6,0 @@ |
@@ -80,4 +80,6 @@ /** | ||
*/ | ||
function isValidAOMAddonId (s) { | ||
return /^(\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}|[a-z0-9-\._]*\@[a-z0-9-\._]+)$/i.test(s || ""); | ||
function isValidAOMAddonId(s) { | ||
return /^(\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}|[a-z0-9-\._]*\@[a-z0-9-\._]+)$/i.test( | ||
s || '' | ||
); | ||
} | ||
@@ -144,3 +146,3 @@ | ||
this.profileDir = opts.profileDirectory; | ||
this.defaultPreferences = {...config.DEFAULT_PREFERENCES}; | ||
this.defaultPreferences = { ...config.DEFAULT_PREFERENCES }; | ||
// if true, the profile folder is deleted after | ||
@@ -290,3 +292,8 @@ this._deleteOnExit = !hasDestDir; | ||
try { | ||
fs.rmSync(this.profileDir, {recursive: true, force: true}); | ||
// node 14.4+ | ||
if (fs.rmSync) { | ||
fs.rmSync(this.profileDir, { recursive: true, force: true }); | ||
} else { | ||
fs.removeSync(this.profileDir); | ||
} | ||
} catch (e) { | ||
@@ -371,3 +378,3 @@ console.warn( | ||
var addExtension = util.promisify(this.addExtension.bind(this)); | ||
var promises = extensions.map(extension => | ||
var promises = extensions.map((extension) => | ||
addExtension(path.normalize(extension)) | ||
@@ -603,9 +610,5 @@ ); | ||
await fs.mkdir(addonPath); | ||
await fs.copy( | ||
addon, | ||
addonPath, | ||
{ | ||
clobber: true, | ||
} | ||
); | ||
await fs.copy(addon, addonPath, { | ||
clobber: true, | ||
}); | ||
} | ||
@@ -618,3 +621,3 @@ | ||
return addonDetails; | ||
})(cb) | ||
})(cb); | ||
}); | ||
@@ -723,3 +726,5 @@ }; | ||
// Don't use an empty string for `prefix` or it might not work on some CIs (Travis) | ||
return fs.mkdtempSync(path.resolve(os.tmpdir(), prefix || 'firefox-profile')) + '/'; | ||
return ( | ||
fs.mkdtempSync(path.resolve(os.tmpdir(), prefix || 'firefox-profile')) + '/' | ||
); | ||
}; | ||
@@ -726,0 +731,0 @@ |
{ | ||
"name": "firefox-profile", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"description": "firefox profile for selenium WebDriverJs, admc/wd or any other node selenium driver that supports capabilities", | ||
@@ -5,0 +5,0 @@ "main": "lib/firefox_profile", |
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
46620
961