From 5394d8a1f126a339ef0e7fb269f671c039d66bf8 Mon Sep 17 00:00:00 2001 From: MMK21Hub <50421330+MMK21Hub@users.noreply.github.com> Date: Mon, 31 Oct 2022 16:07:44 +0000 Subject: [PATCH] Don't warn for "duplicate" fixes --- src/builder.ts | 12 ------------ src/main.ts | 2 +- src/publisher/main.ts | 1 + 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/builder.ts b/src/builder.ts index 30a9c5f..0e4ce64 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -136,18 +136,6 @@ async function generateTranslationStrings( (fix) => !fix.languages || fix.languages.includes(targetLanguage) ) - const fixKeyIsDuplicated = (fixes: Fix[], fix: Fix, index: number) => - fixes.filter((f, i) => f.key === fix.key && index > i).length - const duplicateFixes = fixes.filter((fix, i) => - fixKeyIsDuplicated(fixes, fix, i) - ) - - duplicateFixes.forEach(({ key }) => - console.warn( - `[${brand}] Translation key ${key} has multiple fixes that target it` - ) - ) - for (const { key, transformer } of fixes) { const transformerName = Object.getPrototypeOf(transformer).constructor.name const logger = new TransformerLogger() diff --git a/src/main.ts b/src/main.ts index eb7e4d5..0504048 100644 --- a/src/main.ts +++ b/src/main.ts @@ -42,7 +42,7 @@ export const cache = new Map() const commandLineArg = process.argv[2] const targetVersions: MinecraftVersionFancyRange = { - start: "22w43a", + start: "1.19.2", } // const targetVersions = "1.19.2" // const targetVersions: StartAndEnd = ["1.19.1-pre1", null] diff --git a/src/publisher/main.ts b/src/publisher/main.ts index 1ed4bb4..7a29a1a 100644 --- a/src/publisher/main.ts +++ b/src/publisher/main.ts @@ -56,6 +56,7 @@ async function askForChangelog(): Promise { const changelogFileName = "changelog.md" const changelogFilePath = join(releaseConfigFolder, changelogFileName) await ensureDir(releaseConfigFolder) + // Create the file (with no content) if it doesn't already exist: await writeFile(changelogFilePath, Buffer.from(""), { flag: "a", })