Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

firefox-profile

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firefox-profile - npm Package Compare versions

Comparing version 4.5.0 to 4.6.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 4.6.0
- Linux: add support for snap, flatpak and XDG_CONFIG_HOME firefox directory
# 4.5.0

@@ -2,0 +6,0 @@

@@ -8,19 +8,57 @@ 'use strict';

function locateLinuxDirectory() {
var userHomeDir = process.env.HOME;
var homes = [
// look for a valid sandboxed profile directories
path.join(userHomeDir, 'snap/firefox/common', '.mozilla/firefox'),
path.join(userHomeDir, 'snap/firefox/common', '.config/mozilla/firefox'),
path.join(userHomeDir, '.var/app/org.mozilla.firefox', '.mozilla/firefox'),
path.join(
userHomeDir,
'.var/app/org.mozilla.firefox',
'.config/mozilla/firefox'
),
];
// keep support for nodejs 12
for (var i = 0; i < homes.length; i++) {
var dir = homes[i];
if (fs.existsSync(dir)) {
return dir;
}
}
// look in the next probable location
const defaultLocation = path.join(userHomeDir, '.mozilla/firefox');
if (fs.existsSync(defaultLocation)) {
return defaultLocation;
}
const configDir = path.join(
process.env.XDG_CONFIG_HOME || path.join(userHomeDir, '.config'),
'mozilla/firefox'
);
if (!fs.existsSync(configDir)) {
console.warn('detected firefox profile directory:', configDir, 'not found');
}
return configDir;
}
function locateUserDirectory(platform) {
var userDir;
switch (platform || os.platform()) {
var platform = platform || os.platform();
switch (platform) {
case 'darwin':
userDir = path.join(
return path.join(
process.env.HOME,
'/Library/Application Support/Firefox'
);
break;
case 'linux':
userDir = path.join(process.env.HOME, '/.mozilla/firefox');
break;
return locateLinuxDirectory();
case 'win32':
userDir = path.join(process.env.APPDATA, '/Mozilla/Firefox');
break;
return path.join(process.env.APPDATA, '/Mozilla/Firefox');
default:
throw new Error('unsupported platform ' + platform);
}
return userDir;
}

@@ -27,0 +65,0 @@

2

package.json
{
"name": "firefox-profile",
"version": "4.5.0",
"version": "4.6.0",
"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",

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