Skip to content

Commit 6f9d798

Browse files
authored
chore(deps): Upgrade dependencies (kriasoft#2061)
1 parent b882d5a commit 6f9d798

File tree

10 files changed

+770
-750
lines changed

10 files changed

+770
-750
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"editor.codeActionsOnSave": {
3-
"source.organizeImports": true
3+
"source.organizeImports": "explicit"
44
},
55
"editor.defaultFormatter": "esbenp.prettier-vscode",
66
"editor.formatOnSave": true,

.yarn/sdks/eslint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint",
3-
"version": "8.55.0-sdk",
3+
"version": "8.56.0-sdk",
44
"main": "./lib/api.js",
55
"type": "commonjs",
66
"bin": {

.yarn/sdks/prettier/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "prettier",
3-
"version": "3.1.0-sdk",
3+
"version": "3.1.1-sdk",
44
"main": "./index.cjs",
55
"type": "commonjs",
66
"bin": "./bin/prettier.cjs"

.yarn/sdks/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript",
3-
"version": "5.3.2-sdk",
3+
"version": "5.3.3-sdk",
44
"main": "./lib/typescript.js",
55
"type": "commonjs",
66
"bin": {

app/core/auth.ts

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,32 @@ import {
1010
signInWithPopup,
1111
} from "firebase/auth";
1212
import { atom, useAtomValue } from "jotai";
13-
import { atomEffect } from "jotai-effect";
1413
import { loadable } from "jotai/utils";
1514
import { useCallback, useState } from "react";
1615
import { useNavigate } from "react-router-dom";
17-
import { app } from "./firebase";
16+
import { app, auth } from "./firebase";
17+
import { store } from "./store";
1818

19-
export const currentUserValue = atom<User | null | undefined>(undefined);
19+
export const currentUser = atom<Promise<User | null> | User | null>(
20+
new Promise<User | null>(() => {}),
21+
);
2022

21-
export const currentUserListener = atomEffect((get, set) => {
22-
return getAuth(app).onAuthStateChanged((user) => {
23-
set(currentUserValue, user);
24-
});
25-
});
23+
currentUser.debugLabel = "currentUser";
2624

27-
export const currentUserAsync = atom(async (get) => {
28-
get(currentUserListener);
29-
const user = get(currentUserValue);
30-
31-
if (user === undefined) {
32-
const auth = getAuth(app);
33-
await auth.authStateReady();
34-
return auth.currentUser;
35-
} else {
36-
return user;
37-
}
25+
const unsubscribe = auth.onAuthStateChanged((user) => {
26+
store.set(currentUser, user);
3827
});
3928

40-
export const currentUserLoadable = loadable(currentUserAsync);
29+
if (import.meta.hot) {
30+
import.meta.hot.dispose(() => unsubscribe());
31+
}
4132

4233
export function useCurrentUser() {
43-
return useAtomValue(currentUserAsync);
34+
return useAtomValue(currentUser);
4435
}
4536

37+
export const currentUserLoadable = loadable(currentUser);
38+
4639
export function useCurrentUserLoadable() {
4740
return useAtomValue(currentUserLoadable);
4841
}

app/package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,34 @@
1616
"app:deploy": "yarn workspace app deploy"
1717
},
1818
"dependencies": {
19-
"@babel/runtime": "^7.23.5",
20-
"@emotion/react": "^11.11.1",
19+
"@babel/runtime": "^7.23.7",
20+
"@emotion/react": "^11.11.3",
2121
"@emotion/styled": "^11.11.0",
22-
"@mui/base": "^5.0.0-beta.25",
23-
"@mui/icons-material": "^5.14.19",
24-
"@mui/joy": "^5.0.0-beta.16",
25-
"@mui/lab": "^5.0.0-alpha.154",
26-
"@mui/material": "^5.14.19",
27-
"firebase": "^10.7.0",
28-
"jotai": "^2.6.0",
22+
"@mui/base": "^5.0.0-beta.29",
23+
"@mui/icons-material": "^5.15.2",
24+
"@mui/joy": "^5.0.0-beta.20",
25+
"@mui/lab": "^5.0.0-alpha.158",
26+
"@mui/material": "^5.15.2",
27+
"firebase": "^10.7.1",
28+
"jotai": "^2.6.1",
2929
"jotai-effect": "^0.2.3",
3030
"localforage": "^1.10.0",
3131
"notistack": "^3.0.1",
3232
"react": "^18.2.0",
3333
"react-dom": "^18.2.0",
34-
"react-router-dom": "^6.20.1"
34+
"react-router-dom": "^6.21.1"
3535
},
3636
"devDependencies": {
37-
"@babel/core": "^7.23.5",
37+
"@babel/core": "^7.23.7",
3838
"@emotion/babel-plugin": "^11.11.0",
39-
"@types/node": "^20.10.2",
40-
"@types/react": "^18.2.41",
41-
"@types/react-dom": "^18.2.17",
42-
"@vitejs/plugin-react": "^4.2.0",
39+
"@types/node": "^20.10.6",
40+
"@types/react": "^18.2.46",
41+
"@types/react-dom": "^18.2.18",
42+
"@vitejs/plugin-react": "^4.2.1",
4343
"envars": "^1.0.2",
4444
"happy-dom": "^12.10.3",
45-
"typescript": "~5.3.2",
46-
"vite": "~5.0.4",
47-
"vitest": "~0.34.6"
45+
"typescript": "~5.3.3",
46+
"vite": "~5.0.10",
47+
"vitest": "~1.1.1"
4848
}
4949
}

edge/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
},
2020
"dependencies": {
2121
"@hono/zod-validator": "^0.1.11",
22-
"hono": "^3.10.4",
23-
"jose": "^5.1.3",
22+
"hono": "^3.11.11",
23+
"jose": "^5.2.0",
2424
"web-auth-library": "^1.0.3",
2525
"zod": "^3.22.4"
2626
},
2727
"devDependencies": {
28-
"@cloudflare/workers-types": "^4.20231121.0",
29-
"@types/node": "^20.10.2",
28+
"@cloudflare/workers-types": "^4.20231218.0",
29+
"@types/node": "^20.10.6",
3030
"happy-dom": "^12.10.3",
3131
"toml": "^3.0.0",
32-
"typescript": "~5.3.2",
33-
"vite": "~5.0.4",
34-
"vitest": "~0.34.6",
32+
"typescript": "~5.3.3",
33+
"vite": "~5.0.10",
34+
"vitest": "~1.1.1",
3535
"vitest-environment-miniflare": "^2.14.1"
3636
}
3737
}

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@
2020
"devDependencies": {
2121
"@emotion/babel-plugin": "^11.11.0",
2222
"@emotion/eslint-plugin": "^11.11.0",
23-
"@types/eslint": "^8.44.8",
24-
"@typescript-eslint/eslint-plugin": "^6.13.1",
25-
"@typescript-eslint/parser": "^6.13.1",
26-
"eslint": "^8.55.0",
23+
"@types/eslint": "^8.56.0",
24+
"@typescript-eslint/eslint-plugin": "^6.16.0",
25+
"@typescript-eslint/parser": "^6.16.0",
26+
"eslint": "^8.56.0",
2727
"eslint-config-prettier": "^9.1.0",
2828
"eslint-import-resolver-typescript": "^3.6.1",
29-
"eslint-plugin-import": "^2.29.0",
29+
"eslint-plugin-import": "^2.29.1",
3030
"eslint-plugin-jsx-a11y": "^6.8.0",
3131
"eslint-plugin-react": "^7.33.2",
3232
"eslint-plugin-react-hooks": "^4.6.0",
3333
"graphql": "^16.8.1",
3434
"happy-dom": "^12.10.3",
3535
"husky": "^8.0.3",
36-
"prettier": "^3.1.0",
36+
"prettier": "^3.1.1",
3737
"react": "^18.2.0",
3838
"relay-config": "^12.0.1",
39-
"typescript": "~5.3.2",
40-
"vite": "~5.0.4",
41-
"vitest": "~0.34.6"
39+
"typescript": "~5.3.3",
40+
"vite": "~5.0.10",
41+
"vitest": "~1.1.1"
4242
},
4343
"prettier": {
4444
"printWidth": 80,

scripts/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"got": "^14.0.0",
1111
"graphql": "^16.8.1",
1212
"lodash-es": "^4.17.21",
13-
"miniflare": "^3.20231030.2",
14-
"prettier": "^3.1.0",
13+
"miniflare": "^3.20231030.4",
14+
"prettier": "^3.1.1",
1515
"toml": "^3.0.0",
16-
"vite": "^5.0.4",
17-
"wrangler": "^3.18.0",
16+
"vite": "^5.0.10",
17+
"wrangler": "^3.22.1",
1818
"zx": "^7.2.3"
1919
}
2020
}

0 commit comments

Comments
 (0)