
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
electron-to-chromium
Advanced tools
This repository provides a mapping of Electron versions to the Chromium version that it uses.
This package is used in Browserslist, so you can use e.g. electron >= 1.4 in Autoprefixer, Stylelint, babel-preset-env and eslint-plugin-compat.
Install using npm install electron-to-chromium.
To include Electron-to-Chromium, require it:
var e2c = require('electron-to-chromium');
The Electron-to-Chromium object has 4 properties to use:
versionsAn object of key-value pairs with a major Electron version as the key, and the corresponding major Chromium version as the value.
var versions = e2c.versions;
console.log(versions['1.4']);
// returns "53"
fullVersionsAn object of key-value pairs with a Electron version as the key, and the corresponding full Chromium version as the value.
var versions = e2c.fullVersions;
console.log(versions['1.4.11']);
// returns "53.0.2785.143"
chromiumVersionsAn object of key-value pairs with a major Chromium version as the key, and the corresponding major Electron version as the value.
var versions = e2c.chromiumVersions;
console.log(versions['54']);
// returns "1.4"
fullChromiumVersionsAn object of key-value pairs with a Chromium version as the key, and an array of the corresponding major Electron versions as the value.
var versions = e2c.fullChromiumVersions;
console.log(versions['54.0.2840.101']);
// returns ["1.5.1", "1.5.0"]
electronToChromium(query)Arguments:
A function that returns the corresponding Chromium version for a given Electron function. Returns a string.
If you provide it with a major Electron version, it will return a major Chromium version:
var chromeVersion = e2c.electronToChromium('1.4');
// chromeVersion is "53"
If you provide it with a full Electron version, it will return the full Chromium version.
var chromeVersion = e2c.electronToChromium('1.4.11');
// chromeVersion is "53.0.2785.143"
If a query does not match a Chromium version, it will return undefined.
var chromeVersion = e2c.electronToChromium('9000');
// chromeVersion is undefined
chromiumToElectron(query)Arguments:
Returns a string with the corresponding Electron version for a given Chromium query.
If you provide it with a major Chromium version, it will return a major Electron version:
var electronVersion = e2c.chromiumToElectron('54');
// electronVersion is "1.4"
If you provide it with a full Chrome version, it will return an array of full Electron versions.
var electronVersions = e2c.chromiumToElectron('56.0.2924.87');
// electronVersions is ["1.6.3", "1.6.2", "1.6.1", "1.6.0"]
If a query does not match an Electron version, it will return undefined.
var electronVersion = e2c.chromiumToElectron('10');
// chromeVersion is undefined
electronToBrowserList(query) DEPRECATEDArguments:
Deprecated: Browserlist already includes electron-to-chromium.
A function that returns a Browserslist query that matches the given major Electron version. Returns a string.
If you provide it with a major Electron version, it will return a Browserlist query string that matches the Chromium capabilities:
var query = e2c.electronToBrowserList('1.4');
// query is "Chrome >= 53"
If a query does not match a Chromium version, it will return undefined.
var query = e2c.electronToBrowserList('9000');
// query is undefined
All lists can be imported on their own, if file size is a concern.
versionsvar versions = require('electron-to-chromium/versions');
fullVersionsvar fullVersions = require('electron-to-chromium/full-versions');
chromiumVersionsvar chromiumVersions = require('electron-to-chromium/chromium-versions');
fullChromiumVersionsvar fullChromiumVersions = require('electron-to-chromium/full-chromium-versions');
This package will be updated with each new Electron release.
To update the list, run npm run build.js. Requires internet access as it downloads from the canonical list of Electron versions.
To verify correct behaviour, run npm test.
The browserslist package allows you to share target browsers and Node.js versions between different front-end tools. It is similar to electron-to-chromium in that it helps developers target specific browser versions, but it is more general and not limited to Electron's Chromium versions.
caniuse-lite is a lighter version of the caniuse database, providing browser support tables for front-end technologies. While it does not directly map Electron versions to Chromium, it serves a similar purpose in informing developers about feature support and compatibility across different browsers and versions.
electron-releases is a package that provides information about Electron releases, including version numbers, release dates, and more. It is similar to electron-to-chromium in that it provides data about Electron versions, but it does not focus on the mapping to Chromium versions.
FAQs
Provides a list of electron-to-chromium version mappings
The npm package electron-to-chromium receives a total of 58,919,045 weekly downloads. As such, electron-to-chromium popularity was classified as popular.
We found that electron-to-chromium demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.