refactor(core): normalize service naming across app runtime

This commit is contained in:
2026-02-17 19:00:27 -08:00
parent e38a1c945e
commit 1233e3630f
87 changed files with 2813 additions and 1636 deletions

View File

@@ -50,8 +50,7 @@ function addEntriesToMap(
incomingLevel: JlptLevel,
): boolean =>
existingLevel === undefined ||
JLPT_LEVEL_PRECEDENCE[incomingLevel] >
JLPT_LEVEL_PRECEDENCE[existingLevel];
JLPT_LEVEL_PRECEDENCE[incomingLevel] > JLPT_LEVEL_PRECEDENCE[existingLevel];
if (!Array.isArray(rawEntries)) {
return;
@@ -163,7 +162,7 @@ export async function createJlptVocabularyLookup(
return (term: string): JlptLevel | null => {
if (!term) return null;
const normalized = normalizeJlptTerm(term);
return normalized ? terms.get(normalized) ?? null : null;
return normalized ? (terms.get(normalized) ?? null) : null;
};
}
@@ -181,7 +180,9 @@ export async function createJlptVocabularyLookup(
);
}
if (resolvedBanks.length > 0 && foundBankCount > 0) {
options.log(`JLPT dictionary search matched path(s): ${resolvedBanks.join(", ")}`);
options.log(
`JLPT dictionary search matched path(s): ${resolvedBanks.join(", ")}`,
);
}
return NOOP_LOOKUP;
}