From a83a0204f4953d33a41aa73e14f975eb63a2ffb4 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Fri, 5 Nov 2021 14:38:20 -0400 Subject: [PATCH] Remove deprecated updateStore method --- extension/src/app/api/index.ts | 19 ------------------- .../browser/extension/inject/pageScript.ts | 6 ------ 2 files changed, 25 deletions(-) diff --git a/extension/src/app/api/index.ts b/extension/src/app/api/index.ts index 4128de21..12e0213c 100644 --- a/extension/src/app/api/index.ts +++ b/extension/src/app/api/index.ts @@ -707,25 +707,6 @@ export function connect(preConfig: Config): ConnectResponse { }; } -export function updateStore>(stores: { - [K in string | number]: EnhancedStore; -}) { - return function (newStore: EnhancedStore, instanceId: number) { - /* eslint-disable no-console */ - console.warn( - '`__REDUX_DEVTOOLS_EXTENSION__.updateStore` is deprecated, remove it and just use ' + - "`__REDUX_DEVTOOLS_EXTENSION_COMPOSE__` instead of the extension's store enhancer: " + - 'https://github.com/zalmoxisus/redux-devtools-extension#12-advanced-store-setup' - ); - /* eslint-enable no-console */ - const store = stores[instanceId || Object.keys(stores)[0]]; - // Mutate the store in order to keep the reference - store.liftedStore = newStore.liftedStore; - store.getState = newStore.getState; - store.dispatch = newStore.dispatch; - }; -} - export function isInIframe() { try { return window.self !== window.top; diff --git a/extension/src/browser/extension/inject/pageScript.ts b/extension/src/browser/extension/inject/pageScript.ts index 33808c23..98d19758 100644 --- a/extension/src/browser/extension/inject/pageScript.ts +++ b/extension/src/browser/extension/inject/pageScript.ts @@ -31,7 +31,6 @@ import importState from '../../../app/api/importState'; import openWindow, { Position } from '../../../app/api/openWindow'; import generateId from '../../../app/api/generateInstanceId'; import { - updateStore, toContentScript, sendMessage, setListener, @@ -158,10 +157,6 @@ interface ReduxDevtoolsExtension { ): Store; (config?: Config): StoreEnhancer; open: (position?: Position) => void; - updateStore: ( - newStore: EnhancedStore, unknown>, - instanceId: number - ) => void; notifyErrors: (onError?: () => boolean) => void; send: >( action: StructuralPerformAction | StructuralPerformAction[], @@ -634,7 +629,6 @@ declare global { // noinspection JSAnnotator window.__REDUX_DEVTOOLS_EXTENSION__ = __REDUX_DEVTOOLS_EXTENSION__ as any; window.__REDUX_DEVTOOLS_EXTENSION__.open = openWindow; -window.__REDUX_DEVTOOLS_EXTENSION__.updateStore = updateStore(stores); window.__REDUX_DEVTOOLS_EXTENSION__.notifyErrors = notifyErrors; window.__REDUX_DEVTOOLS_EXTENSION__.send = sendMessage; window.__REDUX_DEVTOOLS_EXTENSION__.listen = setListener;