create-sdd-project 0.9.4 → 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.
- package/lib/upgrade-generator.js +2 -2
- package/package.json +1 -1
package/lib/upgrade-generator.js
CHANGED
|
@@ -402,8 +402,8 @@ function generateUpgrade(config) {
|
|
|
402
402
|
const freshLines = new Set(envContent.split('\n').map((l) => l.trim()));
|
|
403
403
|
const customLines = existingEnv.split('\n').filter((line) => {
|
|
404
404
|
const trimmed = line.trim();
|
|
405
|
-
// Keep lines that are not in the fresh version and
|
|
406
|
-
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)';
|
|
407
407
|
});
|
|
408
408
|
if (customLines.length > 0) {
|
|
409
409
|
envContent = envContent.trimEnd() + '\n\n# Project-specific variables (preserved from previous version)\n' + customLines.join('\n') + '\n';
|