Skip to content

Commit 9b748d8

Browse files
authored
chore(web): upgrade dependencies (#104)
1 parent aa6ce51 commit 9b748d8

12 files changed

Lines changed: 12821 additions & 8305 deletions

File tree

web/.yarn/install-state.gz

-15.9 KB
Binary file not shown.

web/package.json

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
"resolutions": {
1010
"@apollo/client": "3.8.1",
1111
"@zip.js/zip.js": "2.7.48",
12-
"@cesium/engine": "9.0.0"
12+
"@cesium/engine": "9.0.0",
13+
"cookie": "^0.7.0",
14+
"jsonpath-plus": "10.3.0",
15+
"glob": "^11.1.0",
16+
"js-yaml": "4.1.1"
1317
},
1418
"scripts": {
1519
"start": "yarn && vite",
@@ -41,14 +45,14 @@
4145
},
4246
"devDependencies": {
4347
"@emotion/jest": "11.11.0",
44-
"@graphql-codegen/cli": "3.3.1",
45-
"@graphql-codegen/client-preset": "4.0.1",
46-
"@graphql-codegen/fragment-matcher": "4.0.1",
47-
"@graphql-codegen/introspection": "4.0.0",
48-
"@graphql-codegen/typescript": "4.0.1",
49-
"@graphql-codegen/typescript-operations": "4.0.1",
50-
"@graphql-codegen/typescript-react-apollo": "3.3.7",
51-
"@playwright/test": "1.39.0",
48+
"@graphql-codegen/cli": "6.1.0",
49+
"@graphql-codegen/client-preset": "5.2.0",
50+
"@graphql-codegen/fragment-matcher": "6.0.0",
51+
"@graphql-codegen/introspection": "5.0.0",
52+
"@graphql-codegen/typescript": "5.0.5",
53+
"@graphql-codegen/typescript-operations": "5.0.5",
54+
"@graphql-codegen/typescript-react-apollo": "4.3.3",
55+
"@playwright/test": "1.55.1",
5256
"@rollup/plugin-yaml": "4.1.2",
5357
"@storybook/addon-essentials": "7.5.2",
5458
"@storybook/addon-styling": "1.3.7",
@@ -67,6 +71,7 @@
6771
"@types/gapi.client.sheets": "4.0.20201031",
6872
"@types/google.picker": "0.0.41",
6973
"@types/js-md5": "0.7.1",
74+
"@types/js-yaml": "^4.0.9",
7075
"@types/lodash-es": "4.17.10",
7176
"@types/mapbox__vector-tile": "1.3.3",
7277
"@types/node": "22.13.14",
@@ -78,7 +83,7 @@
7883
"@types/tinycolor2": "1.4.5",
7984
"@types/uuid": "9.0.6",
8085
"@vitejs/plugin-react-swc": "3.7.1",
81-
"@vitest/coverage-v8": "1.6.1",
86+
"@vitest/coverage-v8": "4.0.14",
8287
"@welldone-software/why-did-you-render": "7.0.1",
8388
"del-cli": "5.1.0",
8489
"dotenv": "16.3.1",
@@ -100,17 +105,17 @@
100105
"type-fest": "4.6.0",
101106
"typescript": "5.0.4",
102107
"typescript-styled-plugin": "0.18.3",
103-
"vite": "5.4.20",
108+
"vite": "5.4.21",
104109
"vite-plugin-cesium": "1.2.23",
105110
"vite-plugin-svgr": "4.5.0",
106111
"vite-tsconfig-paths": "5.1.4",
107-
"vitest": "1.6.1",
112+
"vitest": "4.0.14",
108113
"web-streams-polyfill": "3.2.1"
109114
},
110115
"dependencies": {
111116
"@apollo/client": "3.8.1",
112117
"@auth0/auth0-react": "2.2.2",
113-
"@aws-amplify/ui-react": "5.3.1",
118+
"@aws-amplify/ui-react": "6.13.1",
114119
"@carbon/colors": "11.20.1",
115120
"@cesium/engine": "9.0.0",
116121
"@emotion/react": "11.11.1",
@@ -133,7 +138,7 @@
133138
"apollo-link-sentry": "3.2.3",
134139
"apollo-upload-client": "17.0.0",
135140
"array-move": "4.0.0",
136-
"aws-amplify": "5.3.11",
141+
"aws-amplify": "6.15.8",
137142
"axios": "1.12.0",
138143
"cesium": "1.116.0",
139144
"cesium-dnd": "1.1.0",
@@ -157,7 +162,7 @@
157162
"jotai": "1.12.1",
158163
"js-file-download": "0.4.12",
159164
"js-md5": "0.7.3",
160-
"js-yaml": "4.1.0",
165+
"js-yaml": "4.1.1",
161166
"jsep": "1.3.8",
162167
"jsonpath-plus": "10.3.0",
163168
"jszip": "3.10.1",

web/src/beta/utils/raf.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
import { describe, expect, test, vi } from "vitest";
1+
import { afterEach, describe, expect, test, vi } from "vitest";
22

33
import { interval, intervalDuring, tweenInterval } from "./raf";
44

55
describe("interval", () => {
6+
afterEach(() => {
7+
vi.restoreAllMocks();
8+
vi.useRealTimers();
9+
});
10+
611
test("regular", () => {
712
vi.useFakeTimers();
813
const requestAnimationFrame = vi.spyOn(window, "requestAnimationFrame");
@@ -73,6 +78,11 @@ describe("interval", () => {
7378
});
7479
});
7580

81+
afterEach(() => {
82+
vi.restoreAllMocks();
83+
vi.useRealTimers();
84+
});
85+
7686
test("intervalDuring", () => {
7787
vi.useFakeTimers();
7888
const requestAnimationFrame = vi.spyOn(window, "requestAnimationFrame");

web/src/classic/gql/graphql-client-api.tsx

Lines changed: 3623 additions & 176 deletions
Large diffs are not rendered by default.

web/src/classic/util/raf.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
import { describe, expect, test, vi } from "vitest";
1+
import { afterEach, describe, expect, test, vi } from "vitest";
22

33
import { interval, intervalDuring, tweenInterval } from "./raf";
44

55
describe("interval", () => {
6+
afterEach(() => {
7+
vi.restoreAllMocks();
8+
vi.useRealTimers();
9+
});
10+
611
test("regular", () => {
712
vi.useFakeTimers();
813
const requestAnimationFrame = vi.spyOn(window, "requestAnimationFrame");
@@ -73,6 +78,11 @@ describe("interval", () => {
7378
});
7479
});
7580

81+
afterEach(() => {
82+
vi.restoreAllMocks();
83+
vi.useRealTimers();
84+
});
85+
7686
test("intervalDuring", () => {
7787
vi.useFakeTimers();
7888
const requestAnimationFrame = vi.spyOn(window, "requestAnimationFrame");

web/src/services/auth/cognitoAuth.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Auth } from "@aws-amplify/auth";
1+
import { getCurrentUser, signOut, fetchAuthSession, signInWithRedirect } from "aws-amplify/auth";
22
import { useState, useEffect } from "react";
33

44
import { logOutFromTenant } from "@reearth/services/config";
@@ -13,7 +13,7 @@ export const useCognitoAuth = (): AuthHook => {
1313
useEffect(() => {
1414
const checkUser = async () => {
1515
try {
16-
const cognitoUser = await Auth.currentAuthenticatedUser();
16+
const cognitoUser = await getCurrentUser();
1717
setUser(cognitoUser);
1818
} catch (err) {
1919
if (err instanceof Error) {
@@ -29,19 +29,19 @@ export const useCognitoAuth = (): AuthHook => {
2929
}, []);
3030

3131
const getAccessToken = async () => {
32-
const session = await Auth.currentSession();
33-
return session.getIdToken().getJwtToken();
32+
const session = await fetchAuthSession();
33+
return session.tokens?.idToken?.toString() || "";
3434
};
3535

3636
const login = () => {
3737
logOutFromTenant();
38-
Auth.federatedSignIn();
38+
signInWithRedirect();
3939
};
4040

4141
const logout = async () => {
4242
logOutFromTenant();
4343
try {
44-
await Auth.signOut();
44+
await signOut();
4545
setUser(null);
4646
} catch (err) {
4747
if (err instanceof Error) {

web/src/services/config/aws.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,19 @@ export const configureCognito = (cognitoConfig: CognitoParams) => {
2323

2424
const config = {
2525
Auth: {
26-
region: cognitoRegion,
27-
userPoolId: cognitoUserPoolId,
28-
userPoolWebClientId: cognitoUserPoolWebClientId,
29-
oauth: {
30-
scope: cognitoOauthScope,
31-
domain: cognitoOauthDomain,
32-
redirectSignIn: cognitoOauthRedirectSignIn,
33-
redirectSignOut: cognitoOauthRedirectSignOut,
34-
responseType: cognitoOauthResponseType,
26+
Cognito: {
27+
region: cognitoRegion,
28+
userPoolId: cognitoUserPoolId || "",
29+
userPoolClientId: cognitoUserPoolWebClientId || "",
30+
loginWith: {
31+
oauth: {
32+
domain: cognitoOauthDomain || "",
33+
scopes: cognitoOauthScope || [],
34+
redirectSignIn: [cognitoOauthRedirectSignIn || ""],
35+
redirectSignOut: [cognitoOauthRedirectSignOut || ""],
36+
responseType: (cognitoOauthResponseType as "code" | "token") || "code",
37+
},
38+
},
3539
},
3640
},
3741
};

0 commit comments

Comments
 (0)