Skip to content

Commit

Permalink
Maintenance: Upgraded all packages. (#630)
Browse files Browse the repository at this point in the history
* maintenance: upgraded all packages, many changes for ESLint 9 migration, and many imports that were remove

* updated version of each step in CI

* updated version of each step in CI

* updated version of each step in CI

* updated version of each step in CI

* testing ci changes

* testing ci changes

* testing ci changes

* testing ci changes

* removed globals from vitest config

* readded globals for tests
  • Loading branch information
buffet-time authored Aug 16, 2024
1 parent 0045cf0 commit fd0d83e
Show file tree
Hide file tree
Showing 27 changed files with 2,591 additions and 3,910 deletions.
99 changes: 0 additions & 99 deletions .eslintrc.cjs

This file was deleted.

30 changes: 4 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,16 @@ jobs:

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Read package.json
id: package
uses: juliangruber/read-file-action@v1
with:
path: ./package.json

# Ensures pnpm version is consistent and gets back the value to be used in pnpm setup action
- name: Get PNPM version
id: pnpm-version
uses: buffet-time/[email protected]
with:
# engines.pnpm
packageJson-engines-pnpm: '${{ fromJson(steps.package.outputs.content).engines.pnpm }}'

# packageManager
packageJson-packageManager: '${{ fromJson(steps.package.outputs.content).packageManager }}'

- name: Cache PNPM modules
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-modules
with:
path: |
Expand All @@ -54,11 +43,9 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-node-

- uses: pnpm/[email protected]
with:
version: '${{ steps.pnpm-version.outputs.version }}'
- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v3.8.2
- uses: actions/setup-node@v4
with:
# use the version found in `.nvmrc`
node-version-file: '.nvmrc'
Expand All @@ -71,16 +58,7 @@ jobs:
- name: Copy `.env.test` -> `.env`
run: cp .env.test .env

- name: Cache build
uses: actions/cache@v3
id: cache-build
with:
path: .nuxt/
key: ${{ runner.os }}-build-${{ hashFiles('**/.nuxt') }}
restore-keys: ${{ runner.os }}-build-

- name: Build the `.nuxt` directory
if: steps.cache-build.outputs.cache-hit != 'true'
run: pnpm build

- name: Tests
Expand Down
34 changes: 4 additions & 30 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,16 @@ jobs:

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Read package.json
id: package
uses: juliangruber/read-file-action@v1
with:
path: ./package.json

# Ensures pnpm version is consistent and gets back the value to be used in pnpm setup action
- name: Get PNPM version
id: pnpm-version
uses: buffet-time/[email protected]
with:
# engines.pnpm
packageJson-engines-pnpm: '${{ fromJson(steps.package.outputs.content).engines.pnpm }}'

# packageManager
packageJson-packageManager: '${{ fromJson(steps.package.outputs.content).packageManager }}'

- name: Cache PNPM modules
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-modules
with:
path: |
Expand All @@ -45,36 +34,21 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-node-

- uses: pnpm/[email protected]
with:
version: '${{ steps.pnpm-version.outputs.version }}'
- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v3.8.2
- uses: actions/setup-node@v4
with:
# use the version found in `.nvmrc`
node-version-file: '.nvmrc'

# shows current pnpm version
- name: check pnpm version
run: pnpm -v

- name: Install `node_modules`
if: steps.cache-modules.outputs.cache-hit != 'true'
run: pnpm install

- name: Copy `.env.test` -> `.env`
run: cp .env.test .env

- name: Cache build
uses: actions/cache@v3
id: cache-build
with:
path: .nuxt/
key: ${{ runner.os }}-build-${{ hashFiles('**/.nuxt') }}
restore-keys: ${{ runner.os }}-build-

- name: Build the `.nuxt` directory
if: steps.cache-build.outputs.cache-hit != 'true'
run: pnpm build

- name: Linting
Expand Down
36 changes: 5 additions & 31 deletions .github/workflows/update-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,16 @@ jobs:

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Read package.json
id: package
uses: juliangruber/read-file-action@v1
with:
path: ./package.json

# Ensures pnpm version is consistent and gets back the value to be used in pnpm setup action
- name: Get PNPM version
id: pnpm-version
uses: buffet-time/[email protected]
with:
# engines.pnpm
packageJson-engines-pnpm: '${{ fromJson(steps.package.outputs.content).engines.pnpm }}'

# packageManager
packageJson-packageManager: '${{ fromJson(steps.package.outputs.content).packageManager }}'

- name: Cache PNPM modules
uses: actions/cache@v3.7.0
uses: actions/cache@v4
id: cache-modules
with:
path: |
Expand All @@ -45,37 +34,22 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-node-

- uses: pnpm/[email protected]
with:
version: '${{ steps.pnpm-version.outputs.version }}'
- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
# use the version found in `.nvmrc`
node-version-file: '.nvmrc'
cache: 'pnpm'

# shows current pnpm version
- name: check pnpm version
run: pnpm -v

- name: Install `node_modules`
if: steps.cache-modules.outputs.cache-hit != 'true'
run: pnpm install

- name: Copy `.env.test` -> `.env`
run: cp .env.test .env

- name: Cache build
uses: actions/cache@v3
id: cache-build
with:
path: .nuxt/
key: ${{ runner.os }}-build-${{ hashFiles('**/.nuxt') }}
restore-keys: ${{ runner.os }}-build-

- name: Build the `.nuxt` directory
if: steps.cache-build.outputs.cache-hit != 'true'
run: pnpm build

- name: Run the API generation
Expand All @@ -100,7 +74,7 @@ jobs:
git push origin ${{ steps.branch.outputs.BRANCH_NAME }}
- name: Create PR
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.WORKFLOW_ACCESS_TOKEN }}
script: |
Expand Down
1 change: 0 additions & 1 deletion components/blocks/LeaderboardInfo/Desktop/Desktop.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { vi } from 'vitest'
import { mountSuspended } from '@nuxt/test-utils/runtime'
import { getByTestId } from 'root/testUtils'
import Desktop from './Desktop.vue'
Expand Down
1 change: 0 additions & 1 deletion components/blocks/LeaderboardInfo/LeaderboardInfo.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { vi } from 'vitest'
import { mountSuspended } from '@nuxt/test-utils/runtime'
import { getByTestId } from 'root/testUtils'
import LeaderboardInfo from './LeaderboardInfo.vue'
Expand Down
1 change: 0 additions & 1 deletion components/blocks/LeaderboardInfo/Mobile/Mobile.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { vi } from 'vitest'
import { mountSuspended } from '@nuxt/test-utils/runtime'
import { getByTestId } from 'root/testUtils'
import Mobile from './Mobile.vue'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { type ComputedRef } from 'vue'
import type { ComputedRef } from 'vue'
// import { type LocaleObject } from '#imports'
const NuxtI18n = useI18n()
Expand Down
2 changes: 1 addition & 1 deletion components/blocks/cards/BasicAlert/BasicAlert.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import BasicAlert from './BasicAlert.vue'
beforeEach(() => {
const { state: modalAlertState } = useModalAlert()
modalAlertState.value = {
title: 'A test alert?',
body: 'This is a test',
show: true,
title: 'A test alert?',
type: 'info',
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ interface ForgotPasswordCardState {
}
const emit = defineEmits<{
(event: 'close'): void
(event: 'cancelClick'): void
(event: 'close' | 'cancelClick'): void
}>()
const props = withDefaults(defineProps<ForgotPasswordCardPops>(), {
Expand Down
6 changes: 2 additions & 4 deletions components/blocks/cards/LogInCard/LogInCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ interface LogInCardState {
}
const emit = defineEmits<{
(event: 'close'): void
(event: 'forgotPasswordClick'): void
(event: 'signUpClick'): void
(event: 'close' | 'forgotPasswordClick' | 'signUpClick'): void
}>()
const props = withDefaults(defineProps<LogInCardProps>(), {
Expand Down Expand Up @@ -160,7 +158,7 @@ async function login() {
#hide-show-password {
@apply hidden sm:inline;
@apply text-gray-700 hover:bg-gray-100 bg-gray-100 hover:bg-gray-300;
@apply text-gray-700 bg-gray-100 hover:bg-gray-300;
}
#sign-up-button {
Expand Down
6 changes: 2 additions & 4 deletions components/blocks/cards/SignUpCard/SignUpCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ interface UserRegister {
}
const emit = defineEmits<{
(event: 'close'): void
(event: 'logInClick'): void
(event: 'signUpClick'): void
(event: 'close' | 'logInClick' | 'signUpClick'): void
}>()
const props = withDefaults(defineProps<SignUpCardProps>(), {
Expand Down Expand Up @@ -271,7 +269,7 @@ function validatePasswordInputs() {
#hide-show-password {
@apply hidden sm:inline;
@apply text-gray-700 hover:bg-gray-100 bg-gray-100 hover:bg-gray-300;
@apply text-gray-700 bg-gray-100 hover:bg-gray-300;
}
}
Expand Down
1 change: 1 addition & 0 deletions composables/api/useChangePassword/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export async function useChangePassword(
baseUrl: useRuntimeConfig().public.backendBaseUrl,
})

// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
return await useApi<void>(
async () => await account.recoverCreate2(token, requestData),
{
Expand Down
Loading

0 comments on commit fd0d83e

Please sign in to comment.