You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ bun add @stainless-code/codemap
18
18
19
19
(`0.0.0` until the first npm release; use a git dependency or `bun link` until then.)
20
20
21
-
The package exposes a **`codemap`** binary, a **library** entry (`import` / `exports`), and ships compiled **`dist/`** — see [docs/packaging.md](docs/packaging.md).
21
+
The package exposes a **`codemap`** binary, a **library** entry (`import` / `exports`), compiled **`dist/`**, and **`templates/agents`** for **`codemap agents init`** — see [docs/packaging.md](docs/packaging.md).
22
22
23
23
**Engines:** Node **≥20** and/or Bun **≥1.1** (see `package.json`).
24
24
@@ -94,7 +94,7 @@ bun run check # build + format:check + lint + test + typecheck
94
94
bun run fix # oxlint --fix, then oxfmt
95
95
```
96
96
97
-
**Readability & DX:** Prefer clear names and small functions over cleverness. **Public API** surface (`createCodemap`, `Codemap`, config types, `runCodemapIndex`) should stay **documented with JSDoc** so consumers get good hovers and published `.d.ts` stay useful. **Layering** (`cli` → `application` → parsers / SQLite): see [docs/architecture.md](docs/architecture.md). More for contributors: [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md).
97
+
**Readability & DX:** Prefer clear names and small functions over cleverness. **Public API** surface (`createCodemap`, `Codemap`, config types, `runCodemapIndex`, adapter exports) should stay **documented with JSDoc** so consumers get good hovers and published `.d.ts` stay useful. **Layering** (`cli` → `application` → `adapters` / parsers → SQLite): see [docs/architecture.md](docs/architecture.md). More for contributors: [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md).
@@ -130,7 +131,7 @@ When specific file paths are passed via `--files`, the indexer skips git diff, g
130
131
131
132
## Programmatic usage
132
133
133
-
The npm package exports **`createCodemap`**, **`Codemap`** (`query`, `index`), **`runCodemapIndex`** (advanced), and config helpers— see **`src/api.ts`** and **`dist/index.d.mts`**. Typical flow:
134
+
The npm package exports **`createCodemap`**, **`Codemap`** (`query`, `index`), **`runCodemapIndex`** (advanced), config helpers, **`CodemapDatabase`** (type), adapter types (`LanguageAdapter`, `getAdapterForExtension`, …), and **`ParsedFile`**— see **`src/api.ts`** / **`src/index.ts`** and **`dist/index.d.mts`**. Typical flow:
Copy file name to clipboardExpand all lines: docs/benchmark.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ Each scenario runs both approaches back-to-back on the same machine, same data.
62
62
63
63
## Results
64
64
65
-
Example snapshot from `bun src/benchmark.ts` immediately after `bun src/index.ts --full` on **this repository** (small tree; many scenario result counts are zero — that is expected here). Numbers vary by machine and project shape. Settings: schema v2, `Bun.hash` content fingerprints, `db.query()` caching, covering/partial indexes, mmap, worker threads, deferred indexes, `batchInsert` helper.
65
+
Example snapshot from `bun src/benchmark.ts` immediately after `bun src/index.ts --full` on **this repository** (small tree; many scenario result counts are zero — that is expected here). Numbers vary by machine and project shape. Settings: schema v2, SHA-256 content fingerprints (`src/hash.ts`), `db.query()` caching, covering/partial indexes, mmap, worker threads, deferred indexes, `batchInsert` helper.
66
66
67
67
| Scenario | Index Time | Results | Trad. Time | Results | Files Read | Bytes Read | Speedup |
|**CLI**|`package.json` → `"bin": { "codemap": "./dist/index.mjs" }` — same file as the library entry; **shebang** prepended at build time (tsdown `banner`) for `npx` / `node_modules/.bin`. |
16
-
|**Library**|`"exports"` / `"main"` / `"types"` → **`./dist/index.mjs`** and **`./dist/index.d.mts`** — `createCodemap`, `Codemap`, `defineConfig`, config types, `runCodemapIndex`, etc. |
17
-
|**Published files**|`package.json` → `"files": ["dist", "templates"]` — `src/` is not published; **`templates/agents`** supports `codemap agents init`. |
|**CLI**|`package.json` → `"bin": { "codemap": "./dist/index.mjs" }` — same file as the library entry; **shebang** prepended at build time (tsdown `banner`) for `npx` / `node_modules/.bin`. |
0 commit comments