31 tests in test/, run in a plain Node env with a tiny localStorage shim (no jsdom — its Node-22.4 transitive-dep breakage isn't worth working around for logic tests): - type-chart: modern effectiveness, dual-type stacking, and the era rules (no Fairy pre-6, Steel resists Ghost/Dark pre-6, the Gen 1 Ghost→Psychic and Bug↔Poison quirks). - damage-calc: nature multipliers, the Gen 3+ stat formula (Garchomp reference values), STAB/effectiveness/immunity, pre/post-Gen-6 crit. - savedex: a synthetic Gen 1 SRAM (bitfields + checksum) round-trips; checksum-mismatch and size guards. - selection: normalizeSelection v2→v3 migration, per-game isolation, global favourite, stats vs statsNational. - pokedex-resolver: prettify, dex resolution against a mini snapshot. `npm test` wired into CI after format:check. Also: docker-compose host port 8080 → 4753 (README updated). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Ve7HLspzeG2xDPtJQ8vmu
37 lines
980 B
JSON
37 lines
980 B
JSON
{
|
|
"name": "pocketdex",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "An offline-first Pokédex, team builder and save-file tracker powered by PokéAPI. Vanilla JS + Vite + Workbox.",
|
|
"scripts": {
|
|
"snapshot": "node scripts/build-snapshot.mjs",
|
|
"prebuild": "node scripts/build-snapshot.mjs",
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check ."
|
|
},
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"license": "MIT",
|
|
"devDependencies": {
|
|
"prettier": "3.9.6",
|
|
"vite": "^6.4.3",
|
|
"vite-plugin-pwa": "^1.3.0",
|
|
"vitest": "^5.0.0"
|
|
},
|
|
"dependencies": {
|
|
"workbox-cacheable-response": "^7.4.1",
|
|
"workbox-expiration": "^7.4.1",
|
|
"workbox-precaching": "^7.4.1",
|
|
"workbox-routing": "^7.4.1",
|
|
"workbox-strategies": "^7.4.1",
|
|
"workbox-window": "^7.4.1"
|
|
}
|
|
}
|