From cf94212e8ed718bf7c93481250bc599769b131dd Mon Sep 17 00:00:00 2001 From: Igor Gassmann Date: Tue, 21 Nov 2017 17:09:20 -0300 Subject: [PATCH] HOTFIX: fix import paths --- ui/js/component/header/index.js | 4 ++-- ui/js/redux/actions/app.js | 41 +++++++++++++++++---------------- yarn.lock | 23 ++++++++++++++++++ 3 files changed, 46 insertions(+), 22 deletions(-) diff --git a/ui/js/component/header/index.js b/ui/js/component/header/index.js index 4e2a2d078..f0f171511 100644 --- a/ui/js/component/header/index.js +++ b/ui/js/component/header/index.js @@ -12,8 +12,8 @@ import { doHistoryForward, } from "redux/actions/navigation"; import Header from "./view"; -import { selectIsUpgradeAvailable } from "../../selectors/app"; -import { doDownloadUpgrade } from "../../actions/app"; +import { selectIsUpgradeAvailable } from "redux/selectors/app"; +import { doDownloadUpgrade } from "redux/actions/app"; const select = state => ({ isBackDisabled: selectIsBackDisabled(state), diff --git a/ui/js/redux/actions/app.js b/ui/js/redux/actions/app.js index 93f93b8ca..91f5f795e 100644 --- a/ui/js/redux/actions/app.js +++ b/ui/js/redux/actions/app.js @@ -13,8 +13,8 @@ import { doBalanceSubscribe } from "redux/actions/wallet"; import { doAuthenticate } from "redux/actions/user"; import { doFetchFileInfosAndPublishedClaims } from "redux/actions/file_info"; import * as modals from "constants/modal_types"; -import { doFetchRewardedContent } from "actions/content"; -import { selectCurrentModal } from "../selectors/app"; +import { doFetchRewardedContent } from "redux/actions/content"; +import { selectCurrentModal } from "redux/selectors/app"; const { remote, ipcRenderer, shell } = require("electron"); const path = require("path"); @@ -68,31 +68,33 @@ export function doDownloadUpgrade() { const state = getState(); // Make a new directory within temp directory so the filename is guaranteed to be available const dir = fs.mkdtempSync( - remote.app.getPath("temp") + require("path").sep - ), + remote.app.getPath("temp") + require("path").sep + ), upgradeFilename = selectUpgradeFilename(state); let options = { onProgress: p => dispatch(doUpdateDownloadProgress(Math.round(p * 100))), directory: dir, }; - download(remote.getCurrentWindow(), selectUpdateUrl(state), options).then( - downloadItem => { - /** + download( + remote.getCurrentWindow(), + selectUpdateUrl(state), + options + ).then(downloadItem => { + /** * TODO: get the download path directly from the download object. It should just be * downloadItem.getSavePath(), but the copy on the main process is being garbage collected * too soon. */ - dispatch({ - type: types.UPGRADE_DOWNLOAD_COMPLETED, - data: { - downloadItem, - path: path.join(dir, upgradeFilename), - }, - }); - } - ); + dispatch({ + type: types.UPGRADE_DOWNLOAD_COMPLETED, + data: { + downloadItem, + path: path.join(dir, upgradeFilename), + }, + }); + }); dispatch({ type: types.UPGRADE_DOWNLOAD_STARTED, @@ -190,10 +192,9 @@ export function doCheckDaemonVersion() { return function(dispatch, getState) { lbry.version().then(({ lbrynet_version }) => { dispatch({ - type: - config.lbrynetDaemonVersion == lbrynet_version - ? types.DAEMON_VERSION_MATCH - : types.DAEMON_VERSION_MISMATCH, + type: config.lbrynetDaemonVersion == lbrynet_version + ? types.DAEMON_VERSION_MATCH + : types.DAEMON_VERSION_MISMATCH, }); }); }; diff --git a/yarn.lock b/yarn.lock index 3119be846..52ca5eb3a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,6 +22,10 @@ "7zip-bin-mac" "^1.0.1" "7zip-bin-win" "^2.1.0" +"7zip@0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30" + "@types/node@^7.0.18": version "7.0.43" resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c" @@ -283,6 +287,10 @@ create-error-class@^3.0.1: dependencies: capture-stack-trace "^1.0.0" +cross-unzip@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/cross-unzip/-/cross-unzip-0.0.2.tgz#5183bc47a09559befcf98cc4657964999359372f" + cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -428,6 +436,15 @@ electron-debug@^1.4.0: electron-is-dev "^0.3.0" electron-localshortcut "^3.0.0" +electron-devtools-installer@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/electron-devtools-installer/-/electron-devtools-installer-2.2.1.tgz#0beb73ccbf65cbc4d09e706cebda638f839b8c55" + dependencies: + "7zip" "0.0.6" + cross-unzip "0.0.2" + rimraf "^2.5.2" + semver "^5.3.0" + electron-download-tf@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/electron-download-tf/-/electron-download-tf-3.1.0.tgz#c6d62c0e0a4c63b67295f57b6b66514c13b8ed8d" @@ -1317,6 +1334,12 @@ rimraf@^2.2.8: dependencies: glob "^7.0.5" +rimraf@^2.5.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + safe-buffer@^5.0.1, safe-buffer@~5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"