diff --git a/package-lock.json b/package-lock.json index 88757835b..eb6f31980 100644 --- a/package-lock.json +++ b/package-lock.json @@ -130,7 +130,6 @@ "eslint": "8.47.0", "eslint-config-prettier": "9.1.0", "execa": "8.0.1", - "glob": "10.3.15", "husky": "8.0.3", "jest": "29.7.0", "jest-expo": "50.0.4", diff --git a/package.json b/package.json index 502110bee..e64b83245 100644 --- a/package.json +++ b/package.json @@ -151,7 +151,6 @@ "eslint": "8.47.0", "eslint-config-prettier": "9.1.0", "execa": "8.0.1", - "glob": "10.3.15", "husky": "8.0.3", "jest": "29.7.0", "jest-expo": "50.0.4", diff --git a/scripts/build-translations.mjs b/scripts/build-translations.mjs index 8e28aa504..a7a85287f 100644 --- a/scripts/build-translations.mjs +++ b/scripts/build-translations.mjs @@ -3,7 +3,6 @@ import path from 'node:path'; import fs from 'node:fs'; import {readFile, writeFile} from 'node:fs/promises'; -import {glob} from 'glob'; import LANGUAGE_NAME_TRANSLATIONS from '../src/frontend/languages.json' assert {type: 'json'}; @@ -38,13 +37,15 @@ async function run() { * @returns {Promise<{ [lang: string]: unknown }>} */ async function loadMessages() { - const files = await glob(`${PROJECT_ROOT_DIR_PATH}/messages/**/*.json`); + const files = fs.readdirSync(path.join(PROJECT_ROOT_DIR_PATH, 'messages'), { + withFileTypes: true, + }); /** @type {Array<[string, any]>} */ const loadedMessages = await Promise.all( files.map(async file => { - const lang = path.parse(file).name; - const msgs = JSON.parse(await readFile(file)); + const lang = path.parse(file.name).name; + const msgs = JSON.parse(await readFile(path.join(file.path, file.name))); return [lang, msgs]; }), );