fix: add typo alias shopify—development -> shopify-development (fixes #120)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -102,6 +102,7 @@
|
||||
"startup-business-projections": "startup-business-analyst-financial-projections",
|
||||
"startup-business-opportunity": "startup-business-analyst-market-opportunity",
|
||||
"systems-programming-project": "systems-programming-rust-project",
|
||||
"team-collaboration-notes": "team-collaboration-standup-notes"
|
||||
"team-collaboration-notes": "team-collaboration-standup-notes",
|
||||
"shopify—development": "shopify-development"
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user