@devries-cameron20 / t3code Mirror · read-only / commits / 86f079964b
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 24, 10:15 UTC

refactor(shared): keep search ranking comparator private (#10031)

Julius Marminge committed Sep 5, 2026 at 01:20 UTC 86f079964b9c3d2a087907d2ef8273c3dbcb960b
2 files changed +1 -3
packages/shared/src/searchRanking.test.ts
-2
@@ -1,7 +1,6 @@
1 import { describe, expect, it } from "vite-plus/test";
2
3 import {
4 - compareRankedSearchResults,
4 insertRankedSearchResult,
5 normalizeSearchQuery,
6 scoreQueryMatch,
@@ -90,6 +89,5 @@ describe("insertRankedSearchResult", () => {
89 insertRankedSearchResult(ranked, { item: "c", score: 30, tieBreaker: "c" }, 2);
90
91 expect(ranked.map((entry) => entry.item)).toEqual(["a", "b"]);
93 - expect(compareRankedSearchResults(ranked[0]!, ranked[1]!)).toBeLessThan(0);
92 });
93 });
packages/shared/src/searchRanking.ts
+1 -1
@@ -135,7 +135,7 @@ export function scoreQueryMatch(input: {
135 return null;
136 }
137
138 -export function compareRankedSearchResults<T>(
138 +function compareRankedSearchResults<T>(
139 left: RankedSearchResult<T>,
140 right: RankedSearchResult<T>,
141 ): number {