claude-devkit-cli 1.2.0 → 1.2.2

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-devkit-cli",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "CLI toolkit for spec-first development with Claude Code — hooks, commands, guards, and test runners",
5
5
  "bin": {
6
6
  "claude-devkit": "./bin/devkit.js",
@@ -83,10 +83,25 @@ export async function upgradeCommand(path, opts) {
83
83
  updated++;
84
84
  }
85
85
 
86
- // Check for files in manifest that no longer exist in kit
86
+ // Remove files in manifest that no longer exist in kit
87
+ let removed = 0;
87
88
  for (const file of Object.keys(manifest.files)) {
88
89
  if (!allFiles.includes(file)) {
89
- log.warn(`${file} no longer in kit (keeping)`);
90
+ const filePath = resolve(targetDir, file);
91
+ if (!opts.dryRun) {
92
+ try {
93
+ const { unlink } = await import('node:fs/promises');
94
+ await unlink(filePath);
95
+ delete manifest.files[file];
96
+ removed++;
97
+ log.del(file);
98
+ } catch {
99
+ log.warn(`${file} — no longer in kit (could not delete)`);
100
+ }
101
+ } else {
102
+ log.del(`${file} (would remove)`);
103
+ removed++;
104
+ }
90
105
  }
91
106
  }
92
107
 
@@ -100,7 +115,9 @@ export async function upgradeCommand(path, opts) {
100
115
 
101
116
  // Summary
102
117
  log.blank();
103
- log.pass(`Updated ${updated}, added ${added}, unchanged ${unchanged}, skipped ${skippedCustomized} customized.`);
118
+ const parts = [`Updated ${updated}`, `added ${added}`, `removed ${removed}`, `unchanged ${unchanged}`];
119
+ if (skippedCustomized > 0) parts.push(`skipped ${skippedCustomized} customized`);
120
+ log.pass(parts.join(', ') + '.');
104
121
 
105
122
  if (skippedCustomized > 0) {
106
123
  log.warn(`${skippedCustomized} customized file(s) skipped. Run with --force to overwrite.`);