Skip to content

Commit 5c1b41e

Browse files
authored
Update frontend dependencies (a lot of them) (#479)
* clippy * update webpack * update a lot of stuff
1 parent 33d9b9d commit 5c1b41e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2304
-2825
lines changed

core/examples/simulate_play.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ fn main() {
206206
u.into_iter()
207207
.flat_map(|x| {
208208
x.into_iter().flat_map(|(card, count)| {
209-
std::iter::repeat(card.card).take(count)
209+
std::iter::repeat_n(card.card, count)
210210
})
211211
})
212212
.collect::<Vec<_>>()

frontend/package.json

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,28 @@
55
"repository": "https://github.com/rbtying/shengji.git",
66
"license": "MIT",
77
"dependencies": {
8-
"@sentry/react": "^6.1.0",
9-
"@sentry/tracing": "^5.27.4",
8+
"@sentry/react": "^9.13.0",
9+
"@sentry/tracing": "^7.120.3",
1010
"@types/canvas-confetti": "^1.0.0",
1111
"@types/classnames": "^2.2.10",
12-
"@types/jest": "^25.2.1",
13-
"@types/node": "^13.11.1",
14-
"@types/react": "^16.9.32",
15-
"@types/react-dom": "^16.9.6",
12+
"@types/jest": "^29.5.14",
13+
"@types/node": "^22.14.1",
14+
"@types/react": "19.1.2",
15+
"@types/react-dom": "^19.1.2",
1616
"@types/react-modal": "^3.10.5",
17-
"@types/react-select": "^3.0.11",
18-
"@types/react-tooltip": "^4.2.4",
19-
"@types/styled-components": "^5.0.1",
2017
"canvas-confetti": "^1.2.0",
2118
"classnames": "^2.2.6",
2219
"emoji-picker-react": "^4.4.7",
2320
"jest": "^29.7.0",
24-
"json-schema-to-typescript": "^11.0.2",
25-
"react": "^16.13.1",
26-
"react-dom": "^16.13.1",
27-
"react-is": "^16.13.1",
21+
"json-schema-to-typescript": "^15.0.4",
22+
"react": "19.1.0",
23+
"react-dom": "19.1.0",
24+
"react-is": "^19.1.0",
2825
"react-modal": "^3.11.2",
29-
"react-select": "^3.1.0",
30-
"react-tooltip": "^4.2.7",
31-
"styled-components": "^5.1.0",
26+
"react-select": "5",
27+
"react-tooltip": "^5.28.1",
28+
"styled-components": "^6.0.0",
29+
"stylis": "^4.0.0",
3230
"ts-jest": "^29.2.5",
3331
"ts-loader": "^9.5.1",
3432
"typescript": "^5.7.2"
@@ -48,24 +46,24 @@
4846
"@typescript-eslint/eslint-plugin": "^8.17.0",
4947
"@typescript-eslint/parser": "^8.0.0",
5048
"@wasm-tool/wasm-pack-plugin": "^1.4.0",
51-
"copy-webpack-plugin": "^6.0.3",
52-
"css-loader": "^4.0.0",
53-
"css-minimizer-webpack-plugin": "^3.0.1",
49+
"copy-webpack-plugin": "^13.0.0",
50+
"css-loader": "^7.1.2",
51+
"css-minimizer-webpack-plugin": "^7.0.2",
5452
"eslint": "^9.16.0",
5553
"eslint-plugin-import": "^2.31.0",
5654
"eslint-plugin-n": "^17.14.0",
5755
"eslint-plugin-promise": "^7.2.1",
5856
"eslint-plugin-react": "^7.37.2",
59-
"globals": "^15.13.0",
60-
"hook-shell-script-webpack-plugin": "^0.1.4",
57+
"globals": "^16.0.0",
58+
"hook-shell-script-webpack-plugin": "^0.4.0",
6159
"html-webpack-plugin": "^5.3.2",
62-
"mini-css-extract-plugin": "^1.6.0",
60+
"mini-css-extract-plugin": "^2.9.2",
6361
"prettier": "^3.4.1",
6462
"react-color": "^2.18.1",
65-
"rimraf": "^3.0.2",
63+
"rimraf": "^6.0.1",
6664
"terser-webpack-plugin": "^5.1.3",
6765
"typescript-eslint": "^8.17.0",
6866
"webpack": "^5.76.0",
69-
"webpack-cli": "^4.7.2"
67+
"webpack-cli": "^6.0.1"
7068
}
7169
}

frontend/shengji-wasm/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ pub fn decompose_trick_format(req: JsValue) -> Result<JsValue, JsValue> {
140140
.into_iter()
141141
.flat_map(|u| {
142142
u.into_iter()
143-
.flat_map(|(card, count)| std::iter::repeat(card.card).take(count))
143+
.flat_map(|(card, count)| std::iter::repeat_n(card.card, count))
144144
.collect::<Vec<_>>()
145145
})
146146
.collect()

frontend/src/AppStateProvider.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import {
99
numberLocalStorageState,
1010
} from "./localStorageState";
1111

12+
import type { JSX } from "react";
13+
1214
export interface AppState {
1315
settings: Settings;
1416
gameStatistics: GameStatistics;

frontend/src/AutoPlayButton.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import * as React from "react";
22

3+
import type { JSX } from "react";
4+
35
interface IProps {
46
onSubmit: () => void;
57
playDescription: null | string;

frontend/src/BeepButton.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import * as React from "react";
22
import { WebsocketContext } from "./WebsocketProvider";
33

4+
import type { JSX } from "react";
5+
46
const BeepButton = (): JSX.Element => {
57
const { send } = React.useContext(WebsocketContext);
68

frontend/src/BidArea.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import { WebsocketContext } from "./WebsocketProvider";
1313
import LabeledPlay from "./LabeledPlay";
1414
import WasmContext from "./WasmContext";
1515

16+
import type { JSX } from "react";
17+
1618
interface IBidAreaProps {
1719
bids: Bid[];
1820
autobid: Bid | null;

frontend/src/Card.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { ISuitOverrides } from "./state/Settings";
99
import { Trump } from "./gen-types";
1010
import WasmContext from "./WasmContext";
1111

12+
import type { JSX } from "react";
13+
1214
const SvgCard = React.lazy(async () => await import("./SvgCard"));
1315

1416
interface IProps {

frontend/src/Cards.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import ArrayUtils from "./util/array";
66
import WasmContext from "./WasmContext";
77
import { SettingsContext } from "./AppStateProvider";
88

9+
import type { JSX } from "react";
10+
911
interface IProps {
1012
hands: Hands;
1113
trump: Trump;

frontend/src/Chat.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import ChatMessage, { Message } from "./ChatMessage";
44
import { WebsocketContext } from "./WebsocketProvider";
55
import { SettingsContext } from "./AppStateProvider";
66

7+
import type { JSX } from "react";
8+
79
interface IProps {
810
messages: Message[];
911
}

0 commit comments

Comments
 (0)