@sdsrs/code-graph 0.191.1 → 0.193.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
// cg-answer.js).
|
|
17
17
|
|
|
18
18
|
const { spawnSync } = require('child_process');
|
|
19
|
+
const fs = require('fs');
|
|
20
|
+
const path = require('path');
|
|
19
21
|
const { hidden } = require('./proc-opts');
|
|
20
22
|
|
|
21
23
|
const MARKER = '<!-- code-graph-impact-review -->';
|
|
@@ -132,8 +134,14 @@ function computeReview(binary, changedFiles, cwd) {
|
|
|
132
134
|
// covered file: the most dangerous direction for a test-gap report to fail in.
|
|
133
135
|
const uncovered = [];
|
|
134
136
|
const unanalyzed = [];
|
|
137
|
+
//
|
|
138
|
+
// A changed file missing from the checkout is one the PR deleted. `affected`
|
|
139
|
+
// answers for it from the index's deletion record, and its dependents' tests
|
|
140
|
+
// are already in the aggregate. It leaves no code of its own to cover, so it
|
|
141
|
+
// is no gap: deleting dead code (no dependents, so no tests) is not one.
|
|
135
142
|
for (const f of changed) {
|
|
136
143
|
if (isTestPath(f)) continue;
|
|
144
|
+
if (!fs.existsSync(path.join(cwd, f))) continue;
|
|
137
145
|
const single = runAffected(binary, ['affected', f, '--json'], cwd, '');
|
|
138
146
|
if (!single) {
|
|
139
147
|
unanalyzed.push(f);
|
|
@@ -305,7 +313,6 @@ function upsertComment(repo, prNumber, body) {
|
|
|
305
313
|
|
|
306
314
|
function main(argv) {
|
|
307
315
|
// argv: [changedFilesPath]. Env: GH_REPO, PR_NUMBER, CODE_GRAPH_FAIL_ON_RISK.
|
|
308
|
-
const fs = require('fs');
|
|
309
316
|
const changedPath = argv[0];
|
|
310
317
|
if (!changedPath) {
|
|
311
318
|
console.error('usage: pr-impact-comment.js <changed-files.txt>');
|
|
@@ -41,7 +41,7 @@ jobs:
|
|
|
41
41
|
# refuses a snapshot that has no checksum sidecar.
|
|
42
42
|
- name: Build snapshot
|
|
43
43
|
run: |
|
|
44
|
-
npx -y -p @sdsrs/code-graph@0.
|
|
44
|
+
npx -y -p @sdsrs/code-graph@0.193.0 code-graph-mcp snapshot create --out "code-graph-snapshot-${GITHUB_SHA:0:7}.db.zst"
|
|
45
45
|
- name: Upload to release
|
|
46
46
|
env:
|
|
47
47
|
GH_TOKEN: ${{ github.token }}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdsrs/code-graph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.193.0",
|
|
4
4
|
"description": "MCP server that indexes codebases into an AST knowledge graph with semantic search, call graph traversal, and HTTP route tracing",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"node": ">=16"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@sdsrs/code-graph-linux-x64": "0.
|
|
39
|
-
"@sdsrs/code-graph-linux-arm64": "0.
|
|
40
|
-
"@sdsrs/code-graph-darwin-x64": "0.
|
|
41
|
-
"@sdsrs/code-graph-darwin-arm64": "0.
|
|
42
|
-
"@sdsrs/code-graph-win32-x64": "0.
|
|
38
|
+
"@sdsrs/code-graph-linux-x64": "0.193.0",
|
|
39
|
+
"@sdsrs/code-graph-linux-arm64": "0.193.0",
|
|
40
|
+
"@sdsrs/code-graph-darwin-x64": "0.193.0",
|
|
41
|
+
"@sdsrs/code-graph-darwin-arm64": "0.193.0",
|
|
42
|
+
"@sdsrs/code-graph-win32-x64": "0.193.0"
|
|
43
43
|
}
|
|
44
44
|
}
|