commit-analyzer 1.1.2 → 1.1.3

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": "commit-analyzer",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Analyze git commits and generate categories, summaries, and descriptions for each commit. Optionally generate a yearly breakdown report of your commit history.",
5
5
  "main": "dist/main.ts",
6
6
  "bin": {
@@ -24,7 +24,7 @@ export interface CLIOptions {
24
24
  }
25
25
 
26
26
  export class CLIApplication {
27
- private static readonly VERSION = "1.1.2"
27
+ private static readonly VERSION = "1.1.3"
28
28
  private static readonly DEFAULT_COMMITS_OUTPUT_FILE = "results/commits.csv"
29
29
  private static readonly DEFAULT_REPORT_OUTPUT_FILE = "results/report.md"
30
30
 
@@ -271,9 +271,8 @@ export class CLIApplication {
271
271
  }
272
272
 
273
273
  private getReportPathFromCsv(csvPath: string): string {
274
- if (csvPath.endsWith(".csv")) {
275
- return csvPath.replace(/\.csv$/, ".md")
276
- }
277
- return csvPath + ".md"
274
+ const lastSlash = csvPath.lastIndexOf("/")
275
+ const directory = lastSlash >= 0 ? csvPath.substring(0, lastSlash + 1) : ""
276
+ return directory + "report.md"
278
277
  }
279
278
  }