github withastro/astro astro@4.10.2

latest releases: astro@4.11.3, astro@4.11.2, @astrojs/studio@0.1.1...
21 days ago

Patch Changes

  • #11231 58d7dbb Thanks @ematipico! - Fixes a regression for getViteConfig, where the inline config wasn't merged in the final config.

  • #11228 1e293a1 Thanks @ascorbic! - Updates getCollection() 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 using getLocaleByPath on path that doesn't contain any locales.

  • #11195 0a6ab6f Thanks @florian-lefebvre! - Adds support for enums to astro: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 to astro:env

    astro:env schema datatypes string and number 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

Don't miss a new astro release

NewReleases is sending notifications on new releases.