Remove ts-node (#31228)

* Remove ts-node

Node can handle typescript nowadays

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-11-13 16:33:36 +00:00
committed by GitHub
parent 425bc64aa9
commit ac255445d1
9 changed files with 343 additions and 464 deletions

View File

@@ -6,8 +6,8 @@ import parseArgs from "minimist";
import * as chokidar from "chokidar";
import * as fs from "node:fs";
import _ from "lodash";
import { util } from "webpack";
import { Translations } from "matrix-web-i18n";
import webpack from "webpack";
import type { Translations } from "matrix-web-i18n";
const I18N_BASE_PATH = "src/i18n/strings/";
const INCLUDE_LANGS = [...new Set([...fs.readdirSync(I18N_BASE_PATH)])]
@@ -58,7 +58,7 @@ function prepareLangFile(lang: string, dest: string): [filename: string, json: s
const json = JSON.stringify(translations, null, 4);
const jsonBuffer = Buffer.from(json);
const digest = util.createHash("xxhash64").update(jsonBuffer).digest("hex").slice(0, 7);
const digest = webpack.util.createHash("xxhash64").update(jsonBuffer).digest("hex").slice(0, 7);
const filename = `${lang}.${digest}.json`;
return [filename, json];