Packages

astro

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

Your version

5.13.5

29 Aug 2025Where it was published

5.18.2 is the newest release of 5.x.

In short

1 breaking2 new2 fixed

  • Breaking

    BREAKING CHANGES only to the experimental CSP feature

Security

22 advisories affect 5.13.5; 7.4.5 fixes them

17 more

Release note

Patch Changes

  • Breaking

    BREAKING CHANGES only to the experimental CSP feature

    The following runtime APIs of the Astro global have been renamed:

    • Astro.insertDirective to Astro.csp.insertDirective

    • Astro.insertStyleResource to Astro.csp.insertStyleResource

    • Astro.insertStyleHash to Astro.csp.insertStyleHash

    • Astro.insertScriptResource to Astro.csp.insertScriptResource

    • Astro.insertScriptHash to Astro.csp.insertScriptHash

    The following runtime APIs of the APIContext have been renamed:

    • ctx.insertDirective to ctx.csp.insertDirective

    • ctx.insertStyleResource to ctx.csp.insertStyleResource

    • ctx.insertStyleHash to ctx.csp.insertStyleHash

    • ctx.insertScriptResource to ctx.csp.insertScriptResource

    • ctx.insertScriptHash to ctx.csp.insertScriptHash

  • Fixes an issue where CSP headers were incorrectly injected in the development server.

  • Adds support for experimental CSP when using experimental fonts

    Experimental fonts now integrate well with experimental CSP by injecting hashes for the styles it generates, as well as font-src directives.

    No action is required to benefit from it.

  • Fixes a bug that caused cookies to not be correctly set when using middleware sequences

  • Adds a missing export for resolveSrc, a documented image services utility.

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.