Packages

astro

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

Your version

5.11.0

3 Jul 2025Where it was published

5.18.2 is the newest release of 5.x.

In short

1 new2 fixed

Security

23 advisories affect 5.11.0; 7.4.5 fixes them

18 more

Release note

Minor Changes

  • Updates the NodeApp.match() function in the Adapter API to accept a second, optional parameter to allow adapter authors to add headers to static, prerendered pages.

    NodeApp.match(request) currently checks whether there is a route that matches the given Request. If there is a prerendered route, the function returns undefined, because static routes are already rendered and their headers cannot be updated.

    When the new, optional boolean parameter is passed (e.g. NodeApp.match(request, true)), Astro will return the first matched route, even when it's a prerendered route. This allows your adapter to now access static routes and provides the opportunity to set headers for these pages, for example, to implement a Content Security Policy (CSP).

Patch Changes

  • Fixes a bug where server islands wouldn't be correctly rendered when they are rendered inside fragments.

    Now the following examples work as expected:

    ---
    import { Cart } from '../components/Cart.astro';
    ---
    
    <>
      <Cart server:defer />
    </>
    
    <Fragment slot="rest">
      <Cart server:defer>
        <div slot="fallback">Not working</div>
      </Cart>
    </Fragment>
  • Fixes a bug where i18n fallback rewrites didn't work in dynamic pages.

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.