Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade dependencies #79

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 16 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ env:
extends:
- eslint:recommended
- plugin:@typescript-eslint/recommended
- plugin:import/recommended
- plugin:import/typescript
- prettier
parser: '@typescript-eslint/parser'
parserOptions:
Expand All @@ -13,4 +15,17 @@ parserOptions:
plugins:
- '@typescript-eslint'
rules:
'@typescript-eslint/no-empty-interface': ['error', { allowSingleExtends: true }]
'@typescript-eslint/no-empty-interface':
- 'error'
- allowSingleExtends: true
'import/order':
- 'error'
- alphabetize:
order: 'asc'
caseInsensitive: true
newlines-between: always
'import/no-unresolved': 'off'
settings:
import/resolver:
typescript: true
node: true
11 changes: 5 additions & 6 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Publish
on:
workflow_dispatch:

permissions:
contents: write

jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
outputs:
server_updated: ${{ steps.publish.outputs.server_updated }}
steps:
Expand Down Expand Up @@ -48,12 +48,11 @@ jobs:
- name: Build packages
run: corepack yarn workspaces foreach -Ap --topological-dev run build

- name: Setup Yarn
run: corepack yarn config set -H 'npmAuthToken' "${{ secrets.NPM_TOKEN }}"

- name: Publish and commit
id: publish
run: corepack yarn zx scripts/publish.mjs
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Upload server tgz
uses: actions/upload-artifact@v4
Expand Down
3 changes: 3 additions & 0 deletions .yarn/versions/50a3988a.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
releases:
"@aoi-js/frontend": 1.1.0-alpha.1
"@aoi-js/server": prerelease
1 change: 1 addition & 0 deletions apps/frontend/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ parserOptions:
rules:
'@typescript-eslint/no-unused-vars': 'off'
'vue/multi-word-component-names': 'off'
'import/default': 'off'
6 changes: 3 additions & 3 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@babel/types": "^7.21.4",
"@intlify/unplugin-vue-i18n": "^0.12.2",
"@mdi/font": "7.0.96",
"@sinclair/typebox": "^0.30.4",
"@sinclair/typebox": "^0.32.19",
"@types/blueimp-md5": "^2.18.0",
"@types/debug": "^4.1.12",
"@types/dompurify": "^3.0.2",
Expand All @@ -41,7 +41,7 @@
"@wooorm/starry-night": "^2.1.1",
"blueimp-md5": "^2.19.0",
"debug": "^4.3.4",
"dompurify": "^3.0.6",
"dompurify": "^3.0.11",
"echarts": "^5.4.3",
"eslint-plugin-prettier": "^5.1.0",
"eslint-plugin-vue": "^9.19.2",
Expand All @@ -57,7 +57,7 @@
"pinia": "^2.1.7",
"roboto-fontface": "*",
"unocss": "^0.58.0",
"vite": "^5.1.4",
"vite": "^5.2.6",
"vite-plugin-pages": "^0.32.0",
"vite-plugin-vuetify": "^2.0.2",
"vscode-oniguruma": "1",
Expand Down
5 changes: 3 additions & 2 deletions apps/frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@
</template>

<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { RouterView } from 'vue-router'

import AoiBar from '@/components/aoi/AoiBar.vue'
import AoiNavDrawer from '@/components/aoi/AoiNavDrawer.vue'
import AoiFooter from '@/components/aoi/AoiFooter.vue'
import AoiNavDrawer from '@/components/aoi/AoiNavDrawer.vue'
import { usePlatformIssues, useRecommendedBrowsers } from '@/utils/platform'
import { useI18n } from 'vue-i18n'

const { t } = useI18n()
const { issues, hasIssue, ignore } = usePlatformIssues()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
</template>

<script setup lang="ts">
import { withTitle } from '@/utils/title'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { usePagination } from '@/utils/pagination'

import { fmtDate } from './fmtdate'

import { usePagination } from '@/utils/pagination'
import { withTitle } from '@/utils/title'

const { t } = useI18n()

withTitle(computed(() => t('pages.announcements')))
Expand Down
13 changes: 8 additions & 5 deletions apps/frontend/src/components/aoi/AoiBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@
</template>

