Skip to content

Releases: withastro/astro

astro@4.16.8

31 Oct 07:58
5f7bf49
Compare
Choose a tag to compare

Patch Changes

  • #12338 9ca89b3 Thanks @situ2001! - Resets NODE_ENV to ensure install command run in dev mode

  • #12286 9d6bcdb Thanks @florian-lefebvre! - Fixes a case where a warning for experimental astro:env support would be shown when using an adapter but not actually using astro:env

  • #12342 ffc836b Thanks @liruifengv! - Fixes a typo in the command name of the CLI

  • #12301 0cfc69d Thanks @apatel369! - Fixes an issue with action handler context by passing the correct context (ActionAPIContext).

  • #12312 5642ef9 Thanks @koyopro! - Fixes an issue where using getViteConfig() returns incorrect and duplicate configuration

  • #12245 1d4f6a4 Thanks @bmenant! - Add components property to MDXInstance type definition (RenderResult and module import)

  • #12340 94eaeea Thanks @ematipico! - Fixes an issue where Astro actions didn't work when base was different from /

@astrojs/mdx@3.1.9

31 Oct 07:58
5f7bf49
Compare
Choose a tag to compare

Patch Changes

  • #12245 1d4f6a4 Thanks @bmenant! - Add components property to MDXInstance type definition (RenderResult and module import)

astro@5.0.0-beta.6

31 Oct 09:09
731b697
Compare
Choose a tag to compare
astro@5.0.0-beta.6 Pre-release
Pre-release

Major Changes

  • #12268 4e9a3ac Thanks @ematipico! - The command astro add vercel now updates the configuration file differently, and adds @astrojs/vercel as module to import.

    This is a breaking change because it requires the version 8.* of @astrojs/vercel.

  • #12231 90ae100 Thanks @bluwy! - Updates the automatic charset=utf-8 behavior for Markdown pages, where instead of responding with charset=utf-8 in the Content-Type header, Astro will now automatically add the <meta charset="utf-8"> tag instead.

    This behaviour only applies to Markdown pages (.md or similar Markdown files located within src/pages/) that do not use Astro's special layout frontmatter property. It matches the rendering behaviour of other non-content pages, and retains the minimal boilerplate needed to write with non-ASCII characters when adding individual Markdown pages to your site.

    If your Markdown pages use the layout frontmatter property, then HTML encoding will be handled by the designated layout component instead, and the <meta charset="utf-8"> tag will not be added to your page by default.

    If you require charset=utf-8 to render your page correctly, make sure that your layout components contain the <meta charset="utf-8"> tag. You may need to add this if you have not already done so.

Minor Changes

  • #12243 eb41d13 Thanks @florian-lefebvre! - Improves defineConfig type safety. TypeScript will now error if a group of related configuration options do not have consistent types. For example, you will now see an error if your language set for i18n.defaultLocale is not one of the supported locales specified in i18n.locales.

  • #12150 93351bc Thanks @bluwy! - Adds support for passing values other than "production" or "development" to the --mode flag (e.g. "staging", "testing", or any custom value) to change the value of import.meta.env.MODE or the loaded .env file. This allows you take advantage of Vite's mode feature.

    Also adds a new --devOutput flag for astro build that will output a development-based build.

    Note that changing the mode does not change the kind of code transform handled by Vite and Astro:

    • In astro dev, Astro will transform code with debug information.
    • In astro build, Astro will transform code with the most optimized output and removes debug information.
    • In astro build --devOutput (new flag), Astro will transform code with debug information like in astro dev.

    This enables various usecases like:

    # Run the dev server connected to a "staging" API
    astro dev --mode staging
    
    # Build a site that connects to a "staging" API
    astro build --mode staging
    
    # Build a site that connects to a "production" API with additional debug information
    astro build --devOutput
    
    # Build a site that connects to a "testing" API
    astro build --mode testing

    The different modes can be used to load different .env files, e.g. .env.staging or .env.production, which can be customized for each environment, for example with different API_URL environment variable values.

Patch Changes

  • #12302 7196c24 Thanks @ematipico! - Fixes an issue where the origin check middleware run for prendered pages

  • #12341 c1786d6 Thanks @ematipico! - Fixes and issue where Astro.currentLocale always returned the default locale when consumed inside a server island.

  • #12270 25192a0 Thanks @ematipico! - Fixes a bug where the params weren't correctly computed when rendering URLs with non-English characters

