mirror of
https://github.com/elk-zone/elk
synced 2024-11-23 14:46:08 +09: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:
parent
344ec56da0
commit
dd6fab86ee
@ -3,7 +3,6 @@
|
|||||||
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 { mastodon } from 'masto'
|
import type { mastodon } from 'masto'
|
||||||
import type { UnwrapRef } from 'vue'
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
paginator,
|
paginator,
|
||||||
@ -33,7 +32,7 @@ defineSlots<{
|
|||||||
newer: U // newer is undefined when index === 0
|
newer: U // newer is undefined when index === 0
|
||||||
}) => void
|
}) => void
|
||||||
items: (props: {
|
items: (props: {
|
||||||
items: UnwrapRef<U[]>
|
items: U[]
|
||||||
}) => void
|
}) => void
|
||||||
updater: (props: {
|
updater: (props: {
|
||||||
number: number
|
number: number
|
||||||
@ -74,7 +73,7 @@ defineExpose({ createEntry, removeEntry, updateEntry })
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<slot v-if="prevItems.length" name="updater" v-bind="{ number: prevItems.length, update }" />
|
<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">
|
<template v-if="virtualScroller">
|
||||||
<DynamicScroller
|
<DynamicScroller
|
||||||
v-slot="{ item, active, index }"
|
v-slot="{ item, active, index }"
|
||||||
|
@ -17,7 +17,7 @@ const modelValue = defineModel<boolean>({ required: true })
|
|||||||
text-red-600 dark:text-red-400
|
text-red-600 dark:text-red-400
|
||||||
border="~ base rounded red-600 dark: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 flex items-center gap-x-2 font-bold>
|
||||||
<div aria-hidden="true" i-ri:error-warning-fill />
|
<div aria-hidden="true" i-ri:error-warning-fill />
|
||||||
<p>{{ title ?? $t('settings.notifications.push_notifications.subscription_error.title') }}</p>
|
<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 />
|
<span aria-hidden="true" w="1.75em" h="1.75em" i-ri:close-line />
|
||||||
</button>
|
</button>
|
||||||
</CommonTooltip>
|
</CommonTooltip>
|
||||||
</head>
|
</header>
|
||||||
<p>{{ message }}</p>
|
<p>{{ message }}</p>
|
||||||
<p py-2>
|
<p py-2>
|
||||||
<i18n-t keypath="settings.notifications.push_notifications.subscription_error.error_hint">
|
<i18n-t keypath="settings.notifications.push_notifications.subscription_error.error_hint">
|
||||||
|
@ -13,6 +13,6 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nuxt-themes/docus": "^1.15.0",
|
"@nuxt-themes/docus": "^1.15.0",
|
||||||
"nuxt": "^3.13.0"
|
"nuxt": "^3.13.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import fs from 'fs-extra'
|
import { lstat } from 'node:fs'
|
||||||
import { createResolver, defineNuxtModule } from '@nuxt/kit'
|
import { createResolver, defineNuxtModule } from '@nuxt/kit'
|
||||||
import { currentLocales } from '../config/i18n'
|
import { currentLocales } from '../config/i18n'
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ export default defineNuxtModule({
|
|||||||
|
|
||||||
async function isFile(path: string) {
|
async function isFile(path: string) {
|
||||||
return new Promise<boolean>((resolve) => {
|
return new Promise<boolean>((resolve) => {
|
||||||
fs.lstat(path, (err, stats) => {
|
lstat(path, (err, stats) => {
|
||||||
if (err)
|
if (err)
|
||||||
resolve(false)
|
resolve(false)
|
||||||
else
|
else
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Buffer } from 'node:buffer'
|
import { Buffer } from 'node:buffer'
|
||||||
import { readFile } from 'fs-extra'
|
import { readFile } from 'node:fs/promises'
|
||||||
import { createResolver } from '@nuxt/kit'
|
import { createResolver } from '@nuxt/kit'
|
||||||
import type { ManifestOptions } from 'vite-plugin-pwa'
|
import type { ManifestOptions } from 'vite-plugin-pwa'
|
||||||
import { getEnv } from '../../config/env'
|
import { getEnv } from '../../config/env'
|
||||||
|
@ -8,11 +8,12 @@ import { currentLocales } from './config/i18n'
|
|||||||
const { resolve } = createResolver(import.meta.url)
|
const { resolve } = createResolver(import.meta.url)
|
||||||
|
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
|
compatibilityDate: '2024-09-11',
|
||||||
typescript: {
|
typescript: {
|
||||||
tsConfig: {
|
tsConfig: {
|
||||||
exclude: ['../service-worker'],
|
exclude: ['../service-worker'],
|
||||||
vueCompilerOptions: {
|
vueCompilerOptions: {
|
||||||
target: 3.4,
|
target: 3.5,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
41
package.json
41
package.json
@ -37,11 +37,11 @@
|
|||||||
"@iconify-emoji/twemoji": "^1.0.2",
|
"@iconify-emoji/twemoji": "^1.0.2",
|
||||||
"@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.4.2",
|
||||||
"@nuxt/test-utils": "^3.12.0",
|
"@nuxt/test-utils": "^3.14.2",
|
||||||
"@nuxtjs/color-mode": "^3.3.4",
|
"@nuxtjs/color-mode": "^3.4.4",
|
||||||
"@nuxtjs/i18n": "^8.4.0",
|
"@nuxtjs/i18n": "^8.5.3",
|
||||||
"@pinia/nuxt": "^0.5.3",
|
"@pinia/nuxt": "^0.5.4",
|
||||||
"@tiptap/core": "2.2.4",
|
"@tiptap/core": "2.2.4",
|
||||||
"@tiptap/extension-bold": "2.2.4",
|
"@tiptap/extension-bold": "2.2.4",
|
||||||
"@tiptap/extension-character-count": "2.2.4",
|
"@tiptap/extension-character-count": "2.2.4",
|
||||||
@ -59,13 +59,13 @@
|
|||||||
"@unocss/nuxt": "^0.62.3",
|
"@unocss/nuxt": "^0.62.3",
|
||||||
"@upstash/redis": "^1.27.1",
|
"@upstash/redis": "^1.27.1",
|
||||||
"@vercel/kv": "^2.0.0",
|
"@vercel/kv": "^2.0.0",
|
||||||
"@vue-macros/nuxt": "^1.6.0",
|
"@vue-macros/nuxt": "^1.11.12",
|
||||||
"@vueuse/core": "^11.0.0",
|
"@vueuse/core": "^11.0.3",
|
||||||
"@vueuse/gesture": "^2.0.0",
|
"@vueuse/gesture": "^2.0.0",
|
||||||
"@vueuse/integrations": "^11.0.0",
|
"@vueuse/integrations": "^11.0.3",
|
||||||
"@vueuse/math": "^11.0.0",
|
"@vueuse/math": "^11.0.3",
|
||||||
"@vueuse/motion": "2.2.5",
|
"@vueuse/motion": "2.2.5",
|
||||||
"@vueuse/nuxt": "^11.0.0",
|
"@vueuse/nuxt": "^11.0.3",
|
||||||
"blurhash": "^2.0.5",
|
"blurhash": "^2.0.5",
|
||||||
"browser-fs-access": "^0.35.0",
|
"browser-fs-access": "^0.35.0",
|
||||||
"cheerio": "^1.0.0",
|
"cheerio": "^1.0.0",
|
||||||
@ -85,7 +85,7 @@
|
|||||||
"lru-cache": "^11.0.0",
|
"lru-cache": "^11.0.0",
|
||||||
"masto": "^6.7.5",
|
"masto": "^6.7.5",
|
||||||
"node-emoji": "^2.1.3",
|
"node-emoji": "^2.1.3",
|
||||||
"nuxt-security": "^1.0.0",
|
"nuxt-security": "^1.4.3",
|
||||||
"page-lifecycle": "^0.1.2",
|
"page-lifecycle": "^0.1.2",
|
||||||
"pinia": "^2.2.2",
|
"pinia": "^2.2.2",
|
||||||
"postcss-nested": "^6.0.1",
|
"postcss-nested": "^6.0.1",
|
||||||
@ -105,11 +105,11 @@
|
|||||||
"ufo": "^1.5.3",
|
"ufo": "^1.5.3",
|
||||||
"ultrahtml": "^1.5.3",
|
"ultrahtml": "^1.5.3",
|
||||||
"unimport": "^3.10.0",
|
"unimport": "^3.10.0",
|
||||||
"vite-plugin-pwa": "^0.20.0",
|
"vite-plugin-pwa": "^0.20.5",
|
||||||
"vue-advanced-cropper": "^2.8.8",
|
"vue-advanced-cropper": "^2.8.9",
|
||||||
"vue-virtual-scroller": "2.0.0-beta.8",
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
||||||
"workbox-build": "^7.0.0",
|
"workbox-build": "^7.1.1",
|
||||||
"workbox-window": "^7.0.0",
|
"workbox-window": "^7.1.0",
|
||||||
"ws": "^8.15.1"
|
"ws": "^8.15.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -132,7 +132,7 @@
|
|||||||
"flat": "^6.0.1",
|
"flat": "^6.0.1",
|
||||||
"fs-extra": "^11.2.0",
|
"fs-extra": "^11.2.0",
|
||||||
"lint-staged": "^15.2.10",
|
"lint-staged": "^15.2.10",
|
||||||
"nuxt": "^3.13.0",
|
"nuxt": "^3.13.1",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"sharp": "^0.33.5",
|
"sharp": "^0.33.5",
|
||||||
"sharp-ico": "^0.1.5",
|
"sharp-ico": "^0.1.5",
|
||||||
@ -140,21 +140,22 @@
|
|||||||
"tsx": "^4.19.0",
|
"tsx": "^4.19.0",
|
||||||
"typescript": "^5.4.4",
|
"typescript": "^5.4.4",
|
||||||
"vitest": "2.0.5",
|
"vitest": "2.0.5",
|
||||||
"vue-tsc": "^2.0.10"
|
"vue-tsc": "^2.1.6"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"@vueuse/motion": "patches/@vueuse__motion.patch",
|
"@vueuse/motion": "patches/@vueuse__motion.patch",
|
||||||
"pinceau": "patches/pinceau.patch",
|
"pinceau": "patches/pinceau.patch",
|
||||||
"vue-i18n": "patches/vue-i18n.patch",
|
"vue-i18n": "patches/vue-i18n.patch",
|
||||||
"nuxt-security": "patches/nuxt-security.patch"
|
"nuxt-security": "patches/nuxt-security.patch",
|
||||||
|
"nuxt": "patches/nuxt.patch"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"nuxt-component-meta": "0.8.0",
|
"nuxt-component-meta": "0.8.1",
|
||||||
"unstorage": "^1.12.0",
|
"unstorage": "^1.12.0",
|
||||||
"vitest": "2.0.5",
|
"vitest": "2.0.5",
|
||||||
"vue": "^3.4.21"
|
"vue": "^3.5.4"
|
||||||
},
|
},
|
||||||
"simple-git-hooks": {
|
"simple-git-hooks": {
|
||||||
"pre-commit": "pnpm lint-staged"
|
"pre-commit": "pnpm lint-staged"
|
||||||
|
12
patches/nuxt.patch
Normal file
12
patches/nuxt.patch
Normal 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);
|
3229
pnpm-lock.yaml
3229
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
import { Buffer } from 'node:buffer'
|
import { writeFile } from 'node:fs/promises'
|
||||||
import { join, resolve } from 'pathe'
|
import { join, resolve } from 'pathe'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import { ofetch } from 'ofetch'
|
import { ofetch } from 'ofetch'
|
||||||
@ -12,7 +12,7 @@ async function download(url: string, fileName: string) {
|
|||||||
console.log('downloading', fileName)
|
console.log('downloading', fileName)
|
||||||
try {
|
try {
|
||||||
const image = await ofetch(url, { responseType: 'arrayBuffer' })
|
const image = await ofetch(url, { responseType: 'arrayBuffer' })
|
||||||
await fs.writeFile(fileName, Buffer.from(image))
|
await writeFile(fileName, new Uint8Array(image))
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Buffer } from 'node:buffer'
|
import { Buffer } from 'node:buffer'
|
||||||
|
import { readFile, writeFile } from 'node:fs/promises'
|
||||||
import { flatten, unflatten } from 'flat'
|
import { flatten, unflatten } from 'flat'
|
||||||
import { createResolver } from '@nuxt/kit'
|
import { createResolver } from '@nuxt/kit'
|
||||||
import fs from 'fs-extra'
|
|
||||||
import { currentLocales } from '../config/i18n'
|
import { currentLocales } from '../config/i18n'
|
||||||
|
|
||||||
const resolver = createResolver(import.meta.url)
|
const resolver = createResolver(import.meta.url)
|
||||||
@ -27,7 +27,7 @@ const sourceTranslations: Record<string, string> = {}
|
|||||||
|
|
||||||
for (const file of sourceFiles) {
|
for (const file of sourceFiles) {
|
||||||
const data = JSON.parse(Buffer.from(
|
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>
|
).toString()) as Record<string, unknown>
|
||||||
|
|
||||||
merge(flatten(data), sourceTranslations)
|
merge(flatten(data), sourceTranslations)
|
||||||
@ -41,7 +41,7 @@ async function removeOutdatedTranslations() {
|
|||||||
const path = resolver.resolve(`../locales/${file}`)
|
const path = resolver.resolve(`../locales/${file}`)
|
||||||
|
|
||||||
const data = JSON.parse(Buffer.from(
|
const data = JSON.parse(Buffer.from(
|
||||||
await fs.readFile(path, 'utf-8'),
|
await readFile(path, 'utf-8'),
|
||||||
).toString())
|
).toString())
|
||||||
|
|
||||||
const targetTranslations: Record<string, string> = flatten(data)
|
const targetTranslations: Record<string, string> = flatten(data)
|
||||||
@ -53,7 +53,7 @@ async function removeOutdatedTranslations() {
|
|||||||
|
|
||||||
const unflattened = unflatten(targetTranslations)
|
const unflattened = unflatten(targetTranslations)
|
||||||
|
|
||||||
await fs.writeFile(
|
await writeFile(
|
||||||
path,
|
path,
|
||||||
`${JSON.stringify(unflattened, null, 2)}\n`,
|
`${JSON.stringify(unflattened, null, 2)}\n`,
|
||||||
{ encoding: 'utf-8' },
|
{ encoding: 'utf-8' },
|
||||||
|
@ -148,7 +148,7 @@ async function generatePWAIconForEnv(folder: string, icons: ResolvedIcons) {
|
|||||||
const png = await sharp(
|
const png = await sharp(
|
||||||
resolve(folder, icons.iconName('transparent', size).replace(/-temp\.png$/, '.png')),
|
resolve(folder, icons.iconName('transparent', size).replace(/-temp\.png$/, '.png')),
|
||||||
).toFormat('png').toBuffer()
|
).toFormat('png').toBuffer()
|
||||||
await writeFile(resolve(folder, icoName(size)), ico.encode([png]))
|
await writeFile(resolve(folder, icoName(size)), new Uint8Array(ico.encode([png])))
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Buffer } from 'node:buffer'
|
import { Buffer } from 'node:buffer'
|
||||||
|
import { readFile, writeFile } from 'node:fs/promises'
|
||||||
import { flatten } from 'flat'
|
import { flatten } from 'flat'
|
||||||
import { createResolver } from '@nuxt/kit'
|
import { createResolver } from '@nuxt/kit'
|
||||||
import fs from 'fs-extra'
|
|
||||||
import { countryLocaleVariants, currentLocales } from '../config/i18n'
|
import { countryLocaleVariants, currentLocales } from '../config/i18n'
|
||||||
import type { LocaleEntry } from '../docs/types'
|
import type { LocaleEntry } from '../docs/types'
|
||||||
import type { ElkTranslationStatus } from '~/types/translation-status'
|
import type { ElkTranslationStatus } from '~/types/translation-status'
|
||||||
@ -28,7 +28,7 @@ async function readI18nFile(file: string | string[]) {
|
|||||||
if (Array.isArray(file)) {
|
if (Array.isArray(file)) {
|
||||||
const files = await Promise.all(file.map(f => async () => {
|
const files = await Promise.all(file.map(f => async () => {
|
||||||
return JSON.parse(Buffer.from(
|
return JSON.parse(Buffer.from(
|
||||||
await fs.readFile(resolver.resolve(`../locales/${f}`), 'utf-8'),
|
await readFile(resolver.resolve(`../locales/${f}`), 'utf-8'),
|
||||||
).toString())
|
).toString())
|
||||||
})).then(f => f.map(f => f()))
|
})).then(f => f.map(f => f()))
|
||||||
const data: Record<string, any> = files[0]
|
const data: Record<string, any> = files[0]
|
||||||
@ -38,7 +38,7 @@ async function readI18nFile(file: string | string[]) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return JSON.parse(Buffer.from(
|
return JSON.parse(Buffer.from(
|
||||||
await fs.readFile(resolver.resolve(`../locales/${file}`), 'utf-8'),
|
await readFile(resolver.resolve(`../locales/${file}`), 'utf-8'),
|
||||||
).toString())
|
).toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ async function prepareTranslationStatus() {
|
|||||||
|
|
||||||
const resolver = createResolver(import.meta.url)
|
const resolver = createResolver(import.meta.url)
|
||||||
|
|
||||||
await fs.writeFile(
|
await writeFile(
|
||||||
resolver.resolve('../docs/translation-status.json'),
|
resolver.resolve('../docs/translation-status.json'),
|
||||||
JSON.stringify(sorted, null, 2),
|
JSON.stringify(sorted, null, 2),
|
||||||
{ encoding: 'utf-8' },
|
{ encoding: 'utf-8' },
|
||||||
@ -136,7 +136,7 @@ async function prepareTranslationStatus() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
await fs.writeFile(
|
await writeFile(
|
||||||
resolver.resolve('../elk-translation-status.json'),
|
resolver.resolve('../elk-translation-status.json'),
|
||||||
JSON.stringify(translationStatus, null, 2),
|
JSON.stringify(translationStatus, null, 2),
|
||||||
{ encoding: 'utf-8' },
|
{ encoding: 'utf-8' },
|
||||||
|
Loading…
Reference in New Issue
Block a user