Packages

astro

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

Your version

5.16.7

7 Jan 2026Where it was published

5.18.2 is the newest release of 5.x.

In short

1 breaking1 new7 fixed

  • Breaking

    BREAKING CHANGE to the experimental Fonts API only

Security

14 advisories affect 5.16.7; 7.4.7 fixes them

9 more

Release note

Patch Changes

  • Improves JSDoc annotations for AstroGlobal, AstroSharedContext and APIContext types

  • Improves rendering performance by grouping render chunks when emitting from async iterables to avoid encoding costs

  • Fixes remote images Etag header handling by disabling internal cache

  • Fixes images not working in development when using setups with port forwarding

  • Fixes certain aliases not working when using images in JSON files with the content layer

  • Breaking

    BREAKING CHANGE to the experimental Fonts API only

    Removes the defineAstroFontProvider() type helper.

    If you are building a custom font provider, remove any occurrence of defineAstroFontProvider() and use the FontProvider type instead:

    -import { defineAstroFontProvider } from 'astro/config';
    
    -export function myProvider() {
    -    return defineAstroFontProvider({
    -        entrypoint: new URL('./implementation.js', import.meta.url)
    -    });
    -};
    
    +import type { FontProvider } from 'astro';
    
    +export function myProvider(): FontProvider {
    +    return {
    +        entrypoint: new URL('./implementation.js', import.meta.url)
    +    },
    +}
  • Reduces Astro’s install size by around 8 MB

  • Enables the ClientRouter to preserve the original hash part of the target URL during server side redirects.

  • Breaking

    BREAKING CHANGE to the experimental Fonts API only

    Changes the font format downloaded by default when using the experimental Fonts API. Additionally, adds a new formats configuration option to specify which font formats to download.

    Previously, Astro was opinionated about which font sources would be kept for usage, mainly keeping woff2 and woff files.

    You can now specify what font formats should be downloaded (if available). Only woff2 files are downloaded by default.

What should I do?

If you were previously relying on Astro downloading the `woff` format, you will now need to specify this explicitly with the new `formats` configuration option. Additionally, you may also specify any additional file formats to download if available:

```diff
// astro.config.mjs
import { defineConfig, fontProviders } from 'astro/config'

export default defineConfig({
    experimental: {
        fonts: [{
            name: 'Roboto',
            cssVariable: '--font-roboto',
            provider: fontProviders.google(),
+            formats: ['woff2', 'woff', 'otf']
        }]
    }
})
```
  • Fixes a vite warning log during builds when using npm

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.