chore: remove connected-react-router (#5096)
This commit is contained in:
parent
a25fa6d66f
commit
4703406e4f
@ -29,7 +29,6 @@
|
|||||||
"ajv": "^7.0.0",
|
"ajv": "^7.0.0",
|
||||||
"ajv-errors": "^2.0.0",
|
"ajv-errors": "^2.0.0",
|
||||||
"ajv-keywords": "^4.0.0",
|
"ajv-keywords": "^4.0.0",
|
||||||
"connected-react-router": "^6.8.0",
|
|
||||||
"copy-text-to-clipboard": "^3.0.0",
|
"copy-text-to-clipboard": "^3.0.0",
|
||||||
"deepmerge": "^4.2.2",
|
"deepmerge": "^4.2.2",
|
||||||
"diacritics": "^1.3.0",
|
"diacritics": "^1.3.0",
|
||||||
|
9
packages/netlify-cms-core/src/bootstrap.js
vendored
9
packages/netlify-cms-core/src/bootstrap.js
vendored
@ -1,10 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { render } from 'react-dom';
|
import { render } from 'react-dom';
|
||||||
import { Provider, connect } from 'react-redux';
|
import { Provider, connect } from 'react-redux';
|
||||||
import { Route } from 'react-router-dom';
|
import { Route, Router } from 'react-router-dom';
|
||||||
import { ConnectedRouter } from 'connected-react-router';
|
|
||||||
import history from 'Routing/history';
|
|
||||||
import store from 'ReduxStore';
|
import store from 'ReduxStore';
|
||||||
|
import history from 'Routing/history';
|
||||||
import { loadConfig } from 'Actions/config';
|
import { loadConfig } from 'Actions/config';
|
||||||
import { authenticateUser } from 'Actions/auth';
|
import { authenticateUser } from 'Actions/auth';
|
||||||
import { getPhrases } from 'Lib/phrases';
|
import { getPhrases } from 'Lib/phrases';
|
||||||
@ -23,9 +22,9 @@ function TranslatedApp({ locale, config }) {
|
|||||||
return (
|
return (
|
||||||
<I18n locale={locale} messages={getPhrases(locale)}>
|
<I18n locale={locale} messages={getPhrases(locale)}>
|
||||||
<ErrorBoundary showBackup config={config}>
|
<ErrorBoundary showBackup config={config}>
|
||||||
<ConnectedRouter history={history}>
|
<Router history={history}>
|
||||||
<Route component={App} />
|
<Route component={App} />
|
||||||
</ConnectedRouter>
|
</Router>
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
</I18n>
|
</I18n>
|
||||||
);
|
);
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import { combineReducers } from 'redux';
|
import { combineReducers } from 'redux';
|
||||||
import { connectRouter } from 'connected-react-router';
|
|
||||||
import { reducer as notifReducer } from 'redux-notifications';
|
import { reducer as notifReducer } from 'redux-notifications';
|
||||||
import reducers from './index';
|
import reducers from './index';
|
||||||
|
|
||||||
function createRootReducer(history) {
|
function createRootReducer() {
|
||||||
return combineReducers({
|
return combineReducers({
|
||||||
...reducers,
|
...reducers,
|
||||||
notifs: notifReducer,
|
notifs: notifReducer,
|
||||||
router: connectRouter(history),
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1,22 +1,14 @@
|
|||||||
import { createStore, applyMiddleware, AnyAction } from 'redux';
|
import { createStore, applyMiddleware, AnyAction } from 'redux';
|
||||||
import { composeWithDevTools } from 'redux-devtools-extension';
|
import { composeWithDevTools } from 'redux-devtools-extension';
|
||||||
import thunkMiddleware, { ThunkMiddleware } from 'redux-thunk';
|
import thunkMiddleware, { ThunkMiddleware } from 'redux-thunk';
|
||||||
import { routerMiddleware } from 'connected-react-router';
|
|
||||||
import { waitUntilAction } from './middleware/waitUntilAction';
|
import { waitUntilAction } from './middleware/waitUntilAction';
|
||||||
import createRootReducer from '../reducers/combinedReducer';
|
import createRootReducer from '../reducers/combinedReducer';
|
||||||
import history from '../routing/history';
|
|
||||||
import { State } from '../types/redux';
|
import { State } from '../types/redux';
|
||||||
import { Reducer } from 'react';
|
import { Reducer } from 'react';
|
||||||
|
|
||||||
const store = createStore<State | undefined, AnyAction, unknown, unknown>(
|
const store = createStore<State | undefined, AnyAction, unknown, unknown>(
|
||||||
(createRootReducer(history) as unknown) as Reducer<State | undefined, AnyAction>,
|
(createRootReducer() as unknown) as Reducer<State | undefined, AnyAction>,
|
||||||
composeWithDevTools(
|
composeWithDevTools(applyMiddleware(thunkMiddleware as ThunkMiddleware<State>, waitUntilAction)),
|
||||||
applyMiddleware(
|
|
||||||
routerMiddleware(history),
|
|
||||||
thunkMiddleware as ThunkMiddleware<State, AnyAction>,
|
|
||||||
waitUntilAction,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
export default store;
|
export default store;
|
||||||
|
26
yarn.lock
26
yarn.lock
@ -6251,17 +6251,6 @@ connect-history-api-fallback@^1.6.0:
|
|||||||
resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc"
|
resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc"
|
||||||
integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==
|
integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==
|
||||||
|
|
||||||
connected-react-router@^6.8.0:
|
|
||||||
version "6.9.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/connected-react-router/-/connected-react-router-6.9.1.tgz#d842eebaa15b9920e2e45fc03d74e41110e94e4c"
|
|
||||||
integrity sha512-BbtB6t0iqAwGwygDenJl9zmlk7vpKWIRSycULmkAOn2RUaF6+bqETprl0qcIqQmY5CTqSwKanaxkLXYWiffAfQ==
|
|
||||||
dependencies:
|
|
||||||
lodash.isequalwith "^4.4.0"
|
|
||||||
prop-types "^15.7.2"
|
|
||||||
optionalDependencies:
|
|
||||||
immutable "^3.8.1 || ^4.0.0-rc.1"
|
|
||||||
seamless-immutable "^7.1.3"
|
|
||||||
|
|
||||||
console-browserify@^1.1.0:
|
console-browserify@^1.1.0:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336"
|
resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336"
|
||||||
@ -9895,11 +9884,6 @@ immutable@^3.7.6:
|
|||||||
resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3"
|
resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3"
|
||||||
integrity sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=
|
integrity sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=
|
||||||
|
|
||||||
"immutable@^3.8.1 || ^4.0.0-rc.1":
|
|
||||||
version "4.0.0-rc.12"
|
|
||||||
resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0-rc.12.tgz#ca59a7e4c19ae8d9bf74a97bdf0f6e2f2a5d0217"
|
|
||||||
integrity sha512-0M2XxkZLx/mi3t8NVwIm1g8nHoEmM9p9UBl/G9k4+hm0kBgOVdMV/B3CY5dQ8qG8qc80NN4gDV4HQv6FTJ5q7A==
|
|
||||||
|
|
||||||
import-cwd@^2.0.0:
|
import-cwd@^2.0.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9"
|
resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9"
|
||||||
@ -11789,11 +11773,6 @@ lodash.get@^4.4.2:
|
|||||||
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
|
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
|
||||||
integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=
|
integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=
|
||||||
|
|
||||||
lodash.isequalwith@^4.4.0:
|
|
||||||
version "4.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/lodash.isequalwith/-/lodash.isequalwith-4.4.0.tgz#266726ddd528f854f21f4ea98a065606e0fbc6b0"
|
|
||||||
integrity sha1-Jmcm3dUo+FTyH06pigZWBuD7xrA=
|
|
||||||
|
|
||||||
lodash.ismatch@^4.4.0:
|
lodash.ismatch@^4.4.0:
|
||||||
version "4.4.0"
|
version "4.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37"
|
resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37"
|
||||||
@ -15920,11 +15899,6 @@ schema-utils@^3.0.0:
|
|||||||
ajv "^6.12.5"
|
ajv "^6.12.5"
|
||||||
ajv-keywords "^3.5.2"
|
ajv-keywords "^3.5.2"
|
||||||
|
|
||||||
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==
|
|
||||||
|
|
||||||
section-matter@^1.0.0:
|
section-matter@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/section-matter/-/section-matter-1.0.0.tgz#e9041953506780ec01d59f292a19c7b850b84167"
|
resolved "https://registry.yarnpkg.com/section-matter/-/section-matter-1.0.0.tgz#e9041953506780ec01d59f292a19c7b850b84167"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user