From 3ee7c62119bdc022b4c62eab6bff6cfede7375d1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2024 14:09:41 +0000 Subject: [PATCH 1/3] fix(deps): replace dependency redux-devtools-extension with @redux-devtools/extension 3.0.0 --- package-lock.json | 20 ++++++++++---------- package.json | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5542f028..f586f670 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,7 @@ "@openedx/frontend-slot-footer": "^1.0.2", "@openedx/paragon": "^22.2.2", "@redux-beacon/segment": "^1.1.0", + "@redux-devtools/extension": "3.0.0", "@reduxjs/toolkit": "^1.6.1", "@testing-library/user-event": "^13.5.0", "axios": "^0.28.0", @@ -53,7 +54,6 @@ "react-zendesk": "^0.1.13", "redux": "4.2.1", "redux-beacon": "^2.1.0", - "redux-devtools-extension": "2.13.9", "redux-logger": "3.0.6", "redux-thunk": "2.4.2", "regenerator-runtime": "^0.14.0", @@ -4732,6 +4732,15 @@ "redux-beacon": "2.x" } }, + "node_modules/@redux-devtools/extension": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@redux-devtools/extension/-/extension-3.0.0.tgz", + "integrity": "sha512-oWFp1zIiqn8H/AbFw+pJnM3b2YKdRSzB+NycomEuMgxYPcn46iiIN/RJ4TucXfI8CR8QRbWpiBrAXSwY6GC92A==", + "license": "MIT", + "peerDependencies": { + "redux": "^3.1.0 || ^4.0.0" + } + }, "node_modules/@reduxjs/toolkit": { "version": "1.9.7", "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.9.7.tgz", @@ -21997,15 +22006,6 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", "integrity": "sha512-Ylfqm/V1V/VKGazsJeRDZ31wV9gdNeK3ZsvwbYBAVSNgH8o8CMLfdx/ofn9pnMVsvTMfvC3yfcBYzGpD1vxnlw==" }, - "node_modules/redux-devtools-extension": { - "version": "2.13.9", - "resolved": "https://registry.npmjs.org/redux-devtools-extension/-/redux-devtools-extension-2.13.9.tgz", - "integrity": "sha512-cNJ8Q/EtjhQaZ71c8I9+BPySIBVEKssbPpskBfsXqb8HJ002A3KRVHfeRzwRo6mGPqsm7XuHTqNSNeS1Khig0A==", - "deprecated": "Package moved to @redux-devtools/extension.", - "peerDependencies": { - "redux": "^3.1.0 || ^4.0.0" - } - }, "node_modules/redux-logger": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz", diff --git a/package.json b/package.json index 73cf81f0..4bef238e 100755 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "react-zendesk": "^0.1.13", "redux": "4.2.1", "redux-beacon": "^2.1.0", - "redux-devtools-extension": "2.13.9", + "@redux-devtools/extension": "3.0.0", "redux-logger": "3.0.6", "redux-thunk": "2.4.2", "regenerator-runtime": "^0.14.0", From f149f2c8cf55195c6861c57ef72b80e10c0b7d9c Mon Sep 17 00:00:00 2001 From: Deborah Kaplan Date: Tue, 30 Jul 2024 17:30:29 +0000 Subject: [PATCH 2/3] chore: packkage and method name change this renovate update changed the package. See: https://github.com/reduxjs/redux-devtools/releases/tag/remotedev-redux-devtools-extension%403.0.0 --- package-lock.json | 12 +++++++----- package.json | 2 +- src/data/store.js | 6 ++++-- src/data/store.test.js | 10 ++++++---- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index f586f670..dd24206d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "@openedx/frontend-slot-footer": "^1.0.2", "@openedx/paragon": "^22.2.2", "@redux-beacon/segment": "^1.1.0", - "@redux-devtools/extension": "3.0.0", + "@redux-devtools/extension": "3.2.2", "@reduxjs/toolkit": "^1.6.1", "@testing-library/user-event": "^13.5.0", "axios": "^0.28.0", @@ -4733,10 +4733,12 @@ } }, "node_modules/@redux-devtools/extension": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@redux-devtools/extension/-/extension-3.0.0.tgz", - "integrity": "sha512-oWFp1zIiqn8H/AbFw+pJnM3b2YKdRSzB+NycomEuMgxYPcn46iiIN/RJ4TucXfI8CR8QRbWpiBrAXSwY6GC92A==", - "license": "MIT", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@redux-devtools/extension/-/extension-3.2.2.tgz", + "integrity": "sha512-fKA2TWNzJF7wXSDwBemwcagBFudaejXCzH5hRszN3Z6B7XEJtEmGD77AjV0wliZpIZjA/fs3U7CejFMQ+ipS7A==", + "dependencies": { + "@babel/runtime": "^7.17.0" + }, "peerDependencies": { "redux": "^3.1.0 || ^4.0.0" } diff --git a/package.json b/package.json index 4bef238e..6728d4bd 100755 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "react-zendesk": "^0.1.13", "redux": "4.2.1", "redux-beacon": "^2.1.0", - "@redux-devtools/extension": "3.0.0", + "@redux-devtools/extension": "3.2.2", "redux-logger": "3.0.6", "redux-thunk": "2.4.2", "regenerator-runtime": "^0.14.0", diff --git a/src/data/store.js b/src/data/store.js index 20989475..8df4af52 100755 --- a/src/data/store.js +++ b/src/data/store.js @@ -1,6 +1,8 @@ import * as redux from 'redux'; import thunkMiddleware from 'redux-thunk'; -import { composeWithDevTools } from 'redux-devtools-extension/logOnlyInProduction'; +import { + composeWithDevToolsLogOnlyInProduction, +} from '@redux-devtools/extension'; import { createLogger } from 'redux-logger'; import apiTestUtils from 'data/services/lms/fakeData/testUtils'; @@ -14,7 +16,7 @@ export const createStore = () => { const store = redux.createStore( reducer, - composeWithDevTools(redux.applyMiddleware(...middleware)), + composeWithDevToolsLogOnlyInProduction(redux.applyMiddleware(...middleware)), ); /** diff --git a/src/data/store.test.js b/src/data/store.test.js index f44bc0fb..e7d7ac56 100644 --- a/src/data/store.test.js +++ b/src/data/store.test.js @@ -1,6 +1,8 @@ import { applyMiddleware } from 'redux'; import thunkMiddleware from 'redux-thunk'; -import { composeWithDevTools } from 'redux-devtools-extension/logOnlyInProduction'; +import { + composeWithDevToolsLogOnlyInProduction, +} from '@redux-devtools/extension'; import { createLogger } from 'redux-logger'; import rootReducer, { actions, selectors } from 'data/redux'; @@ -22,8 +24,8 @@ jest.mock('redux', () => ({ applyMiddleware: (...middleware) => ({ applied: middleware }), createStore: (reducer, middleware) => ({ reducer, middleware }), })); -jest.mock('redux-devtools-extension/logOnlyInProduction', () => ({ - composeWithDevTools: (middleware) => ({ withDevTools: middleware }), +jest.mock('redux-devtools/extension', () => ({ + composeWithDevToolsLogOnly: (middleware) => ({ withDevTools: middleware }), })); describe('store aggregator module', () => { @@ -37,7 +39,7 @@ describe('store aggregator module', () => { describe('middleware', () => { it('exports thunk and logger middleware, composed and applied with dev tools', () => { expect(createStore().middleware).toEqual( - composeWithDevTools(applyMiddleware(thunkMiddleware, createLogger())), + composeWithDevToolsLogOnlyInProduction(applyMiddleware(thunkMiddleware, createLogger())), ); }); }); From e9a1e3e40d24cb9ca7b29dacb8ffbf110737cccd Mon Sep 17 00:00:00 2001 From: Deborah Kaplan Date: Tue, 30 Jul 2024 17:56:58 +0000 Subject: [PATCH 3/3] chore: fixing jest making mocked method match --- src/data/store.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/store.test.js b/src/data/store.test.js index e7d7ac56..cd789bc4 100644 --- a/src/data/store.test.js +++ b/src/data/store.test.js @@ -24,8 +24,8 @@ jest.mock('redux', () => ({ applyMiddleware: (...middleware) => ({ applied: middleware }), createStore: (reducer, middleware) => ({ reducer, middleware }), })); -jest.mock('redux-devtools/extension', () => ({ - composeWithDevToolsLogOnly: (middleware) => ({ withDevTools: middleware }), +jest.mock('@redux-devtools/extension', () => ({ + composeWithDevToolsLogOnlyInProduction: (middleware) => ({ withDevTools: middleware }), })); describe('store aggregator module', () => {