Provides a list of electron-to-chromium version mappings
Installations
npm install electron-to-chromium
Releases
Unable to fetch releases
Developer
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
16.20.2
NPM Version
8.19.4
Statistics
143 Stars
4,503 Commits
27 Forks
6 Watching
6 Branches
10 Contributors
Updated on 27 Nov 2024
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
8,822,136,626
Last day
-2.9%
11,188,798
Compared to previous day
Last week
2.8%
60,588,299
Compared to previous week
Last month
18.1%
243,583,883
Compared to previous month
Last year
19.6%
2,392,028,948
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
6
Made by @kilianvalkhof
Other projects:
- 💻 Polypane - Develop responsive websites and apps twice as fast on multiple screens at once
- 🖌️ Superposition - Kickstart your design system by extracting design tokens from your website
- 🗒️ FromScratch - A smart but simple autosaving scratchpad
Electron-to-Chromium
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.
Supported by:
Install
Install using npm install electron-to-chromium
.
Usage
To include Electron-to-Chromium, require it:
1var e2c = require('electron-to-chromium');
Properties
The Electron-to-Chromium object has 4 properties to use:
versions
An object of key-value pairs with a major Electron version as the key, and the corresponding major Chromium version as the value.
1var versions = e2c.versions; 2console.log(versions['1.4']); 3// returns "53"
fullVersions
An object of key-value pairs with a Electron version as the key, and the corresponding full Chromium version as the value.
1var versions = e2c.fullVersions; 2console.log(versions['1.4.11']); 3// returns "53.0.2785.143"
chromiumVersions
An object of key-value pairs with a major Chromium version as the key, and the corresponding major Electron version as the value.
1var versions = e2c.chromiumVersions; 2console.log(versions['54']); 3// returns "1.4"
fullChromiumVersions
An object of key-value pairs with a Chromium version as the key, and an array of the corresponding major Electron versions as the value.
1var versions = e2c.fullChromiumVersions; 2console.log(versions['54.0.2840.101']); 3// returns ["1.5.1", "1.5.0"]
Functions
electronToChromium(query)
Arguments:
- Query: string or number, required. A major or full Electron version.
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:
1var chromeVersion = e2c.electronToChromium('1.4'); 2// chromeVersion is "53"
If you provide it with a full Electron version, it will return the full Chromium version.
1var chromeVersion = e2c.electronToChromium('1.4.11'); 2// chromeVersion is "53.0.2785.143"
If a query does not match a Chromium version, it will return undefined
.
1var chromeVersion = e2c.electronToChromium('9000'); 2// chromeVersion is undefined
chromiumToElectron(query)
Arguments:
- Query: string or number, required. A major or full Chromium version.
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:
1var electronVersion = e2c.chromiumToElectron('54'); 2// electronVersion is "1.4"
If you provide it with a full Chrome version, it will return an array of full Electron versions.
1var electronVersions = e2c.chromiumToElectron('56.0.2924.87'); 2// 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
.
1var electronVersion = e2c.chromiumToElectron('10'); 2// electronVersion is undefined
electronToBrowserList(query)
DEPRECATED
Arguments:
- Query: string or number, required. A major Electron version.
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:
1var query = e2c.electronToBrowserList('1.4'); 2// query is "Chrome >= 53"
If a query does not match a Chromium version, it will return undefined
.
1var query = e2c.electronToBrowserList('9000'); 2// query is undefined
Importing just versions, fullVersions, chromiumVersions and fullChromiumVersions
All lists can be imported on their own, if file size is a concern.
versions
1var versions = require('electron-to-chromium/versions');
fullVersions
1var fullVersions = require('electron-to-chromium/full-versions');
chromiumVersions
1var chromiumVersions = require('electron-to-chromium/chromium-versions');
fullChromiumVersions
1var fullChromiumVersions = require('electron-to-chromium/full-chromium-versions');
Updating
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
.
License
No vulnerabilities found.
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: ISC License: LICENSE:0
Reason
2 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/Kilian/electron-to-chromium/node.js.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/Kilian/electron-to-chromium/node.js.yml/master?enable=pin
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 1 out of 1 npmCommand dependencies pinned
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/node.js.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
4.4
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to electron-to-chromium
electron
Build cross platform desktop apps with JavaScript, HTML, and CSS
chromium-pickle-js
Binary value packing and unpacking
chromium-bidi
An implementation of the WebDriver BiDi protocol for Chromium implemented as a JavaScript layer translating between BiDi and CDP, running inside a Chrome tab.
json5
JSON for Humans