codesummary 1.1.0 → 1.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/CHANGELOG.md +25 -0
- package/package.json +2 -3
- package/src/cli.js +31 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.1.1] - 2025-07-31
|
|
9
|
+
|
|
10
|
+
### 🔧 **Fixes & Improvements**
|
|
11
|
+
|
|
12
|
+
#### **CLI Enhancements**
|
|
13
|
+
- **Added Version Flag**: New `--version` and `-v` flags to display current version
|
|
14
|
+
- **Cross-Platform Compatibility**: Fixed Windows path resolution for version detection
|
|
15
|
+
- **Help Documentation**: Updated help text to include version option
|
|
16
|
+
|
|
17
|
+
#### **Dependency Cleanup**
|
|
18
|
+
- **Removed Deprecated Crypto**: Eliminated `crypto@1.0.1` dependency (now uses built-in Node.js crypto)
|
|
19
|
+
- **Security Improvement**: No more npm warnings about deprecated packages
|
|
20
|
+
- **Cleaner Dependencies**: Reduced package footprint
|
|
21
|
+
|
|
22
|
+
#### **Bug Fixes**
|
|
23
|
+
- **Merge Conflicts**: Resolved conflicts between main and develop branches
|
|
24
|
+
- **CLI Argument Parsing**: Fixed unknown option error for `--version` flag
|
|
25
|
+
|
|
26
|
+
### 📋 **Migration Notes**
|
|
27
|
+
- No breaking changes
|
|
28
|
+
- Existing installations will benefit from cleaner dependencies
|
|
29
|
+
- New `--version` flag available immediately after update
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
8
33
|
## [1.1.0] - 2025-07-31
|
|
9
34
|
|
|
10
35
|
### 🎉 Major Features Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codesummary",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Cross-platform CLI tool that generates professional PDF documentation and RAG-optimized JSON outputs from project source code. Perfect for code reviews, audits, documentation, and AI/ML applications with semantic chunking and precision offsets.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -79,8 +79,7 @@
|
|
|
79
79
|
"chalk": "^5.3.0",
|
|
80
80
|
"ora": "^8.0.1",
|
|
81
81
|
"js-yaml": "^4.1.0",
|
|
82
|
-
"ajv": "^8.12.0"
|
|
83
|
-
"crypto": "^1.0.1"
|
|
82
|
+
"ajv": "^8.12.0"
|
|
84
83
|
},
|
|
85
84
|
"devDependencies": {
|
|
86
85
|
"eslint": "^8.57.0",
|
package/src/cli.js
CHANGED
|
@@ -66,6 +66,7 @@ export class CLI {
|
|
|
66
66
|
resetConfig: false,
|
|
67
67
|
config: false,
|
|
68
68
|
help: false,
|
|
69
|
+
version: false,
|
|
69
70
|
noInteractive: false,
|
|
70
71
|
format: 'pdf'
|
|
71
72
|
};
|
|
@@ -122,6 +123,10 @@ export class CLI {
|
|
|
122
123
|
case '-h':
|
|
123
124
|
options.help = true;
|
|
124
125
|
break;
|
|
126
|
+
case '--version':
|
|
127
|
+
case '-v':
|
|
128
|
+
options.version = true;
|
|
129
|
+
break;
|
|
125
130
|
case '--no-interactive':
|
|
126
131
|
options.noInteractive = true;
|
|
127
132
|
break;
|
|
@@ -151,6 +156,11 @@ export class CLI {
|
|
|
151
156
|
await ErrorHandler.safeExit(0, 'Help displayed');
|
|
152
157
|
}
|
|
153
158
|
|
|
159
|
+
if (options.version) {
|
|
160
|
+
await this.showVersion();
|
|
161
|
+
await ErrorHandler.safeExit(0, 'Version displayed');
|
|
162
|
+
}
|
|
163
|
+
|
|
154
164
|
return options;
|
|
155
165
|
}
|
|
156
166
|
|
|
@@ -476,6 +486,26 @@ export class CLI {
|
|
|
476
486
|
return `${size.toFixed(1)} ${units[unitIndex]}`;
|
|
477
487
|
}
|
|
478
488
|
|
|
489
|
+
/**
|
|
490
|
+
* Show version information
|
|
491
|
+
*/
|
|
492
|
+
async showVersion() {
|
|
493
|
+
try {
|
|
494
|
+
// Get the current module directory and resolve package.json
|
|
495
|
+
const currentDir = path.dirname(new URL(import.meta.url).pathname);
|
|
496
|
+
// Handle Windows paths by removing leading slash if present
|
|
497
|
+
const normalizedDir = process.platform === 'win32' && currentDir.startsWith('/')
|
|
498
|
+
? currentDir.slice(1)
|
|
499
|
+
: currentDir;
|
|
500
|
+
const packageJsonPath = path.resolve(normalizedDir, '..', 'package.json');
|
|
501
|
+
|
|
502
|
+
const packageJson = await fs.readJson(packageJsonPath);
|
|
503
|
+
console.log(`CodeSummary v${packageJson.version}`);
|
|
504
|
+
} catch (error) {
|
|
505
|
+
console.log('CodeSummary version unknown');
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
|
|
479
509
|
/**
|
|
480
510
|
* Show help information
|
|
481
511
|
*/
|
|
@@ -493,6 +523,7 @@ export class CLI {
|
|
|
493
523
|
console.log(' --show-config Display current configuration');
|
|
494
524
|
console.log(' --reset-config Reset configuration to defaults');
|
|
495
525
|
console.log(' -h, --help Show this help message');
|
|
526
|
+
console.log(' -v, --version Show version information');
|
|
496
527
|
console.log();
|
|
497
528
|
|
|
498
529
|
console.log(chalk.white('Examples:'));
|