github withastro/astro astro@6.0.0-beta.12

latest releases: @astrojs/db@0.19.0-beta.4, @astrojs/vercel@10.0.0-beta.5, @astrojs/netlify@7.0.0-beta.10...
pre-release9 hours ago

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

Don't miss a new astro release

NewReleases is sending notifications on new releases.