Try to find out which Electron version is bundled in an application file.
Go to file
Nemo c9a445d063 Add badges 2021-07-16 21:49:30 +05:30
.github/workflows Add GitHub Actions for test 2021-07-16 12:33:40 +05:30
_scripts Adds tests for os file list guesser 2021-07-16 12:27:39 +05:30
tests Fix win32 os extension guesses 2021-07-16 20:56:43 +05:30
.editorconfig Initial commit 2021-07-15 20:56:36 +05:30
.gitignore Initial commit 2021-07-15 20:56:36 +05:30
.npmignore Ignore files for package 2021-07-16 21:11:35 +05:30
HACKING.md Add note about generating fixtures 2021-07-16 12:42:09 +05:30
LICENSE Initial commit 2021-07-15 20:56:36 +05:30
README.md Add badges 2021-07-16 21:49:30 +05:30
finder.js Add proper report, os guessing and version ranges 2021-07-16 20:40:30 +05:30
fingerprint.js Add proper report, os guessing and version ranges 2021-07-16 20:40:30 +05:30
index.js Fix win32 os extension guesses 2021-07-16 20:56:43 +05:30
os.js Fix win32 os extension guesses 2021-07-16 20:56:43 +05:30
package-lock.json Remove unused dependencies and get 7z binary 2021-07-16 21:10:18 +05:30
package.json Remove unused dependencies and get 7z binary 2021-07-16 21:10:18 +05:30
utils.js Initial commit 2021-07-15 20:56:36 +05:30
version.js Add proper report, os guessing and version ranges 2021-07-16 20:40:30 +05:30
versions.json Change supported.json to list all versions 2021-07-16 19:27:43 +05:30
zip.js Remove unused dependencies and get 7z binary 2021-07-16 21:10:18 +05:30

README.md

which-electron npm Libraries.io dependency status for latest release NPM

Try to find out which Electron version is bundled inside an application.

Usage

$ npm install which-electron

$ which-electron Google.Play.Music.Desktop.Player.OSX.zip
Version Constraint (Unsupported): <v7.0.0
Fingerprint: v3.1.7-v3.1.8
v3.1.8 is currently not supported

$ which-electron HashTag-win32-x64.zip
Found Version file: v7.1.10
v7.1.10 is currently not supported
Fingerprint: v7.1.10
v7.1.10 is currently not supported

$ which-electron Appium-linux-1.21.0.AppImage
Fingerprint: v7.2.4-v7.3.3
v7.3.3 is currently not supported

How does it work?

We attempt multiple pathways:

  1. The presence of a electron.asar file denotes an electron version <v7.0.0, since later releases dropped that file and embedded it in the binary instead.
  2. A version text file is sometimes included in the final binary.
  3. The node_modules/electron/package.json file is sometimes present.
  4. A lookup table of hashes from various electron releases is used to guess the version. In case of multiple matches, it returns a range of versions.
  5. Get the electron version from the electron binary (WIP)

Note that this can be run against untrusted binaries as it does not try to run the application. It has been tested against various file formats: zip/dmg/exe/AppImage/tar.gz etc. It extracts limited files using 7-zip.

Known Issues

It is known to not work against:

  1. Windows setup files (ones with -setup in their name)

License

Licensed under the MIT License. See LICENSE file for details.