github withastro/astro @astrojs/netlify@7.0.0

latest releases: @astrojs/netlify@6.6.5, @astrojs/node@9.5.5, @astrojs/internal-helpers@0.7.6...
5 hours ago

Major Changes

Minor Changes

  • #15258 d339a18 Thanks @ematipico! - Stabilizes the adapter feature experimentalStatiHeaders. If you were using this feature in any of the supported adapters, you'll need to change the name of the flag:

    export default defineConfig({
      adapter: netlify({
    -    experimentalStaticHeaders: true
    +    staticHeaders: true
      })
    })
  • #15809 94b4a46 Thanks @Princesseuh! - Adds support for the fit option to the image service

  • #15495 5b99e90 Thanks @leekeh! - Adds new middlewareMode adapter feature and deprecates edgeMiddleware option

    The edgeMiddleware option is now deprecated and will be removed in a future major release, so users should transition to using the new middlewareMode feature as soon as possible.

    export default defineConfig({
      adapter: netlify({
    -    edgeMiddleware: true
    +    middlewareMode: 'edge'
      })
    })
  • #15006 f361730 Thanks @florian-lefebvre! - Adds new session driver object shape

    For greater flexibility and improved consistency with other Astro code, session drivers are now specified as an object:

    -import { defineConfig } from 'astro/config'
    +import { defineConfig, sessionDrivers } from 'astro/config'
    
    export default defineConfig({
      session: {
    -    driver: 'redis',
    -    options: {
    -      url: process.env.REDIS_URL
    -    },
    +    driver: sessionDrivers.redis({
    +      url: process.env.REDIS_URL
    +    }),
      }
    })

    Specifying the session driver as a string has been deprecated, but will continue to work until this feature is removed completely in a future major version. The object shape is the current recommended and documented way to configure a session driver.

  • #15413 736216b Thanks @florian-lefebvre! - Updates the implementation to use the new Adapter API

  • #14946 95c40f7 Thanks @ematipico! - Removes the experimental.csp flag and replaces it with a new configuration option security.csp - (v6 upgrade guidance)

Patch Changes

  • #15187 bbb5811 Thanks @matthewp! - Update to Astro 6 beta

  • #15781 2de969d Thanks @ematipico! - Adds a new clientAddress option to the createContext() function

    Providing this value gives adapter and middleware authors explicit control over the client IP address. When not provided, accessing clientAddress throws an error consistent with other contexts where it is not set by the adapter.

    Additionally, both of the official Netlify and Vercel adapters have been updated to provide this information in their edge middleware.

    import { createContext } from 'astro/middleware';
    
    createContext({
      clientAddress: context.headers.get('x-real-ip'),
    });
  • #15665 52a7efd Thanks @matthewp! - Fixes builds that were failing with "Entry module cannot be external" error when using the Netlify adapter

    This error was preventing sites from building after recent internal changes. Your builds should now work as expected without any changes to your code.

  • #15679 19ba822 Thanks @matthewp! - Fixes server-rendered routes returning 404 errors

    A configuration error in the build output prevented Netlify from correctly routing requests to server-rendered pages, causing them to return 404 errors. This fix ensures that all server routes are properly handled by the Netlify SSR function.

  • #15809 94b4a46 Thanks @Princesseuh! - Fixes the image CDN being used in development despite being disabled in certain cases

  • #15460 ee7e53f Thanks @florian-lefebvre! - Updates to use the new Adapter API

  • #15450 50c9129 Thanks @florian-lefebvre! - Fixes a case where build.serverEntry would not be respected when using the new Adapter API

  • #15461 9f21b24 Thanks @florian-lefebvre! - Updates to new Adapter API introduced in v6

  • Updated dependencies [4ebc1e3, 4e7f3e8, a164c77, cf6ea6b, a18d727, 240c317, 745e632]:

    • @astrojs/internal-helpers@0.8.0
    • @astrojs/underscore-redirects@1.0.0

Don't miss a new astro release

NewReleases is sending notifications on new releases.