From ae953d6c1a31cf3ba6647811fac96f87155134e5 Mon Sep 17 00:00:00 2001 From: Divlo Date: Mon, 3 Apr 2023 00:11:19 +0200 Subject: [PATCH] fix: update dependencies to latest --- .github/workflows/analyze.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 6 +- .vscode/settings.json | 6 +- Dockerfile | 4 +- README.md | 2 +- components/Application/Application.tsx | 2 +- .../ChannelSettings/ChannelSettings.tsx | 2 +- components/Application/Channels/Channel.tsx | 2 +- .../Application/ConfirmPopup/ConfirmPopup.tsx | 2 +- .../CreateChannel/CreateChannel.tsx | 2 +- .../Application/CreateGuild/CreateGuild.tsx | 2 +- .../GuildSettings/GuildSettings.tsx | 4 +- .../JoinGuildsPublic/GuildPublic.tsx | 2 +- .../JoinGuildsPublic/JoinGuildsPublic.tsx | 2 +- components/Application/Members/Member.tsx | 2 +- .../Message/MessageOptions/MessageOptions.tsx | 2 +- components/Application/Sidebar/Sidebar.tsx | 4 +- .../Application/UserProfile/UserProfile.tsx | 4 +- .../Application/UserSettings/UserSettings.tsx | 12 +- components/Authentication/Authentication.tsx | 12 +- components/Header/SwitchTheme.tsx | 4 +- components/design/Checkbox/Checkbox.tsx | 2 +- components/design/Input/Input.tsx | 4 +- components/design/Loader/Loader.tsx | 2 +- components/design/Textarea/Textarea.tsx | 2 +- contexts/Guilds.tsx | 4 +- cypress.config.ts | 27 +- next.config.js | 2 +- package-lock.json | 10748 +++++++++++----- package.json | 88 +- pages/authentication/forgot-password.tsx | 6 +- pages/authentication/reset-password.tsx | 4 +- tools/api.ts | 2 +- tools/authentication/Authentication.ts | 8 +- tsconfig.json | 25 +- 38 files changed, 7885 insertions(+), 3125 deletions(-) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index bcbc0b6..9762664 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -16,7 +16,7 @@ jobs: language: ['javascript'] steps: - - uses: 'actions/checkout@v3.3.0' + - uses: 'actions/checkout@v3.5.0' - name: 'Initialize CodeQL' uses: 'github/codeql-action/init@v2' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6598dd6..58cb5cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: build: runs-on: 'ubuntu-latest' steps: - - uses: 'actions/checkout@v3.3.0' + - uses: 'actions/checkout@v3.5.0' - name: 'Use Node.js' uses: 'actions/setup-node@v3.6.0' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 382261f..c1fbbd2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,7 +10,7 @@ jobs: lint: runs-on: 'ubuntu-latest' steps: - - uses: 'actions/checkout@v3.3.0' + - uses: 'actions/checkout@v3.5.0' - name: 'Use Node.js' uses: 'actions/setup-node@v3.6.0' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7ca0aa2..8508f6b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ jobs: release: runs-on: 'ubuntu-latest' steps: - - uses: 'actions/checkout@v3.3.0' + - uses: 'actions/checkout@v3.5.0' with: fetch-depth: 0 persist-credentials: false diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 96ba122..8aeab87 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: test-unit: runs-on: 'ubuntu-latest' steps: - - uses: 'actions/checkout@v3.3.0' + - uses: 'actions/checkout@v3.5.0' - name: 'Use Node.js' uses: 'actions/setup-node@v3.6.0' @@ -27,7 +27,7 @@ jobs: test-lighthouse: runs-on: 'ubuntu-latest' steps: - - uses: 'actions/checkout@v3.3.0' + - uses: 'actions/checkout@v3.5.0' - name: 'Use Node.js' uses: 'actions/setup-node@v3.6.0' @@ -52,7 +52,7 @@ jobs: test-e2e: runs-on: 'ubuntu-latest' steps: - - uses: 'actions/checkout@v3.3.0' + - uses: 'actions/checkout@v3.5.0' - name: 'Use Node.js' uses: 'actions/setup-node@v3.6.0' diff --git a/.vscode/settings.json b/.vscode/settings.json index 513901a..73550e9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,5 +6,9 @@ "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll": true - } + }, + "eslint.options": { + "ignorePath": ".gitignore" + }, + "prettier.ignorePath": ".gitignore" } diff --git a/Dockerfile b/Dockerfile index e427f38..4a76c9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM node:18.13.0 AS builder-dependencies +FROM node:18.15.0 AS builder-dependencies WORKDIR /usr/src/application COPY ./package*.json ./ RUN npm install -FROM node:18.13.0 AS builder +FROM node:18.15.0 AS builder WORKDIR /usr/src/application COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules COPY ./ ./ diff --git a/README.md b/README.md index 4674383..bb1cea3 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Thream's website to stay close with your friends and communities. -It uses [Thream/api](https://github.com/Thream/api) [v1.2.4](https://github.com/Thream/api/releases/tag/v1.2.4). +It uses [Thream/api](https://github.com/Thream/api) [v1.2.5](https://github.com/Thream/api/releases/tag/v1.2.5). ## ⚙️ Getting Started diff --git a/components/Application/Application.tsx b/components/Application/Application.tsx index bad0f3c..30f4897 100644 --- a/components/Application/Application.tsx +++ b/components/Application/Application.tsx @@ -185,7 +185,7 @@ export const Application: React.FC< visible={visibleSidebars.left} isMobile={isMobile} > -
+
= (props) => { } catch (error) { return { type: 'error', - value: 'errors:server-error' + message: 'errors:server-error' } } } diff --git a/components/Application/Channels/Channel.tsx b/components/Application/Channels/Channel.tsx index e3322d8..c31b3d2 100644 --- a/components/Application/Channels/Channel.tsx +++ b/components/Application/Channels/Channel.tsx @@ -25,7 +25,7 @@ const ChannelMemo: React.FC = (props) => { = ({ ...props }) => {
{ } catch (error) { return { type: 'error', - value: 'errors:server-error' + message: 'errors:server-error' } } } diff --git a/components/Application/CreateGuild/CreateGuild.tsx b/components/Application/CreateGuild/CreateGuild.tsx index ed09e69..84b203c 100644 --- a/components/Application/CreateGuild/CreateGuild.tsx +++ b/components/Application/CreateGuild/CreateGuild.tsx @@ -45,7 +45,7 @@ export const CreateGuild: React.FC = () => { } catch (error) { return { type: 'error', - value: 'errors:server-error' + message: 'errors:server-error' } } } diff --git a/components/Application/GuildSettings/GuildSettings.tsx b/components/Application/GuildSettings/GuildSettings.tsx index a3b5e1a..871f40b 100644 --- a/components/Application/GuildSettings/GuildSettings.tsx +++ b/components/Application/GuildSettings/GuildSettings.tsx @@ -56,12 +56,12 @@ export const GuildSettings: React.FC = () => { setInputValues(formData as unknown as any) return { type: 'success', - value: 'application:saved-information' + message: 'application:saved-information' } } catch (error) { return { type: 'error', - value: 'errors:server-error' + message: 'errors:server-error' } } } diff --git a/components/Application/JoinGuildsPublic/GuildPublic.tsx b/components/Application/JoinGuildsPublic/GuildPublic.tsx index cd6b184..9d65fdd 100644 --- a/components/Application/JoinGuildsPublic/GuildPublic.tsx +++ b/components/Application/JoinGuildsPublic/GuildPublic.tsx @@ -96,7 +96,7 @@ export const GuildPublic: React.FC = (props) => { { = (props) => { return ( -
+
+
{message.type === 'text' && (
> = ( className={classNames( 'h-full-without-header visible z-50 flex bg-gray-200 drop-shadow-2xl transition-all dark:bg-gray-800', { - 'scrollbar-firefox-support top-0 right-0 flex-col space-y-1 overflow-y-auto': + 'scrollbar-firefox-support right-0 top-0 flex-col space-y-1 overflow-y-auto': direction === 'right', 'w-72': direction === 'right' && visible, 'invisible w-0 opacity-0': !visible, 'w-80': direction === 'left' && visible, 'max-w-max': typeof path !== 'string' && direction === 'left', - 'top-0 right-0': direction === 'right' && isMobile, + 'right-0 top-0': direction === 'right' && isMobile, absolute: isMobile } )} diff --git a/components/Application/UserProfile/UserProfile.tsx b/components/Application/UserProfile/UserProfile.tsx index 6b4a847..1ab731e 100644 --- a/components/Application/UserProfile/UserProfile.tsx +++ b/components/Application/UserProfile/UserProfile.tsx @@ -58,7 +58,7 @@ export const UserProfile: React.FC = (props) => { @@ -73,7 +73,7 @@ export const UserProfile: React.FC = (props) => { target='_blank' rel='noreferrer' href={user.website} - className='relative ml-2 font-normal tracking-wide no-underline opacity-80 transition-all after:absolute after:left-0 after:bottom-[-2px] after:h-[1px] after:w-0 after:bg-black after:transition-all hover:opacity-100 hover:after:w-full dark:after:bg-white' + className='relative ml-2 font-normal tracking-wide no-underline opacity-80 transition-all after:absolute after:bottom-[-2px] after:left-0 after:h-[1px] after:w-0 after:bg-black after:transition-all hover:opacity-100 hover:after:w-full dark:after:bg-white' > {user.website} diff --git a/components/Application/UserSettings/UserSettings.tsx b/components/Application/UserSettings/UserSettings.tsx index 82aecfc..426f9da 100644 --- a/components/Application/UserSettings/UserSettings.tsx +++ b/components/Application/UserSettings/UserSettings.tsx @@ -75,7 +75,7 @@ export const UserSettings: React.FC = () => { if (hasEmailChanged) { return { type: 'success', - value: 'application:success-email-changed' + message: 'application:success-email-changed' } } const { data: userCurrentSettings } = await authentication.api.put( @@ -94,7 +94,7 @@ export const UserSettings: React.FC = () => { }) return { type: 'success', - value: 'application:saved-information' + message: 'application:saved-information' } } catch (error) { if (axios.isAxiosError(error) && error.response?.status === 400) { @@ -102,22 +102,22 @@ export const UserSettings: React.FC = () => { if (message.endsWith('already taken.')) { return { type: 'error', - value: 'authentication:already-used' + message: 'authentication:already-used' } } else if (message.endsWith('email to sign in.')) { return { type: 'error', - value: 'authentication:email-required-to-sign-in' + message: 'authentication:email-required-to-sign-in' } } return { type: 'error', - value: 'errors:server-error' + message: 'errors:server-error' } } return { type: 'error', - value: 'errors:server-error' + message: 'errors:server-error' } } } diff --git a/components/Authentication/Authentication.tsx b/components/Authentication/Authentication.tsx index 5e9691e..75e8e40 100644 --- a/components/Authentication/Authentication.tsx +++ b/components/Authentication/Authentication.tsx @@ -54,7 +54,7 @@ export const Authentication: React.FC = (props) => { formElement.reset() return { type: 'success', - value: 'authentication:success-signup' + message: 'authentication:success-signup' } } catch (error) { if (axios.isAxiosError(error) && error.response?.status === 400) { @@ -62,17 +62,17 @@ export const Authentication: React.FC = (props) => { if (message.endsWith('already taken.')) { return { type: 'error', - value: 'authentication:already-used' + message: 'authentication:already-used' } } return { type: 'error', - value: 'errors:server-error' + message: 'errors:server-error' } } return { type: 'error', - value: 'errors:server-error' + message: 'errors:server-error' } } } else { @@ -86,12 +86,12 @@ export const Authentication: React.FC = (props) => { if (axios.isAxiosError(error) && error.response?.status === 400) { return { type: 'error', - value: 'authentication:wrong-credentials' + message: 'authentication:wrong-credentials' } } return { type: 'error', - value: 'errors:server-error' + message: 'errors:server-error' } } } diff --git a/components/Header/SwitchTheme.tsx b/components/Header/SwitchTheme.tsx index 812c34a..f5577a7 100644 --- a/components/Header/SwitchTheme.tsx +++ b/components/Header/SwitchTheme.tsx @@ -29,7 +29,7 @@ export const SwitchTheme: React.FC = () => {
{
= (props) => { {...props} type='checkbox' id={id} - className='relative mr-3 min-h-[25px] min-w-[25px] cursor-pointer appearance-none rounded-md bg-gradient-to-t from-[#bcc7d4] to-[#d3dfed] transition-all before:absolute before:top-[50%] before:left-[59%] before:h-[12px] before:w-[2px] before:translate-x-[-59%] before:translate-y-[-50%] before:rotate-[40deg] before:scale-0 before:bg-black before:transition-all after:absolute after:top-[62.5%] after:left-[36%] after:h-[7px] after:w-[2px] after:translate-x-[-35%] after:translate-y-[-62.5%] after:rotate-[-50deg] after:scale-0 after:bg-black after:transition-all after:duration-200 checked:before:scale-100 checked:after:scale-100 dark:from-[#1f2937] dark:to-[#273547] dark:before:bg-white dark:after:bg-white' + className='relative mr-3 min-h-[25px] min-w-[25px] cursor-pointer appearance-none rounded-md bg-gradient-to-t from-[#bcc7d4] to-[#d3dfed] transition-all before:absolute before:left-[59%] before:top-[50%] before:h-[12px] before:w-[2px] before:translate-x-[-59%] before:translate-y-[-50%] before:rotate-[40deg] before:scale-0 before:bg-black before:transition-all after:absolute after:left-[36%] after:top-[62.5%] after:h-[7px] after:w-[2px] after:translate-x-[-35%] after:translate-y-[-62.5%] after:rotate-[-50deg] after:scale-0 after:bg-black after:transition-all after:duration-200 checked:before:scale-100 checked:after:scale-100 dark:from-[#1f2937] dark:to-[#273547] dark:before:bg-white dark:after:bg-white' />