Skip to content

Commit 22eb141

Browse files
committed
chore(Dependencies): Update dependencies
1 parent d4d21a3 commit 22eb141

File tree

8 files changed

+20223
-17249
lines changed

8 files changed

+20223
-17249
lines changed

demo/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88
"tsc": "tsc"
99
},
1010
"dependencies": {
11-
"@reduxjs/toolkit": "^1.8.3",
11+
"@reduxjs/toolkit": "^1.9.0",
1212
"delay": "^5.0.0",
13-
"next": "^12.2.3",
13+
"next": "^13.0.3",
1414
"next-redux-cookie-wrapper": "*",
15-
"next-redux-wrapper": "^7.0.5",
15+
"next-redux-wrapper": "^8.0.0",
1616
"react": "^18.2.0",
1717
"react-dom": "^18.2.0",
18-
"react-redux": "8.0.2",
18+
"react-redux": "8.0.5",
1919
"redux": "^4.2.0"
2020
},
2121
"license": "MIT",
2222
"devDependencies": {
23-
"@types/node": "^18.0.6",
24-
"@types/react": "^18.0.15",
23+
"@types/node": "^18.11.9",
24+
"@types/react": "^18.0.25",
2525
"@types/react-redux": "^7.1.24",
26-
"typescript": "^4.7.4"
26+
"typescript": "^4.8.4"
2727
},
2828
"overrides": {
2929
"react": "18.2.0",

demo/pages/_app.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
import type {AppProps} from "next/app";
22
import * as React from "react";
3+
import {Provider} from "react-redux";
34

45
import {wrapper} from "../store";
56

6-
const App = ({Component, pageProps}: AppProps) => {
7-
return <Component {...pageProps} />;
7+
const App = ({Component, ...appProps}: AppProps) => {
8+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
9+
const {store, props} = wrapper.useWrappedStore(appProps);
10+
11+
return (
12+
<Provider store={store}>
13+
<Component {...props.pageProps} />
14+
</Provider>
15+
);
816
};
917

10-
export default wrapper.withRedux(App);
18+
export default App;

demo/store.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ export const pageSlice = createSlice({
2929
},
3030
},
3131

32-
extraReducers: {
33-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
34-
[HYDRATE]: (state, {payload}) => ({
35-
...state,
36-
...payload.page,
37-
}),
32+
extraReducers(builder) {
33+
builder.addCase<typeof HYDRATE, PayloadAction<AppState, typeof HYDRATE>>(
34+
HYDRATE,
35+
(state, {payload}) => ({...state, ...payload.page})
36+
);
3837
},
3938
});
4039

main/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"dependencies": {
4242
"@types/cookie": "0.4.1",
4343
"fast-deep-equal": "^3.1.3",
44-
"immer": "^9.0.15",
44+
"immer": "^9.0.16",
4545
"lodash": "^4.17.21",
4646
"lodash-es": "^4.17.21",
4747
"lz-string": "^1.4.4",
@@ -53,24 +53,24 @@
5353
"devDependencies": {
5454
"@size-limit/esbuild": "^7.0.8",
5555
"@size-limit/file": "^7.0.8",
56-
"@types/jest": "^28.1.6",
57-
"@types/lodash": "^4.14.182",
56+
"@types/jest": "^29.2.3",
57+
"@types/lodash": "^4.14.189",
5858
"@types/lz-string": "^1.3.34",
59-
"@types/node": "^18.0.6",
59+
"@types/node": "^18.11.9",
6060
"@types/set-cookie-parser": "^2.4.2",
61-
"jest": "^28.1.3",
62-
"jest-environment-jsdom": "^28.1.3",
63-
"next": "^12.2.3",
64-
"next-redux-wrapper": "^7.0.5",
65-
"node-mocks-http": "^1.11.0",
61+
"jest": "^29.3.1",
62+
"jest-environment-jsdom": "^29.3.1",
63+
"next": "^13.0.3",
64+
"next-redux-wrapper": "^8.0.0",
65+
"node-mocks-http": "^1.12.1",
6666
"redux": "^4.2.0",
67-
"set-cookie-parser": "^2.5.0",
67+
"set-cookie-parser": "^2.5.1",
6868
"size-limit": "^7.0.8",
69-
"ts-jest": "^28.0.7",
70-
"tslib": "^2.4.0",
71-
"tsup": "^6.2.2",
72-
"type-fest": "^2.18.0",
73-
"typescript": "^4.7.4"
69+
"ts-jest": "^29.0.3",
70+
"tslib": "^2.4.1",
71+
"tsup": "^6.5.0",
72+
"type-fest": "^3.2.0",
73+
"typescript": "^4.8.4"
7474
},
7575
"tsup": {
7676
"entry": [
Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`processMiddlewareConfig() should include global options in InternalSubtreeConfig objects 1`] = `
4-
Object {
4+
{
55
"compress": false,
66
"cookieName": "path1",
7-
"cookieOptions": Object {
7+
"cookieOptions": {
88
"path": "/test",
99
"sameSite": false,
1010
"secure": true,
@@ -18,10 +18,10 @@ Object {
1818
`;
1919

2020
exports[`processMiddlewareConfig() should include global options in InternalSubtreeConfig objects 2`] = `
21-
Object {
21+
{
2222
"compress": false,
2323
"cookieName": "path2",
24-
"cookieOptions": Object {
24+
"cookieOptions": {
2525
"path": "/test",
2626
"sameSite": false,
2727
"secure": true,
@@ -33,32 +33,3 @@ Object {
3333
"subtree": "path2",
3434
}
3535
`;
36-
37-
exports[`processMiddlewareConfig() should turn subtree strings into config objects 1`] = `
38-
Object {
39-
"0": Object {
40-
"compress": true,
41-
"cookieName": "path1",
42-
"cookieOptions": Object {
43-
"path": "/",
44-
"sameSite": true,
45-
},
46-
"deserializationFunction": undefined,
47-
"ignoreStateFromStaticProps": true,
48-
"serializationFunction": undefined,
49-
"subtree": "path1",
50-
},
51-
"1": Object {
52-
"compress": true,
53-
"cookieName": "path2",
54-
"cookieOptions": Object {
55-
"path": "/",
56-
"sameSite": true,
57-
},
58-
"deserializationFunction": undefined,
59-
"ignoreStateFromStaticProps": true,
60-
"serializationFunction": undefined,
61-
"subtree": "path2",
62-
},
63-
}
64-
`;

main/test/config.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ import {
66
} from "../src/config";
77

88
describe("processMiddlewareConfig()", () => {
9-
// Temporarily skipped due to https://github.com/facebook/jest/issues/13134
10-
it.skip("should turn subtree strings into config objects", () => {
11-
expect(processMiddlewareConfig({subtrees: ["path1", {subtree: "path2"}]})).toMatchSnapshot([
9+
it("should turn subtree strings into config objects", () => {
10+
expect(processMiddlewareConfig({subtrees: ["path1", {subtree: "path2"}]})).toEqual([
1211
expect.objectContaining<SubtreeConfig>({subtree: "path1"}),
1312
expect.objectContaining<SubtreeConfig>({subtree: "path2"}),
1413
]);

0 commit comments

Comments
 (0)