From ef8480b9ed746bd9fa5d98b45426e6b07eb78127 Mon Sep 17 00:00:00 2001 From: Mark Erikson Date: Sun, 16 Apr 2023 17:17:53 -0400 Subject: [PATCH 1/2] Bump deps --- packages/toolkit/package.json | 6 +++--- yarn.lock | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 55e2501e66..cf12707ca3 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -97,10 +97,10 @@ "query" ], "dependencies": { - "immer": "^9.0.16", - "redux": "^4.2.0", + "immer": "^9.0.21", + "redux": "^4.2.1", "redux-thunk": "^2.4.2", - "reselect": "^4.1.7" + "reselect": "^4.1.8" }, "peerDependencies": { "react": "^16.9.0 || ^17.0.0 || ^18", diff --git a/yarn.lock b/yarn.lock index 6a36315faa..75cf7af2e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6361,7 +6361,7 @@ __metadata: eslint-plugin-react: ^7.23.2 eslint-plugin-react-hooks: ^4.2.0 fs-extra: ^9.1.0 - immer: ^9.0.16 + immer: ^9.0.21 invariant: ^2.2.4 jest: ^27 json-stringify-safe: ^5.0.1 @@ -6371,9 +6371,9 @@ __metadata: node-fetch: ^2.6.1 prettier: ^2.2.1 query-string: ^7.0.1 - redux: ^4.2.0 + redux: ^4.2.1 redux-thunk: ^2.4.2 - reselect: ^4.1.7 + reselect: ^4.1.8 rimraf: ^3.0.2 rollup: ^2.47.0 rollup-plugin-strip-code: ^0.2.6 @@ -16263,10 +16263,10 @@ fsevents@^1.2.7: languageName: node linkType: hard -"immer@npm:^9.0.16": - version: 9.0.16 - resolution: "immer@npm:9.0.16" - checksum: e9a5ca65c929b329da7a3b7beccf7984271cda7bdd47b2cab619eac3277dcd56598c211b55cc340786b6eff0c06652ac018808d9fd744443f06882364dece6bc +"immer@npm:^9.0.21": + version: 9.0.21 + resolution: "immer@npm:9.0.21" + checksum: 70e3c274165995352f6936695f0ef4723c52c92c92dd0e9afdfe008175af39fa28e76aafb3a2ca9d57d1fb8f796efc4dd1e1cc36f18d33fa5b74f3dfb0375432 languageName: node linkType: hard @@ -23557,12 +23557,12 @@ fsevents@^1.2.7: languageName: node linkType: hard -"redux@npm:^4.2.0": - version: 4.2.0 - resolution: "redux@npm:4.2.0" +"redux@npm:^4.2.1": + version: 4.2.1 + resolution: "redux@npm:4.2.1" dependencies: "@babel/runtime": ^7.9.2 - checksum: 75f3955c89b3f18edf5411e5fb482aa2e4f41a416183e8802a6bf6472c4fc3d47675b8b321d147f8af8e0f616436ac507bf5a25f1c4d6180e797b549c7db2c1d + checksum: f63b9060c3a1d930ae775252bb6e579b42415aee7a23c4114e21a0b4ba7ec12f0ec76936c00f546893f06e139819f0e2855e0d55ebfce34ca9c026241a6950dd languageName: node linkType: hard @@ -24011,10 +24011,10 @@ fsevents@^1.2.7: languageName: node linkType: hard -"reselect@npm:^4.1.7": - version: 4.1.7 - resolution: "reselect@npm:4.1.7" - checksum: 738d8e2b8f0dca154ad29de6a209c9fbca2d70ae6788fd85df87f2c74b95a65bbf2d16d43a9e2faff39de34d17a29d706ba08a6b2ee5660c09589edbd19af7e1 +"reselect@npm:^4.1.8": + version: 4.1.8 + resolution: "reselect@npm:4.1.8" + checksum: a4ac87cedab198769a29be92bc221c32da76cfdad6911eda67b4d3e7136dca86208c3b210e31632eae31ebd2cded18596f0dd230d3ccc9e978df22f233b5583e languageName: node linkType: hard From a9057c6bb6a51a5582824ce1dc083512f99ea417 Mon Sep 17 00:00:00 2001 From: Mark Erikson Date: Sun, 16 Apr 2023 21:08:33 -0400 Subject: [PATCH 2/2] Mark `subscriptionsUpdated` as autobatched --- packages/toolkit/src/query/core/buildSlice.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/query/core/buildSlice.ts b/packages/toolkit/src/query/core/buildSlice.ts index 6abad48641..6d0a2e579f 100644 --- a/packages/toolkit/src/query/core/buildSlice.ts +++ b/packages/toolkit/src/query/core/buildSlice.ts @@ -433,8 +433,11 @@ export function buildSlice({ name: `${reducerPath}/internalSubscriptions`, initialState: initialState as SubscriptionState, reducers: { - subscriptionsUpdated(state, action: PayloadAction) { - return applyPatches(state, action.payload) + subscriptionsUpdated: { + reducer(state, action: PayloadAction) { + return applyPatches(state, action.payload) + }, + prepare: prepareAutoBatched(), }, }, })