diff --git a/packages/holocron/__tests__/holocronModule.spec.jsx b/packages/holocron/__tests__/holocronModule.spec.jsx index 84a12ba..9f4791d 100644 --- a/packages/holocron/__tests__/holocronModule.spec.jsx +++ b/packages/holocron/__tests__/holocronModule.spec.jsx @@ -15,7 +15,7 @@ /* eslint-disable react/prop-types, import/no-extraneous-dependencies -- disable for tests */ import React from 'react'; import { createStore, applyMiddleware } from 'redux'; -import { withExtraArgument, thunk } from 'redux-thunk'; +import thunk from 'redux-thunk'; import { combineReducers as immutableCombineReducers } from 'redux-immutable'; import { Provider, connect } from 'react-redux'; import { fromJS } from 'immutable'; @@ -399,7 +399,7 @@ describe('holocronModule', () => { })(TestComponent); const mockStore = createStore( (state) => state, - applyMiddleware(withExtraArgument({ fetchClient: jest.fn() })) + applyMiddleware(thunk.withExtraArgument({ fetchClient: jest.fn() })) ); render( diff --git a/packages/holocron/package.json b/packages/holocron/package.json index 63e0daa..18e9e09 100644 --- a/packages/holocron/package.json +++ b/packages/holocron/package.json @@ -35,7 +35,7 @@ "immutable": "^4.0.0-rc.12", "prop-types": "^15.5.10", "redux-immutable": "^4.0.0", - "redux-thunk": "^3.1.0", + "redux-thunk": "^2.1.0", "require-from-string": "^1.2.1", "reselect": "^4.0.0", "semver": "^7.3.8", diff --git a/packages/holocron/src/createHolocronStore.js b/packages/holocron/src/createHolocronStore.js index e7604e4..5f2924a 100644 --- a/packages/holocron/src/createHolocronStore.js +++ b/packages/holocron/src/createHolocronStore.js @@ -14,7 +14,7 @@ import { createStore, compose } from 'redux'; import immutableCombineReducers from '@americanexpress/vitruvius/immutable'; -import { withExtraArgument } from 'redux-thunk'; +import thunk from 'redux-thunk'; import { Map as iMap, Set as iSet, isImmutable } from 'immutable'; import holocronReducer from './ducks/load'; @@ -116,7 +116,7 @@ const holocronEnhancer = (localsForBuildInitialState, extraThunkArguments = {}) getState: store.getState, dispatch: (action) => dispatch(action), }; - dispatch = withExtraArgument({ + dispatch = thunk.withExtraArgument({ ...extraThunkArguments, rebuildReducer, modules: store.modules, diff --git a/yarn.lock b/yarn.lock index 9729e24..ec406ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9559,10 +9559,10 @@ redux-immutable@^4.0.0: resolved "https://registry.yarnpkg.com/redux-immutable/-/redux-immutable-4.0.0.tgz#3a1a32df66366462b63691f0e1dc35e472bbc9f3" integrity sha512-SchSn/DWfGb3oAejd+1hhHx01xUoxY+V7TeK0BKqpkLKiQPVFf7DYzEaKmrEVxsWxielKfSK9/Xq66YyxgR1cg== -redux-thunk@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-3.1.0.tgz#94aa6e04977c30e14e892eae84978c1af6058ff3" - integrity sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw== +redux-thunk@^2.1.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.4.2.tgz#b9d05d11994b99f7a91ea223e8b04cf0afa5ef3b" + integrity sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q== redux@^4.0.0, redux@^4.0.4: version "4.2.1"