diff --git a/lib/utils/extend-aliases.ts b/lib/utils/extend-aliases.ts new file mode 100644 index 0000000..ab9665f --- /dev/null +++ b/lib/utils/extend-aliases.ts @@ -0,0 +1,12 @@ +export const extendAliases = ( + aliases: string[], + additionalAliases: Record, +): string[] => { + return Array.from( + new Set( + aliases.flatMap((alias) => { + return [alias, ...(additionalAliases[alias] || [])] + }), + ), + ) +} diff --git a/lib/utils/selector-matching/index.ts b/lib/utils/selector-matching/index.ts index 97f6650..ecef3e5 100644 --- a/lib/utils/selector-matching/index.ts +++ b/lib/utils/selector-matching/index.ts @@ -33,7 +33,9 @@ export function isMatchingSelector( } // Split the selector into type and conditions - const [type, ...conditions] = selector.split(/(?=[#.[])/) + let [type, ...conditions] = selector.split(/(?=[#.[])/) + + if (type === "pin") type = "port" // Check if the component type matches if (