From 014c4ef055fb70b47c4c5002f667815e712cc992 Mon Sep 17 00:00:00 2001 From: Andrew Chou Date: Tue, 21 Jan 2025 18:22:55 -0500 Subject: [PATCH] remove rimraf --- package-lock.json | 20 -------------------- package.json | 1 - scripts/build-translations.mjs | 11 ++--------- 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3717227a2..88757835b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -140,7 +140,6 @@ "prettier": "3.2.5", "react-native-svg-transformer": "1.3.0", "react-test-renderer": "18.2.0", - "rimraf": "5.0.5", "semver": "7.6.0", "type-fest": "4.26.0", "typescript": "5.3.3" @@ -25325,25 +25324,6 @@ "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "license": "MIT" }, - "node_modules/rimraf": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", - "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^10.3.7" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/rpc-reflector": { "version": "1.3.11", "resolved": "https://registry.npmjs.org/rpc-reflector/-/rpc-reflector-1.3.11.tgz", diff --git a/package.json b/package.json index 7b8b5d498..502110bee 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,6 @@ "prettier": "3.2.5", "react-native-svg-transformer": "1.3.0", "react-test-renderer": "18.2.0", - "rimraf": "5.0.5", "semver": "7.6.0", "type-fest": "4.26.0", "typescript": "5.3.3" diff --git a/scripts/build-translations.mjs b/scripts/build-translations.mjs index 5ba1ee934..8e28aa504 100644 --- a/scripts/build-translations.mjs +++ b/scripts/build-translations.mjs @@ -4,7 +4,6 @@ import path from 'node:path'; import fs from 'node:fs'; import {readFile, writeFile} from 'node:fs/promises'; import {glob} from 'glob'; -import {rimraf} from 'rimraf'; import LANGUAGE_NAME_TRANSLATIONS from '../src/frontend/languages.json' assert {type: 'json'}; @@ -19,14 +18,8 @@ const TRANSLATIONS_OUTPUT_PATH = path.join( await run(); async function run() { - // We want to preserve the translations/ directory - await rimraf(`${TRANSLATIONS_DIR_PATH}/*`, {glob: true, preserveRoot: true}); - - try { - fs.mkdirSync(TRANSLATIONS_DIR_PATH); - } catch (_) { - // Translations directory already exists - } + fs.rmSync(TRANSLATIONS_DIR_PATH, {force: true, recursive: true}); + fs.mkdirSync(TRANSLATIONS_DIR_PATH); const messages = await loadMessages(); const translations = convertMessagesToTranslations(messages);