Skip to content

Releases: stainless-code/codemap

v0.2.2

09 Apr 07:42
56bb673

Choose a tag to compare

Patch Changes

  • 5f65c33 Thanks @SutuSebastian! - Use vendor-neutral .md extension for agent rules in templates; Cursor integration remaps to .mdc at wiring time
    • codemap agents init now writes .md rule files to .agents/rules/ (plain Markdown with YAML frontmatter)
    • Cursor target automatically renames rules to .mdc (required for frontmatter parsing); all other targets (Windsurf, Continue, Cline, Amazon Q) keep .md
    • SKILL.md now includes name and description frontmatter per the Agent Skills spec

v0.2.1

08 Apr 17:19
c95fa6c

Choose a tag to compare

Patch Changes

  • 7f663be Thanks @SutuSebastian! - Sync bundled agent rule template with schema v2: add type_members, calls, and doc_comment trigger patterns and query rows. Add golden scenarios and fixture coverage for both new tables.

v0.2.0

08 Apr 15:21
037daff

Choose a tag to compare

Minor Changes

  • #19 53b2c52 Thanks @SutuSebastian! - Richer symbol metadata: generics, return types, JSDoc, type members, const values, symbol nesting, call graph
    • Signatures now include generic type parameters, return type annotations, and heritage clauses (extends/implements)
    • New doc_comment column on symbols extracts leading JSDoc comments
    • New type_members table indexes properties and methods of interfaces and object-literal types
    • New value column on symbols captures const literal values (strings, numbers, booleans, null)
    • New parent_name column on symbols tracks scope nesting; class methods/properties/getters extracted as individual symbols
    • New calls table tracks function-scoped call edges with caller_scope for qualified disambiguation (deduped per file)
    • Enum members extracted into members column as JSON
    • Performance: cached scope strings, hoisted hot-path regex, batch deletes, reduced redundant I/O, BATCH_SIZE 100→500
    • SCHEMA_VERSION bumped to 2

v0.1.9

08 Apr 11:10
630c0b4

Choose a tag to compare

Patch Changes

  • #17 e962326 Thanks @SutuSebastian! - Fix incremental detection reporting unchanged files as "changed" on every run when the working tree has uncommitted modifications. getChangedFiles now compares content hashes against the index before including candidates, so only truly modified files enter the indexing pipeline.

v0.1.8

08 Apr 10:43
b5c2570

Choose a tag to compare

