brainy/tests/unit/hnsw
David Snelling f39d420cb4 refactor(8.0): rename HNSWIndex class → JsHnswVectorIndex (scaffold step 3)
Step 3 of the brainy 8.0 rename scaffolding. The class name now matches
its role: the JS HNSW implementation of the VectorIndexProvider contract.
Per planning § 2.3: this is NOT cosmetic — leaving HNSWIndex when the
public contract is VectorIndexProvider creates a confusing read at the
implementation layer.

CHANGES

Repo-wide mechanical rename: HNSWIndex → JsHnswVectorIndex across 52
references in src/ + 5 references in tests/ via sed. Class declaration,
imports, JSDoc, comments, and identifiers all updated.

src/index.ts
- Primary public export: JsHnswVectorIndex (the new name).
- Backwards-compat alias: `export const HNSWIndex = JsHnswVectorIndex`
  with @deprecated note. Removed in the final 8.0 cleanup commit.

NO-OP scope

No behavioural change. The class is exactly the same; only the name
moved. Tests + build green.

VERIFICATION

- npx tsc --noEmit: clean
- npm test: 1468 / 1468 unit
2026-06-09 13:07:56 -07:00
..
connections-codec.test.ts feat: graph link compression — delta-varint connections (2.4.0 #3) 2026-05-28 10:37:47 -07:00
lazy-vectors.test.ts refactor(8.0): rename HNSWIndex class → JsHnswVectorIndex (scaffold step 3) 2026-06-09 13:07:56 -07:00
mmap-vector-backend.test.ts feat: mmap-vector backend wiring — HNSWIndex consumes vectorStore:mmap (2.4.0 #2) 2026-05-28 10:37:47 -07:00
quantization.test.ts refactor(8.0): rename HNSWIndex class → JsHnswVectorIndex (scaffold step 3) 2026-06-09 13:07:56 -07:00