Packages

astro

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

Your version

7.3.6

6 Oct 2026Where it was published

7.4.13 is the newest release of 7.x.

In short

1 security2 new32 fixed2 internal

  • Security

    Improves CSRF protection by taking modern browsers headers into account

Security

Release note

Patch Changes

  • Fixes an intermittent dev server crash when using astro:actions inside a server island with adapters that use a pre-bundled SSR environment (e.g. @astrojs/cloudflare)

  • Fixes stale scoped styles during HMR when both markup and <style> are changed in a single save

  • Fixes CSS from other pages leaking into a page's <head> in dev when the page imports a module such as astro:config/server.

  • Fixes a bug where server islands containing framework components rendered empty in the dev server when using a custom src/fetch.ts

  • Fixes the composable i18n() handler from astro/fetch and astro/hono returning an empty 404 for paths without a locale prefix. It now renders the custom 404 page, matching astro().

  • Fixes CSS Module HMR in dev when a component is rendered both with and without hydration on the same page. Astro now uses path-based class name hashing in dev mode so that editing CSS declarations no longer changes the generated selectors, allowing Vite's CSS HMR to update styles without a full page reload.

  • Fixes context.props being null in middleware and endpoints when the composable astro/hono or astro/fetch actions() handler runs before middleware(), or when pages() runs without middleware()

  • Fixes astro build failing on Windows with Node.js 25+ with ERR_INVALID_ARG_VALUE when clearing the output directory hits a transient EPERM error

  • Fixes type errors reported in Astro's built-in <Picture /> and <Font /> components when type-checking a project with tsc and @astrojs/ts-content-mapper

  • Fixes lost request state when Vite discovers server dependencies during a request in Cloudflare dev mode

  • Fixes CSS imported from an injectScript('page') script being dropped during build

  • Fixes a hang when a server:defer component is inside a slot of another component in an MDX content collection entry

  • Fixes the glob() loader skipping content files whose paths contain # or ?

  • Fixes a bug where page routes added with injectRoute() returned a 404 when i18n.routing.prefixDefaultLocale was true and the route path had no locale prefix

  • Fixes content collection changes being ignored in astro dev after the dev server restarts because of a config change

  • Fixes Astro.cookies.get() returning undefined for request cookies with empty values

  • Fixes nondeterministic ordering of the server manifest's assets array, ensuring builds with identical inputs produce byte-identical output

  • Adds YAML parsing with timestamp and merge key support, and formats YAML errors consistently across Astro, Markdown, MDX, and Markdoc.

  • Security

    Improves CSRF protection by taking modern browsers headers into account

  • Fixes a runtime ReferenceError for inlined scripts that import a URL with /* @vite-ignore */.

    Astro now inlines scripts after Vite replaces its preload markers, so ignored dynamic imports can remain inline without shipping an unresolved __VITE_PRELOAD__ reference.

  • Fixes custom View Transition direction names that are not valid CSS identifiers, such as names starting with a digit or containing spaces. These directions now match their animations correctly.

  • Fixes a 404 for a CSS file that a dynamic import preloads when the imported module uses a component that is also a hydrated island on the same page

  • Fixes duplicate CSS in production builds when a component is both server-rendered and used with client:only on the same page

  • Fixes the composable astro/fetch and astro/hono handlers (trailingSlash(), redirects(), actions(), middleware(), and pages()) so they reject over-encoded request paths with a 400 Bad Request, matching astro(). For these requests, redirects() and actions() return the 400 response instead of undefined, so no redirect is issued and no action runs.

  • Fixes Astro.rewrite() and context.rewrite() selecting the wrong route in astro dev when two dynamic routes match the same path

  • Allows Astro CLI commands to install tagged package versions

  • Fixes a dev server dependency scan failure when an .astro file contains a literal <script in frontmatter or a template expression

  • Fixes Astro on StackBlitz and other WebContainer environments

  • Fixes a MODULE_LEVEL_DIRECTIVE warning during build caused by a stale "use astro:head-inject" directive in content collection propagated asset modules

  • Fixes actions returning 500 for malformed JSON request bodies and undecodable action names. A SyntaxError from invalid JSON now returns 400 (BAD_REQUEST), and a URIError from a malformed percent-encoded action name now returns 404 (NOT_FOUND).

  • Validates the Host header against security.allowedDomains when using the Node adapter

  • Fixes the fontsource font provider to resolve variable fonts when using the "Variable" suffix in the font name (e.g. "Inter Variable")

  • Fixes <video muted> losing its muted state after a ClientRouter navigation in Chrome

  • Fixes localized error pages such as src/pages/pt/404.astro returning a 200 status when rendered through the pages() handler from astro/fetch or astro/hono

  • Fixes experimental_AstroContainer output including dev toolbar data-astro-source-file and data-astro-source-loc attributes when rendering components under Vitest

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.