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
13 changed files with 1489 additions and 1837 deletions
|
@ -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' },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue