1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-14 21:09:58 +00:00

chore(deps): update dependency nuxt to ^3.13.1 (#2946)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
renovate[bot] 2024-09-11 15:37:59 +01:00 committed by GitHub
parent 344ec56da0
commit dd6fab86ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 1489 additions and 1837 deletions

View file

@ -3,7 +3,6 @@
import { DynamicScroller } from 'vue-virtual-scroller'
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
import type { mastodon } from 'masto'
import type { UnwrapRef } from 'vue'
const {
paginator,
@ -33,7 +32,7 @@ defineSlots<{
newer: U // newer is undefined when index === 0
}) => void
items: (props: {
items: UnwrapRef<U[]>
items: U[]
}) => void
updater: (props: {
number: number
@ -74,7 +73,7 @@ defineExpose({ createEntry, removeEntry, updateEntry })
<template>
<div>
<slot v-if="prevItems.length" name="updater" v-bind="{ number: prevItems.length, update }" />
<slot name="items" :items="items">
<slot name="items" :items="items as U[]">
<template v-if="virtualScroller">
<DynamicScroller
v-slot="{ item, active, index }"

View file

@ -17,7 +17,7 @@ const modelValue = defineModel<boolean>({ required: true })
text-red-600 dark:text-red-400
border="~ base rounded red-600 dark:red-400"
>
<head id="notification-failed" flex justify-between>
<header id="notification-failed" flex justify-between>
<div flex items-center gap-x-2 font-bold>
<div aria-hidden="true" i-ri:error-warning-fill />
<p>{{ title ?? $t('settings.notifications.push_notifications.subscription_error.title') }}</p>
@ -32,7 +32,7 @@ const modelValue = defineModel<boolean>({ required: true })
<span aria-hidden="true" w="1.75em" h="1.75em" i-ri:close-line />
</button>
</CommonTooltip>
</head>
</header>
<p>{{ message }}</p>
<p py-2>
<i18n-t keypath="settings.notifications.push_notifications.subscription_error.error_hint">

View file

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

View file

@ -1,4 +1,4 @@
import fs from 'fs-extra'
import { lstat } from 'node:fs'
import { createResolver, defineNuxtModule } from '@nuxt/kit'
import { currentLocales } from '../config/i18n'
@ -53,7 +53,7 @@ export default defineNuxtModule({
async function isFile(path: string) {
return new Promise<boolean>((resolve) => {
fs.lstat(path, (err, stats) => {
lstat(path, (err, stats) => {
if (err)
resolve(false)
else

View file

@ -1,5 +1,5 @@
import { Buffer } from 'node:buffer'
import { readFile } from 'fs-extra'
import { readFile } from 'node:fs/promises'
import { createResolver } from '@nuxt/kit'
import type { ManifestOptions } from 'vite-plugin-pwa'
import { getEnv } from '../../config/env'

View file

@ -8,11 +8,12 @@ import { currentLocales } from './config/i18n'
const { resolve } = createResolver(import.meta.url)
export default defineNuxtConfig({
compatibilityDate: '2024-09-11',
typescript: {
tsConfig: {
exclude: ['../service-worker'],
vueCompilerOptions: {
target: 3.4,
target: 3.5,
},
},
},

View file

@ -37,11 +37,11 @@
"@iconify-emoji/twemoji": "^1.0.2",
"@iconify/json": "^2.2.170",
"@iconify/utils": "^2.1.22",
"@nuxt/devtools": "^1.0.8",
"@nuxt/test-utils": "^3.12.0",
"@nuxtjs/color-mode": "^3.3.4",
"@nuxtjs/i18n": "^8.4.0",
"@pinia/nuxt": "^0.5.3",
"@nuxt/devtools": "^1.4.2",
"@nuxt/test-utils": "^3.14.2",
"@nuxtjs/color-mode": "^3.4.4",
"@nuxtjs/i18n": "^8.5.3",
"@pinia/nuxt": "^0.5.4",
"@tiptap/core": "2.2.4",
"@tiptap/extension-bold": "2.2.4",
"@tiptap/extension-character-count": "2.2.4",
@ -59,13 +59,13 @@
"@unocss/nuxt": "^0.62.3",
"@upstash/redis": "^1.27.1",
"@vercel/kv": "^2.0.0",
"@vue-macros/nuxt": "^1.6.0",
"@vueuse/core": "^11.0.0",
"@vue-macros/nuxt": "^1.11.12",
"@vueuse/core": "^11.0.3",
"@vueuse/gesture": "^2.0.0",
"@vueuse/integrations": "^11.0.0",
"@vueuse/math": "^11.0.0",
"@vueuse/integrations": "^11.0.3",
"@vueuse/math": "^11.0.3",
"@vueuse/motion": "2.2.5",
"@vueuse/nuxt": "^11.0.0",
"@vueuse/nuxt": "^11.0.3",
"blurhash": "^2.0.5",
"browser-fs-access": "^0.35.0",
"cheerio": "^1.0.0",
@ -85,7 +85,7 @@
"lru-cache": "^11.0.0",
"masto": "^6.7.5",
"node-emoji": "^2.1.3",
"nuxt-security": "^1.0.0",
"nuxt-security": "^1.4.3",
"page-lifecycle": "^0.1.2",
"pinia": "^2.2.2",
"postcss-nested": "^6.0.1",
@ -105,11 +105,11 @@
"ufo": "^1.5.3",
"ultrahtml": "^1.5.3",
"unimport": "^3.10.0",
"vite-plugin-pwa": "^0.20.0",
"vue-advanced-cropper": "^2.8.8",
"vite-plugin-pwa": "^0.20.5",
"vue-advanced-cropper": "^2.8.9",
"vue-virtual-scroller": "2.0.0-beta.8",
"workbox-build": "^7.0.0",
"workbox-window": "^7.0.0",
"workbox-build": "^7.1.1",
"workbox-window": "^7.1.0",
"ws": "^8.15.1"
},
"devDependencies": {
@ -132,7 +132,7 @@
"flat": "^6.0.1",
"fs-extra": "^11.2.0",
"lint-staged": "^15.2.10",
"nuxt": "^3.13.0",
"nuxt": "^3.13.1",
"prettier": "^3.3.3",
"sharp": "^0.33.5",
"sharp-ico": "^0.1.5",
@ -140,21 +140,22 @@
"tsx": "^4.19.0",
"typescript": "^5.4.4",
"vitest": "2.0.5",
"vue-tsc": "^2.0.10"
"vue-tsc": "^2.1.6"
},
"pnpm": {
"patchedDependencies": {
"@vueuse/motion": "patches/@vueuse__motion.patch",
"pinceau": "patches/pinceau.patch",
"vue-i18n": "patches/vue-i18n.patch",
"nuxt-security": "patches/nuxt-security.patch"
"nuxt-security": "patches/nuxt-security.patch",
"nuxt": "patches/nuxt.patch"
}
},
"resolutions": {
"nuxt-component-meta": "0.8.0",
"nuxt-component-meta": "0.8.1",
"unstorage": "^1.12.0",
"vitest": "2.0.5",
"vue": "^3.4.21"
"vue": "^3.5.4"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"

12
patches/nuxt.patch Normal file
View file

@ -0,0 +1,12 @@
diff --git a/dist/index.mjs b/dist/index.mjs
index a5c61adc0c21b5df5b1a3ffcf81d2469c7f96873..9241cf294b398b43a4a5555f39746a6c844d0b0f 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -2183,6 +2183,7 @@ function createTransformPlugin(nuxt, getComponents, mode) {
}
return createUnplugin(() => ({
name: "nuxt:components:imports",
+ enforce: "post",
transformInclude(id) {
id = normalize(id);
return id.startsWith("virtual:") || id.startsWith("\0virtual:") || id.startsWith(nuxt.options.buildDir) || !isIgnored(id);

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
import { Buffer } from 'node:buffer'
import { writeFile } from 'node:fs/promises'
import { join, resolve } from 'pathe'
import fs from 'fs-extra'
import { ofetch } from 'ofetch'
@ -12,7 +12,7 @@ async function download(url: string, fileName: string) {
console.log('downloading', fileName)
try {
const image = await ofetch(url, { responseType: 'arrayBuffer' })
await fs.writeFile(fileName, Buffer.from(image))
await writeFile(fileName, new Uint8Array(image))
}
catch (err) {
console.error(err)

View file

@ -1,7 +1,7 @@
import { Buffer } from 'node:buffer'
import { readFile, writeFile } from 'node:fs/promises'
import { flatten, unflatten } from 'flat'
import { createResolver } from '@nuxt/kit'
import fs from 'fs-extra'
import { currentLocales } from '../config/i18n'
const resolver = createResolver(import.meta.url)
@ -27,7 +27,7 @@ const sourceTranslations: Record<string, string> = {}
for (const file of sourceFiles) {
const data = JSON.parse(Buffer.from(
await fs.readFile(resolver.resolve(`../locales/${file as string}`), 'utf-8'),
await readFile(resolver.resolve(`../locales/${file as string}`), 'utf-8'),
).toString()) as Record<string, unknown>
merge(flatten(data), sourceTranslations)
@ -41,7 +41,7 @@ async function removeOutdatedTranslations() {
const path = resolver.resolve(`../locales/${file}`)
const data = JSON.parse(Buffer.from(
await fs.readFile(path, 'utf-8'),
await readFile(path, 'utf-8'),
).toString())
const targetTranslations: Record<string, string> = flatten(data)
@ -53,7 +53,7 @@ async function removeOutdatedTranslations() {
const unflattened = unflatten(targetTranslations)
await fs.writeFile(
await writeFile(
path,
`${JSON.stringify(unflattened, null, 2)}\n`,
{ encoding: 'utf-8' },

View file

@ -148,7 +148,7 @@ async function generatePWAIconForEnv(folder: string, icons: ResolvedIcons) {
const png = await sharp(
resolve(folder, icons.iconName('transparent', size).replace(/-temp\.png$/, '.png')),
).toFormat('png').toBuffer()
await writeFile(resolve(folder, icoName(size)), ico.encode([png]))
await writeFile(resolve(folder, icoName(size)), new Uint8Array(ico.encode([png])))
}))
}
}

View file

@ -1,7 +1,7 @@
import { Buffer } from 'node:buffer'
import { readFile, writeFile } from 'node:fs/promises'
import { flatten } from 'flat'
import { createResolver } from '@nuxt/kit'
import fs from 'fs-extra'
import { countryLocaleVariants, currentLocales } from '../config/i18n'
import type { LocaleEntry } from '../docs/types'
import type { ElkTranslationStatus } from '~/types/translation-status'
@ -28,7 +28,7 @@ async function readI18nFile(file: string | string[]) {
if (Array.isArray(file)) {
const files = await Promise.all(file.map(f => async () => {
return JSON.parse(Buffer.from(
await fs.readFile(resolver.resolve(`../locales/${f}`), 'utf-8'),
await readFile(resolver.resolve(`../locales/${f}`), 'utf-8'),
).toString())
})).then(f => f.map(f => f()))
const data: Record<string, any> = files[0]
@ -38,7 +38,7 @@ async function readI18nFile(file: string | string[]) {
}
else {
return JSON.parse(Buffer.from(
await fs.readFile(resolver.resolve(`../locales/${file}`), 'utf-8'),
await readFile(resolver.resolve(`../locales/${file}`), 'utf-8'),
).toString())
}
}
@ -107,7 +107,7 @@ async function prepareTranslationStatus() {
const resolver = createResolver(import.meta.url)
await fs.writeFile(
await writeFile(
resolver.resolve('../docs/translation-status.json'),
JSON.stringify(sorted, null, 2),
{ encoding: 'utf-8' },
@ -136,7 +136,7 @@ async function prepareTranslationStatus() {
}
})
await fs.writeFile(
await writeFile(
resolver.resolve('../elk-translation-status.json'),
JSON.stringify(translationStatus, null, 2),
{ encoding: 'utf-8' },