Skip to content

Commit

Permalink
chore(update): use electron builder default autoupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
ritz078 committed Apr 26, 2020
1 parent 3024170 commit 6288e77
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 45 deletions.
5 changes: 2 additions & 3 deletions main/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import serve from "electron-serve";
import createWindow from "./helpers/createWindow";
import getPort from "get-port";
import { name } from "../package.json";
const { autoUpdater } = require("electron-updater");

// import modules
import { setMenu } from "./modules/menu";
Expand All @@ -14,7 +15,6 @@ import { createServer, closeServer } from "./server";
import client from "./utils/webtorrent";
import { cleanup } from "./modules/cast";
import { EventEmitter } from "events";
import { checkForUpdate } from "./utils/checkForUpdate";

EventEmitter.defaultMaxListeners = 0;

Expand All @@ -33,8 +33,7 @@ if (app.isPackaged) {

async function _createWindow() {
await app.whenReady();

await checkForUpdate();
await autoUpdater.checkForUpdatesAndNotify();

const apiPort = await getPort({
port: getPort.makeRange(3000, 3010),
Expand Down
29 changes: 0 additions & 29 deletions main/utils/checkForUpdate.ts

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"internal-ip": "^6.0.0",
"mime": "^2.4.4",
"range-parser": "^1.2.1",
"semver": "^7.3.2",
"vlc-command": "^1.2.0",
"webtorrent": "0.108.1"
},
Expand All @@ -48,6 +47,7 @@
"electron": "^8.2.3",
"electron-builder": "^22.5.1",
"electron-notarize": "^0.3.0",
"electron-updater": "^4.2.5",
"husky": "^4.2.3",
"imagemin-lint-staged": "^0.4.0",
"lint-staged": "^10.1.7",
Expand Down
13 changes: 7 additions & 6 deletions website/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,19 @@ export default () => {
</div>
</div>
</div>
<div className="demo-wrapper">
<ProgressiveImage src="/demo.png" placeholder="/demo-small.png">
{(src) => (

<ProgressiveImage src="/demo.png" placeholder="/demo-small.png">
{(src) => (
<div className="demo-wrapper">
<div
className="demo"
style={{
backgroundImage: `url(${src})`,
}}
/>
)}
</ProgressiveImage>
</div>
</div>
)}
</ProgressiveImage>
</div>

<footer>
Expand Down
41 changes: 35 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,13 @@
"@types/prop-types" "*"
csstype "^2.2.0"

"@types/semver@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.1.0.tgz#c8c630d4c18cd326beff77404887596f96408408"
integrity sha512-pOKLaubrAEMUItGNpgwl0HMFPrSAFic8oSVIvfu1UwcgGNmNyK9gyhBHKmBnUTwwVvpZfkzUC0GaMgnL6P86uA==
dependencies:
"@types/node" "*"

"@types/serve-static@*":
version "1.13.3"
resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.3.tgz#eb7e1c41c4468272557e897e9171ded5e2ded9d1"
Expand Down Expand Up @@ -2214,6 +2221,14 @@ bufferutil@^4.0.0:
dependencies:
node-gyp-build "~3.7.0"

[email protected]:
version "8.6.2"
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-8.6.2.tgz#8270e15b012d8d3b110f3e327b0fd8b0e07b1686"
integrity sha512-9QnIBISfhgQ2BxtRLidVqf/v5HD73vSKZDllpUmGd2L6VORGQk7cZAPmPtw4HQM3gPBelyVJ5yIjMNZ8xjmd1A==
dependencies:
debug "^4.1.1"
sax "^1.2.4"

[email protected]:
version "8.7.0"
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-8.7.0.tgz#e48ad004835c8284662e8eaf47a53468c66e8e8d"
Expand Down Expand Up @@ -3618,6 +3633,20 @@ electron-to-chromium@^1.3.413:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.418.tgz#840021191f466b803a873e154113620c9f53cec6"
integrity sha512-i2QrQtHes5fK/F9QGG5XacM5WKEuR322fxTYF9e8O9Gu0mc0WmjjwGpV8c7Htso6Zf2Di18lc3SIPxmMeRFBug==

electron-updater@^4.2.5:
version "4.2.5"
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-4.2.5.tgz#dbced8da6f8c6fc2dc662f2776131f5a49ce018d"
integrity sha512-ir8SI3capF5pN4LTQY79bP7oqiBKjgtdDW378xVId5VcGUZ+Toei2j+fgx1mq3y4Qg19z4HqLxEZ9FqMD0T0RA==
dependencies:
"@types/semver" "^7.1.0"
builder-util-runtime "8.6.2"
fs-extra "^8.1.0"
js-yaml "^3.13.1"
lazy-val "^1.0.4"
lodash.isequal "^4.5.0"
pako "^1.0.11"
semver "^7.1.3"

electron-util@^0.14.1:
version "0.14.1"
resolved "https://registry.yarnpkg.com/electron-util/-/electron-util-0.14.1.tgz#047095c9ac76582612e7e496b0b9c70b73e9ca6c"
Expand Down Expand Up @@ -5719,6 +5748,11 @@ lodash.debounce@^4.0.8:
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=

lodash.isequal@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA=

lodash.memoize@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
Expand Down Expand Up @@ -6753,7 +6787,7 @@ package-json@^6.3.0:
registry-url "^5.0.0"
semver "^6.2.0"

pako@~1.0.5:
pako@^1.0.11, pako@~1.0.5:
version "1.0.11"
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==
Expand Down Expand Up @@ -8215,11 +8249,6 @@ semver@^7.1.3:
resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6"
integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA==

semver@^7.3.2:
version "7.3.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==

[email protected]:
version "0.17.1"
resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
Expand Down

0 comments on commit 6288e77

Please sign in to comment.