Packages

astro

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

Your version

6.1.0

26 Mar 2026Where it was published

6.4.8 is the newest release of 6.x.

In short

2 security3 new15 fixed1 internal

  • Security

    Fixes checkOrigin CSRF protection in astro dev behind a TLS-terminating reverse proxy. The dev server now reads X-Forwarded-Proto (gated on security.allowedDomains, matching production behaviour) so the constructed request origin matches the https:// origin the browser sends. Also ensures security.allowedDomains and security.checkOrigin are respected in dev.

  • Security

    Updates the dependency svgo to the latest, to fix a security issue.

Security

13 advisories affect 6.1.0; 7.4.7 fixes them

8 more

Release note

Minor Changes

  • Allows setting codec-specific defaults for Astro's built-in Sharp image service via image.service.config.

    You can now configure encoder-level options such as jpeg.mozjpeg, webp.effort, webp.alphaQuality, avif.effort, avif.chromaSubsampling, and png.compressionLevel when using astro/assets/services/sharp for compile-time image generation.

    These settings apply as defaults for the built-in Sharp pipeline, while per-image quality still takes precedence when set on <Image />, <Picture />, or getImage().

  • Adds fallbackRoutes to the IntegrationResolvedRoute type, exposing i18n fallback routes to integrations via the astro:routes:resolved hook for projects using fallbackType: 'rewrite'.

    This allows integrations such as the sitemap integration to properly include generated fallback routes in their output.

    {
      'astro:routes:resolved': ({ routes }) => {
        for (const route of routes) {
          for (const fallback of route.fallbackRoutes) {
            console.log(fallback.pathname) // e.g. /fr/about/
          }
        }
      }
    }
  • Adds support for advanced configuration of SmartyPants in Markdown.

    You can now pass an options object to markdown.smartypants in your Astro configuration to fine-tune how punctuation, dashes, and quotes are transformed.

    This is helpful for projects that require specific typographic standards, such as "oldschool" dash handling or localized quotation marks.

    // astro.config.mjs
    export default defineConfig({
      markdown: {
        smartypants: {
          backticks: 'all',
          dashes: 'oldschool',
          ellipses: 'unspaced',
          openingQuotes: { double: '«', single: '‹' },
          closingQuotes: { double: '»', single: '›' },
          quotes: false,
        },
      },
    });

    See the retext-smartypants options for more information.

Patch Changes

  • Instructs the client router to skip view transition animations when the browser is already providing its own visual transition, such as a swipe gesture.

  • Fixes an issue where client:only components could have duplicate client:component-path attributes added in MDX in rare cases

  • Fixes the emitFile() is not supported in serve mode warning that appears during astro dev when using integrations that inject before-hydration scripts (e.g. @astrojs/react)

  • Fixes the dev toolbar a11y audit incorrectly classifying menuitemradio as a non-interactive ARIA role.

  • Fixes experimental.queuedRendering incorrectly escaping the HTML output of .html page files, causing the page content to render as plain text instead of HTML in the browser.

  • Fixes a dev server crash (serverIslandNameMap.get is not a function) that occurred when navigating to a page with server:defer after first visiting a page without one, when using @astrojs/cloudflare

  • Fixes Zod meta not correctly being rendered on top-level schema when converted into JSON Schema

  • Security

    Fixes checkOrigin CSRF protection in astro dev behind a TLS-terminating reverse proxy. The dev server now reads X-Forwarded-Proto (gated on security.allowedDomains, matching production behaviour) so the constructed request origin matches the https:// origin the browser sends. Also ensures security.allowedDomains and security.checkOrigin are respected in dev.

  • Security

    Updates the dependency svgo to the latest, to fix a security issue.

  • Fixes a case where fonts files would unecessarily be copied several times during the build

  • Fix the astro sync error message when getImage() is called while loading content collections.

  • Fixes a build error where using astro:config/client inside a <script> tag would cause Rollup to fail with "failed to resolve import virtual:astro:routes from virtual:astro:manifest"

  • Fixes an issue with the development server, where changes to the middleware weren't picked, and it required a full restart of the server.

  • Fixes a bug where the the role image was incorrectly reported by audit tool bar.

  • Fixes cached assets failing to revalidate due to redirect check mishandling Not Modified responses.

  • Fixes a case where invalid URLs would be generated in development when using font families with an oblique style and angles

  • Warns on dev server startup when Vite 8 is detected at the top level of the user's project, and automatically adds a "overrides": { "vite": "^7" } entry to package.json when running astro add cloudflare. This prevents a require_dist is not a function crash caused by a Vite version split between Astro (requires Vite 7) and packages like @tailwindcss/vite that hoist Vite 8.

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.