Packages

astro

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

Your version

4.16.6

17 Oct 2024Where it was published

4.16.19 is the newest release of 4.x.

In short

1 breaking2 fixed

  • Breaking

    BREAKING CHANGE to the experimental Container API only

Security

23 advisories affect 4.16.6; 7.4.5 fixes them

18 more

Release note

Patch Changes

  • Improve error message when inferSize is used in local images with the Image component

  • Fixes a case where environment variables would not be refreshed when using astro:env

  • Breaking

    BREAKING CHANGE to the experimental Container API only

    Changes the default page rendering behavior of Astro components in containers, and adds a new option partial: false to render full Astro pages as before.

    Previously, the Container API was rendering all Astro components as if they were full Astro pages containing <!DOCTYPE html> by default. This was not intended, and now by default, all components will render as page partials: only the contents of the components without a page shell.

    To render the component as a full-fledged Astro page, pass a new option called partial: false to renderToString() and renderToResponse():

    import { experimental_AstroContainer as AstroContainer } from 'astro/container';
    import Card from '../src/components/Card.astro';
    
    const container = AstroContainer.create();
    
    await container.renderToString(Card); // the string will not contain `<!DOCTYPE html>`
    await container.renderToString(Card, { partial: false }); // the string will contain `<!DOCTYPE html>`

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.