107 lines
3.9 KiB
Markdown
107 lines
3.9 KiB
Markdown
# electron-releases
|
|
|
|
> Complete and up-to-date info about every release of Electron.
|
|
|
|
This package:
|
|
|
|
- includes all [GitHub Releases](https://developer.github.com/v3/repos/releases/#get-a-single-release) data about Electron.
|
|
- does not include draft releases.
|
|
- includes prereleases which are not published to npm.
|
|
- tracks which versions are published to npm.
|
|
- tracks [npm dist-tags](https://docs.npmjs.com/cli/dist-tag) like `latest` and `beta`.
|
|
- includes V8, Chromium, and Node.js version data.
|
|
- includes [GitHub-flavored HTML](https://ghub.io/hubdown) for each release's changelog.
|
|
- ignores npm versions from the days before [Electron was `electron`](https://electronjs.org/blog/npm-install-electron).
|
|
- is [updated regularly](#updates).
|
|
|
|
## Installation
|
|
|
|
```sh
|
|
npm i electron-releases
|
|
```
|
|
|
|
## Usage
|
|
|
|
The module exports an array of release objects:
|
|
|
|
```js
|
|
const releases = require('electron-releases')
|
|
|
|
// find newest version:
|
|
releases[0].tag_name // => 'v1.8.2-beta.3'
|
|
|
|
// find `latest` on npm, which is not necessarily the most recent release:
|
|
releases.find(release => release.npm_dist_tag === 'latest')
|
|
|
|
// find `beta` on npm:
|
|
releases.find(release => release.npm_dist_tag === 'beta')
|
|
```
|
|
|
|
### Data
|
|
|
|
Each release contains all the data returned by the
|
|
[GitHub Releases API](https://developer.github.com/v3/repos/releases/#get-a-single-release),
|
|
plus some extra properties:
|
|
|
|
- `version` (String) - the same thing as `dist_tag`, but without the `v` for convenient [semver comparisons](https://github.com/npm/node-semver#usage).
|
|
- `npm_dist_tag` (String) - an [npm dist-tag](https://docs.npmjs.com/cli/dist-tag) like `latest` or `beta`. Most releases will not have 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](https://github.com/zeke/platform-utils#api) 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
|
|
[Heroku Scheduler](https://devcenter.heroku.com/articles/scheduler)
|
|
process every ten minutes. 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](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.
|
|
|
|
## Tests
|
|
|
|
```sh
|
|
npm install
|
|
npm test
|
|
```
|
|
|
|
## Dependencies
|
|
|
|
None
|
|
|
|
## Dev Dependencies
|
|
|
|
- [chai](https://github.com/chaijs/chai): BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
|
|
- [check-for-leaks](): avoid publishing secrets to git and npm
|
|
- [dotenv-safe](https://github.com/rolodato/dotenv-safe): Load environment variables from .env and ensure they are defined
|
|
- [github](): NodeJS wrapper for the GitHub API
|
|
- [got](): Simplified HTTP requests
|
|
- [hubdown](): Convert markdown to GitHub-style HTML using a common set of remark plugins
|
|
- [lodash](): Lodash modular utilities.
|
|
- [mocha](https://github.com/mochajs/mocha): simple, flexible, fun test framework
|
|
- [npm](https://github.com/npm/npm): a package manager for JavaScript
|
|
- [parse-link-header](https://github.com/thlorenz/parse-link-header): Parses a link header and returns paging information for each contained link.
|
|
- [semver](): The semantic version parser used by npm.
|
|
- [standard](https://github.com/standard/standard): JavaScript Standard Style
|
|
- [standard-markdown](): Test your Markdown files for Standard JavaScript Style™
|
|
|
|
|
|
## License
|
|
|
|
MIT
|