Skip to content

refactor: remove redundant snapshot.json files#34

Open
howlsome wants to merge 1 commit into
mainfrom
fix/remove-snapshot-json
Open

refactor: remove redundant snapshot.json files#34
howlsome wants to merge 1 commit into
mainfrom
fix/remove-snapshot-json

Conversation

@howlsome

Copy link
Copy Markdown
Owner

Summary

  • Each season directory held a snapshot.json that was a byte-for-byte copy of the latest weeks/*.json, duplicating ~12 MB across the four season dirs and requiring manual double-writes to stay in sync.
  • scripts/fetch.ts no longer writes snapshot.json after each fetch run; the existing weeks/{week}.json write is the only output.
  • The three server routes (+page.server.js, raider/[uuid]/+page.server.js, season/[season_id]/+page.server.js) now resolve the snapshot by reading the lexicographically highest file in weeks/ instead of a fixed snapshot.json path.
  • All four existing snapshot.json files are deleted.

Test plan

  • Home page renders raid and M+ data as before
  • Raider page renders parse history and M+ data as before
  • Season page renders snapshot data as before
  • No data/seasons/*/snapshot.json files exist after the change
  • Running pnpm fetch (when credentials are available) does not recreate snapshot.json

Closes #6

Each season directory contained a snapshot.json that was a byte-for-byte
copy of the latest weeks/*.json. Stop writing it in fetch.ts and update
the three server routes to read the highest-sorted week file instead.

Closes #6
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying relentless with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7e2f423
Status: ✅  Deploy successful!
Preview URL: https://e3093150.relentless-2cp.pages.dev
Branch Preview URL: https://fix-remove-snapshot-json.relentless-2cp.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove redundant snapshot.json

2 participants