1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-07-01 12:06:49 +01:00

chore: upgrade to nuxt v3.5 and vue v3.3 (#2132)

This commit is contained in:
Daniel Roe 2023-05-29 02:16:34 -05:00 committed by GitHub
parent ad0725e9ae
commit 897968027c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 2325 additions and 2062 deletions

View file

@ -3,6 +3,7 @@
import { DynamicScroller } from 'vue-virtual-scroller' import { DynamicScroller } from 'vue-virtual-scroller'
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css' import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
import type { Paginator, WsEvents } from 'masto' import type { Paginator, WsEvents } from 'masto'
import type { UnwrapRef } from 'vue'
const { const {
paginator, paginator,
@ -23,23 +24,23 @@ const {
}>() }>()
defineSlots<{ defineSlots<{
default: { default: (props: {
items: U[] items: U[]
item: U item: U
index: number index: number
active?: boolean active?: boolean
older?: U older: U
newer?: U // newer is undefined when index === 0 newer: U // newer is undefined when index === 0
} }) => void
items: { items: (props: {
items: U[] items: UnwrapRef<U[]>
} }) => void
updater: { updater: (props: {
number: number number: number
update: () => void update: () => void
} }) => void
loading: {} loading: (props: {}) => void
done: {} done: (props: {}) => void
}>() }>()
const { t } = useI18n() const { t } = useI18n()
@ -83,25 +84,23 @@ defineExpose({ createEntry, removeEntry, updateEntry })
page-mode page-mode
> >
<slot <slot
:key="item[keyProp]"
:item="item" :item="item"
:active="active" :active="active"
:older="items[index + 1]" :older="items[index + 1] as U"
:newer="items[index - 1]" :newer="items[index - 1] as U"
:index="index" :index="index"
:items="items" :items="items as U[]"
/> />
</DynamicScroller> </DynamicScroller>
</template> </template>
<template v-else> <template v-else>
<slot <slot
v-for="item, index of items" v-for="item, index of items"
:key="(item as any)[keyProp]" :item="item as U"
:item="item" :older="items[index + 1] as U"
:older="items[index + 1]" :newer="items[index - 1] as U"
:newer="items[index - 1]"
:index="index" :index="index"
:items="items" :items="items as U[]"
/> />
</template> </template>
</slot> </slot>

View file

@ -10,8 +10,8 @@ const props = withDefaults(defineProps<{
}) })
defineSlots<{ defineSlots<{
icon: {} icon: (props: {}) => void
default: {} default: (props: {}) => void
}>() }>()
const router = useRouter() const router = useRouter()

View file

@ -10,7 +10,7 @@ defineProps<{
defineEmits(['hide', 'subscribe']) defineEmits(['hide', 'subscribe'])
defineSlots<{ defineSlots<{
error: {} error: (props: {}) => void
}>() }>()
const xl = useMediaQuery('(min-width: 1280px)') const xl = useMediaQuery('(min-width: 1280px)')

View file

@ -155,14 +155,14 @@ const { clearNotifications } = useNotifications()
const { formatNumber } = useHumanReadableNumber() const { formatNumber } = useHumanReadableNumber()
</script> </script>
<!-- eslint-disable vue/attribute-hyphenation -->
<template> <template>
<CommonPaginator <CommonPaginator
:paginator="paginator" :paginator="paginator"
:preprocess="preprocess" :preprocess="preprocess"
:stream="stream" :stream="stream"
:eager="3" :virtualScroller="virtualScroller"
:virtual-scroller="virtualScroller" eventType="notification"
event-type="notification"
> >
<template #updater="{ number, update }"> <template #updater="{ number, update }">
<button py-4 border="b base" flex="~ col" p-3 w-full text-primary font-bold @click="() => { update(); clearNotifications() }"> <button py-4 border="b base" flex="~ col" p-3 w-full text-primary font-bold @click="() => { update(); clearNotifications() }">

View file

@ -18,7 +18,7 @@ defineOptions({
}) })
defineSlots<{ defineSlots<{
text: {} text: (props: {}) => void
}>() }>()
const el = ref<HTMLDivElement>() const el = ref<HTMLDivElement>()

View file

@ -36,7 +36,7 @@ const vnode = $computed(() => {
class="content-rich line-compact" dir="auto" class="content-rich line-compact" dir="auto"
:lang="('language' in status && status.language) || undefined" :lang="('language' in status && status.language) || undefined"
> >
<component :is="vnode" /> <component :is="vnode" v-if="vnode" />
</span> </span>
<div v-else /> <div v-else />
<template v-if="translation.visible"> <template v-if="translation.visible">

View file

@ -13,6 +13,6 @@
}, },
"devDependencies": { "devDependencies": {
"@nuxt-themes/docus": "^1.11.0", "@nuxt-themes/docus": "^1.11.0",
"nuxt": "^3.4.3" "nuxt": "^3.5.1"
} }
} }

View file

