Packages

astro

7.4.13 · 18 Nov 2026MIT12.5M / weekRepositoryHomepagenpmAtom feed

Your version

5.3.0

13 Feb 2025Where it was published

5.18.2 is the newest release of 5.x.

In short

1 breaking2 new2 fixed

  • Breaking

    :warning: BREAKING CHANGE FOR EXPERIMENTAL SESSIONS ONLY :warning:

Security

23 advisories affect 5.3.0; 7.4.5 fixes them

18 more

Release note

Minor Changes

  • Handle HEAD requests to an endpoint when a handler is not defined.

    If an endpoint defines a handler for GET, but does not define a handler for HEAD, Astro will call the GET handler and return the headers and status but an empty body.

  • Improves SSR performance for synchronous components by avoiding the use of Promises. With this change, SSR rendering of on-demand pages can be up to 4x faster.

  • Adds support for adapters auto-configuring experimental session storage drivers.

    Adapters can now configure a default session storage driver when the experimental.session flag is enabled. If a hosting platform has a storage primitive that can be used for session storage, the adapter can automatically configure the session storage using that driver. This allows Astro to provide a more seamless experience for users who want to use sessions without needing to manually configure the session storage.

Patch Changes

  • Breaking

    :warning: BREAKING CHANGE FOR EXPERIMENTAL SESSIONS ONLY :warning:

    Changes the experimental.session option to a boolean flag and moves session config to a top-level value. This change is to allow the new automatic session driver support. You now need to separately enable the experimental.session flag, and then configure the session driver using the top-level session key if providing manual configuration.

    defineConfig({
      // ...
      experimental: {
    -    session: {
    -      driver: 'upstash',
    -    },
    +    session: true,
      },
    +  session: {
    +    driver: 'upstash',
    +  },
    });

    You no longer need to configure a session driver if you are using an adapter that supports automatic session driver configuration and wish to use its default settings.

    defineConfig({
      adapter: node({
        mode: "standalone",
      }),
      experimental: {
    -    session: {
    -      driver: 'fs',
    -      cookie: 'astro-cookie',
    -    },
    +    session: true,
      },
    +  session: {
    +    cookie: 'astro-cookie',
    +  },
    });

    However, you can still manually configure additional driver options or choose a non-default driver to use with your adapter with the new top-level session config option. For more information, see the experimental session docs.

  • Fixes a bug where HEAD and OPTIONS requests for non-prerendered pages were incorrectly rejected with 403 FORBIDDEN

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.