npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

which-electron

v1.1.5

Published

Guess which electron version is bundled in an application

Downloads

3

Readme

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

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

$ which-electron https://github.com/stoplightio/studio/releases/download/v2.3.0-stable.5931.git-67616e9/stoplight-studio-mac.dmg
Downloaded https://github.com/stoplightio/studio/releases/download/v2.3.0-stable.5931.git-67616e9/stoplight-studio-mac.dmg
/tmp/which-electronaN3QGg/stoplight-studio-mac.dmg
Fingerprint: v11.0.5-v11.1.1
v11.1.1 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 to a temporary directory at runtime if needed.

Known Issues

It is known to not work against:

  1. Windows setup files (ones with -setup in their name)
  2. On systems without 7-zip installed, it falls back to an older version of 7zip via the 7z-bin package on NPM. Unfortunately, the older version can't extract AppImage files correctly.

License

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