create-sdd-project 0.9.3 → 0.9.5

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.
@@ -239,10 +239,15 @@ function generateUpgrade(config) {
239
239
  const srcSub = path.join(templateToolDir, sub);
240
240
  const destSub = path.join(base, sub);
241
241
  if (fs.existsSync(srcSub)) {
242
- // For .claude/commands, merge (don't overwrite user's custom commands)
242
+ // For .claude/commands, merge: copy new template files without overwriting user's custom commands
243
243
  if (dir === '.claude' && sub === 'commands') {
244
- // Just ensure directory exists — template only has .gitkeep
245
244
  fs.mkdirSync(destSub, { recursive: true });
245
+ for (const file of fs.readdirSync(srcSub)) {
246
+ const destFile = path.join(destSub, file);
247
+ if (!fs.existsSync(destFile)) {
248
+ fs.cpSync(path.join(srcSub, file), destFile);
249
+ }
250
+ }
246
251
  } else {
247
252
  fs.cpSync(srcSub, destSub, { recursive: true });
248
253
  }
@@ -397,8 +402,8 @@ function generateUpgrade(config) {
397
402
  const freshLines = new Set(envContent.split('\n').map((l) => l.trim()));
398
403
  const customLines = existingEnv.split('\n').filter((line) => {
399
404
  const trimmed = line.trim();
400
- // Keep lines that are not in the fresh version and are not empty
401
- return trimmed.length > 0 && !freshLines.has(trimmed);
405
+ // Keep lines that are not in the fresh version, not empty, and not our own injected header
406
+ return trimmed.length > 0 && !freshLines.has(trimmed) && trimmed !== '# Project-specific variables (preserved from previous version)';
402
407
  });
403
408
  if (customLines.length > 0) {
404
409
  envContent = envContent.trimEnd() + '\n\n# Project-specific variables (preserved from previous version)\n' + customLines.join('\n') + '\n';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sdd-project",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "description": "Create a new SDD DevFlow project with AI-assisted development workflow",
5
5
  "bin": {
6
6
  "create-sdd-project": "bin/cli.js"