getprismo 0.1.45 → 0.1.47
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.
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Validation week log (June 12-16, 2026)
|
|
2
|
+
|
|
3
|
+
Paper cuts, observations, and metric notes from the measurement window. Fix bugs; log everything else here instead of changing the product.
|
|
4
|
+
|
|
5
|
+
- 2026-06-12: connector auto-detect was creating a .prismo backup every 5 min when content was unchanged (735 .bak files/day) — fixed in v0.1.46.
|
|
6
|
+
- 2026-06-12: SaaS frontend test harness still emits two warnings during dogfooding: Supabase auth-js probes Node localStorage without a localstorage file, and useWorkspaceData has an existing exhaustive-deps warning. Left as paper cuts during freeze; Recharts mock hoisting warning was fixed in the SaaS repo.
|
|
7
|
+
- 2026-06-12: follow-up dogfood found optimize-report.md still churned backups because the report timestamp changed every auto-detect. Fixed by comparing optimize reports with the generated-at line normalized and added a repeated-run regression test.
|
|
@@ -393,6 +393,23 @@ function renderOptimizeReport(ctx, generatedFiles) {
|
|
|
393
393
|
].join("\n");
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
+
function normalizeOptimizeReportForCompare(contents) {
|
|
397
|
+
return contents.replace(/^- Generated at: .+$/m, "- Generated at: <timestamp>");
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
function writeOptimizeReport(root, relPath, contents) {
|
|
401
|
+
const fullPath = path.join(root, relPath);
|
|
402
|
+
try {
|
|
403
|
+
if (
|
|
404
|
+
fs.existsSync(fullPath) &&
|
|
405
|
+
normalizeOptimizeReportForCompare(fs.readFileSync(fullPath, "utf8")) === normalizeOptimizeReportForCompare(contents)
|
|
406
|
+
) {
|
|
407
|
+
return { path: relPath, backupPath: null, unchanged: true };
|
|
408
|
+
}
|
|
409
|
+
} catch {}
|
|
410
|
+
return writeGeneratedFile(root, relPath, contents);
|
|
411
|
+
}
|
|
412
|
+
|
|
396
413
|
function renderScopedContext(ctx, scope) {
|
|
397
414
|
const scopeLower = scope.toLowerCase();
|
|
398
415
|
const relevant = ctx.scan.files
|
|
@@ -530,7 +547,7 @@ function runOptimize(rootDir = process.cwd(), options = {}) {
|
|
|
530
547
|
generated.push(written.path);
|
|
531
548
|
}
|
|
532
549
|
const report = renderOptimizeReport(ctx, [...generated, ".prismo/optimize-report.md"]);
|
|
533
|
-
const writtenReport =
|
|
550
|
+
const writtenReport = writeOptimizeReport(ctx.root, path.join(".prismo", "optimize-report.md"), report);
|
|
534
551
|
generated.push(writtenReport.path);
|
|
535
552
|
|
|
536
553
|
return {
|
package/lib/prismo-dev-scan.js
CHANGED
|
@@ -178,6 +178,13 @@ const { appendIgnoreSuggestions, applyFixes } = require("./prismo-dev/fixes")({
|
|
|
178
178
|
function writeGeneratedFile(root, relPath, contents) {
|
|
179
179
|
const fullPath = path.join(root, relPath);
|
|
180
180
|
fs.mkdirSync(path.dirname(fullPath), { recursive: true });
|
|
181
|
+
// Periodic regenerations (connector auto-detect every few minutes) must
|
|
182
|
+
// not churn backups when nothing changed.
|
|
183
|
+
try {
|
|
184
|
+
if (fs.existsSync(fullPath) && fs.readFileSync(fullPath, "utf8") === contents) {
|
|
185
|
+
return { path: relPath, backupPath: null, unchanged: true };
|
|
186
|
+
}
|
|
187
|
+
} catch {}
|
|
181
188
|
const backupPath = backupIfExists(fullPath);
|
|
182
189
|
fs.writeFileSync(fullPath, contents, "utf8");
|
|
183
190
|
return { path: relPath, backupPath };
|
package/package.json
CHANGED