claude-roi 0.1.0 → 0.1.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-roi",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Correlate Claude Code token usage with git output to measure AI coding agent ROI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -411,7 +411,7 @@ export async function parseAllProjects(claudeDir, days, projectFilter) {
411
411
  }
412
412
 
413
413
  const projectDir = path.join(claudeDir, folder);
414
- const projectName = folder.split('-').pop() || folder;
414
+ const folderProjectName = folder;
415
415
 
416
416
  let files;
417
417
  try {
@@ -445,7 +445,11 @@ export async function parseAllProjects(claudeDir, days, projectFilter) {
445
445
  // Apply date filter on session start time
446
446
  if (new Date(session.startTime).getTime() < cutoffMs) continue;
447
447
 
448
- session.projectName = projectName;
448
+ // Derive project name from the session's actual repo path (cwd),
449
+ // falling back to the folder name if repoPath is unavailable
450
+ session.projectName = session.repoPath
451
+ ? path.basename(session.repoPath)
452
+ : folderProjectName;
449
453
  sessions.push(session);
450
454
  } catch (err) {
451
455
  process.stderr.write(`Warning: Failed to parse ${filePath}: ${err.message}\n`);
package/src/index.js CHANGED
@@ -10,7 +10,7 @@ import { computeMetrics } from './metrics.js';
10
10
  import { loadCache, saveCache, deleteCache, getStaleFiles } from './cache.js';
11
11
  import { createServer } from './server.js';
12
12
 
13
- const VERSION = '0.1.0';
13
+ const VERSION = '0.1.1';
14
14
 
15
15
  async function main() {
16
16
  const program = new Command();