Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

code-graph-llm

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code-graph-llm - npm Package Compare versions

Comparing version
4.15.0
to
4.16.0
+1
-1
lib/config.js

@@ -7,3 +7,3 @@ /**

export const CONFIG = Object.freeze({
VERSION: '4.15.0',
VERSION: '4.16.0',
IGNORE_FILE: '.gitignore',

@@ -10,0 +10,0 @@ MAP_FILE: 'llm-code-graph.md',

@@ -100,3 +100,3 @@ /**

if (this.files.length % 25 === 0) {
process.stdout.write(`\r[Code-Graph] Processed ${this.files.length} files...`);
console.log(`[Code-Graph] Processed ${this.files.length} files...`);
}

@@ -152,2 +152,3 @@ await this.processEdges(relPath, edges, inheritance);

const start = Date.now();
const t = () => `+${((Date.now() - start) / 1000).toFixed(1)}s`;
console.log(`[Code-Graph v${CONFIG.VERSION}] Starting map generation...`);

@@ -158,9 +159,11 @@ console.log(`[Code-Graph] Root: ${this.cwd}`);

if (this.files.length >= 25) process.stdout.write('\n');
console.log(`[Code-Graph] Scan complete: ${this.files.length} files, ${this.allEdges.length} edges found.`);
console.log(`[Code-Graph] Scan complete (${t()}): ${this.files.length} files, ${this.allEdges.length} edges found.`);
console.log(`[Code-Graph] Sorting and formatting...`);
console.log(`[Code-Graph] Sorting ${this.files.length} files by importance...`);
this.files.sort((a, b) => (b.isCore - a.isCore) || ((this.incomingEdges[b.path] || 0) - (this.incomingEdges[a.path] || 0)));
console.log(`[Code-Graph] Sort complete (${t()}).`);
const output = this.formatOutput();
console.log(`[Code-Graph] Formatting nodes...`);
const output = this.formatOutput(t);
console.log(`[Code-Graph] Format complete (${t()}): ${output.length} chars.`);

@@ -174,4 +177,6 @@ console.log(`[Code-Graph] Writing ${CONFIG.MAP_FILE}...`);

formatOutput() {
formatOutput(t = () => '') {
const header = `# CODE_GRAPH\nMISSION: COMPACT PROJECT MAP FOR LLM AGENTS.\nPROTOCOL: Follow llm-agent-rules.md\nMEMORY: See llm-agent-project-learnings.md\n\n> Legend: * core, (↑out ↓in deps), s: symbols, d: desc\n\n`;
console.log(`[Code-Graph] Building node list (${this.files.length} files)...`);
const nodes = this.files.map(f => {

@@ -184,4 +189,5 @@ const inCount = this.incomingEdges[f.path] || 0;

}).join('\n');
console.log(`[Code-Graph] Nodes built (${t()}).`);
// Group edges by source for density
console.log(`[Code-Graph] Grouping ${this.allEdges.length} edges...`);
const groupedEdges = {};

@@ -202,3 +208,5 @@ const inheritanceEdges = [];

});
console.log(`[Code-Graph] Edges grouped: ${Object.keys(groupedEdges).length} import sources, ${inheritanceEdges.length} inheritance (${t()}).`);
console.log(`[Code-Graph] Sorting edge lines...`);
const edgeLines = [

@@ -208,2 +216,3 @@ ...Object.entries(groupedEdges).map(([src, targets]) => `[${src}] -> [${Array.from(targets).join(', ')}]`),

].sort();
console.log(`[Code-Graph] Edge lines sorted: ${edgeLines.length} total (${t()}).`);

@@ -210,0 +219,0 @@ const edges = edgeLines.length

{
"name": "code-graph-llm",
"version": "4.15.0",
"version": "4.16.0",
"description": "Compact, language-agnostic codebase mapper for LLM token efficiency.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,2 @@

# CODE-GRAPH (v4.15.0)
# CODE-GRAPH (v4.16.0)

@@ -7,6 +7,7 @@ > Inspired by [Andrej Karpathy skills](https://github.com/forrestchang/andrej-karpathy-skills), [juliusbrussee/caveman](https://github.com/juliusbrussee/caveman), and the community's work building better agent workflows.

## New in v4.15.0
## New in v4.16.0
- **UX (CLI Progress — `generate`):** `code-graph generate` now prints structured progress: root path, per-directory scan lines for top-level dirs, live file counter every 25 files (inline `\r` overwrite), post-scan summary with file + edge counts, phase markers for sorting/formatting and writing, and a final elapsed-time line. No more silent hang on large repos.
- **UX (CLI Progress — `init`):** `code-graph init` now logs the target directory on start and confirms completion.
- **UX (Generate — granular timing):** Every `generate` phase now shows elapsed time (`+Xs`): scan complete, sort, format, and write. Pinpoints slow steps on large repos instantly.
- **UX (Generate — formatOutput visibility):** Node build, edge grouping, and edge sort each emit before/after logs with counts (import sources, inheritance edges, sorted lines). Previously a silent black box.
- **Fix (Generate — progress interleaving):** File counter switched from `\r` overwrite to `\n`. On Windows/non-TTY, `\r` caused scan lines to overwrite the counter on the same line.

@@ -13,0 +14,0 @@ See [RELEASE_NOTES.md](RELEASE_NOTES.md) for full history.

# RELEASE NOTES
### v4.16.0 (2026-05-07)
- **UX (Generate — granular timing logs):** `ProjectMapper.generate()` now emits elapsed-time markers (`+Xs`) on every phase: scan complete, sort complete, format complete, and write. Each phase is independently timed so slow steps are immediately identifiable.
- **UX (Generate — formatOutput visibility):** `formatOutput()` now logs before and after each sub-phase: node list build, edge grouping (reporting import-source count and inheritance edge count), and edge-line sort (reporting total sorted line count). Previously the entire format phase was a silent black box on large repos.
- **Fix (Generate — progress interleaving):** File progress counter switched from `\r` (carriage-return overwrite) to `\n` (newline). On Windows and non-TTY outputs, `\r` caused scan-directory log lines to overwrite the progress counter on the same line, producing garbled output like `Processed 75 files...[Code-Graph] Scanning: linux`.
- **Maintenance:** Bumped version to 4.16.0 in `config.js` and `package.json`.
### v4.15.0 (2026-05-07)

@@ -4,0 +10,0 @@ - **UX (CLI Progress — `generate`):** `ProjectMapper.generate()` now prints a structured progress log across all phases: start with root path, per-directory scanning for depth 0–1 dirs, live inline file counter every 25 files (`\r` overwrite), post-scan summary (file count + edge count), sorting/formatting phase marker, write-phase marker, and a final timing line (`Done in Xs`). Large projects no longer appear to hang silently.