Skip to content

Commit 01f719f

Browse files
authored
Update dependencies (#68)
Signed-off-by: Hugo Marcellin <[email protected]>
1 parent ef87ecd commit 01f719f

File tree

8 files changed

+11258
-7344
lines changed

8 files changed

+11258
-7344
lines changed

.prettierrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"trailingComma": "es5",
23
"tabWidth": 4,
34
"singleQuote": true
45
}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ npm run licenses-check
2323
Notes :
2424
* Check [license-checker-config.json](license-checker-config.json) for license white list and exclusion.
2525
If you need to update this list, please inform organization's owners.
26+
* Excluded dependencies :
27+
* [email protected] : old version of a dependency which doesn't have a recognized license identifier on https://spdx.org/licenses/ (BSD)
28+
* [email protected] and [email protected] : dependencies to be removed once Vite migration done

license-checker-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
"Python-2.0",
1818
"Unlicense"
1919
],
20-
"excludePackages": []
20+
2121
}

package-lock.json

Lines changed: 11148 additions & 7255 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,30 @@
99
"npm": "^10.2.0"
1010
},
1111
"dependencies": {
12-
"@emotion/react": "^11.8.2",
13-
"@emotion/styled": "^11.8.1",
14-
"@gridsuite/commons-ui": "^0.52.0",
15-
"@hookform/resolvers": "^3.3.1",
16-
"@mui/icons-material": "^5.5.1",
17-
"@mui/lab": "^5.0.0-alpha.75",
18-
"@mui/material": "^5.5.3",
19-
"@reduxjs/toolkit": "^1.2.3",
20-
"core-js": "^3.6.4",
21-
"notistack": "^3.0.0",
22-
"prop-types": "^15.7.2",
23-
"react": "^18.0.0",
24-
"react-dom": "^18.0.0",
25-
"react-hook-form": "^7.46.1",
26-
"react-intl": "^6.0.0",
27-
"react-redux": "^8.0.0",
28-
"react-router-dom": "^6.0.0",
29-
"react-scripts": "^5.0.0",
30-
"react-window": "^1.8.5",
12+
"@emotion/react": "^11.11.4",
13+
"@emotion/styled": "^11.11.5",
14+
"@gridsuite/commons-ui": "^0.52.1",
15+
"@hookform/resolvers": "^3.3.4",
16+
"@mui/icons-material": "^5.15.14",
17+
"@mui/lab": "^5.0.0-alpha.169",
18+
"@mui/x-tree-view": "^6.17.0",
19+
"@mui/material": "^5.15.14",
20+
"@reduxjs/toolkit": "^1.9.7",
21+
"core-js": "^3.36.1",
22+
"notistack": "^3.0.1",
23+
"prop-types": "^15.8.1",
24+
"react": "^18.2.0",
25+
"react-dom": "^18.2.0",
26+
"react-hook-form": "^7.51.2",
27+
"react-intl": "^6.6.4",
28+
"react-redux": "^8.1.3",
29+
"react-router-dom": "^6.22.3",
30+
"react-scripts": "^5.0.1",
31+
"react-window": "^1.8.10",
3132
"reconnecting-websocket": "^4.4.0",
32-
"redux": "^4.0.5",
33-
"typeface-roboto": "^1.0.0",
34-
"yup": "^1.2.0"
33+
"redux": "^5.0.1",
34+
"typeface-roboto": "^1.1.13",
35+
"yup": "^1.4.0"
3536
},
3637
"scripts": {
3738
"start": "react-scripts start",
@@ -40,7 +41,8 @@
4041
"test:watch": "react-scripts test",
4142
"test:coverage": "react-scripts test --coverage",
4243
"eject": "react-scripts eject",
43-
"licenses-check": "license-checker --summary --excludePrivatePackages --production --onlyAllow \"$( jq -r .onlyAllow[] license-checker-config.json | tr '\n' ';')\" --excludePackages \"$( jq -r .excludePackages[] license-checker-config.json | tr '\n' ';')\""
44+
"lint": "eslint . --ext js,mjs,jsx,ts,mts,tsx --max-warnings 0",
45+
"licenses-check": "license-checker --summary --excludePrivatePackages --production --onlyAllow \"$( jq -r .onlyAllow[] license-checker-config.json | tr '\n' ';')\" --excludePackages \"$( jq -r .excludePackages[] license-checker-config.json | tr '\n' ';')\""
4446
},
4547
"jest": {
4648
"moduleNameMapper": {
@@ -73,21 +75,22 @@
7375
]
7476
},
7577
"devDependencies": {
78+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
7679
"@types/core-js": "^2.5.8",
7780
"@types/eslint-config-prettier": "^6.11.3",
7881
"@types/eslint-plugin-prettier": "^3.1.3",
79-
"@types/jest": "^27.5.1",
80-
"@types/node": "^18.19.3",
81-
"@types/prettier": "^2.0.2",
82-
"@types/prop-types": "^15.7.11",
83-
"@types/react": "^18.2.9",
84-
"@types/react-dom": "^18.2.4",
82+
"@types/jest": "^29.5.12",
83+
"@types/node": "^20.12.2",
84+
"@types/prettier": "^3.0.0",
85+
"@types/prop-types": "^15.7.12",
86+
"@types/react": "^18.2.73",
87+
"@types/react-dom": "^18.2.23",
8588
"@types/react-window": "^1.8.8",
86-
"eslint-config-prettier": "^8.0.0",
87-
"eslint-plugin-prettier": "^4.0.0",
88-
"http-proxy-middleware": "^2.0.0",
89+
"eslint-config-prettier": "^9.1.0",
90+
"eslint-plugin-prettier": "^4.2.1",
91+
"http-proxy-middleware": "^2.0.6",
8992
"license-checker": "^25.0.1",
90-
"prettier": "^2.0.0",
91-
"typescript": "^5.1.3"
93+
"prettier": "^2.8.8",
94+
"typescript": "5.1.6"
9295
}
9396
}