<script setup lang="ts">
import { useAppState } from '@/stores/app'
import { useI18n } from 'vue-i18n'
import { appName, showCountdown } from '@/utils/flags'
import AoiBarUserMenu from './AoiBarUserMenu.vue'

import SearchBox from '../homepage/SearchBox.vue'
import TimeLabel from '../homepage/TimeLabel.vue'

import AoiBarAddMenu from './AoiBarAddMenu.vue'
import AoiBarUserMenu from './AoiBarUserMenu.vue'
import AoiLogo from './AoiLogo.vue'
import TimeLabel from '../homepage/TimeLabel.vue'
import SearchBox from '../homepage/SearchBox.vue'

import { useAppState } from '@/stores/app'
import { appName, showCountdown } from '@/utils/flags'

const { t } = useI18n()
const appState = useAppState()
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/src/components/aoi/AoiBarUserMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

<script setup lang="ts">
import AoiGravatar from './AoiGravatar.vue'

import { useAppState } from '@/stores/app'
import { useAppUserMenu } from '@/utils/menus'

Expand Down
3 changes: 2 additions & 1 deletion apps/frontend/src/components/aoi/AoiFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
</template>

<script setup lang="ts">
import { extraFooterText } from '@/utils/flags'
import { useI18n } from 'vue-i18n'

import { extraFooterText } from '@/utils/flags'

const { t } = useI18n()
</script>

Expand Down
3 changes: 2 additions & 1 deletion apps/frontend/src/components/aoi/AoiGravatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
</template>

<script setup lang="ts">
import { getAvatarUrl } from '@/utils/avatar'
import { computed } from 'vue'

import { getAvatarUrl } from '@/utils/avatar'

const props = defineProps<{
email: string
}>()
Expand Down
6 changes: 4 additions & 2 deletions apps/frontend/src/components/aoi/AoiNavDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@

<script setup lang="ts">
import type { VListItem } from 'vuetify/components'
import { useAppState } from '@/stores/app'

import AoiNavOrgSelector from './AoiNavOrgSelector.vue'

import LocaleSelectBtn from '@/components/locale/LocaleSelectBtn.vue'
import { useAppState } from '@/stores/app'
import { appBuildInfo } from '@/utils/build'
import AoiNavOrgSelector from './AoiNavOrgSelector.vue'
import { useAppNavMenu } from '@/utils/menus'

const appState = useAppState()
Expand Down
4 changes: 3 additions & 1 deletion apps/frontend/src/components/aoi/AoiNavOrgSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@
</template>

<script setup lang="ts">
import { useI18n } from 'vue-i18n'

import AoiGravatar from '../aoi/AoiGravatar.vue'

import { useAppState } from '@/stores/app'
import { useI18n } from 'vue-i18n'

const appState = useAppState()
const { t } = useI18n()
Expand Down
3 changes: 2 additions & 1 deletion apps/frontend/src/components/aoi/AoiNotFound.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
</template>

<script setup lang="ts">
import { withI18nTitle } from '@/utils/title'
import { useI18n } from 'vue-i18n'

import { withI18nTitle } from '@/utils/title'

const { t } = useI18n()
withI18nTitle('pages.not-found')
</script>
12 changes: 7 additions & 5 deletions apps/frontend/src/components/app/AppList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@
</template>

<script setup lang="ts">
import { withTitle } from '@/utils/title'
import { computed } from 'vue'
import { computed, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { usePagination } from '@/utils/pagination'
import { watch } from 'vue'
import type { IAppDTO } from './types'

import AccessLevelBadge from '../utils/AccessLevelBadge.vue'

import type { IAppDTO } from './types'

import { usePagination } from '@/utils/pagination'
import { withTitle } from '@/utils/title'

const props = defineProps<{
orgId: string
search?: string
Expand Down
4 changes: 3 additions & 1 deletion apps/frontend/src/components/app/AppSettingsInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
</template>

<script setup lang="ts">
import { useI18n } from 'vue-i18n'

import ListInput from '../utils/ListInput.vue'
import OptionalInput from '../utils/OptionalInput.vue'

import type { IAppSettingsDTO } from './types'
import { useI18n } from 'vue-i18n'

const model = defineModel<IAppSettingsDTO>({ required: true })
const { t } = useI18n()
Expand Down
3 changes: 2 additions & 1 deletion apps/frontend/src/components/app/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { MapEntity } from '@/types/server'
import type { IApp, IAppSettings } from '@aoi-js/server'

import type { MapEntity } from '@/types/server'

export interface IAppDTO extends MapEntity<IApp> {
capability: string
settings: IAppSettings
Expand Down
3 changes: 2 additions & 1 deletion apps/frontend/src/components/common/CommonTagDialog.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { http } from '@/utils/http'
import { useAsyncState } from '@vueuse/core'

import { http } from '@/utils/http'

export interface ICommonTagDialogProps {
endpoint: string
target: string
Expand Down
4 changes: 3 additions & 1 deletion apps/frontend/src/components/common/CommonTagDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@

<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { useCommonTagDialog, type ICommonTagDialogProps } from './CommonTagDialog'

import AsyncState from '../utils/AsyncState.vue'

import { useCommonTagDialog, type ICommonTagDialogProps } from './CommonTagDialog'

const props = defineProps<ICommonTagDialogProps>()
const { tags } = useCommonTagDialog(props)
const { t } = useI18n()
Expand Down
13 changes: 7 additions & 6 deletions apps/frontend/src/components/contest/ContestList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,16 @@
</template>

<script setup lang="ts">
import { withTitle } from '@/utils/title'
import { computed } from 'vue'
import { computed, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { usePagination } from '@/utils/pagination'
import { watch } from 'vue'
import ContestStageChip from '@/components/utils/ContestStageChip.vue'
import AccessLevelBadge from '@/components/utils/AccessLevelBadge.vue'

import type { IContestDTO } from './types'

import AccessLevelBadge from '@/components/utils/AccessLevelBadge.vue'
import ContestStageChip from '@/components/utils/ContestStageChip.vue'
import { usePagination } from '@/utils/pagination'
import { denseDateString } from '@/utils/time'
import { withTitle } from '@/utils/title'
const props = defineProps<{
orgId: string
search?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

<script setup lang="ts">
import { inject } from 'vue'

import { kContestProblemList } from '@/utils/contest/problem/inject'

const model = defineModel<string>({ required: true })
Expand Down
8 changes: 4 additions & 4 deletions apps/frontend/src/components/contest/ContestProgressBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
</template>

<script setup lang="ts">
import { computed } from 'vue'
import type { IContestDTO } from '@/components/contest/types'
import { ref } from 'vue'
import { onBeforeUnmount } from 'vue'
import ms from 'ms'
import { computed, ref, onBeforeUnmount } from 'vue'

import type { IPlanContestDTO } from '../plan/types'

import type { IContestDTO } from '@/components/contest/types'

const props = defineProps<{ contest: IContestDTO | IPlanContestDTO }>()
const emit = defineEmits<{
(ev: 'updated'): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
</template>

<script setup lang="ts">
import type { IContestStage } from '@/types'
import { useI18n } from 'vue-i18n'

import ContestStageTagRulesInput from './ContestStageTagRulesInput.vue'

import type { IContestStage } from '@/types'

const { t } = useI18n()

const model = defineModel<IContestStage['settings']>({ required: true })
Expand Down
5 changes: 3 additions & 2 deletions apps/frontend/src/components/contest/ProblemJumpBtn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
</template>

<script setup lang="ts">
import { ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { http } from '@/utils/http'
import { useRoute, useRouter } from 'vue-router'
import { ref, watch } from 'vue'

import { http } from '@/utils/http'

const { t } = useI18n()
const router = useRouter()
Expand Down
10 changes: 6 additions & 4 deletions apps/frontend/src/components/contest/ProblemTabAdmin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { http } from '@/utils/http'
import type { IContestProblemDTO } from './types'
import { useRoute, useRouter } from 'vue-router'
import SettingsEditor from '@/components/utils/SettingsEditor.vue'

import ContestProblemSettingsInput from './ContestProblemSettingsInput.vue'
import type { IContestProblemDTO } from './types'

import SettingsEditor from '@/components/utils/SettingsEditor.vue'
import { useAsyncTask, withMessage } from '@/utils/async'
import { ref } from 'vue'
import { http } from '@/utils/http'

const { t } = useI18n()
const router = useRouter()
Expand Down
Loading
Loading