From 734357b396b487a66db14478ed1e546d51c775b8 Mon Sep 17 00:00:00 2001 From: Divlo Date: Tue, 13 Dec 2022 11:38:07 +0100 Subject: [PATCH] build(deps): bump Next.js to v13 --- .devcontainer/Dockerfile | 2 +- .env.example | 2 +- .github/workflows/analyze.yml | 6 +- .github/workflows/build.yml | 6 +- .github/workflows/lint.yml | 8 +- .github/workflows/release.yml | 6 +- .github/workflows/test.yml | 18 +- .html-w3c-validatorrc.json | 10 +- .lighthouserc.json | 10 +- README.md | 2 +- components/Application/Channels/Channel.tsx | 52 +- .../GuildLeftSidebar/GuildLeftSidebar.tsx | 28 +- components/Application/Members/Member.tsx | 54 +- .../Application/Messages/Message/Message.tsx | 48 +- .../Application/PopupGuild/PopupGuildCard.tsx | 11 +- .../Application/UserSettings/UserSettings.tsx | 19 +- components/Authentication/Authentication.tsx | 8 +- components/ErrorPage.tsx | 9 +- components/Footer/Footer.tsx | 9 +- components/Header/Header.tsx | 26 +- components/design/IconLink/IconLink.tsx | 36 +- components/design/Input/Input.tsx | 13 +- cypress.config.ts | 2 +- package-lock.json | 7371 +++++++---------- package.json | 77 +- pages/authentication/forgot-password.tsx | 2 +- pages/index.tsx | 19 +- tools/api.ts | 2 +- vercel.json | 1 + 29 files changed, 3430 insertions(+), 4427 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d56daef..38ef5e8 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,2 +1,2 @@ -ARG VARIANT="16" +ARG VARIANT="18" FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} diff --git a/.env.example b/.env.example index 368ac4a..c650a82 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,3 @@ COMPOSE_PROJECT_NAME=thream-website -NEXT_PUBLIC_API_URL=http://localhost:8080 +NEXT_PUBLIC_API_URL=http://127.0.0.1:8080 PORT=3000 diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index a60a644..6b9fb09 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -16,12 +16,12 @@ jobs: language: ['javascript'] steps: - - uses: 'actions/checkout@v3.0.0' + - uses: 'actions/checkout@v3.1.0' - name: 'Initialize CodeQL' - uses: 'github/codeql-action/init@v1' + uses: 'github/codeql-action/init@v2' with: languages: ${{ matrix.language }} - name: 'Perform CodeQL Analysis' - uses: 'github/codeql-action/analyze@v1' + uses: 'github/codeql-action/analyze@v2' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0094ff6..a615054 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,12 +10,12 @@ jobs: build: runs-on: 'ubuntu-latest' steps: - - uses: 'actions/checkout@v3.0.0' + - uses: 'actions/checkout@v3.1.0' - name: 'Use Node.js' - uses: 'actions/setup-node@v3.0.0' + uses: 'actions/setup-node@v3.5.1' with: - node-version: '16.x' + node-version: '18.x' cache: 'npm' - name: 'Install' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2930106..23f4387 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,12 +10,12 @@ jobs: lint: runs-on: 'ubuntu-latest' steps: - - uses: 'actions/checkout@v3.0.0' + - uses: 'actions/checkout@v3.1.0' - name: 'Use Node.js' - uses: 'actions/setup-node@v3.0.0' + uses: 'actions/setup-node@v3.5.1' with: - node-version: '16.x' + node-version: '18.x' cache: 'npm' - name: 'Install' @@ -42,6 +42,6 @@ jobs: github_token: ${{ secrets.github_token }} - name: 'lint:docker' - uses: 'hadolint/hadolint-action@v1.6.0' + uses: 'hadolint/hadolint-action@v3.0.0' with: dockerfile: './Dockerfile' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e48ec6..5823933 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.0.0' + - uses: 'actions/checkout@v3.1.0' with: fetch-depth: 0 persist-credentials: false @@ -21,9 +21,9 @@ jobs: git_commit_gpgsign: true - name: 'Use Node.js' - uses: 'actions/setup-node@v2.4.0' + uses: 'actions/setup-node@v3.5.1' with: - node-version: '16.x' + node-version: '18.x' cache: 'npm' - name: 'Install' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d12ae1..639a26e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,12 +10,12 @@ jobs: test-unit: runs-on: 'ubuntu-latest' steps: - - uses: 'actions/checkout@v3.0.0' + - uses: 'actions/checkout@v3.1.0' - name: 'Use Node.js' - uses: 'actions/setup-node@v3.0.0' + uses: 'actions/setup-node@v3.5.1' with: - node-version: '16.x' + node-version: '18.x' cache: 'npm' - name: 'Install' @@ -27,12 +27,12 @@ jobs: test-lighthouse: runs-on: 'ubuntu-latest' steps: - - uses: 'actions/checkout@v3.0.0' + - uses: 'actions/checkout@v3.1.0' - name: 'Use Node.js' - uses: 'actions/setup-node@v3.0.0' + uses: 'actions/setup-node@v3.5.1' with: - node-version: '16.x' + node-version: '18.x' cache: 'npm' - name: 'Install' @@ -52,12 +52,12 @@ jobs: test-e2e: runs-on: 'ubuntu-latest' steps: - - uses: 'actions/checkout@v3.0.0' + - uses: 'actions/checkout@v3.1.0' - name: 'Use Node.js' - uses: 'actions/setup-node@v3.0.0' + uses: 'actions/setup-node@v3.5.1' with: - node-version: '16.x' + node-version: '18.x' cache: 'npm' - name: 'Install' diff --git a/.html-w3c-validatorrc.json b/.html-w3c-validatorrc.json index cba0597..1ab96c2 100644 --- a/.html-w3c-validatorrc.json +++ b/.html-w3c-validatorrc.json @@ -1,9 +1,9 @@ { "urls": [ - "http://localhost:3000/", - "http://localhost:3000/authentication/forgot-password", - "http://localhost:3000/authentication/reset-password", - "http://localhost:3000/authentication/signin", - "http://localhost:3000/authentication/signup" + "http://127.0.0.1:3000/", + "http://127.0.0.1:3000/authentication/forgot-password", + "http://127.0.0.1:3000/authentication/reset-password", + "http://127.0.0.1:3000/authentication/signin", + "http://127.0.0.1:3000/authentication/signup" ] } diff --git a/.lighthouserc.json b/.lighthouserc.json index a14d04b..e635854 100644 --- a/.lighthouserc.json +++ b/.lighthouserc.json @@ -5,11 +5,11 @@ "startServerReadyPattern": "ready on", "startServerReadyTimeout": 20000, "url": [ - "http://localhost:3000/", - "http://localhost:3000/authentication/forgot-password", - "http://localhost:3000/authentication/reset-password", - "http://localhost:3000/authentication/signin", - "http://localhost:3000/authentication/signup" + "http://127.0.0.1:3000/", + "http://127.0.0.1:3000/authentication/forgot-password", + "http://127.0.0.1:3000/authentication/reset-password", + "http://127.0.0.1:3000/authentication/signin", + "http://127.0.0.1:3000/authentication/signup" ], "numberOfRuns": 1 }, diff --git a/README.md b/README.md index 7121704..38df2e6 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ docker compose up --build #### Services started -- website : `http://localhost:3000` +- website : `http://127.0.0.1:3000` ## 💡 Contributing diff --git a/components/Application/Channels/Channel.tsx b/components/Application/Channels/Channel.tsx index af428ea..e3322d8 100644 --- a/components/Application/Channels/Channel.tsx +++ b/components/Application/Channels/Channel.tsx @@ -22,35 +22,31 @@ const ChannelMemo: React.FC = (props) => { const { member } = useGuildMember() return ( - - - + + # {channel.name} + + {member.isOwner && ( + { + await router.push( + `/application/${channel.guildId}/${channel.id}/settings` + ) + }} + className='bg-unherit absolute -right-10 h-full w-8 transition-all group-hover:right-0 group-hover:shadow-lg dark:group-hover:bg-gray-600' + title='Settings' > - # {channel.name} - - {member.isOwner && ( - { - await router.push( - `/application/${channel.guildId}/${channel.id}/settings` - ) - }} - className='bg-unherit absolute -right-10 h-full w-8 transition-all group-hover:right-0 group-hover:shadow-lg dark:group-hover:bg-gray-600' - title='Settings' - > - - - )} - + + + )} ) } diff --git a/components/Application/GuildLeftSidebar/GuildLeftSidebar.tsx b/components/Application/GuildLeftSidebar/GuildLeftSidebar.tsx index 2ba9a9a..7ce252c 100644 --- a/components/Application/GuildLeftSidebar/GuildLeftSidebar.tsx +++ b/components/Application/GuildLeftSidebar/GuildLeftSidebar.tsx @@ -28,20 +28,24 @@ export const GuildLeftSidebar: React.FC = (props) => {
{member.isOwner && ( - - - - - - + + + + )} - - - - - - + + + +
diff --git a/components/Application/Members/Member.tsx b/components/Application/Members/Member.tsx index 5334f52..cce7ab0 100644 --- a/components/Application/Members/Member.tsx +++ b/components/Application/Members/Member.tsx @@ -14,35 +14,33 @@ const MemberMemo: React.FC = (props) => { return ( - -
-
- {"Users's -
-
-

- {member.user.name} - {member.isOwner && ( - - - - )} -

- {member.user.status != null && member.user.status} -
+
+
+ {"Users's
-
+
+

+ {member.user.name} + {member.isOwner && ( + + + + )} +

+ {member.user.status != null && member.user.status} +
+
) } diff --git a/components/Application/Messages/Message/Message.tsx b/components/Application/Messages/Message/Message.tsx index 669eede..abb2ef9 100644 --- a/components/Application/Messages/Message/Message.tsx +++ b/components/Application/Messages/Message/Message.tsx @@ -73,37 +73,33 @@ export const Message: React.FC = (props) => { }} > - -
-
- {"Users's -
+
- - - {message.member.user.name} - - + + {message.member.user.name} + = (props) => {

{description}

- - - {link.icon} - {link.text} - + + {link.icon} + {link.text}
diff --git a/components/Application/UserSettings/UserSettings.tsx b/components/Application/UserSettings/UserSettings.tsx index c43f50b..3ac5fa6 100644 --- a/components/Application/UserSettings/UserSettings.tsx +++ b/components/Application/UserSettings/UserSettings.tsx @@ -312,16 +312,15 @@ export const UserSettings: React.FC = () => {
- - - - + +
diff --git a/components/Authentication/Authentication.tsx b/components/Authentication/Authentication.tsx index d0755c2..5e9691e 100644 --- a/components/Authentication/Authentication.tsx +++ b/components/Authentication/Authentication.tsx @@ -139,11 +139,9 @@ export const Authentication: React.FC = (props) => { : '/authentication/signup' } > - - {mode === 'signup' - ? t('authentication:already-have-an-account') - : t('authentication:dont-have-an-account')} - + {mode === 'signup' + ? t('authentication:already-have-an-account') + : t('authentication:dont-have-an-account')}

diff --git a/components/ErrorPage.tsx b/components/ErrorPage.tsx index 8e799b0..e1c7ba6 100644 --- a/components/ErrorPage.tsx +++ b/components/ErrorPage.tsx @@ -23,10 +23,11 @@ export const ErrorPage: React.FC = (props) => {

{message}{' '} - - - {t('errors:return-to-home-page')} - + + {t('errors:return-to-home-page')}

diff --git a/components/Footer/Footer.tsx b/components/Footer/Footer.tsx index c25e2ed..0c195d5 100644 --- a/components/Footer/Footer.tsx +++ b/components/Footer/Footer.tsx @@ -15,10 +15,11 @@ export const Footer: React.FC = (props) => { return (