Skip to content

Commit 73cf2ba

Browse files
committed
fix(state): clarify plugin sidecar conflicts
1 parent fccbafe commit 73cf2ba

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/commands/doctor-state-migrations.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3348,7 +3348,7 @@ describe("doctor legacy state migrations", () => {
33483348
const result = await runLegacyStateMigrations({ detected });
33493349

33503350
expect(result.warnings).toStrictEqual([
3351-
"Left plugin-state sidecar in place because 1 row have different values in the sidecar and shared state; sidecar data is newer. First key: discord/components/interaction:1",
3351+
"Left plugin-state sidecar in place because 1 row differs from shared state without a newer canonical timestamp. First key: discord/components/interaction:1",
33523352
]);
33533353
expect(fs.existsSync(sourcePath)).toBe(true);
33543354
expect(fs.existsSync(`${sourcePath}.migrated`)).toBe(false);
@@ -3402,7 +3402,7 @@ describe("doctor legacy state migrations", () => {
34023402
const result = await runLegacyStateMigrations({ detected });
34033403

34043404
expect(result.warnings).toStrictEqual([
3405-
"Left plugin-state sidecar in place because 1 row have different values in the sidecar and shared state; sidecar data is newer. First key: discord/components/interaction:1",
3405+
"Left plugin-state sidecar in place because 1 row differs from shared state without a newer canonical timestamp. First key: discord/components/interaction:1",
34063406
]);
34073407
expect(fs.existsSync(sourcePath)).toBe(true);
34083408
expect(fs.existsSync(`${sourcePath}.migrated`)).toBe(false);

src/infra/state-migrations.plugin-state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export async function migrateLegacyPluginStateSidecar(params: {
146146
return {
147147
changes,
148148
warnings: [
149-
`Left plugin-state sidecar in place because ${conflictedKeys.length} ${conflictedKeys.length === 1 ? "row" : "rows"} have different values in the sidecar and shared state; sidecar data is newer. First key: ${conflictedKeys[0]}`,
149+
`Left plugin-state sidecar in place because ${conflictedKeys.length} ${conflictedKeys.length === 1 ? "row differs" : "rows differ"} from shared state without a newer canonical timestamp. First key: ${conflictedKeys[0]}`,
150150
],
151151
};
152152
}

0 commit comments

Comments
 (0)