src/components/app.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ afterEach(() => {
3838
});
3939

4040
it('renders', async () => {
41-
if(container === null) throw new Error('No container was defined');
41+
if (container === null) {
42+
throw new Error('No container was defined');
43+
}
4244
const root = createRoot(container);
4345
await act(async () =>
4446
root.render(

src/redux/reducer.ts

Lines changed: 64 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -65,58 +65,70 @@ export type AppStateKey = keyof AppState;
6565

6666
export const reducer: ReducerWithInitialState<AppState> = createReducer(
6767
initialState,
68-
{
69-
[SELECT_THEME]: (state: Draft<AppState>, action: ThemeAction) => {
70-
state.theme = action.theme;
71-
saveLocalStorageTheme(state.theme);
72-
},
73-
74-
[USER]: (state: Draft<AppState>, action: AnyAction) => {
68+
(builder) => {
69+
builder.addCase(
70+
SELECT_THEME,
71+
(state: Draft<AppState>, action: ThemeAction) => {
72+
state.theme = action.theme;
73+
saveLocalStorageTheme(state.theme);
74+
}
75+
);
76+
77+
builder.addCase(USER, (state: Draft<AppState>, action: AnyAction) => {
7578
state.user = action.user;
76-
},
77-
78-
[SIGNIN_CALLBACK_ERROR]: (
79-
state: Draft<AppState>,
80-
action: AnyAction
81-
) => {
82-
state.signInCallbackError = action.signInCallbackError;
83-
},
84-
85-
[UNAUTHORIZED_USER_INFO]: (
86-
state: Draft<AppState>,
87-
action: AnyAction
88-
) => {
89-
state.authenticationRouterError = action.authenticationRouterError;
90-
},
91-
92-
[LOGOUT_ERROR]: (state: Draft<AppState>, action: AnyAction) => {
93-
state.authenticationRouterError = action.authenticationRouterError;
94-
},
95-
96-
[USER_VALIDATION_ERROR]: (
97-
state: Draft<AppState>,
98-
action: AnyAction
99-
) => {
100-
state.authenticationRouterError = action.authenticationRouterError;
101-
},
102-
103-
[RESET_AUTHENTICATION_ROUTER_ERROR]: (
104-
state: Draft<AppState>,
105-
action: AnyAction
106-
) => {
107-
state.authenticationRouterError = null;
108-
},
109-
110-
[SHOW_AUTH_INFO_LOGIN]: (state: Draft<AppState>, action: AnyAction) => {
111-
state.showAuthenticationRouterLogin =
112-
action.showAuthenticationRouterLogin;
113-
},
114-
115-
[SELECT_COMPUTED_LANGUAGE]: (
116-
state: Draft<AppState>,
117-
action: ComputedLanguageAction
118-
) => {
119-
state.computedLanguage = action.computedLanguage;
120-
},
79+
});
80+
81+
builder.addCase(
82+
SIGNIN_CALLBACK_ERROR,
83+
(state: Draft<AppState>, action: AnyAction) => {
84+
state.signInCallbackError = action.signInCallbackError;
85+
}
86+
);
87+
88+
builder.addCase(
89+
UNAUTHORIZED_USER_INFO,
90+
(state: Draft<AppState>, action: AnyAction) => {
91+
state.authenticationRouterError =
92+
action.authenticationRouterError;
93+
}
94+
);
95+
96+
builder.addCase(
97+
LOGOUT_ERROR,
98+
(state: Draft<AppState>, action: AnyAction) => {
99+
state.authenticationRouterError =
100+
action.authenticationRouterError;
101+
}
102+
);
103+
104+
builder.addCase(
105+
USER_VALIDATION_ERROR,
106+
(state: Draft<AppState>, action: AnyAction) => {
107+
state.authenticationRouterError =
108+
action.authenticationRouterError;
109+
}
110+
);
111+
112+
builder.addCase(
113+
RESET_AUTHENTICATION_ROUTER_ERROR,
114+
(state: Draft<AppState>, action: AnyAction) => {
115+
state.authenticationRouterError = null;
116+
}
117+
);
118+
119+
builder.addCase(
120+
SHOW_AUTH_INFO_LOGIN,
121+
(state: Draft<AppState>, action: AnyAction) => {
122+
state.showAuthenticationRouterLogin =
123+
action.showAuthenticationRouterLogin;
124+
}
125+
);
126+
127+
builder.addCase(
128+
SELECT_COMPUTED_LANGUAGE,
129+
(state: Draft<AppState>, action: ComputedLanguageAction) => {
130+
state.computedLanguage = action.computedLanguage;
131+
}
132+
);
121133
}
122134
);

src/utils/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ export type User = {
99
id_token: string;
1010
profile?: {
1111
sub?: string;
12-
}
12+
};
1313
};

0 commit comments

Comments
 (0)