Drop .cursor rules and npm lockfile; standardize on Bun; remove v1 migration code

- Delete .cursor/rules/boardui.mdc (rules live in AGENTS.md) and
  package-lock.json; README now uses bun install/dev/test/build
- Remove migrateV1Slots, the v1 localStorage key, the legacy "asian"
  cuisine expansion, the ownsPantryStaples fallback, and the pre-BoardUI
  theme-key carryover in the layout init script; drop their tests

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Cayden Schwechten 2026-11-06 20:41:36 -06:00
parent df5dd3a70e
commit 2cd683e64a
7 changed files with 14 additions and 6904 deletions

View file

@ -1,7 +1,7 @@
import { describe, expect, test } from "bun:test";
import type { MealPlanState } from "@/app/types";
import { activeRecipeIds, mealKindFor, mealLabel, visibleMeals } from "./plan";
import { DEFAULT_STATE, migrateV1Slots, sanitizeState } from "./sanitize";
import { DEFAULT_STATE } from "./sanitize";
import { RECIPES } from "./recipes";
import { planReducer } from "./usePlanState";
@ -70,24 +70,3 @@ describe("Clear", () => {
expect(cleared.slots).toEqual({ "0-1": PANCAKES }); // breakfast was hidden, so untouched
});
});
describe("migrating plans saved before meal numbers were fixed", () => {
test("2 meals/day: old 1/2 (Lunch/Dinner) become 2/3", () => {
const old = { mealsPerDay: 2, slots: { "0-1": SANDWICH, "0-2": STEW } };
expect((migrateV1Slots(old) as MealPlanState).slots).toEqual({ "0-2": SANDWICH, "0-3": STEW });
});
test("1 meal/day: old 1 (Dinner) becomes 3, stale hidden keys are dropped", () => {
const old = { mealsPerDay: 1, slots: { "0-1": STEW, "0-2": SANDWICH } };
expect((migrateV1Slots(old) as MealPlanState).slots).toEqual({ "0-3": STEW });
});
test("3 meals/day: nothing moves", () => {
const old = { mealsPerDay: 3, slots: { "0-1": PANCAKES, "0-3": STEW } };
expect((migrateV1Slots(old) as MealPlanState).slots).toEqual(old.slots);
});
test("migrated plans still pass sanitizeState", () => {
expect(() => sanitizeState(migrateV1Slots({ mealsPerDay: 2, slots: { "0-1": "x" } }))).not.toThrow();
});
});