Patch Changes
-
#11231
58d7dbb
Thanks @ematipico! - Fixes a regression forgetViteConfig
, where the inline config wasn't merged in the final config. -
#11228
1e293a1
Thanks @ascorbic! - UpdatesgetCollection()
to always return a cloned array -
#11207
7d9aac3
Thanks @ematipico! - Fixes an issue in the rewriting logic where old data was not purged during the rewrite flow. This caused some false positives when checking the validity of URL path names during the rendering phase. -
#11189
75a8fe7
Thanks @ematipico! - Improve error message when usinggetLocaleByPath
on path that doesn't contain any locales. -
#11195
0a6ab6f
Thanks @florian-lefebvre! - Adds support for enums toastro:env
You can now call
envField.enum
:import { defineConfig, envField } from 'astro/config'; export default defineConfig({ experimental: { env: { schema: { API_VERSION: envField.enum({ context: 'server', access: 'secret', values: ['v1', 'v2'], }), }, }, }, });
-
#11210
66fc028
Thanks @matthewp! - Close the iterator only after rendering is complete -
#11195
0a6ab6f
Thanks @florian-lefebvre! - Adds additional validation options toastro:env
astro:env
schema datatypesstring
andnumber
now have new optional validation rules:import { defineConfig, envField } from 'astro/config'; export default defineConfig({ experimental: { env: { schema: { FOO: envField.string({ // ... max: 32, min: 3, length: 12, url: true, includes: 'foo', startsWith: 'bar', endsWith: 'baz', }), BAR: envField.number({ // ... gt: 2, min: 3, lt: 10, max: 9, int: true, }), }, }, }, });
-
#11211
97724da
Thanks @matthewp! - Let middleware handle the original request URL -
#10607
7327c6a
Thanks @frankbits! - Fixes an issue where a leading slash created incorrect conflict resolution between pages generated from static routes and catch-all dynamic routes