Skip to content

Releases: withastro/astro

[email protected]

19 Feb 15:55
00e95c4

Choose a tag to compare

[email protected] Pre-release
Pre-release

Patch Changes

  • #15573 d789452 Thanks @matthewp! - Clear the route cache on content changes so slug pages reflect updated data during dev.

  • #15560 170ed89 Thanks @z0mt3c! - Fix X-Forwarded-Proto validation when allowedDomains includes both protocol and hostname fields. The protocol check no longer fails due to hostname mismatch against the hardcoded test URL.

  • #15563 e959698 Thanks @ematipico! - Fixes an issue where warnings would be logged during the build using one of the official adapters

[email protected]

18 Feb 20:26
e0f1a2b

Choose a tag to compare

Patch Changes

  • #15564 522f880 Thanks @matthewp! - Add a default body size limit for server actions to prevent oversized requests from exhausting memory.

  • #15569 e01e98b Thanks @matthewp! - Respect image allowlists when inferring remote image sizes and reject remote redirects.

@astrojs/[email protected]

18 Feb 20:26
e0f1a2b

Choose a tag to compare

Patch Changes

  • #15564 522f880 Thanks @matthewp! - Add a default body size limit for server actions to prevent oversized requests from exhausting memory.

  • #15572 ef851bf Thanks @matthewp! - Upgrade astro package support

    [email protected] includes a fix to prevent Action payloads from exhausting memory. @astrojs/node now depends on this version of Astro as a minimum requirement.

[email protected]

17 Feb 14:44
55c568c

Choose a tag to compare

[email protected] Pre-release
Pre-release

Major Changes

Minor Changes

  • #15529 a509941 Thanks @florian-lefebvre! - Adds a new build-in font provider npm to access fonts installed as NPM packages

    You can now add web fonts specified in your package.json through Astro's type-safe Fonts API. The npm font provider allows you to add fonts either from locally installed packages in node_modules or from a CDN.

    Set fontProviders.npm() as your fonts provider along with the required name and cssVariable values, and add options as needed:

    import { defineConfig, fontProviders } from 'astro/config';
    
    export default defineConfig({
      experimental: {
        fonts: [
          {
            name: 'Roboto',
            provider: fontProviders.npm(),
            cssVariable: '--font-roboto',
          },
        ],
      },
    });

    See the NPM font provider reference documentation for more details.

  • #15548 5b8f573 Thanks @florian-lefebvre! - Adds a new optional embeddedLangs prop to the <Code /> component to support languages beyond the primary lang

    This allows, for example, highlighting .vue files with a <script setup lang="tsx"> block correctly:

    ---
    import { Code } from 'astro:components';
    
    const code = `
    <script setup lang="tsx">
    const Text = ({ text }: { text: string }) => <div>{text}</div>;
    </script>
    
    <template>
      <Text text="hello world" />
    </template>`;
    ---
    
    <Code {code} lang="vue" embeddedLangs={['tsx']} />

    See the <Code /> component documentation for more details.

  • #15483 7be3308 Thanks @florian-lefebvre! - Adds streaming option to the createApp() function in the Adapter API, mirroring the same functionality available when creating a new App instance

    An adapter's createApp() function now accepts streaming (defaults to true) as an option. HTML streaming breaks a document into chunks to send over the network and render on the page in order. This normally results in visitors seeing your HTML as fast as possible but factors such as network conditions and waiting for data fetches can block page rendering.

    HTML streaming helps with performance and generally provides a better visitor experience. In most cases, disabling streaming is not recommended.

    However, when you need to disable HTML streaming (e.g. your host only supports non-streamed HTML caching at the CDN level), you can opt out of the default behavior by passing streaming: false to createApp():

    import { createApp } from 'astro/app/entrypoint';
    
    const app = createApp({ streaming: false });

    See more about the createApp() function in the Adapter API reference.

Patch Changes

@astrojs/[email protected]

17 Feb 14:44
55c568c

Choose a tag to compare

Pre-release

Major Changes

Patch Changes

@astrojs/[email protected]

17 Feb 14:44
55c568c

Choose a tag to compare

Pre-release

Major Changes

@astrojs/[email protected]

17 Feb 14:44
55c568c

Choose a tag to compare

Pre-release

Patch Changes

[email protected]

16 Feb 15:47
478816e

Choose a tag to compare

[email protected] Pre-release
Pre-release

Major Changes

  • #15535 dfe2e22 Thanks @florian-lefebvre! - Deprecates loadManifest() and loadApp() from astro/app/node (Adapter API) - (v6 upgrade guidance)

  • #15461 9f21b24 Thanks @florian-lefebvre! - BREAKING CHANGE to the v6 beta Adapter API only: renames entryType to entrypointResolution and updates possible values

    Astro 6 introduced a way to let adapters have more control over the entrypoint by passing entryType: 'self' to setAdapter(). However during beta development, the name was unclear and confusing.

    entryType is now renamed to entrypointResolution and its possible values are updated:

    • legacy-dynamic becomes explicit.
    • self becomes auto.

    If you are building an adapter with v6 beta and specifying entryType, update it:

    setAdapter({
        // ...
    -    entryType: 'legacy-dynamic'
    +    entrypointResolution: 'explicit'
    })
    
    setAdapter({
        // ...
    -    entryType: 'self'
    +    entrypointResolution: 'auto'
    })
  • #15461 9f21b24 Thanks @florian-lefebvre! - Deprecates createExports() and start() (Adapter API) - (v6 upgrade guidance)

  • #15535 dfe2e22 Thanks @florian-lefebvre! - Deprecates NodeApp from astro/app/node (Adapter API) - (v6 upgrade guidance)

  • #15407 aedbbd8 Thanks @ematipico! - Changes how styles of responsive images are emitted - (v6 upgrade guidance)

Minor Changes

  • #15535 dfe2e22 Thanks @florian-lefebvre! - Exports new createRequest() and writeResponse() utilities from astro/app/node

    To replace the deprecated NodeApp.createRequest() and NodeApp.writeResponse() methods, the astro/app/node module now exposes new createRequest() and writeResponse() utilities. These can be used to convert a NodeJS IncomingMessage into a web-standard Request and stream a web-standard Response into a NodeJS ServerResponse:

    import { createApp } from 'astro/app/entrypoint';
    import { createRequest, writeResponse } from 'astro/app/node';
    import { createServer } from 'node:http';
    
    const app = createApp();
    
    const server = createServer(async (req, res) => {
      const request = createRequest(req);
      const response = await app.render(request);
      await writeResponse(response, res);
    });
  • #15407 aedbbd8 Thanks @ematipico! - Adds support for responsive images when security.csp is enabled, out of the box.

    Astro's implementation of responsive image styles has been updated to be compatible with a configured Content Security Policy.

    Instead of, injecting style elements at runtime, Astro will now generate your styles at build time using a combination of class="" and data-* attributes. This means that your processed styles are loaded and hashed out of the box by Astro.

    If you were previously choosing between Astro's CSP feature and including responsive images on your site, you may now use them together.

Patch Changes

[email protected]

16 Feb 15:47
478816e

Choose a tag to compare

[email protected] Pre-release
Pre-release

Patch Changes

  • #15496 eb7cdda Thanks @matthewp! - Fix syntax highlighting for lowercase component tags that start with "style" or "script".

@astrojs/[email protected]

16 Feb 15:47
478816e

Choose a tag to compare

Pre-release

Patch Changes