The autoUpdater enables an electron app to check the latest version and update itself automatically. 1

Installation

You can install autoUpdater via NPM or yarn:

npm install --save—dev electron-updater

or

yarn add electron-updater

Example

In main .js file of electron, autoUpdater can be defined as follows:

// main.js
const { autoUpdater } = require("electron-updater");

autoUpdater.setFeedURL({
    provider: "github",
    host: "github.com",
    owner: "{ username }",
    repo: "{ repository }",
    token: "{ token }",
});

Events

Properties

Methods

  1. https://www.electronjs.org/docs/latest/api/auto-updater