From 039b6fa280c83a3059d13857f7786545cd2f06be Mon Sep 17 00:00:00 2001 From: Maksym Dogadailo Date: Sun, 23 Sep 2018 17:51:56 +0200 Subject: [PATCH] Replace node-fetch with electron-fetch (#3108) --- app/auto-updater-linux.js | 2 +- app/notifications.js | 2 +- app/package.json | 2 +- app/yarn.lock | 10 ++++++++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/auto-updater-linux.js b/app/auto-updater-linux.js index 80c2b057..31dd23d8 100644 --- a/app/auto-updater-linux.js +++ b/app/auto-updater-linux.js @@ -1,6 +1,6 @@ 'use strict'; -const fetch = require('node-fetch'); +const fetch = require('electron-fetch'); const {EventEmitter} = require('events'); class AutoUpdater extends EventEmitter { diff --git a/app/notifications.js b/app/notifications.js index 1c7b5b91..c7ca21ab 100644 --- a/app/notifications.js +++ b/app/notifications.js @@ -1,5 +1,5 @@ const ms = require('ms'); -const fetch = require('node-fetch'); +const fetch = require('electron-fetch'); const {version} = require('./package'); diff --git a/app/package.json b/app/package.json index 99f1e812..64ddc73a 100644 --- a/app/package.json +++ b/app/package.json @@ -15,6 +15,7 @@ "convert-css-color-name-to-hex": "0.1.1", "default-shell": "1.0.1", "electron-config": "1.0.0", + "electron-fetch": "1.1.0", "electron-is-dev": "0.3.0", "electron-squirrel-startup": "1.0.0", "file-uri-to-path": "1.0.0", @@ -22,7 +23,6 @@ "lodash": "4.17.5", "mkdirp": "0.5.1", "ms": "2.1.1", - "node-fetch": "1.7.3", "node-pty": "0.7.4", "os-locale": "2.1.0", "parse-url": "3.0.2", diff --git a/app/yarn.lock b/app/yarn.lock index d97f88b2..0f397b6a 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -106,6 +106,12 @@ electron-config@1.0.0: dependencies: conf "^1.0.0" +electron-fetch@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/electron-fetch/-/electron-fetch-1.1.0.tgz#74b0ea547fe149620d38596a84fb104d34218e31" + dependencies: + encoding "^0.1.12" + electron-is-dev@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/electron-is-dev/-/electron-is-dev-0.3.0.tgz#14e6fda5c68e9e4ecbeff9ccf037cbd7c05c5afe" @@ -116,7 +122,7 @@ electron-squirrel-startup@1.0.0: dependencies: debug "^2.2.0" -encoding@^0.1.11: +encoding@^0.1.11, encoding@^0.1.12: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" dependencies: @@ -326,7 +332,7 @@ nan@^2.6.2: version "2.7.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" -node-fetch@1.7.3, node-fetch@^1.0.1: +node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" dependencies: