From 9883452ea7ca7bb02050db268f1a1ab993ea7503 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Tue, 6 Nov 2018 10:28:47 +0100 Subject: [PATCH 1/2] chore(deps): update react (menu/hot-loader/spring) --- package.json | 6 +++--- yarn.lock | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index a5d1260b..5c18f721 100644 --- a/package.json +++ b/package.json @@ -331,16 +331,16 @@ "lodash.pick": "^4.4.0", "prop-types": "^15.6.2", "qrcode.react": "0.8.0", - "rc-menu": "^7.4.18", + "rc-menu": "^7.4.19", "react": "^16.6.0", "react-dom": "^16.6.0", - "react-hot-loader": "^4.3.11", + "react-hot-loader": "^4.3.12", "react-intl": "^2.7.2", "react-intl-redux": "^2.0.2", "react-redux": "^5.1.0", "react-router-dom": "^4.3.1", "react-router-redux": "^5.0.0-alpha.9", - "react-spring": "^6.1.5", + "react-spring": "^6.1.6", "rebass": "^3.0.0-9", "redux": "^4.0.0", "redux-electron-ipc": "^1.1.13", diff --git a/yarn.lock b/yarn.lock index 302ac2e0..04720c74 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13184,10 +13184,10 @@ rc-animate@2.x: raf "^3.4.0" react-lifecycles-compat "^3.0.4" -rc-menu@^7.4.18: - version "7.4.18" - resolved "https://registry.yarnpkg.com/rc-menu/-/rc-menu-7.4.18.tgz#485769269e6089e1932108868a5775a0fb431e47" - integrity sha512-E4zM+Qwar6DasJSNoggSUO54adekxTggpnMpPpnnJBRsblrCWF75O45xudou3FSsmmaMRziyxjydEOOF99pYRg== +rc-menu@^7.4.19: + version "7.4.19" + resolved "https://registry.yarnpkg.com/rc-menu/-/rc-menu-7.4.19.tgz#b65a35215966053fe6f6c3b7b12155051969f567" + integrity sha512-6rSQk9TsPcC7PuPS1sBXAG6HVUjUuXUO2gSzhxiZx/s9z0px91fd+FxbGbyZmRkPgku2mlZT2hfdIpWItYcPhQ== dependencies: babel-runtime "6.x" classnames "2.x" @@ -13347,10 +13347,10 @@ react-fuzzy@^0.5.2: fuse.js "^3.0.1" prop-types "^15.5.9" -react-hot-loader@^4.3.11: - version "4.3.11" - resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.3.11.tgz#fe5cf7be7700c249b58293f977c1e6e0900f0d87" - integrity sha512-T0G5jURyTsFLoiW6MTr5Q35UHC/B2pmYJ7+VBjk8yMDCEABRmCGy4g6QwxoB4pWg4/xYvVTa/Pbqnsgx/+NLuA== +react-hot-loader@^4.3.12: + version "4.3.12" + resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.3.12.tgz#0d56688884e7330c63a00a17217866280616b07a" + integrity sha512-GMM4TsqUVss2QPe+Y33NlgydA5/+7tAVQxR0rZqWvBpapM8JhD7p6ymMwSZzr5yxjoXXlK/6P6qNQBOqm1dqdg== dependencies: fast-levenshtein "^2.0.6" global "^4.3.0" @@ -13491,10 +13491,10 @@ react-split-pane@^0.1.77, react-split-pane@^0.1.84: react-lifecycles-compat "^3.0.4" react-style-proptype "^3.0.0" -react-spring@^6.1.5: - version "6.1.5" - resolved "https://registry.yarnpkg.com/react-spring/-/react-spring-6.1.5.tgz#37e6106f19a5c76e892eafb43a6eb434c4cacbfc" - integrity sha512-0gWXUu0g+CMGT0oSKxgeYfFrZ5fHrtwl0GpYjO+IMD7nVGR7JvxLXs8bNROB2IHOvzZpQolNRnQQD+WCR8U9dQ== +react-spring@^6.1.6: + version "6.1.6" + resolved "https://registry.yarnpkg.com/react-spring/-/react-spring-6.1.6.tgz#032671c051c0ec90408fcb8c8e7dc7934dd2e7fc" + integrity sha512-h5gKG5PWj6mk66XUMdEUt26TOCTF3ILdkrqL6InAxGYdD6IJ9mg+KYJygBzheZxzRfkOu/b+tCX1w69eNZu1aw== dependencies: "@babel/runtime" "^7.1.2" From 540d496dfadbe44f0bab8cf97aec0647014c0840 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Tue, 6 Nov 2018 10:57:25 +0100 Subject: [PATCH 2/2] chore(deps): update connected-react-router to v5.0.1 --- app/reducers/index.js | 59 ++++++++++++++++---------------- app/store/configureStore.dev.js | 12 +++---- app/store/configureStore.prod.js | 6 ++-- package.json | 2 +- yarn.lock | 24 +++---------- 5 files changed, 44 insertions(+), 59 deletions(-) diff --git a/app/reducers/index.js b/app/reducers/index.js index a079f95c..c3604e21 100644 --- a/app/reducers/index.js +++ b/app/reducers/index.js @@ -1,5 +1,5 @@ import { combineReducers } from 'redux' -// import { routerReducer as router } from 'react-router-redux' +import { connectRouter } from 'connected-react-router' import { intlReducer as intl } from 'react-intl-redux' import locale from './locale' import theme from './theme' @@ -23,33 +23,32 @@ import error from './error' import loading from './loading' import settings from './settings' -const rootReducer = combineReducers({ - // Third party reducers. - // router, - intl, - locale, - theme, +export default history => + combineReducers({ + // Third party reducers. + intl, + locale, + router: connectRouter(history), + theme, - // Custom reducers - onboarding, - lnd, - ticker, - info, - balance, - payment, - peers, - channels, - contactsform, - form, - pay, - invoice, - address, - transaction, - activity, - network, - error, - loading, - settings -}) - -export default rootReducer + // Custom reducers + onboarding, + lnd, + ticker, + info, + balance, + payment, + peers, + channels, + contactsform, + form, + pay, + invoice, + address, + transaction, + activity, + network, + error, + loading, + settings + }) diff --git a/app/store/configureStore.dev.js b/app/store/configureStore.dev.js index b3c4dff4..b89a669e 100644 --- a/app/store/configureStore.dev.js +++ b/app/store/configureStore.dev.js @@ -1,9 +1,9 @@ import { createStore, applyMiddleware, compose } from 'redux' import thunk from 'redux-thunk' import { createMemoryHistory } from 'history' -import { connectRouter, routerActions, routerMiddleware } from 'connected-react-router' +import { routerActions, routerMiddleware } from 'connected-react-router' import { createLogger } from 'redux-logger' -import rootReducer from '../reducers' +import createRootReducer from '../reducers' import ipc from '../reducers/ipc' export const history = createMemoryHistory() @@ -46,13 +46,13 @@ export const configureStore = initialState => { const enhancer = composeEnhancers(...enhancers) // Create Store - const store = createStore(connectRouter(history)(rootReducer), initialState, enhancer) + const store = createStore(createRootReducer(history), initialState, enhancer) if (module.hot) { // eslint-disable-next-line global-require - module.hot.accept('../reducers', () => - store.replaceReducer(connectRouter(history)(require('../reducers'))) - ) + module.hot.accept('../reducers', () => { + store.replaceReducer(createRootReducer(history)) + }) } return store diff --git a/app/store/configureStore.prod.js b/app/store/configureStore.prod.js index 465af553..90d85745 100644 --- a/app/store/configureStore.prod.js +++ b/app/store/configureStore.prod.js @@ -1,8 +1,8 @@ import { createStore, applyMiddleware, compose } from 'redux' import thunk from 'redux-thunk' import { createHashHistory } from 'history' -import { connectRouter, routerMiddleware } from 'connected-react-router' -import rootReducer from '../reducers' +import { routerMiddleware } from 'connected-react-router' +import createRootReducer from '../reducers' import ipc from '../reducers/ipc' export const history = createHashHistory({ basename: window.location.pathname }) @@ -22,5 +22,5 @@ export function configureStore(initialState) { enhancers.push(applyMiddleware(...middleware)) const enhancer = compose(...enhancers) - return createStore(connectRouter(history)(rootReducer), initialState, enhancer) + return createStore(createRootReducer(history), initialState, enhancer) } diff --git a/package.json b/package.json index 5c18f721..ec312cd5 100644 --- a/package.json +++ b/package.json @@ -311,7 +311,7 @@ "axios": "^0.18.0", "bitcoinjs-lib": "^4.0.1", "bolt11": "https://github.com/bitcoinjs/bolt11.git", - "connected-react-router": "^4.5.0", + "connected-react-router": "^5.0.1", "copy-to-clipboard": "^3.0.8", "country-data-lookup": "^0.0.3", "debug": "^4.1.0", diff --git a/yarn.lock b/yarn.lock index 04720c74..6bf9acae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5087,13 +5087,12 @@ connect-history-api-fallback@^1.3.0: resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" integrity sha1-sGhzk0vF40T+9hGhlqb6rgruAVo= -connected-react-router@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/connected-react-router/-/connected-react-router-4.5.0.tgz#b6f021cc284a244fbee70e16e5ff0f2a4613e3d3" - integrity sha512-SBBmAZrtmw4y7Rkl2PCct8lN/DuCftl7QSAFLgFyjjuYkeJKAzAvQjzNNNE4R3j2+6a4TUiv8qselxQ4+6H5eA== +connected-react-router@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/connected-react-router/-/connected-react-router-5.0.1.tgz#8379854fad7e027b1e27652c00ad534f8ad244b3" + integrity sha512-0QwWYPRGZQ7f284lmqc5kwC4T3iW3zrAH3zzi6uUMzTOxbA+mn38tAgMOoVo9m3pbskvONFtXiajgVkCElE9EQ== dependencies: immutable "^3.8.1" - redux-seamless-immutable "^0.4.0" seamless-immutable "^7.1.3" console-browserify@1.1.x, console-browserify@^1.1.0: @@ -13454,11 +13453,6 @@ react-router-dom@^4.3.1: react-router "^4.3.1" warning "^4.0.1" -react-router-redux@^4.0.0: - version "4.0.8" - resolved "https://registry.yarnpkg.com/react-router-redux/-/react-router-redux-4.0.8.tgz#227403596b5151e182377dab835b5d45f0f8054e" - integrity sha1-InQDWWtRUeGCN32rg1tdRfD4BU4= - react-router-redux@^5.0.0-alpha.9: version "5.0.0-alpha.9" resolved "https://registry.yarnpkg.com/react-router-redux/-/react-router-redux-5.0.0-alpha.9.tgz#825431516e0e6f1fd93b8807f6bd595e23ec3d10" @@ -13883,14 +13877,6 @@ redux-logger@^3.0.6: dependencies: deep-diff "^0.3.5" -redux-seamless-immutable@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/redux-seamless-immutable/-/redux-seamless-immutable-0.4.0.tgz#b50f8680ecc5ef04021551267f78fa1ffd3cf985" - integrity sha512-/oS3fhrize9D3RSHemgJxVllohybRrad5IjccotFy8Ni4IKAPTtX1mqszpiCIl12+7v0dNqBpq6ES6R236AliQ== - dependencies: - react-router-redux "^4.0.0" - seamless-immutable "^7.1.2" - redux-thunk@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622" @@ -14545,7 +14531,7 @@ scss-tokenizer@^0.2.3: js-base64 "^2.1.8" source-map "^0.4.2" -seamless-immutable@^7.1.2, seamless-immutable@^7.1.3: +seamless-immutable@^7.1.3: version "7.1.4" resolved "https://registry.yarnpkg.com/seamless-immutable/-/seamless-immutable-7.1.4.tgz#6e9536def083ddc4dea0207d722e0e80d0f372f8" integrity sha512-XiUO1QP4ki4E2PHegiGAlu6r82o5A+6tRh7IkGGTVg/h+UoeX4nFBeCGPOhb4CYjvkqsfm/TUtvOMYC1xmV30A==