Skip to content

Commit

Permalink
chore(deps): Upgrade dependencies (#2061)
Browse files Browse the repository at this point in the history
  • Loading branch information
koistya authored Dec 31, 2023
1 parent b882d5a commit 6f9d798
Show file tree
Hide file tree
Showing 10 changed files with 770 additions and 750 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
Expand Down
2 changes: 1 addition & 1 deletion .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "8.55.0-sdk",
"version": "8.56.0-sdk",
"main": "./lib/api.js",
"type": "commonjs",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion .yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "3.1.0-sdk",
"version": "3.1.1-sdk",
"main": "./index.cjs",
"type": "commonjs",
"bin": "./bin/prettier.cjs"
Expand Down
2 changes: 1 addition & 1 deletion .yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript",
"version": "5.3.2-sdk",
"version": "5.3.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs",
"bin": {
Expand Down
35 changes: 14 additions & 21 deletions app/core/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,32 @@ import {
signInWithPopup,
} from "firebase/auth";
import { atom, useAtomValue } from "jotai";
import { atomEffect } from "jotai-effect";
import { loadable } from "jotai/utils";
import { useCallback, useState } from "react";
import { useNavigate } from "react-router-dom";
import { app } from "./firebase";
import { app, auth } from "./firebase";
import { store } from "./store";

export const currentUserValue = atom<User | null | undefined>(undefined);
export const currentUser = atom<Promise<User | null> | User | null>(
new Promise<User | null>(() => {}),
);

export const currentUserListener = atomEffect((get, set) => {
return getAuth(app).onAuthStateChanged((user) => {
set(currentUserValue, user);
});
});
currentUser.debugLabel = "currentUser";

export const currentUserAsync = atom(async (get) => {
get(currentUserListener);
const user = get(currentUserValue);

if (user === undefined) {
const auth = getAuth(app);
await auth.authStateReady();
return auth.currentUser;
} else {
return user;
}
const unsubscribe = auth.onAuthStateChanged((user) => {
store.set(currentUser, user);
});

export const currentUserLoadable = loadable(currentUserAsync);
if (import.meta.hot) {
import.meta.hot.dispose(() => unsubscribe());
}

export function useCurrentUser() {
return useAtomValue(currentUserAsync);
return useAtomValue(currentUser);
}

export const currentUserLoadable = loadable(currentUser);

export function useCurrentUserLoadable() {
return useAtomValue(currentUserLoadable);
}
Expand Down
36 changes: 18 additions & 18 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,34 @@
"app:deploy": "yarn workspace app deploy"
},
"dependencies": {
"@babel/runtime": "^7.23.5",
"@emotion/react": "^11.11.1",
"@babel/runtime": "^7.23.7",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/base": "^5.0.0-beta.25",
"@mui/icons-material": "^5.14.19",
"@mui/joy": "^5.0.0-beta.16",
"@mui/lab": "^5.0.0-alpha.154",
"@mui/material": "^5.14.19",
"firebase": "^10.7.0",
"jotai": "^2.6.0",
"@mui/base": "^5.0.0-beta.29",
"@mui/icons-material": "^5.15.2",
"@mui/joy": "^5.0.0-beta.20",
"@mui/lab": "^5.0.0-alpha.158",
"@mui/material": "^5.15.2",
"firebase": "^10.7.1",
"jotai": "^2.6.1",
"jotai-effect": "^0.2.3",
"localforage": "^1.10.0",
"notistack": "^3.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.20.1"
"react-router-dom": "^6.21.1"
},
"devDependencies": {
"@babel/core": "^7.23.5",
"@babel/core": "^7.23.7",
"@emotion/babel-plugin": "^11.11.0",
"@types/node": "^20.10.2",
"@types/react": "^18.2.41",
"@types/react-dom": "^18.2.17",
"@vitejs/plugin-react": "^4.2.0",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
"@vitejs/plugin-react": "^4.2.1",
"envars": "^1.0.2",
"happy-dom": "^12.10.3",
"typescript": "~5.3.2",
"vite": "~5.0.4",
"vitest": "~0.34.6"
"typescript": "~5.3.3",
"vite": "~5.0.10",
"vitest": "~1.1.1"
}
}
14 changes: 7 additions & 7 deletions edge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
},
"dependencies": {
"@hono/zod-validator": "^0.1.11",
"hono": "^3.10.4",
"jose": "^5.1.3",
"hono": "^3.11.11",
"jose": "^5.2.0",
"web-auth-library": "^1.0.3",
"zod": "^3.22.4"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20231121.0",
"@types/node": "^20.10.2",
"@cloudflare/workers-types": "^4.20231218.0",
"@types/node": "^20.10.6",
"happy-dom": "^12.10.3",
"toml": "^3.0.0",
"typescript": "~5.3.2",
"vite": "~5.0.4",
"vitest": "~0.34.6",
"typescript": "~5.3.3",
"vite": "~5.0.10",
"vitest": "~1.1.1",
"vitest-environment-miniflare": "^2.14.1"
}
}
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@
"devDependencies": {
"@emotion/babel-plugin": "^11.11.0",
"@emotion/eslint-plugin": "^11.11.0",
"@types/eslint": "^8.44.8",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"eslint": "^8.55.0",
"@types/eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"graphql": "^16.8.1",
"happy-dom": "^12.10.3",
"husky": "^8.0.3",
"prettier": "^3.1.0",
"prettier": "^3.1.1",
"react": "^18.2.0",
"relay-config": "^12.0.1",
"typescript": "~5.3.2",
"vite": "~5.0.4",
"vitest": "~0.34.6"
"typescript": "~5.3.3",
"vite": "~5.0.10",
"vitest": "~1.1.1"
},
"prettier": {
"printWidth": 80,
Expand Down
8 changes: 4 additions & 4 deletions scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"got": "^14.0.0",
"graphql": "^16.8.1",
"lodash-es": "^4.17.21",
"miniflare": "^3.20231030.2",
"prettier": "^3.1.0",
"miniflare": "^3.20231030.4",
"prettier": "^3.1.1",
"toml": "^3.0.0",
"vite": "^5.0.4",
"wrangler": "^3.18.0",
"vite": "^5.0.10",
"wrangler": "^3.22.1",
"zx": "^7.2.3"
}
}
Loading

0 comments on commit 6f9d798

Please sign in to comment.