electron-releases
Complete and up-to-date info about every release of Electron.
This package:
Sources
This module collects metadata from various sources:
Installation
npm i electron-releases
Usage
The module exports an array of release objects:
const releases = require('electron-releases')
releases[0].tag_name
releases.find(release => release.npm_dist_tag === 'latest')
releases.find(release => release.npm_dist_tag === 'beta')
Lite Version
The default export is about 75MB, as it includes a lot of metadata from the
GitHub API like release assets.
If you just need the basic info like version numbers, npm dist tags, and publish dates, there's a much smaller (<500K) dataset you can use:
require('electron-releases/lite.json')
You can also get this at unpkg.com/electron-releases/lite.json
Data
Each release contains all the data returned by the
GitHub Releases API,
plus some extra properties:
version
(String) - the same thing as dist_tag
, but without the v
for convenient semver comparisons.npm_dist_tags
(Array) - an array of npm dist-tags like "latest"
or "beta"
. Most releases will have an empty array for this property.npm_package_name
(String) - For packages published to npm, this will be electron
or electron-prebuilt
. For packages not published to npm, this property will not exist.total_downloads
(Number) - Total downloads of all assets in the release that
have a detectable platform in their
filename like .zip
, .dmg
, .exe
, .rpm
, .deb
, etc.deps
(Object) - version numbers for Electron dependencies.
v8
(String)chromium
(String)node
(String)- etc..
Updates
This module is self-publishing. It runs in a GitHub Action cron job every
six hours. A new version of this module is published if any of
the following change:
- number of Electron releases on GitHub
- number of Electron releases on npm
- npm
electron@beta
version - npm
electron@latest
version
If none of these has changed, the build process aborts and runs again ten minutes
later. For more detail, see script/release.sh
The Heroku app is also synced to the GitHub repo, so every push to the
master
branch will automatically deploy a new version of this app.
Manually update
If you need to modify any file in the script
folder, you'll also want
to manually regenerate this module's output files. You can do so with
the following steps:
- Create a personal access token. Note that if Electron maintainers must enable SSO
for the
electron
org for this token to work. - Copy the
.env.example
file into a separate .env
file.
cp .env.example .env
- Paste your token into the
GH_TOKEN
field of the .env
file. - Build the module.
npm run build
- Check if all tests passed:
npm test
Tests
npm install
npm test
License
MIT
Releases