diff --git a/packages/redux-devtools-app/package.json b/packages/redux-devtools-app/package.json index 0a02084b58..f81bd4c060 100644 --- a/packages/redux-devtools-app/package.json +++ b/packages/redux-devtools-app/package.json @@ -43,7 +43,6 @@ "@redux-devtools/ui": "^1.3.2", "localforage": "^1.10.0", "jsan": "^3.1.14", - "lodash": "^4.17.21", "react-redux": "^9.1.2", "redux": "^5.0.1", "redux-persist": "^6.0.0", @@ -62,7 +61,6 @@ "@rjsf/core": "^5.20.0", "@types/jsan": "^3.1.5", "@types/json-schema": "^7.0.15", - "@types/lodash": "^4.17.7", "@types/node": "^20.16.1", "@types/react": "^18.3.4", "@types/react-dom": "^18.3.0", diff --git a/packages/redux-devtools-app/src/utils/monitorActions.ts b/packages/redux-devtools-app/src/utils/monitorActions.ts index 96c32994e6..8f80592af1 100644 --- a/packages/redux-devtools-app/src/utils/monitorActions.ts +++ b/packages/redux-devtools-app/src/utils/monitorActions.ts @@ -1,5 +1,3 @@ -import difference from 'lodash/difference'; -import omit from 'lodash/omit'; import { DispatchAction, InstancesState, @@ -11,10 +9,18 @@ import { Dispatch, MiddlewareAPI } from 'redux'; import { StoreActionWithoutLiftedAction } from '../actions'; export function sweep(state: State): State { + const skippedActionIdsSet = new Set(state.skippedActionIds); + return { ...state, - actionsById: omit(state.actionsById, state.skippedActionIds), - stagedActionIds: difference(state.stagedActionIds, state.skippedActionIds), + actionsById: Object.fromEntries( + Object.entries(state.actionsById).filter( + ([actionId]) => !skippedActionIdsSet.has(parseInt(actionId, 10)), + ), + ), + stagedActionIds: state.stagedActionIds.filter( + (actionId) => !skippedActionIdsSet.has(actionId), + ), skippedActionIds: [], currentStateIndex: Math.min( state.currentStateIndex, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fb67996d38..cfb6958bd1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -687,9 +687,6 @@ importers: localforage: specifier: ^1.10.0 version: 1.10.0 - lodash: - specifier: ^4.17.21 - version: 4.17.21 react-redux: specifier: ^9.1.2 version: 9.1.2(@types/react@18.3.4)(react@18.3.1)(redux@5.0.1) @@ -739,9 +736,6 @@ importers: '@types/json-schema': specifier: ^7.0.15 version: 7.0.15 - '@types/lodash': - specifier: ^4.17.7 - version: 4.17.7 '@types/node': specifier: ^20.16.1 version: 20.16.1