fe99058040
- Zustand 5 vanilla createStore composes 4 slices (garden / memory / narrative / session); useAppStore React hook re-renders on selector change; getState() works without React (Phaser ↔ React bridge per D-32) - simAdapter exposes drainCommands / applyTilesAndUnlocks / applyHarvestedFragments / applyLuraProgress / applyTickCount; sim never imports the store (CORE-10) - V1Payload extended in place per D-34: tickCount (BLOCKER 3 monotonic counter), unlockedPlantTypes, luraBeatProgress, offlineEvents, settings.persistenceToastShown — CURRENT_SCHEMA_VERSION stays 1, no migrations[2] sneaked in (regression-defense test pins this) - migrations[1] populates all new field defaults; tickCount: 0 means fresh sims always start at sim-tick 0 - registerSaveLifecycleHooks (UX-10): visibilitychange→hidden, beforeunload, plus saveOnSeasonTransition() — Vitest covers all three - Phaser EventBus singleton seeded per the Phaser 4 React-template pattern - Install @testing-library/react as devDep so the React-hook test can exercise the real renderHook surface - 27 new tests across store / migrations / lifecycle all green; full npm run ci is 126/126
52 lines
1.6 KiB
JSON
52 lines
1.6 KiB
JSON
{
|
|
"name": "the-last-garden",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "A 7-Season browser narrative idle game in the lineage of A Dark Room and Universal Paperclips.",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"preview": "vite preview",
|
|
"lint": "eslint . --max-warnings 0",
|
|
"test": "vitest run --passWithNoTests=false",
|
|
"test:watch": "vitest",
|
|
"validate:assets": "node scripts/validate-assets.mjs",
|
|
"compile:ink": "echo \"[compile:ink] no .ink files yet — Phase 2 will populate /content/dialogue/\" && exit 0",
|
|
"ci": "npm run lint && npm run test && npm run validate:assets && npm run build"
|
|
},
|
|
"dependencies": {
|
|
"break_eternity.js": "^2.1.3",
|
|
"crc-32": "^1.2.2",
|
|
"gray-matter": "^4.0.3",
|
|
"idb": "^8.0.3",
|
|
"inkjs": "^2.4.0",
|
|
"lz-string": "^1.5.0",
|
|
"phaser": "^4.1.0",
|
|
"react": "^19.2.6",
|
|
"react-dom": "^19.2.6",
|
|
"yaml": "^2.8.4",
|
|
"zod": "^4.4.3",
|
|
"zustand": "^5.0.13"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.59.1",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@types/node": "^22.19.18",
|
|
"@types/react": "^19.2.14",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^6.0.1",
|
|
"@vitest/ui": "^4.1.5",
|
|
"eslint": "^9.39.4",
|
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
"eslint-plugin-boundaries": "^6.0.2",
|
|
"fake-indexeddb": "^6.2.5",
|
|
"happy-dom": "^20.9.0",
|
|
"inklecate": "^1.8.1",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.59.2",
|
|
"vite": "^8.0.11",
|
|
"vitest": "^4.1.5"
|
|
}
|
|
}
|