refactor: remove redundant snapshot.json files#34
Open
howlsome wants to merge 1 commit into
Open
Conversation
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
Deploying relentless with
|
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
snapshot.jsonthat was a byte-for-byte copy of the latestweeks/*.json, duplicating ~12 MB across the four season dirs and requiring manual double-writes to stay in sync.scripts/fetch.tsno longer writessnapshot.jsonafter each fetch run; the existingweeks/{week}.jsonwrite is the only output.+page.server.js,raider/[uuid]/+page.server.js,season/[season_id]/+page.server.js) now resolve the snapshot by reading the lexicographically highest file inweeks/instead of a fixedsnapshot.jsonpath.snapshot.jsonfiles are deleted.Test plan
data/seasons/*/snapshot.jsonfiles exist after the changepnpm fetch(when credentials are available) does not recreatesnapshot.jsonCloses #6