File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,6 +86,22 @@ export default class Database {
8686 if ( aExactFull && ! bExactFull ) return - 1
8787 if ( ! aExactFull && bExactFull ) return 1
8888
89+ // エイリアス(名前空間付き)での完全一致を判定
90+ const aExactAlias = q . _and . some ( s => aidx . _namespacedAliases && aidx . _namespacedAliases . includes ( s ) )
91+ const bExactAlias = q . _and . some ( s => bidx . _namespacedAliases && bidx . _namespacedAliases . includes ( s ) )
92+
93+ // エイリアス(名前空間付き)での完全一致を優先
94+ if ( aExactAlias && ! bExactAlias ) return - 1
95+ if ( ! aExactAlias && bExactAlias ) return 1
96+
97+ // エイリアス(名前空間なし)での完全一致を判定
98+ const aExactAliasShort = q . _and . some ( s => aidx . _aliases && aidx . _aliases . includes ( s ) )
99+ const bExactAliasShort = q . _and . some ( s => bidx . _aliases && bidx . _aliases . includes ( s ) )
100+
101+ // エイリアス(名前空間なし)での完全一致を優先
102+ if ( aExactAliasShort && ! bExactAliasShort ) return - 1
103+ if ( ! aExactAliasShort && bExactAliasShort ) return 1
104+
89105 // 名前空間を除いた部分での完全一致を判定
90106 const aExactPart = q . _and . some ( s => getLastPart ( aidx . _name ) === s )
91107 const bExactPart = q . _and . some ( s => getLastPart ( bidx . _name ) === s )
You can’t perform that action at this time.
0 commit comments