• Stars
    star
    143
  • Rank 257,007 (Top 6 %)
  • Language
    JavaScript
  • License
    ISC License
  • Created almost 8 years ago
  • Updated 20 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Provides a list of electron-to-chromium version mappings

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 npm travis npm-downloads codecovFOSSA Status

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:

var 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.

var versions = e2c.versions;
console.log(versions['1.4']);
// 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.

var versions = e2c.fullVersions;
console.log(versions['1.4.11']);
// 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.

var versions = e2c.chromiumVersions;
console.log(versions['54']);
// 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.

var versions = e2c.fullChromiumVersions;
console.log(versions['54.0.2840.101']);
// 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:

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:

  • 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:

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');
// 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:

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

Importing just versions, fullVersions, chromiumVersions and fullChromiumVersions

All lists can be imported on their own, if file size is a concern.

versions

var versions = require('electron-to-chromium/versions');

fullVersions

var fullVersions = require('electron-to-chromium/full-versions');

chromiumVersions

var chromiumVersions = require('electron-to-chromium/chromium-versions');

fullChromiumVersions

var 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

FOSSA Status

More Repositories

1

fromscratch

Autosaving Scratchpad. A simple but smart note-taking app
JavaScript
718
star
2

Trimage

A cross-platform tool for optimizing PNG and JPG files.
Python
706
star
3

f.lux-indicator-applet

This repository is unmaintained. Visit:
Python
549
star
4

react-bytesize-icons

Bytesize Icons as React Components.
JavaScript
59
star
5

sencss

The sensible standards CSS baseline
53
star
6

jQuery.pulsate

jQuery.pulsate.js adds a pulsating effect to elements. Useful for drawing the users attention.
HTML
52
star
7

electron-create-menu

a default menu for your electron applications, with convenience functions for multiplatform use and i18n.
JavaScript
35
star
8

postcss-hocus

Postcss-hocus fixes a tiny but annoying part of CSS: That you have to repeat yourself whenever you want to specify both `:hover` and `:focus`.
JavaScript
25
star
9

messenger-demo-viewer

Demo Facebook Messenger (bot) interactions without showing personal chats.
JavaScript
24
star
10

gridBuilder.js

a jQuery plugin that draws a grid as a background
JavaScript
22
star
11

gedit-jshint

a JSHint plugin for gedit
JavaScript
14
star
12

postcss-dutch-stylesheets

PostCSS plugin for writing Dutch Style Sheets http://kilian.github.io/postcss-dutch-stylesheets
JavaScript
14
star
13

gedit-jslint

JSLint plugin for Gedit, runs the JSLint javascript verifier
JavaScript
10
star
14

react-xd-example

Example Adobe XD plugin that uses the React-XD reconciler
JavaScript
7
star
15

mailto-clipboard

Converts all `mailto:` links to copying the email address to the clipboard
JavaScript
4
star
16

greenergy

UXD assignment for CMD - datavisualisation prototyping
JavaScript
3
star
17

kType

a simple R-type shooter for C# XNA
C#
2
star
18

jQuery.textshadow

jQuery textshadow plugin for internet explorer
JavaScript
2
star
19

3dbarchart

3d Bar chart generator in actionscript 3 with papervision3d and the Flex SDK
2
star
20

Graduation

Kilian's graduation documentation
JavaScript
2
star
21

ktype2

a simple rtype shooter in akihabara
JavaScript
1
star