From 6cd8af91be35aaf68a9d038caddbb28b19eace1b Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 7 Aug 2019 09:51:08 -0700 Subject: [PATCH] Update to Electron 5 --- package-lock.json | 6 +++--- package.json | 2 +- src/main/windows/about.js | 3 +++ src/main/windows/main.js | 3 +++ src/main/windows/webtorrent.js | 3 +++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 601b5c1e..e2c171e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2614,9 +2614,9 @@ "dev": true }, "electron": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/electron/-/electron-4.2.8.tgz", - "integrity": "sha512-/D9zfs+EWLN4yLV7tu2kWyXUnZQ3CKG1cmWbXeSFXF+0dNXQ8iFpY49dqZRoHGIBImFfp2x4N3Zc5Tu7rw3PJw==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/electron/-/electron-5.0.9.tgz", + "integrity": "sha512-yCt+lnQr47OWB3Oei19odMVB8VKzecTwZLm75PB56f/keeJAM3UqV7+dtjKlPdKt0hJ4sWxe4vjxGPO/oZDv7A==", "dev": true, "requires": { "@types/node": "^10.12.18", diff --git a/package.json b/package.json index ab1d1275..412ae82f 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "buble": "^0.19.6", "cross-zip": "^2.0.1", "depcheck": "^0.8.0", - "electron": "^4.0.0", + "electron": "~5.0.9", "electron-osx-sign": "^0.4.11", "electron-packager": "^14.0.4", "electron-winstaller": "^2.6.4", diff --git a/src/main/windows/about.js b/src/main/windows/about.js index 83cc5155..fc16d517 100644 --- a/src/main/windows/about.js +++ b/src/main/windows/about.js @@ -24,6 +24,9 @@ function init () { skipTaskbar: true, title: 'About ' + config.APP_WINDOW_TITLE, useContentSize: true, + webPreferences: { + nodeIntegration: true + }, width: 300 }) diff --git a/src/main/windows/main.js b/src/main/windows/main.js index 06e6c408..dbfb7d0c 100644 --- a/src/main/windows/main.js +++ b/src/main/windows/main.js @@ -43,6 +43,9 @@ function init (state, options) { titleBarStyle: 'hiddenInset', // Hide title bar (Mac) useContentSize: true, // Specify web page size without OS chrome width: initialBounds.width, + webPreferences: { + nodeIntegration: true + }, x: initialBounds.x, y: initialBounds.y }) diff --git a/src/main/windows/webtorrent.js b/src/main/windows/webtorrent.js index ec0ccd2b..8c58043b 100644 --- a/src/main/windows/webtorrent.js +++ b/src/main/windows/webtorrent.js @@ -25,6 +25,9 @@ function init () { skipTaskbar: true, title: 'webtorrent-hidden-window', useContentSize: true, + webPreferences: { + nodeIntegration: true + }, width: 150 })