Avatar for the withastro user
withastro
astro
BlogDocsChangelog

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

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%
10 hours ago
e29a210
hmr-route-cache-stale
© 2026 CodSpeed Technology
Home Terms Privacy Docs