@ -34,7 +34,7 @@
"@iconify-emoji/twemoji": "^1.0.2", "@iconify-emoji/twemoji": "^1.0.2",
"@iconify/json": "^2.2.49", "@iconify/json": "^2.2.49",
"@iconify/utils": "^2.1.5", "@iconify/utils": "^2.1.5",
"@nuxt/devtools": "^0.4.5", "@nuxt/devtools": "^0.5.3",
"@nuxtjs/color-mode": "^3.2.0", "@nuxtjs/color-mode": "^3.2.0",
"@nuxtjs/i18n": "8.0.0-beta.10", "@nuxtjs/i18n": "8.0.0-beta.10",
"@pinia/nuxt": "^0.4.9", "@pinia/nuxt": "^0.4.9",
@ -49,14 +49,14 @@
"@tiptap/starter-kit": "2.0.3", "@tiptap/starter-kit": "2.0.3",
"@tiptap/suggestion": "2.0.3", "@tiptap/suggestion": "2.0.3",
"@tiptap/vue-3": "2.0.3", "@tiptap/vue-3": "2.0.3",
"@unocss/nuxt": "^0.51.8", "@unocss/nuxt": "^0.52.0",
"@vue-macros/nuxt": "^1.3.4", "@vue-macros/nuxt": "^1.3.8",
"@vueuse/core": "^10.1.0", "@vueuse/core": "^10.1.0",
"@vueuse/gesture": "2.0.0-beta.1", "@vueuse/gesture": "2.0.0-beta.1",
"@vueuse/integrations": "^10.1.0", "@vueuse/integrations": "^10.1.0",
"@vueuse/math": "^10.1.0", "@vueuse/math": "^10.1.0",
"@vueuse/motion": "2.0.0-beta.12", "@vueuse/motion": "2.0.0-beta.12",
"@vueuse/nuxt": "^10.1.0", "@vueuse/nuxt": "^10.1.2",
"blurhash": "^2.0.5", "blurhash": "^2.0.5",
"browser-fs-access": "^0.33.0", "browser-fs-access": "^0.33.0",
"chroma-js": "^2.4.2", "chroma-js": "^2.4.2",
@ -74,7 +74,7 @@
"lru-cache": "^9.0.1", "lru-cache": "^9.0.1",
"masto": "^5.11.3", "masto": "^5.11.3",
"nuxt-security": "^0.13.0", "nuxt-security": "^0.13.0",
"nuxt-vitest": "^0.6.10", "nuxt-vitest": "^0.7.2",
"page-lifecycle": "^0.1.2", "page-lifecycle": "^0.1.2",
"pinia": "^2.0.35", "pinia": "^2.0.35",
"postcss-nested": "^6.0.1", "postcss-nested": "^6.0.1",
@ -84,16 +84,16 @@
"simple-git": "^3.17.0", "simple-git": "^3.17.0",
"slimeform": "^0.9.1", "slimeform": "^0.9.1",
"stale-dep": "^0.6.0", "stale-dep": "^0.6.0",
"std-env": "^3.3.2", "std-env": "^3.3.3",
"string-length": "^5.0.1", "string-length": "^5.0.1",
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log", "tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log",
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store", "tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
"theme-vitesse": "^0.6.4", "theme-vitesse": "^0.6.4",
"tiny-decode": "^0.1.3", "tiny-decode": "^0.1.3",
"tippy.js": "^6.3.7", "tippy.js": "^6.3.7",
"ufo": "^1.1.1", "ufo": "^1.1.2",
"ultrahtml": "^1.2.0", "ultrahtml": "^1.2.0",
"unimport": "^3.0.6", "unimport": "^3.0.7",
"vite-plugin-pwa": "^0.15.0", "vite-plugin-pwa": "^0.15.0",
"vue-advanced-cropper": "^2.8.8", "vue-advanced-cropper": "^2.8.8",
"vue-virtual-scroller": "2.0.0-beta.8", "vue-virtual-scroller": "2.0.0-beta.8",
@ -118,18 +118,15 @@
"flat": "^5.0.2", "flat": "^5.0.2",
"fs-extra": "^11.1.1", "fs-extra": "^11.1.1",
"lint-staged": "^13.2.2", "lint-staged": "^13.2.2",
"nuxt": "3.4.3", "nuxt": "3.5.1",
"prettier": "^2.8.8", "prettier": "^2.8.8",
"simple-git-hooks": "^2.8.1", "simple-git-hooks": "^2.8.1",
"tsx": "^3.12.7", "tsx": "^3.12.7",
"typescript": "^5.0.4", "typescript": "^5.0.4",
"vitest": "^0.30.1", "vitest": "^0.30.1",
"vue-tsc": "^1.2.0" "vue-tsc": "^1.6.5"
}, },
"pnpm": { "pnpm": {
"overrides": {
"vue": "3.2.45"
},
"patchedDependencies": { "patchedDependencies": {
"nuxt-security@0.13.0": "patches/nuxt-security@0.13.0.patch" "nuxt-security@0.13.0": "patches/nuxt-security@0.13.0.patch"
} }

File diff suppressed because it is too large Load diff