Files
TheLastGarden/package.json
T
josh dd486969a9 test(02-05): playwright e2e for PIPE-07 — full Phase-2 loop
- tests/e2e/season1-loop.spec.ts: PIPE-07 smoke covering load → Begin
  → plant rosemary → fast-forward FakeClock 3min → harvest →
  fragment-reveal modal → close → journal-icon visible → open journal
  → fragment present → reload page → fragment persists. Sidesteps
  Phaser canvas pixel-clicking via window.__tlgStore command dispatch
  (test-only window slot, production-guarded by import.meta.env.PROD).
- playwright.config.ts: bumped webServer timeout 30s → 60s for cold
  Vite startup; pinned port 5273 + --strictPort to avoid collisions
  with other dev servers on the user's machine; reuseExistingServer
  false so the spec always starts a fresh Vite against this project.
- package.json: added test:e2e script (npx playwright test). Not
  added to npm run ci — Playwright is slower than Vitest; manual run
  before /gsd-verify-work + future v1 release pipeline.
- src/content/loader.ts (Rule 3 — Blocking): replaced gray-matter
  with a 15-line parseFrontmatter helper. gray-matter pulls in Node's
  Buffer global which is undefined in Vite's browser bundle; the
  build emits a 'Module "buffer" externalized' warning that masks
  the runtime ReferenceError. Surfaced under Vite dev mode while
  running the e2e — Plan 02-03's Markdown loader path (lura-first-
  letter.md + winter-rose-night.md) was effectively broken in real
  browsers since shipping. parseFrontmatter handles the strict
  '---<yaml>---<body>' shape the .md fragments use; bundle dropped
  from 2.2MB to 1.9MB as a side effect of dropping the unused dep.
- deferred-items.md: tracks the gray-matter package.json cleanup
  (the dep is now unused but kept in package.json for now, scoped
  out of this plan).
- npx playwright test exits 0 (1 spec, 1.5s test runtime); npm run
  ci exits 0; 308/308 vitest still green. PIPE-07 satisfied
  end-to-end.
2026-05-09 11:04:32 -04:00

54 lines
1.7 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": "npm run compile:ink && 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",
"check:bundle-split": "node scripts/check-bundle-split.mjs",
"compile:ink": "node scripts/compile-ink.mjs",
"test:e2e": "playwright test",
"ci": "npm run lint && npm run compile:ink && npm run test && npm run validate:assets && npm run build && npm run check:bundle-split"
},
"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"
}
}