Keep YouTube listing data available in clean builds

Netlify prebuild tests import the YouTube listing JSON at module load time, so a fresh checkout needs a baseline copy of that data before any generated API step runs. The fetched JSON is committed and explicitly unignored while the broader static/api output remains generated.

Constraint: Netlify runs test-prebuild before Astro generation creates generated API files

Rejected: Move all API generation before tests | broader build-order change with more external dependencies

Confidence: high

Scope-risk: narrow

Directive: Keep static/api/youtube-videos.json tracked unless helpers/site-listings.js stops importing it at module load time

Tested: pnpm run with-env vite-node /tmp/fetch-youtube-videos.mjs

Tested: pnpm run with-env vitest test/prebuild/site-listings.test.js

Tested: pnpm run netlify-prebuild:test-prebuild-functions
This commit is contained in:
ThatGuySam 2026-04-25 14:44:49 -05:00
parent a05f8607b8
commit eaeff51cc9
2 changed files with 2 additions and 0 deletions

View file

@ -1,2 +1,3 @@
*
!.gitignore
!youtube-videos.json