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

@ -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' },