Patch Changes

  • #15 f2362f9 Thanks @SutuSebastian! - Fix three HIGH-severity bugs found via cross-audit triangulation, plus performance and docs improvements.

    Bug fixes

    • Add missing onerror handler on Bun Worker — prevents silent promise hang when a parse worker crashes
    • Require JSX return or hook usage for component detection — eliminates false positives (e.g. FormatCurrency() in .tsx files no longer indexed as a component)
    • Include previously-indexed files in incremental and --files modes — custom-extension files indexed during --full no longer silently go stale

    Performance

    • Batch CSS imports instead of inserting one-at-a-time (both full-rebuild and incremental paths)
    • Add Map<string, Statement> cache for better-sqlite3 run()/query() — avoids ~2,000+ redundant prepare() calls on large projects
    • Hoist inner.query() in wrap() to prepare once per call instead of per .get()/.all()
    • Skip PRAGMA optimize on closeDb for read-only query paths

    Docs

    • Fix Wyhash → SHA-256 in architecture.md and SKILL.md (3 locations)
    • Correct symbols.kind values (variableconst, type_aliastype) and exports.kind values
    • Clarify Database.query() caching is Bun-only; Node statement cache via wrapper
    • Update architecture.md: component heuristic, statement cache, closeDb readonly, incremental/--files custom extensions
    • Update benchmark.md and golden-queries.md for enriched fixture

    Testing

    • Enrich fixtures/minimal/ to cover all 10 indexed tables (CSS module, @keyframes, @import, non-component PascalCase export, FIXME marker)
    • Add 7 new golden scenarios (exports, css_variables, css_classes, css_keyframes, css_imports, markers-all-kinds, components-no-false-positives)

    Cleanup

    • Remove unused analyzeDependencies: true from CSS parser
    • Deduplicate fetchTableStats (was duplicated across index-engine.ts and run-index.ts)
    • Remove dead eslint-disable-next-line directives (oxlint doesn't enforce those rules)
    • Fix SCHEMA_VERSION comment (said "2", value is 1)

v0.1.7

07 Apr 15:29
5b49b84

Choose a tag to compare

Patch Changes

  • #13 13a2c14 Thanks @SutuSebastian! - Replace fast-glob with tinyglobby for Node include globs. Smaller dependency footprint; expandDirectories: false keeps matching aligned with the previous behavior.

v0.1.6

07 Apr 14:55
f51d77f

Choose a tag to compare

Patch Changes

  • ca4b47a Thanks @SutuSebastian! - Shipped agent rules and skills now lead with codemap query --json (optional table output when --json is omitted). Add bun run benchmark:query to compare console.table vs JSON stdout size, plus integration tests for --json vs default output when .codemap.db is present. README and docs/ (including benchmark.md § Query stdout) updated to match.

v0.1.5

07 Apr 14:07
adb06e5

Choose a tag to compare

Patch Changes

  • #10 9d37bd5 Thanks @SutuSebastian! - Agent templates (templates/agents/)

    • Align codemap.mdc and skills/codemap/SKILL.md with the current codemap query --json contract (bootstrap / DB / SQL failures, process.exitCode).
    • SKILL: QUERY_RECIPES-aligned fan-out SQL examples and bundled-recipe determinism note.

v0.1.4

07 Apr 13:52
1a55026

Choose a tag to compare

Patch Changes

  • #8 889ed5b Thanks @SutuSebastian! - Query CLI

    • codemap query --json: print a JSON array of result rows to stdout (and {"error":"…"} on SQL errors) for agents and automation. Document that the query subcommand does not cap rows — use SQL LIMIT for bounded results. Update bundled agent rule and skill with --json preference, verbatim structural answers, and generic SQL recipes (fan-out + sample targets).

    • codemap query --recipe <id> for bundled read-only SQL so agents can run common structural queries without embedding SQL on the command line. --json works with recipes the same way as ad-hoc SQL. Bundled ids include dependency fan-out / fan-out-sample / fan-out-sample-json (JSON1 json_group_array) / fan-in, index index-summary, files-largest, React components-by-hooks (comma-based hook count, no JSON1), and markers-by-kind. The benchmark suite uses the fan-out recipe SQL for an indexed-path scenario; docs clarify that recipes add no extra query cost vs pasting the same SQL.

    • Recipe discovery (no index / DB): codemap query --recipes-json prints all bundled recipes (id, description, sql) as JSON. codemap query --print-sql <id> prints one recipe’s SQL. listQueryRecipeCatalog() in src/cli/query-recipes.ts is the single derived view of QUERY_RECIPES for the JSON output.

    Golden tests

    • bun run test:golden: index fixtures/minimal, run scenarios from fixtures/golden/scenarios.json, and compare query JSON to fixtures/golden/minimal/. Use bun scripts/query-golden.ts --update after intentional fixture or schema changes. Documented in benchmark.md and CONTRIBUTING.

    Query robustness

    • With --json, {"error":"…"} is printed for invalid SQL, database open failures, and codemap query bootstrap failures (config / resolver setup), not only bad SQL. The CLI sets process.exitCode instead of process.exit so piped stdout is not cut off mid-stream.

    Benchmark & CODEMAP_BENCHMARK_CONFIG

    • Each indexedSql in custom scenario JSON is validated as a single read-only SELECT (or WITHSELECT) — DDL/DML and RETURNING are rejected before execution.
    • Config file paths are resolved from process.cwd() (see benchmark.md). traditional.regex strings are developer-controlled (local JSON); files mode compiles the regex once per scenario.
    • Overlapping globs in the traditional path are deduplicated so Files read / Bytes read count each path once.
    • The default components in shop/ scenario uses a LIKE filter aligned with the traditional globs under components/shop/ (*.tsx and *.jsx, matching components rows from the parser) and avoids unrelated paths such as workshop.

    Recipes (determinism)

    • Bundled recipe SQL adds stable secondary ORDER BY columns (and orders inner LIMIT samples) so --recipe / --json output does not vary on aggregate ties.

    External QA

    • bun run qa:external: --max-files and --max-symbols must be positive integers (invalid values throw before indexing).

v0.1.3

07 Apr 11:03
340bbd9

Choose a tag to compare

Patch Changes

  • #6 ad29694 Thanks @SutuSebastian! - Align shipped agent templates with the published CLI (codemap, npx @stainless-code/codemap, …). Keep this repository’s .agents/ rule and skill dev-oriented (bun src/index.ts). Remove the redundant agents-first-convention template. Document the dev vs templates/agents/ split in templates/agents/README.md and docs/agents.md.