Skip to content

Commit d6f8807

Browse files
author
Yann VR
committed
refactor: Migrate pdc CLI to pdc.js and enhance functionality
- Deleted the old pdc script and replaced it with a symlink to pdc.js for better organization. - Improved command handling in pdc.js, including enhanced quick scan options and better error handling. - Updated peer-check.js and upgrade-check.js for cleaner output and more actionable insights. - Added support for brief analysis mode and improved package manager detection. - All existing tests passed, ensuring stability and readiness for further development.
1 parent 3827d88 commit d6f8807

File tree

4 files changed

+325
-517
lines changed

4 files changed

+325
-517
lines changed

bin/pdc

Lines changed: 0 additions & 298 deletions
This file was deleted.

bin/pdc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pdc.js

bin/pdc.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ program
2424
.description('Analyze current project for upgrade opportunities')
2525
.option('-q, --quick', 'Quick scan with minimal output')
2626
.action((options) => {
27-
if (options.quick) {
28-
console.log('🔍 Quick scanning...');
29-
} else {
27+
if (!options.quick) {
3028
console.log('🔍 Scanning your project...\n');
3129
}
3230

3331
try {
3432
const scriptPath = path.join(__dirname, '..', 'src', 'upgrade-check.js');
35-
const env = options.quick ? { ...process.env, QUICK_MODE: 'true' } : process.env;
36-
execSync(`node "${scriptPath}"`, { stdio: 'inherit', env });
33+
const args = options.quick ? ['--quick', '--brief'] : [];
34+
const command = `node "${scriptPath}" ${args.join(' ')}`.trim();
35+
36+
execSync(command, { stdio: 'inherit' });
3737
} catch (error) {
3838
console.error('❌ Error running scan:', error.message);
3939
}
@@ -159,4 +159,4 @@ if (process.argv.length <= 2) {
159159
process.exit(0);
160160
}
161161

162-
program.parse();
162+
program.parse();

0 commit comments

Comments
 (0)