withastro
astro
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(content): generate anyOf schema for file() loader to support top-level arrays (#16730) * fix(content): generate anyOf schema for file() loader to support top-level arrays The file() loader accepts both top-level array JSON files and record object JSON files. Previously, generateJSONSchema always wrapped the item schema in z.object({}).catchall() which produces a type:object JSON schema. When the source file is a top-level array, VS Code reports validation errors because the data shape doesn't match the generated schema. Replace the object-only wrapping with a z.union of the array shape and the object shape. This generates an anyOf in the output JSON schema, allowing VS Code to validate array-shaped and object-shaped files correctly. The $schema property is injected into the object branch only — top-level array JSON files cannot reference an external schema property. Fixes #16602 * test: update content intellisense test for file loader union schema * chore: add changeset for file loader anyOf schema fix * docs(changeset): reword to user-facing prose per astro guide
main
59 minutes ago
docs(changeset): reword to user-facing prose per astro guide
harshagarwalnyu:fix/file-loader-top-level-array-schema
5 hours ago
Invalidate importer modules in runner cache during HMR When an SSR-only module changes, moduleGraph.invalidateModule() recursively walks importers and populates the invalidatedModules set. However, the runner's evaluatedModules cache was only invalidated for the directly changed file. Barrel files (e.g. index.ts re-exporting components) stayed cached in the runner, so dynamic import() calls returned stale exports. Invalidate all modules in the invalidatedModules set in the runner cache, not just the directly changed ones. Fixes #16000
hmr-dynamic-import-stale
10 hours ago
Invalidate route cache when module identity changes after HMR The route cache stores getStaticPaths() return values keyed by route path, but never checked whether the module that produced those values had been re-evaluated. After HMR, components passed as props via getStaticPaths() remained stale even on manual refresh. Store the module reference in the cache entry and compare identity on lookup. A new module object (from a fresh import after HMR) causes the cache to miss, re-calling getStaticPaths() with updated references. Fixes #16522
hmr-route-cache-stale
10 hours ago
Invalidate route cache when module identity changes after HMR The route cache stores getStaticPaths() return values keyed by route path, but never checked whether the module that produced those values had been re-evaluated. After HMR, components passed as props via getStaticPaths() remained stale even on manual refresh. Store the module reference in the cache entry and compare identity on lookup. A new module object (from a fresh import after HMR) causes the cache to miss, re-calling getStaticPaths() with updated references. Fixes #16522
hmr-route-cache-stale
10 hours ago
fix(content): preserve empty alt attributes on markdown images in content collections (#16774)
main
11 hours ago
fix(content): preserve empty alt attributes on markdown images in content collections
flue/fix-16621
11 hours ago
Fix dev server serving stale content for files outside project root (#16757) * fix(hmr): return SSR-only modules from hotUpdate to propagate invalidation to module runner * fix(hmr): invalidate runner evaluated modules directly instead of returning modules to Vite Returning ssrOnlyModules from hotUpdate causes Vite's updateModules() to run propagateUpdate(), which always hits dead ends for SSR-only modules and triggers a heavy full-reload on the module runner that clears the entire evaluation cache. This caused E2E test failures across actions, cloudflare, HMR, and view transitions tests. Instead, directly invalidate the runner's evaluatedModules cache for each changed module (same pattern as vite-plugin-content-virtual-mod.ts) and return [] to tell Vite we handled it. For non-runnable environments (Cloudflare's workerd), send full-reload through environment.hot so the remote runner clears its cache. --------- Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
main
12 hours ago
Latest Branches
CodSpeed Performance Gauge
0%
fix(content): generate anyOf schema for file() loader to support top-level arrays
#16730
5 hours ago
91e5e41
harshagarwalnyu:fix/file-loader-top-level-array-schema
CodSpeed Performance Gauge
0%
Invalidate importer modules in runner cache during HMR
#16777
10 hours ago
5eba863
hmr-dynamic-import-stale
CodSpeed Performance Gauge
0%
Invalidate route cache when module identity changes after HMR
#16776
10 hours ago
e29a210
hmr-route-cache-stale
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs