1
0

chore: update nuxt to 3.11.0 (#2692)

This commit is contained in:
Joaquín Sánchez 2024-03-17 15:32:02 +01:00 committed by GitHub
parent 21d5633233
commit ded2e0f3d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 1434 additions and 1356 deletions

View File

@ -13,6 +13,6 @@
}, },
"devDependencies": { "devDependencies": {
"@nuxt-themes/docus": "^1.15.0", "@nuxt-themes/docus": "^1.15.0",
"nuxt": "^3.10.3" "nuxt": "^3.11.0"
} }
} }

View File

@ -55,10 +55,15 @@ export default defineNuxtPlugin(async () => {
const localCall = createCall(toNodeListener(h3App) as any) const localCall = createCall(toNodeListener(h3App) as any)
const localFetch = createLocalFetch(localCall, globalThis.fetch) const localFetch = createLocalFetch(localCall, globalThis.fetch)
// eslint-disable-next-line ts/prefer-ts-expect-error
// @ts-ignore error TS2321: Excessive stack depth comparing types
globalThis.$fetch = createFetch({ globalThis.$fetch = createFetch({
// @ts-expect-error slight differences in api // eslint-disable-next-line ts/prefer-ts-expect-error
// @ts-ignore slight differences in api
fetch: localFetch, fetch: localFetch,
Headers, Headers,
// eslint-disable-next-line ts/prefer-ts-expect-error
// @ts-ignore error TS2321: Excessive stack depth comparing types
defaults: { baseURL: config.app.baseURL }, defaults: { baseURL: config.app.baseURL },
}) })

View File

@ -38,7 +38,7 @@
"@iconify/json": "^2.2.170", "@iconify/json": "^2.2.170",
"@iconify/utils": "^2.1.22", "@iconify/utils": "^2.1.22",
"@nuxt/devtools": "^1.0.8", "@nuxt/devtools": "^1.0.8",
"@nuxt/test-utils": "^3.11.0", "@nuxt/test-utils": "^3.12.0",
"@nuxtjs/color-mode": "^3.3.2", "@nuxtjs/color-mode": "^3.3.2",
"@nuxtjs/i18n": "^8.1.1", "@nuxtjs/i18n": "^8.1.1",
"@pinia/nuxt": "^0.5.1", "@pinia/nuxt": "^0.5.1",
@ -101,7 +101,7 @@
"theme-vitesse": "^0.7.2", "theme-vitesse": "^0.7.2",
"tiny-decode": "^0.1.3", "tiny-decode": "^0.1.3",
"tippy.js": "^6.3.7", "tippy.js": "^6.3.7",
"ufo": "^1.4.0", "ufo": "^1.5.1",
"ultrahtml": "^1.5.3", "ultrahtml": "^1.5.3",
"unimport": "^3.7.1", "unimport": "^3.7.1",
"vite-plugin-pwa": "^0.19.2", "vite-plugin-pwa": "^0.19.2",
@ -125,7 +125,7 @@
"@types/ws": "^8.5.10", "@types/ws": "^8.5.10",
"@unlazy/nuxt": "^0.11.1", "@unlazy/nuxt": "^0.11.1",
"@unocss/eslint-config": "^0.58.5", "@unocss/eslint-config": "^0.58.5",
"@vue/test-utils": "^2.4.4", "@vue/test-utils": "2.4.5",
"bumpp": "^9.4.0", "bumpp": "^9.4.0",
"consola": "^3.2.3", "consola": "^3.2.3",
"eslint": "^8.57.0", "eslint": "^8.57.0",
@ -133,27 +133,27 @@
"flat": "^5.0.2", "flat": "^5.0.2",
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
"lint-staged": "^14.0.1", "lint-staged": "^14.0.1",
"nuxt": "^3.10.3", "nuxt": "^3.11.0",
"prettier": "^3.0.3", "prettier": "^3.0.3",
"sharp": "^0.33.2", "sharp": "^0.33.2",
"sharp-ico": "^0.1.5", "sharp-ico": "^0.1.5",
"simple-git-hooks": "^2.10.0", "simple-git-hooks": "^2.10.0",
"tsx": "^4.7.1", "tsx": "^4.7.1",
"typescript": "^5.3.3", "typescript": "^5.4.2",
"vitest": "1.3.1", "vitest": "1.4.0",
"vue-tsc": "^1.8.27" "vue-tsc": "^2.0.6"
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"unstorage": "^1.10.1" "unstorage": "^1.10.2"
}, },
"patchedDependencies": { "patchedDependencies": {
"nuxt-security@0.13.1": "patches/nuxt-security@0.13.1.patch" "nuxt-security@0.13.1": "patches/nuxt-security@0.13.1.patch"
} }
}, },
"resolutions": { "resolutions": {
"vitest": "1.3.1", "vitest": "1.4.0",
"vue": "^3.4.19" "vue": "^3.4.21"
}, },
"simple-git-hooks": { "simple-git-hooks": {
"pre-commit": "pnpm lint-staged" "pre-commit": "pnpm lint-staged"

File diff suppressed because it is too large Load Diff

View File

@ -60,6 +60,8 @@ export function createNotificationOptions(
icon, icon,
lang: preferred_locale, lang: preferred_locale,
tag: notification_id, tag: notification_id,
// eslint-disable-next-line ts/prefer-ts-expect-error
// @ts-ignore error missing type, just ignore
timestamp: new Date().getTime(), timestamp: new Date().getTime(),
} }
@ -70,8 +72,11 @@ export function createNotificationOptions(
if (notification.account.avatar_static) if (notification.account.avatar_static)
notificationOptions.icon = notification.account.avatar_static notificationOptions.icon = notification.account.avatar_static
*/ */
if (notification.created_at) if (notification.created_at) {
// eslint-disable-next-line ts/prefer-ts-expect-error
// @ts-ignore error missing type, just ignore
notificationOptions.timestamp = new Date(notification.created_at).getTime() notificationOptions.timestamp = new Date(notification.created_at).getTime()
}
/* TODO: add spolier when actions available, checking also notification type /* TODO: add spolier when actions available, checking also notification type
if (notification.status && (notification.status.spoilerText || notification.status.sensitive)) { if (notification.status && (notification.status.spoilerText || notification.status.sensitive)) {
@ -83,8 +88,11 @@ export function createNotificationOptions(
*/ */
if (notification.status) { if (notification.status) {
// notificationOptions.body = htmlToPlainText(notification.status.content) // notificationOptions.body = htmlToPlainText(notification.status.content)
if (notification.status.media_attachments && notification.status.media_attachments.length > 0 && notification.status.media_attachments[0].preview_url) if (notification.status.media_attachments && notification.status.media_attachments.length > 0 && notification.status.media_attachments[0].preview_url) {
// eslint-disable-next-line ts/prefer-ts-expect-error
// @ts-ignore error missing type, just ignore
notificationOptions.image = notification.status.media_attachments[0].preview_url notificationOptions.image = notification.status.media_attachments[0].preview_url
}
if (notification.type === 'favourite' || notification.type === 'reblog' || notification.type === 'mention') if (notification.type === 'favourite' || notification.type === 'reblog' || notification.type === 'mention')
notificationOptions.data.url = `${user.server}/@${user.account.username}/${notification.status.id}` notificationOptions.data.url = `${user.server}/@${user.account.username}/${notification.status.id}`