diff --git a/.changeset/fix-apply-symlink-conflict.md b/.changeset/fix-apply-symlink-conflict.md deleted file mode 100644 index 366dfbfa..00000000 --- a/.changeset/fix-apply-symlink-conflict.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Reject apply targets that are symlinks so phase-2 rename cannot replace a link with a regular file. diff --git a/.changeset/fix-benchmark-reindex-exit-code.md b/.changeset/fix-benchmark-reindex-exit-code.md deleted file mode 100644 index bbea9780..00000000 --- a/.changeset/fix-benchmark-reindex-exit-code.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Fail benchmark reindex runs when the spawned indexer exits non-zero instead of recording misleading timings. diff --git a/.changeset/fix-cli-index-files-validation.md b/.changeset/fix-cli-index-files-validation.md deleted file mode 100644 index 665f7d5a..00000000 --- a/.changeset/fix-cli-index-files-validation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Validate `codemap index --files` operands before indexing starts. diff --git a/.changeset/fix-detect-pm-version-validation.md b/.changeset/fix-detect-pm-version-validation.md deleted file mode 100644 index 7c451b65..00000000 --- a/.changeset/fix-detect-pm-version-validation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Validate `VERSION` output in `detect-pm` before writing GitHub Actions outputs. diff --git a/.changeset/fix-diff-format-path-containment.md b/.changeset/fix-diff-format-path-containment.md deleted file mode 100644 index bb335b94..00000000 --- a/.changeset/fix-diff-format-path-containment.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Harden apply and diff-json path containment against traversal outside the project root. diff --git a/.changeset/fix-high-bugs-batch.md b/.changeset/fix-high-bugs-batch.md deleted file mode 100644 index 011609c1..00000000 --- a/.changeset/fix-high-bugs-batch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Fix high-severity bugs (describe.each parent stack, git porcelain -z paths, CLI symlink entry, pr-comment TTY stdin), medium bugs (changed-since -z paths, perf baseline RUNS guard, qualified typeof, decorator args_text, for-of binding refs, HTTP body drain, benchmark regex validation, jsx INSERT RETURNING id, sqlite stmt cache on close), and low bugs (CLI parse guards, incremental delete transaction, apply summary.files, extension case, pnpm # paths, coverage db.transaction, impact walk delimiter, worker errors, pointer dedup, benchmark readAll visibility). diff --git a/.changeset/fix-index-config-resolver-diff-impact.md b/.changeset/fix-index-config-resolver-diff-impact.md deleted file mode 100644 index 7a4bf53f..00000000 --- a/.changeset/fix-index-config-resolver-diff-impact.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Fix diff preview deletions, config empty-array overrides, resolver path containment, impact call-site selection, and FTS cleanup on file delete. diff --git a/.changeset/fix-prepublish-check-validation.md b/.changeset/fix-prepublish-check-validation.md deleted file mode 100644 index eaa6f608..00000000 --- a/.changeset/fix-prepublish-check-validation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Run full `check` (not build-only) in `prepublishOnly` so npm publish cannot skip tests or typecheck. diff --git a/.changeset/fix-serve-reject-origin-null.md b/.changeset/fix-serve-reject-origin-null.md deleted file mode 100644 index 4cbff62a..00000000 --- a/.changeset/fix-serve-reject-origin-null.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Reject opaque `Origin: null` in `codemap serve` CSRF checks. diff --git a/.changeset/fix-skill-rule-extra-args.md b/.changeset/fix-skill-rule-extra-args.md deleted file mode 100644 index 0644d456..00000000 --- a/.changeset/fix-skill-rule-extra-args.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Reject unexpected arguments on `codemap skill` and `codemap rule` instead of silently printing bundled content. diff --git a/.changeset/fix-snippet-terminal-signature.md b/.changeset/fix-snippet-terminal-signature.md deleted file mode 100644 index fea585ad..00000000 --- a/.changeset/fix-snippet-terminal-signature.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Print symbol signature in `codemap snippet` terminal output, matching `codemap show` and the documented contract. diff --git a/.changeset/fix-v8-coverage-innermost-wins.md b/.changeset/fix-v8-coverage-innermost-wins.md deleted file mode 100644 index 5fa1682a..00000000 --- a/.changeset/fix-v8-coverage-innermost-wins.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Fix V8 coverage ingest so innermost-wins applies across all FunctionCoverage entries in a script, not per-function iteration order. diff --git a/.changeset/fix-watcher-index-extractors.md b/.changeset/fix-watcher-index-extractors.md deleted file mode 100644 index e38d05ee..00000000 --- a/.changeset/fix-watcher-index-extractors.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Fix watcher priming race, parse-worker stat errors, incremental rename cleanup, and several indexer extractor gaps (scopes, references, tests.each, process.env, CSS imports). diff --git a/.changeset/fix-worker-count-env-validation.md b/.changeset/fix-worker-count-env-validation.md deleted file mode 100644 index aa64865f..00000000 --- a/.changeset/fix-worker-count-env-validation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/codemap": patch ---- - -Reject malformed `CODEMAP_PARSE_WORKERS` values (e.g. `2abc`, `1.5`) instead of silently truncating with `parseInt`. diff --git a/.changeset/substrate-tiers-1-6.md b/.changeset/substrate-tiers-1-6.md deleted file mode 100644 index 42696647..00000000 --- a/.changeset/substrate-tiers-1-6.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -"@stainless-code/codemap": minor ---- - -Substrate tiers 1–6 remainder (excludes C.9 / `files.is_entry`). **Schema bump** `SCHEMA_VERSION` 27 → **34** — first run after upgrade auto-rebuilds `.codemap/index.db` via the existing version-mismatch path. - -**Tier 1 — call + import precision** - -- `calls.{args_count,is_method_call,is_constructor_call,is_optional_chain}`; constructor vs call dedup key fix -- `symbols.{return_type,is_async,is_generator}` -- Side-effect `import_specifiers` rows (`kind='side-effect'`) + `import_id` FK to `imports` - -**Tier 2 — bindings** - -- `bindings.resolution_kind='re-exported'` when resolution walks a re-export chain - -**Tier 3 — JSX** - -- New tables `jsx_elements` / `jsx_attributes`; extractor with per-file parent linking post-pass - -**Tier 5 — behavioral** - -- New tables `async_calls`, `try_catch`, `decorators`, `jsdoc_tags`; context stack for `in_loop` / `in_try` - -**Tier 6 — module graph (no entry points)** - -- `dynamic_imports` table + extractor -- Post-pass `files.is_barrel` and parse-time `files.has_side_effects` - -**Recipes + goldens:** `find-call-sites` (extended), `find-async-functions`, `find-dynamic-imports`, `find-barrel-files`, `find-side-effect-files`, `find-re-exported-bindings`, `find-side-effect-imports`, `find-jsx-usages`, `find-await-in-loop`, `find-swallowed-errors`, `find-decorator-usage`, `find-throws-jsdoc`, plus golden coverage for `fan-out-sample` / `fan-out-sample-json` and substrate regression tests. - -**Read-only CLI hardening:** `printQueryResult` (ad-hoc `codemap query ""`) now sets `PRAGMA query_only = 1`, closing the last gap vs `queryRows` / `executeQuery` (#107). - -**Out of scope:** C.9 plugin layer (`files.is_entry`, reachability-from-entry); tiers 7–13. - -**Migration:** No in-place DDL — rebuild on schema mismatch preserves user-data tables (`coverage`, `query_baselines`, `recipe_recency`). Re-run `codemap --full` (or any index) after upgrade. diff --git a/CHANGELOG.md b/CHANGELOG.md index c9266ef0..4954a47f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,67 @@ # @stainless-code/codemap +## 0.8.0 + +### Minor Changes + +- [#107](https://github.com/stainless-code/codemap/pull/107) [`f24f8b6`](https://github.com/stainless-code/codemap/commit/f24f8b6d1b531d4425664f6f1aca506bd11cfd6c) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Substrate tiers 1–6 remainder (excludes C.9 / `files.is_entry`). **Schema bump** `SCHEMA_VERSION` 27 → **34** — first run after upgrade auto-rebuilds `.codemap/index.db` via the existing version-mismatch path. + + **Tier 1 — call + import precision** + - `calls.{args_count,is_method_call,is_constructor_call,is_optional_chain}`; constructor vs call dedup key fix + - `symbols.{return_type,is_async,is_generator}` + - Side-effect `import_specifiers` rows (`kind='side-effect'`) + `import_id` FK to `imports` + + **Tier 2 — bindings** + - `bindings.resolution_kind='re-exported'` when resolution walks a re-export chain + + **Tier 3 — JSX** + - New tables `jsx_elements` / `jsx_attributes`; extractor with per-file parent linking post-pass + + **Tier 5 — behavioral** + - New tables `async_calls`, `try_catch`, `decorators`, `jsdoc_tags`; context stack for `in_loop` / `in_try` + + **Tier 6 — module graph (no entry points)** + - `dynamic_imports` table + extractor + - Post-pass `files.is_barrel` and parse-time `files.has_side_effects` + + **Recipes + goldens:** `find-call-sites` (extended), `find-async-functions`, `find-dynamic-imports`, `find-barrel-files`, `find-side-effect-files`, `find-re-exported-bindings`, `find-side-effect-imports`, `find-jsx-usages`, `find-await-in-loop`, `find-swallowed-errors`, `find-decorator-usage`, `find-throws-jsdoc`, plus golden coverage for `fan-out-sample` / `fan-out-sample-json` and substrate regression tests. + + **Read-only CLI hardening:** `printQueryResult` (ad-hoc `codemap query ""`) now sets `PRAGMA query_only = 1`, closing the last gap vs `queryRows` / `executeQuery` ([#107](https://github.com/stainless-code/codemap/issues/107)). + + **Out of scope:** C.9 plugin layer (`files.is_entry`, reachability-from-entry); tiers 7–13. + + **Migration:** No in-place DDL — rebuild on schema mismatch preserves user-data tables (`coverage`, `query_baselines`, `recipe_recency`). Re-run `codemap --full` (or any index) after upgrade. + +### Patch Changes + +- [#118](https://github.com/stainless-code/codemap/pull/118) [`665c19a`](https://github.com/stainless-code/codemap/commit/665c19a547b06855d643d6037702475292fd98c1) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Reject apply targets that are symlinks so phase-2 rename cannot replace a link with a regular file. + +- [#117](https://github.com/stainless-code/codemap/pull/117) [`5ee5f2e`](https://github.com/stainless-code/codemap/commit/5ee5f2ecf8c41cffc8094e54e4e52b6c2052149b) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Fail benchmark reindex runs when the spawned indexer exits non-zero instead of recording misleading timings. + +- [#109](https://github.com/stainless-code/codemap/pull/109) [`02a628f`](https://github.com/stainless-code/codemap/commit/02a628f2db0d88949fc1400b43c8069d8ee1acc4) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Validate `codemap index --files` operands before indexing starts. + +- [#110](https://github.com/stainless-code/codemap/pull/110) [`7767a97`](https://github.com/stainless-code/codemap/commit/7767a975e72ce76a413c8a840c69418d9a5d807e) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Validate `VERSION` output in `detect-pm` before writing GitHub Actions outputs. + +- [#112](https://github.com/stainless-code/codemap/pull/112) [`ec31949`](https://github.com/stainless-code/codemap/commit/ec319495500bdaed0e538dd2b8b52a465ba4a108) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Harden apply and diff-json path containment against traversal outside the project root. + +- [#123](https://github.com/stainless-code/codemap/pull/123) [`54ad25a`](https://github.com/stainless-code/codemap/commit/54ad25a380b2d85760bef07319dd172036a3d0d4) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Fix high-severity bugs (describe.each parent stack, git porcelain -z paths, CLI symlink entry, pr-comment TTY stdin), medium bugs (changed-since -z paths, perf baseline RUNS guard, qualified typeof, decorator args_text, for-of binding refs, HTTP body drain, benchmark regex validation, jsx INSERT RETURNING id, sqlite stmt cache on close), and low bugs (CLI parse guards, incremental delete transaction, apply summary.files, extension case, pnpm # paths, coverage db.transaction, impact walk delimiter, worker errors, pointer dedup, benchmark readAll visibility). + +- [#114](https://github.com/stainless-code/codemap/pull/114) [`ae54ce0`](https://github.com/stainless-code/codemap/commit/ae54ce0d754bdb1455f9b16d59eed6b6f7fa9d2e) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Fix diff preview deletions, config empty-array overrides, resolver path containment, impact call-site selection, and FTS cleanup on file delete. + +- [#122](https://github.com/stainless-code/codemap/pull/122) [`4e191ba`](https://github.com/stainless-code/codemap/commit/4e191bacceeda7fe463f2a2020b83c1bc4b6ddc1) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Run full `check` (not build-only) in `prepublishOnly` so npm publish cannot skip tests or typecheck. + +- [#113](https://github.com/stainless-code/codemap/pull/113) [`126066d`](https://github.com/stainless-code/codemap/commit/126066d2f53129915b993fa81b7d3d2685d25cf1) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Reject opaque `Origin: null` in `codemap serve` CSRF checks. + +- [#120](https://github.com/stainless-code/codemap/pull/120) [`17dcbd1`](https://github.com/stainless-code/codemap/commit/17dcbd150fead9033eeb1cd0d3458733836c6dfd) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Reject unexpected arguments on `codemap skill` and `codemap rule` instead of silently printing bundled content. + +- [#119](https://github.com/stainless-code/codemap/pull/119) [`cf0532b`](https://github.com/stainless-code/codemap/commit/cf0532b4d4b955ee089ec9cb7f1e55129bcc816a) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Print symbol signature in `codemap snippet` terminal output, matching `codemap show` and the documented contract. + +- [#116](https://github.com/stainless-code/codemap/pull/116) [`a444c40`](https://github.com/stainless-code/codemap/commit/a444c4006e64a0b92edc5404ce0833d6d39d0f67) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Fix V8 coverage ingest so innermost-wins applies across all FunctionCoverage entries in a script, not per-function iteration order. + +- [#115](https://github.com/stainless-code/codemap/pull/115) [`eb18750`](https://github.com/stainless-code/codemap/commit/eb18750762d2a725c7d7289fd197b7fec75c0f44) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Fix watcher priming race, parse-worker stat errors, incremental rename cleanup, and several indexer extractor gaps (scopes, references, tests.each, process.env, CSS imports). + +- [#121](https://github.com/stainless-code/codemap/pull/121) [`f5d013c`](https://github.com/stainless-code/codemap/commit/f5d013cda1d1a71a544130e8c759d1e50a72950b) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - Reject malformed `CODEMAP_PARSE_WORKERS` values (e.g. `2abc`, `1.5`) instead of silently truncating with `parseInt`. + ## 0.7.5 ### Patch Changes diff --git a/package.json b/package.json index abca891a..c14bfb17 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stainless-code/codemap", - "version": "0.7.5", + "version": "0.8.0", "description": "Query your codebase — structural SQLite index for AI agents", "keywords": [ "agents",