@astrojs/vue@5.0.0-beta.1

31 Oct 09:09
731b697
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • 81b0bf5 Thanks @bluwy! - New release to include changes from 4.5.2

@astrojs/mdx@4.0.0-beta.3

31 Oct 09:09
731b697
Compare
Choose a tag to compare
Pre-release

Major Changes

  • #12231 90ae100 Thanks @bluwy! - Handles the breaking change in Astro where content pages (including .mdx pages located within src/pages/) no longer respond with charset=utf-8 in the Content-Type header.

    For MDX pages without layouts, @astrojs/mdx will automatically add the <meta charset="utf-8"> tag to the page by default. This reduces the boilerplate needed to write with non-ASCII characters. If your MDX pages have a layout, the layout component should include the <meta charset="utf-8"> tag.

    If you require charset=utf-8 to render your page correctly, make sure that your layout components have the <meta charset="utf-8"> tag added.

astro@4.16.7

22 Oct 12:12
d2b399d
Compare
Choose a tag to compare

Patch Changes

  • #12263 e9e8080 Thanks @Fryuni! - Fixes conflict between server islands and on-demand dynamic routes in the form of /[...rest] or /[paramA]/[paramB].

  • #12279 b781f88 Thanks @jsparkdev! - Update wrong error message

  • #12273 c2ee963 Thanks @ascorbic! - Fixes an issue with some package managers where sites would not build if TypeScript was not installed.

  • #12235 a75bc5e Thanks @ematipico! - Fixes a bug where Astro Actions couldn't redirect to the correct pathname when there was a rewrite involved.

  • #11839 ff522b9 Thanks @icaliman! - Fixes error when returning a top-level null from an Astro file frontmatter

  • #12272 388d237 Thanks @ascorbic! - Correctly handles local images when using a base path in SSR

@astrojs/db@0.14.3

22 Oct 12:12
d2b399d
Compare
Choose a tag to compare

Patch Changes

  • #11435 f32a7a8 Thanks @haivuw! - Fixes a bug where astro:db:seed couldn't access to the environment variable ASTRO_DATABASE_FILE

  • Updated dependencies []:

    • @astrojs/studio@0.1.1

astro@4.16.6

17 Oct 12:59
d6f1704
Compare
Choose a tag to compare

Patch Changes

  • #11823 a3d30a6 Thanks @DerTimonius! - fix: improve error message when inferSize is used in local images with the Image component

  • #12227 8b1a641 Thanks @florian-lefebvre! - Fixes a case where environment variables would not be refreshed when using astro:env

  • #12239 2b6daa5 Thanks @ematipico! - BREAKING CHANGE to the experimental Container API only

    Changes the default page rendering behavior of Astro components in containers, and adds a new option partial: false to render full Astro pages as before.

    Previously, the Container API was rendering all Astro components as if they were full Astro pages containing <!DOCTYPE html> by default. This was not intended, and now by default, all components will render as page partials: only the contents of the components without a page shell.

    To render the component as a full-fledged Astro page, pass a new option called partial: false to renderToString() and renderToResponse():

    import { experimental_AstroContainer as AstroContainer } from 'astro/container';
    import Card from '../src/components/Card.astro';
    
    const container = AstroContainer.create();
    
    await container.renderToString(Card); // the string will not contain `<!DOCTYPE html>`
    await container.renderToString(Card, { partial: false }); // the string will contain `<!DOCTYPE html>`

astro@4.16.5

15 Oct 17:11
5a4edeb
Compare
Choose a tag to compare

Patch Changes

  • #12232 ff68ba5 Thanks @martrapp! - Fixes an issue with cssesc in dev mode when setting vite.ssr.noExternal: true

astro@4.16.4

15 Oct 07:38
6df5bba
Compare
Choose a tag to compare

Patch Changes

  • #12223 79ffa5d Thanks @ArmandPhilippot! - Fixes a false positive reported by the dev toolbar Audit app where a label was considered missing when associated with a button

    The button element can be used with a label (e.g. to create a switch) and should not be reported as an accessibility issue when used as a child of a label.

  • #12199 c351352 Thanks @ematipico! - Fixes a regression in the computation of Astro.currentLocale

  • #12222 fb55695 Thanks @ematipico! - Fixes an issue where the edge middleware couldn't correctly compute the client IP address when calling ctx.clientAddress()