@biffo/cli 0.266.0 → 0.266.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/dist/index.js +24 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2863,6 +2863,24 @@ function assertTargetFidelity(options) {
|
|
|
2863
2863
|
findings.push({ path: entry.path, reason: "content-differs", source });
|
|
2864
2864
|
}
|
|
2865
2865
|
}
|
|
2866
|
+
for (const migration of options.migrations ?? []) {
|
|
2867
|
+
const path = `${MIGRATIONS_VERSIONS_DIR}/${migration.file}`;
|
|
2868
|
+
checked++;
|
|
2869
|
+
if (!blobs.has(path)) {
|
|
2870
|
+
findings.push({ path, reason: "absent-from-tag", source: "migration" });
|
|
2871
|
+
continue;
|
|
2872
|
+
}
|
|
2873
|
+
let tagText;
|
|
2874
|
+
try {
|
|
2875
|
+
tagText = git(["-C", options.templateRepo, "show", `${tag}:${path}`]);
|
|
2876
|
+
} catch {
|
|
2877
|
+
findings.push({ path, reason: "content-differs", source: "migration" });
|
|
2878
|
+
continue;
|
|
2879
|
+
}
|
|
2880
|
+
if (migrationBodyHash(tagText) !== migrationBodyHash(migration.content)) {
|
|
2881
|
+
findings.push({ path, reason: "content-differs", source: "migration" });
|
|
2882
|
+
}
|
|
2883
|
+
}
|
|
2866
2884
|
return { checked, findings, unverifiable: null };
|
|
2867
2885
|
}
|
|
2868
2886
|
function fidelityFailure(report, toVersion) {
|
|
@@ -3456,8 +3474,14 @@ async function runCoreUpgradeResolved(options, deps, cleanups) {
|
|
|
3456
3474
|
});
|
|
3457
3475
|
const orphanRatchet = checkOrphanRatchet(plan.orphaned.length, readOrphanBaseline(options.cwd));
|
|
3458
3476
|
const newSeams = findNewUndeclaredSeams(baseDir, theirsDir, options.cwd);
|
|
3477
|
+
const migrations = planMigrationCarry({
|
|
3478
|
+
templateDir: theirsDir,
|
|
3479
|
+
instanceDir: options.cwd,
|
|
3480
|
+
declined: readDeclinedMigrations(options.cwd)
|
|
3481
|
+
});
|
|
3459
3482
|
const fidelity = assertTargetFidelity({
|
|
3460
3483
|
entries: plan.entries,
|
|
3484
|
+
migrations: migrations.entries,
|
|
3461
3485
|
templateRepo,
|
|
3462
3486
|
toVersion,
|
|
3463
3487
|
theirsDir,
|
|
@@ -3482,11 +3506,6 @@ async function runCoreUpgradeResolved(options, deps, cleanups) {
|
|
|
3482
3506
|
`${String(plan.orphaned.length)} unsanctioned instance file(s) under a template-owned path (baseline ${String(orphanRatchet.baseline)}) \u2014 see the list above (#1026). Move new instance-written files under a sanctioned carve-out (services/api/tests/instance/, modules/**/instance/) or otherwise reduce the count, then re-run.`
|
|
3483
3507
|
);
|
|
3484
3508
|
}
|
|
3485
|
-
const migrations = planMigrationCarry({
|
|
3486
|
-
templateDir: theirsDir,
|
|
3487
|
-
instanceDir: options.cwd,
|
|
3488
|
-
declined: readDeclinedMigrations(options.cwd)
|
|
3489
|
-
});
|
|
3490
3509
|
const coreVersionCleanup = planCoreVersionCleanup(options.cwd);
|
|
3491
3510
|
if (plan.changes.length === 0 && migrations.entries.length === 0) {
|
|
3492
3511
|
log.success("Nothing to upgrade \u2014 the instance already matches the target for all core files.");
|