fix: add typo alias shopify—development -> shopify-development (fixes #120)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
sck_0
2026-02-23 07:28:41 +01:00
parent ad3308f1f6
commit d09036f862
2 changed files with 13 additions and 1 deletions

View File

@@ -480,6 +480,11 @@ function buildTriggers(skill, tags) {
return unique([...tags, ...tokens]).slice(0, 12);
}
/** Common typo aliases (e.g. em dash — instead of hyphen -) for skill lookup. */
const TYPO_ALIASES = {
"shopify—development": "shopify-development",
};
function buildAliases(skills) {
const existingIds = new Set(skills.map((skill) => skill.id));
const aliases = {};
@@ -518,6 +523,12 @@ function buildAliases(skills) {
used.add(alias);
}
for (const [typo, canonicalId] of Object.entries(TYPO_ALIASES)) {
if (existingIds.has(canonicalId) && !aliases[typo]) {
aliases[typo] = canonicalId;
}
}
return aliases;
}