You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#176119bc3207 Thanks @thelazylamaGit! - Fixes component styles rendered from content entries remaining stale until a second save when an adapter uses Astro's fallback development environment
#176342267eee Thanks @astrobot-houston! - Fixes incremental builds dropping optimized images for cached pages when using a collectStaticImages prerenderer (e.g. @astrojs/cloudflare with compile-time image optimization)
#176504cdf128 Thanks @astrobot-houston! - Fixes intermittent ImageNotFound errors during build on projects with many images. The build now limits concurrent image file reads to avoid exhausting OS file descriptors (EMFILE) and retries transient I/O errors with backoff. Non-transient errors are no longer silently swallowed.
#176832378221 Thanks @astrobot-houston! - Fixes prerenderConflictBehavior not applying to content collection duplicate ID warnings in the glob() and file() loaders. Setting it to 'error' now throws during content sync, and 'ignore' suppresses the warning.
#1765990c6ea4 Thanks @astrobot-houston! - Fixes the Fonts API breaking experimental.incrementalBuild caching by embedding a build-local, randomly-assigned server port in generated code used for the dependency hash
#17630fd1d9ee Thanks @ericclemmons! - Fixes incremental builds becoming prohibitively slow for sites with many pages or content entries that share a large dependency graph.
#1769093beecc Thanks @NgoQuocViet2001! - Prevents files in directories whose names start with pages from being treated as page routes
#1767109f0dc7 Thanks @tarikermis! - Fixes astro dev refusing to start after a Docker container restart when an unrelated process reuses the PID from a persisted lock file. Astro now checks the process command across platforms, so stale lock files are cleaned up and --force does not signal the unrelated process.
#176127133730 Thanks @thelazylamaGit! - Fixes CSS hot module replacement after navigating between pages with ClientRouter
#176284ada248 Thanks @astrobot-houston! - Fixes a CSP violation when using both security.csp and experimental.clientPrerender with data-astro-prefetch links. The dynamically injected <script type="speculationrules"> now uses a static "source": "document" approach with a CSS selector, producing a deterministic payload that is hashed and included in the CSP script-src directive at build time.
#1760589e4647 Thanks @ashleigh-yeoman! - Fixes middleware HMR not responding to changes in imported modules. Previously, only direct edits to the middleware file would trigger a reload.
#17582bd2c1a5 Thanks @astrobot-houston! - Fixes a regression where content collection reference() fields silently accepted entry IDs that don't exist, such as an ID that doesn't match a loader's slugified version of it. Astro now logs an error for references that point to a missing entry after all loaders finish syncing.
#1766197b0cc7 Thanks @ArmandPhilippot! - Improves Markdown options documentation with links to the Markdown guide and official processors.
#173494328c73 Thanks @astrobot-houston! - Fixes an issue where requests handled by the dev prerender environment (e.g. /_image with @astrojs/cloudflare's prerenderEnvironment: 'node') returned a 500 when a prerendered catch-all route existed, because non-prerendered route modules were imported in an environment where their runtime-specific APIs are unavailable
#17603722eed6 Thanks @astrobot-houston! - Fixes <video> and <audio> elements being non-functional after navigating via view transitions (<ClientRouter />)
#176163a890d2 Thanks @lazerg! - Fixes experimental.incrementalBuild re-rendering unchanged routes that import more than one asset. The route's dependency hash depended on the order the assets finished building, so two builds of identical sources could produce different hashes. The hash is now based on the file name each asset resolves to.
#17547fba468c Thanks @dmgawel! - Improves getCollection() and getEntry() performance for entries without local image references
#1760216e0d9d Thanks @astrobot-houston! - Fixes a build error caused by hash collisions in generated content collection image import identifiers
#171740224a3a Thanks @matthewp! - Adds the astro preview --background flag to start preview servers as background processes.
This makes preview servers easier to manage from scripts and AI coding agents because the command returns after the server is ready instead of keeping the terminal attached to the long-running process.
astro preview --background
When a preview server is running in the background, you can inspect or stop it with new astro preview subcommands:
If Astro detects that astro preview is being run by an AI coding agent, background mode is enabled automatically. This matches the existing behavior for astro dev, allowing agents to continue working after the preview server starts while still receiving the server URL and process ID.
To opt out of automatic background mode for preview servers, set ASTRO_PREVIEW_BACKGROUND=0 before running astro preview.
Previously, pointing logger.entrypoint at a custom log handler living in your own project required building an absolute URL. You can now write the path directly:
Paths starting with ./ or ../ are resolved against your project root. Package specifiers such as @org/astro-logger, absolute paths, and URL entrypoints keep working as before.
#17084961bbe5 Thanks @matthewp! - Widens the AstroPrerendererrender() return type so prerenderers can report incremental-build metadata
A prerenderer's render() may now resolve to either a Response (as before) or a PrerenderResult object that pairs the response with the content entries and optimized-image transforms the page resolved. This lets prerenderers that render out of process (for example, in an adapter's runtime like workerd) report those dependencies back to the build, so incremental static builds can track and replay them for skipped pages.
This is a non-breaking widening: prerenderers that return a bare Response continue to work unchanged, and in-process prerenderers can keep returning a Response since the build collects their metadata directly.
#1687190c98ae Thanks @adamchal! - Adds session: false in astro.config to opt out of session support. Projects that do not set session: false see no behavior change.
The session runtime and dependencies (unstorage) are now tree-shaken out of the SSR bundle for any project where no session driver is wired via:
session: false
no session config at all
a session config without a driver
Useful for serverless/edge runtimes where cold-start parse time is sensitive.
#17084961bbe5 Thanks @matthewp! - Adds experimental support for incremental static builds with experimental.incrementalBuild.
When enabled, Astro can skip regenerating static pages from dynamic routes when both the page's module dependencies and its data cache key are unchanged from the previous build. This currently applies to pages returned from getStaticPaths() that include a cacheKey.
For incremental builds to skip rendering in CI, Astro's cache directory must be preserved between builds. Astro empties the output directory on each build and restores skipped pages from the cache directory, so only that directory needs to persist. For the default config, cache and restore node_modules/.astro/ before running astro build.
#17084961bbe5 Thanks @matthewp! - Adds the optional digest property to content collection entries.
Loaders can provide an opaque digest value that changes when an entry changes. This is now reflected in the CollectionEntry type returned by getCollection() and getEntry(), making it easier to detect content changes without re-hashing large entry bodies.
#17529d52a787 Thanks @QVinto! - Fixes astro dev crashing with Invalid URL when --host is set to a specific non-loopback address
Vite only reports a local URL for loopback hosts. When the dev server was started with --host <custom-address> bound to a specific non-loopback address (a LAN or Tailscale IP, for example), the URL was reported under network and local was empty, so writing the dev lock file threw Invalid URL and killed a server that had already started successfully.
The lock file URL now falls back to the network URL, and a server that exposes no URL at all is left untracked rather than being taken down by lock file bookkeeping.
#17566296248c Thanks @astrobot-houston! - Fixes fontProviders.googleicons() returning the full icon font (~3.9MB) instead of only the requested glyphs when multiple experimental.glyphs are specified
#17560ef45de1 Thanks @astrobot-houston! - Fixes Astro.url.pathname for non-index pages when using build.format: 'preserve'. Previously, a page like src/pages/about-me.astro would output to dist/about-me.html but Astro.url.pathname would incorrectly return /about-me/ instead of /about-me.html.
#175730089f83 Thanks @astrobot-houston! - Fixes a Content Layer build crash that could occur when another dependency causes an older version of neotraverse to be hoisted to the project root
#17571116f700 Thanks @astrobot-houston! - Fixes cookies set via Astro.cookies.set() inside a custom 404.astro or 500.astro error page being silently dropped from the final response
#175793ea55ce Thanks @bluwy! - Supports the devEngines field in package.json when detecting the package manager for install commands
#17422e4e2037 Thanks @jiwonyoon-dev! - Fixes popover being rendered as popover="true"/popover="false" on custom elements (tag names containing a hyphen). Per the Popover API, the attribute only accepts "auto", "manual", or being absent, so boolean values are now always rendered as a bare popover attribute (or omitted), regardless of the tag name.
#175247613030 Thanks @matthewp! - Fixes a bug where an error while finalizing a request could prevent a response from being sent
#17480f61ba9c Thanks @florian-lefebvre! - Fixes a case where a custom logger.entrypoint failed to load at runtime in a built server bundle.
#17525e614b7b Thanks @matthewp! - Fixes action path resolution so that properties of a resolved action function are not treated as routable path segments
#17284c775c1f Thanks @matthewp! - Fixes a bug where the custom 404 (or 500) page was not rendered when a middleware rewrite targeted a route that returned an empty 404/500 response, and a blank page was returned instead
#17488d4f266d Thanks @emerson-d-lopes! - Fixes duplicate CSS files being emitted in server output when a prerendered page and a server-rendered page share the same styles (e.g. a shared layout importing Tailwind). The prerender and SSR environments each emitted their own copy of the same stylesheet (index.X.css and _..Y.css); the SSR build now reuses the CSS asset filename from the prerender build when the stylesheet is backed by the same CSS source modules, so only a single file is emitted.
#174724dc590c Thanks @astrobot-houston! - Adds the missing background prop to the <Image /> and <Picture /> component types. The prop already worked at runtime, but was absent from the types, causing astro check to report that background does not exist on the component props
#172920fc519d Thanks @astrobot-houston! - Fixes missing scoped styles for child components inside client:only islands in production builds
#17421f1448de Thanks @iamkaleemsajjad-hue! - Fixes session runtime errors being silently swallowed by console.error instead of routing through Astro's logger
#17421f1448de Thanks @iamkaleemsajjad-hue! - Fixes a session being left in a partial state after a storage failure during session.regenerate(), preventing unnecessary storage reads on subsequent operations
#1751782bf7e2 Thanks @Hashim1999164! - Prevents a visible terminal window from popping up on Windows when the dev server runs in background mode. The detached child process is now spawned with windowsHide: true, so console-subsystem grandchildren (such as workerd.exe) no longer get a new focus-stealing window allocated by Windows Terminal.
#17510eaa1fb0 Thanks @astrobot-houston! - Fixes the glob() loader watcher so negation patterns like !docs/drafts/** correctly exclude files during development, matching the behavior of the initial scan. Previously, negations were treated as independent matchers, causing unrelated files (including .astro/data-store.json) to be ingested as collection entries
#17427630b382 Thanks @astrobot-houston! - Fixes image optimization during astro build using too many parallel processes in CPU-limited containers. Builds now respect the container's CPU limit, reducing peak memory usage and avoiding out-of-memory crashes.
#17445a5f7230 Thanks @ocavue! - Updates dependency cookie to v2. Cookie values made entirely of URL-safe characters are no longer percent-encoded in Set-Cookie headers; encoded values round-trip exactly as before.
#17402a89c137 Thanks @farrosfr! - Fixes a bug where mutated Astro.locals during the request lifecycle are lost and not passed to custom error pages (404.astro/500.astro)
#1740591992ef Thanks @Araluma! - Prevents an unhandled promise rejection from the prefetch fetch fallback. In WebKit (Safari), <link rel="prefetch"> is unsupported, so prefetch uses the fetch() fallback; on a flaky connection that fetch rejects with TypeError: Load failed, and because the promise was not awaited or caught, it surfaced as an unhandled rejection to the page's global error handlers. The best-effort prefetch now swallows the failure with .catch().
When set to true, renderable entries (such as Markdown) are not rendered during content sync. Instead, rendering is deferred until the entry is actually rendered in a page, using the same on-demand path that .mdx files already use.
This reduces memory usage during astro build for large collections whose rendered output is much larger than the source — for example, Markdown that uses heavy rehype plugins like rehype-katex. Such builds could previously run out of memory while storing the eagerly-rendered HTML for every entry.
By default deferRender is false, preserving the existing behavior of rendering entries eagerly during sync so their rendered HTML can be cached across builds.
#1729630698a2 Thanks @ematipico! - Adds a new experimental collectionStorage option for controlling how the content layer persists its data store
By default, Astro serializes the entire content layer data store to a single file (.astro/data-store.json). For very large content collections, this file can grow large enough to hit platform file-size limits.
Set experimental.collectionStorage: 'chunked' to instead split the data store across many smaller, content-addressed files inside a .astro/data-store/ directory, described by a manifest:
Because each part file is named by a hash of its contents, unchanged parts keep the same name across builds and are not rewritten, and identical parts are deduplicated. The default value is 'single-file', which preserves the current behavior.
#1721444c4989 Thanks @ematipico! - Adds support for the more specific CSP directives script-src-elem, script-src-attr, style-src-elem, and style-src-attr through a new kind option.
Previously, CSP was only scoped to generic script-src/style-src directives. Now each source or hash can be scoped to a narrower directive — for example, to allow inline style attributes (such as those from define:vars or Shiki) without loosening the policy for your <style> and <link> elements.
Scoping sources and hashes in your config
Each entry in resources and hashes can be an object with a kind property. Depending on whether you use scriptDirective or styleDirective, "element" targets script-src-elem or style-src-elem, "attribute" targets script-src-attr or style-src-attr, and "default" (the same as a bare string or hash) targets script-src or style-src.
#1725884814d4 Thanks @astrobot-houston! - Adds a new format() option to the paginate utility. The format() option is a function that accepts the current URL of the page, and returns a new URL.
For example, when your host only supports URLs using the .html extension, you can use format() to add it to the generated URLs:
---exportasyncfunction getStaticPaths({ paginate }) {// Load your data with fetch(), getCollection(), etc.const response =awaitfetch(`https://pokeapi.co/api/v2/pokemon?limit=150`);const result =awaitresponse.json();const allPokemon =result.results;// Return a paginated collection of paths for all itemsreturnpaginate(allPokemon, { pageSize: 10,format: (url) =>`${url}.html`, });}const { page } =Astro.props;---
#173317db6420 Thanks @matthewp! - Adds a --ignore-lock flag to astro dev for starting a dev server without checking or writing the lock file, so it can run alongside an already-running dev server for the same project.
The new instance is not tracked by astro dev stop, astro dev status, or astro dev logs. --ignore-lock cannot be combined with --background (or an auto-detected AI agent environment, which runs dev servers in the background automatically) or --force, since those rely on the lock file.
#173324407483 Thanks @astrobot-houston! - Fixes the JSON logger crashing with process is not defined in non-Node runtimes like Cloudflare's workerd. The JSON logger now uses console.log/console.error instead of process.stdout/process.stderr, matching the pattern already used by the console logger.
#17286a249317 Thanks @astrobot-houston! - Fixes the first browser visit after astro dev starts triggering an immediate full page reload
#17369a94d4a5 Thanks @adamchal! - Fixes an issue where a client island could permanently fail to hydrate if the first attempt to load its component failed. Islands now reliably recover from transient import failures, which previously did not work for React components during astro dev.
#173633f4efc5 Thanks @astrobot-houston! - Fixes astro preview --open not opening a browser when using an adapter with a custom preview entrypoint, such as @astrojs/cloudflare
#17313e2e319d Thanks @ronits2407! - Exposes the AstroRuntimeLogger interface to allow users to properly type the logger functions at runtime.
#17328025cc74 Thanks @matthewp! - Fixes astro dev --force not replacing an already-running dev server
#173532bba277 Thanks @ematipico! - Updates the Astro compiler to the latest version, which fixes many regressions. Refer to the changelog for more details.
#1734479a41e0 Thanks @adamchal! - Improves rendering performance for pages with many component instances, such as repeated MDX <Content /> components.
#1731823a4120 Thanks @astrobot-houston! - Fixes CSS module scoped-name hash mismatch in astro dev when using vite.css.transformer: 'lightningcss' with content collections. Previously, a component importing a CSS module and rendered via content collection render() would get different class name hashes in the element and the injected <style> tag, causing styles not to apply.
#173234298883 Thanks @ematipico! - Fixes a dev server memory leak which caused Node.js to emit warnings in the console.
#173234298883 Thanks @ematipico! - Fixes a dev server crash when a .html or /index.html suffixed request (such as those netlify dev probes as pretty-URL fallbacks) matched a dynamic endpoint route, causing a TypeError: Missing parameter error
#17325cebc404 Thanks @astrobot-houston! - Fixes a bug where CSS @import rules could end up mid-stylesheet after inline CSS chunks were merged during build, causing browsers to silently ignore them
#173234298883 Thanks @ematipico! - Fixes a build regression that could leave unresolved preload markers in inlined scripts with external dynamic imports
#1726179aa99c Thanks @astrobot-houston! - Fixes a false deprecation warning for markdown.gfm and markdown.smartypants when using the Container API
#17247f94280d Thanks @chatman-media! - Fixes route generation throwing "Missing parameter" (or silently dropping the segment) when a dynamic param's value is 0. The generator used truthy checks instead of checking for undefined, so paginate(posts, { params: { categoryId: 0 } }) would crash even though 0 is a perfectly valid param value.
#172786f11739 Thanks @astrobot-houston! - Fixes missing CSS for virtual style modules (e.g., responsive image layout styles) in dev mode when JavaScript is disabled
#172500b30b35 Thanks @matthewp! - Fixes the security.checkOrigin check so it is applied consistently to Astro Actions and on-demand endpoints, regardless of how the request pipeline is composed. Previously, the origin check could be skipped in the composable astro/hono pipeline depending on the order of the middleware() primitive (or when it was omitted).
#172748c3579b Thanks @astrobot-houston! - Fixes missing render() type overload for live collection entries. Previously, calling render() on a LiveDataEntry produced a TypeScript error when using only live.config.ts without a content.config.ts.
#172574208297 Thanks @astrobot-houston! - Fixes astro check failing to find @astrojs/check and typescript when astro is installed in a directory outside the project tree (e.g. pnpm virtual store)
#17272b428648 Thanks @matthewp! - Fixes island component paths so that extensionless imports (e.g. import { Counter } from '../components/Counter') resolve to the real file on disk, matching Vite's extension order and directory index resolution. This makes the include/exclude options of JSX renderer integrations (React, Preact, Solid) match components imported without a file extension, and removes the spurious React 19 "Invalid hook call" warning logged on every request in dev when include was set alongside another JSX renderer
#172792aeaa44 Thanks @astrobot-houston! - Fixes a bug where <Picture inferSize> with a remote image could fail with FailedToFetchRemoteImageDimensions when the image server rate-limits requests (e.g. HTTP 429). Remote dimensions are now resolved once per render instead of once per output format.
#172515240e26 Thanks @matthewp! - Hardens the handling of attribute rendering when using with custom elements.
#17248429bd62 Thanks @astrobot-houston! - Fixes a crash when using Astro's getViteConfig with Vitest browser mode (e.g., Storybook vitest runner). Astro now skips dev server setup inside Vitest, preventing errors.
#1726014524c0 Thanks @matthewp! - Fixes a regression where a <script> inside a component rendered through Astro.slots.render() was hoisted out of its original position instead of staying next to its component content
#172429c05ba4 Thanks @matthewp! - Fixes an error that could occur after the dev server restarts when using an adapter such as @astrojs/cloudflare, where a request would fail with a 500 referencing a missing pre-bundled dependency:
The file does not exist at "node_modules/.vite/deps_ssr/astro_compiler-runtime.js?v=6419660d" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
#17202c6d254d Thanks @matthewp! - Refactors path alias resolution to use Vite's native tsconfigPaths option
This is an internal change with no expected impact on user projects. Astro now defers tsconfig and jsconfig paths alias resolution to Vite, keeping a small fallback for a few CSS cases Vite does not yet handle.
#1712372e29bd Thanks @martrapp! - Fixes an issue where the ClientRouter wipes head elements after page transitions if the <head> contains a server:defer component.
#17232257505e Thanks @matthewp! - Fixes a bug where <style> tags from components such as a content collection's Content could be silently dropped from the output when an await appeared before the component in an .astro file's markup.
#17193a7352fd Thanks @jan-kubica! - Fixes the background dev server failing to start when astro is hoisted outside the project's node_modules (for example bun workspaces). The background process is now spawned from Astro's own resolved location instead of a path assumed under the project root.
Next steps: Take a moment to review the security alert above. Review
the linked package source code to understand the potential risk. Ensure the
package is not malicious before proceeding. If you're unsure how to proceed,
reach out to your security team or ask the Socket team for help at
support@socket.dev.
Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.
Mark the package as acceptable risk. To ignore this alert only
in this pull request, reply with the comment
@SocketSecurity ignore npm/@emnapi/runtime@1.11.1. You can
also ignore all packages with @SocketSecurity ignore-all.
To ignore an alert for all future pull requests, use Socket's Dashboard to
change the triage state of this alert.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^4.0.0→^7.0.0Release Notes
withastro/astro (astro)
v7.2.2Compare Source
Patch Changes
#17611
9bc3207Thanks @thelazylamaGit! - Fixes component styles rendered from content entries remaining stale until a second save when an adapter uses Astro's fallback development environment#17634
2267eeeThanks @astrobot-houston! - Fixes incremental builds dropping optimized images for cached pages when using acollectStaticImagesprerenderer (e.g.@astrojs/cloudflarewith compile-time image optimization)#17650
4cdf128Thanks @astrobot-houston! - Fixes intermittentImageNotFounderrors during build on projects with many images. The build now limits concurrent image file reads to avoid exhausting OS file descriptors (EMFILE) and retries transient I/O errors with backoff. Non-transient errors are no longer silently swallowed.#17683
2378221Thanks @astrobot-houston! - FixesprerenderConflictBehaviornot applying to content collection duplicate ID warnings in theglob()andfile()loaders. Setting it to'error'now throws during content sync, and'ignore'suppresses the warning.#17659
90c6ea4Thanks @astrobot-houston! - Fixes the Fonts API breakingexperimental.incrementalBuildcaching by embedding a build-local, randomly-assigned server port in generated code used for the dependency hash#17630
fd1d9eeThanks @ericclemmons! - Fixes incremental builds becoming prohibitively slow for sites with many pages or content entries that share a large dependency graph.#17690
93beeccThanks @NgoQuocViet2001! - Prevents files in directories whose names start withpagesfrom being treated as page routes#17671
09f0dc7Thanks @tarikermis! - Fixesastro devrefusing to start after a Docker container restart when an unrelated process reuses the PID from a persisted lock file. Astro now checks the process command across platforms, so stale lock files are cleaned up and--forcedoes not signal the unrelated process.v7.2.1Compare Source
Patch Changes
#17612
7133730Thanks @thelazylamaGit! - Fixes CSS hot module replacement after navigating between pages withClientRouter#17628
4ada248Thanks @astrobot-houston! - Fixes a CSP violation when using bothsecurity.cspandexperimental.clientPrerenderwithdata-astro-prefetchlinks. The dynamically injected<script type="speculationrules">now uses a static"source": "document"approach with a CSS selector, producing a deterministic payload that is hashed and included in the CSPscript-srcdirective at build time.#17605
89e4647Thanks @ashleigh-yeoman! - Fixes middleware HMR not responding to changes in imported modules. Previously, only direct edits to the middleware file would trigger a reload.#17582
bd2c1a5Thanks @astrobot-houston! - Fixes a regression where content collectionreference()fields silently accepted entry IDs that don't exist, such as an ID that doesn't match a loader's slugified version of it. Astro now logs an error for references that point to a missing entry after all loaders finish syncing.#17661
97b0cc7Thanks @ArmandPhilippot! - Improves Markdown options documentation with links to the Markdown guide and official processors.#17349
4328c73Thanks @astrobot-houston! - Fixes an issue where requests handled by the dev prerender environment (e.g./_imagewith@astrojs/cloudflare'sprerenderEnvironment: 'node') returned a 500 when a prerendered catch-all route existed, because non-prerendered route modules were imported in an environment where their runtime-specific APIs are unavailable#17603
722eed6Thanks @astrobot-houston! - Fixes<video>and<audio>elements being non-functional after navigating via view transitions (<ClientRouter />)#17616
3a890d2Thanks @lazerg! - Fixesexperimental.incrementalBuildre-rendering unchanged routes that import more than one asset. The route's dependency hash depended on the order the assets finished building, so two builds of identical sources could produce different hashes. The hash is now based on the file name each asset resolves to.#17547
fba468cThanks @dmgawel! - ImprovesgetCollection()andgetEntry()performance for entries without local image references#17602
16e0d9dThanks @astrobot-houston! - Fixes a build error caused by hash collisions in generated content collection image import identifiersv7.2.0Compare Source
Minor Changes
#17174
0224a3aThanks @matthewp! - Adds theastro preview --backgroundflag to start preview servers as background processes.This makes preview servers easier to manage from scripts and AI coding agents because the command returns after the server is ready instead of keeping the terminal attached to the long-running process.
When a preview server is running in the background, you can inspect or stop it with new
astro previewsubcommands:If Astro detects that
astro previewis being run by an AI coding agent, background mode is enabled automatically. This matches the existing behavior forastro dev, allowing agents to continue working after the preview server starts while still receiving the server URL and process ID.To opt out of automatic background mode for preview servers, set
ASTRO_PREVIEW_BACKGROUND=0before runningastro preview.#17532
7f94895Thanks @florian-lefebvre! - Adds support for paths relative to your project root inlogger.entrypointPreviously, pointing
logger.entrypointat a custom log handler living in your own project required building an absoluteURL. You can now write the path directly:// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ logger: { - entrypoint: new URL('./src/logger.js', import.meta.url), + entrypoint: './src/logger.js', }, });Paths starting with
./or../are resolved against your project root. Package specifiers such as@org/astro-logger, absolute paths, andURLentrypoints keep working as before.#17084
961bbe5Thanks @matthewp! - Widens theAstroPrerendererrender()return type so prerenderers can report incremental-build metadataA prerenderer's
render()may now resolve to either aResponse(as before) or aPrerenderResultobject that pairs the response with the content entries and optimized-image transforms the page resolved. This lets prerenderers that render out of process (for example, in an adapter's runtime like workerd) report those dependencies back to the build, so incremental static builds can track and replay them for skipped pages.This is a non-breaking widening: prerenderers that return a bare
Responsecontinue to work unchanged, and in-process prerenderers can keep returning aResponsesince the build collects their metadata directly.#16871
90c98aeThanks @adamchal! - Addssession: falseinastro.configto opt out of session support. Projects that do not setsession: falsesee no behavior change.The session runtime and dependencies (
unstorage) are now tree-shaken out of the SSR bundle for any project where no session driver is wired via:session: falsesessionconfig at allsessionconfig without a driverUseful for serverless/edge runtimes where cold-start parse time is sensitive.
#17084
961bbe5Thanks @matthewp! - Adds experimental support for incremental static builds withexperimental.incrementalBuild.When enabled, Astro can skip regenerating static pages from dynamic routes when both the page's module dependencies and its data cache key are unchanged from the previous build. This currently applies to pages returned from
getStaticPaths()that include acacheKey.Return a
cacheKeyfor each generated page fromgetStaticPaths():For incremental builds to skip rendering in CI, Astro's cache directory must be preserved between builds. Astro empties the output directory on each build and restores skipped pages from the cache directory, so only that directory needs to persist. For the default config, cache and restore
node_modules/.astro/before runningastro build.See the experimental incremental static builds documentation for more information.
#17084
961bbe5Thanks @matthewp! - Adds the optionaldigestproperty to content collection entries.Loaders can provide an opaque digest value that changes when an entry changes. This is now reflected in the
CollectionEntrytype returned bygetCollection()andgetEntry(), making it easier to detect content changes without re-hashing large entry bodies.The property is optional because not every loader provides a digest. See incremental static builds for how
digestcan be used as acacheKey.Patch Changes
#17534
5a5337eThanks @florian-lefebvre! - Improveslogger.entrypointreference docs#17529
d52a787Thanks @QVinto! - Fixesastro devcrashing withInvalid URLwhen--hostis set to a specific non-loopback addressVite only reports a
localURL for loopback hosts. When the dev server was started with--host <custom-address>bound to a specific non-loopback address (a LAN or Tailscale IP, for example), the URL was reported undernetworkandlocalwas empty, so writing the dev lock file threwInvalid URLand killed a server that had already started successfully.The lock file URL now falls back to the network URL, and a server that exposes no URL at all is left untracked rather than being taken down by lock file bookkeeping.
#17566
296248cThanks @astrobot-houston! - FixesfontProviders.googleicons()returning the full icon font (~3.9MB) instead of only the requested glyphs when multipleexperimental.glyphsare specified#17560
ef45de1Thanks @astrobot-houston! - FixesAstro.url.pathnamefor non-index pages when usingbuild.format: 'preserve'. Previously, a page likesrc/pages/about-me.astrowould output todist/about-me.htmlbutAstro.url.pathnamewould incorrectly return/about-me/instead of/about-me.html.#17573
0089f83Thanks @astrobot-houston! - Fixes a Content Layer build crash that could occur when another dependency causes an older version ofneotraverseto be hoisted to the project root#17571
116f700Thanks @astrobot-houston! - Fixes cookies set viaAstro.cookies.set()inside a custom404.astroor500.astroerror page being silently dropped from the final response#17579
3ea55ceThanks @bluwy! - Supports thedevEnginesfield in package.json when detecting the package manager for install commands#17422
e4e2037Thanks @jiwonyoon-dev! - Fixespopoverbeing rendered aspopover="true"/popover="false"on custom elements (tag names containing a hyphen). Per the Popover API, the attribute only accepts"auto","manual", or being absent, so boolean values are now always rendered as a barepopoverattribute (or omitted), regardless of the tag name.v7.1.6Compare Source
Patch Changes
#17536
ff97b86Thanks @dmgawel! - Fixes concurrent static builds failing to generate i18n rewrite fallbacks for dynamic routes#17383
296e1b0Thanks @thelazylamaGit! - Fixes stale dev CSS after editing component style blocks and CSS files in dev#17543
bbc1ec9Thanks @ematipico! - Adds a feature toexperimental.collectionStoragethat allows to change the size of chunks.For example, you can reduce the size of chunks to 1MB:
#17545
5214663Thanks @ematipico! - Bumps the Astro compiler to the latest version. Changelog.v7.1.5Compare Source
Patch Changes
#17524
7613030Thanks @matthewp! - Fixes a bug where an error while finalizing a request could prevent a response from being sent#17480
f61ba9cThanks @florian-lefebvre! - Fixes a case where a customlogger.entrypointfailed to load at runtime in a built server bundle.#17525
e614b7bThanks @matthewp! - Fixes action path resolution so that properties of a resolved action function are not treated as routable path segments#17284
c775c1fThanks @matthewp! - Fixes a bug where the custom 404 (or 500) page was not rendered when a middleware rewrite targeted a route that returned an empty 404/500 response, and a blank page was returned instead#17474
c895b12Thanks @nicksnyder! - Updates dependencyjs-yamlto v4.3.0Updated dependencies [
c895b12]:v7.1.4Compare Source
Patch Changes
#17488
d4f266dThanks @emerson-d-lopes! - Fixes duplicate CSS files being emitted in server output when a prerendered page and a server-rendered page share the same styles (e.g. a shared layout importing Tailwind). The prerender and SSR environments each emitted their own copy of the same stylesheet (index.X.cssand_..Y.css); the SSR build now reuses the CSS asset filename from the prerender build when the stylesheet is backed by the same CSS source modules, so only a single file is emitted.#17472
4dc590cThanks @astrobot-houston! - Adds the missingbackgroundprop to the<Image />and<Picture />component types. The prop already worked at runtime, but was absent from the types, causingastro checkto report thatbackgrounddoes not exist on the component props#17292
0fc519dThanks @astrobot-houston! - Fixes missing scoped styles for child components insideclient:onlyislands in production builds#17421
f1448deThanks @iamkaleemsajjad-hue! - Fixes session runtime errors being silently swallowed byconsole.errorinstead of routing through Astro's logger#17421
f1448deThanks @iamkaleemsajjad-hue! - Fixes a session being left in a partial state after a storage failure duringsession.regenerate(), preventing unnecessary storage reads on subsequent operations#17517
82bf7e2Thanks @Hashim1999164! - Prevents a visible terminal window from popping up on Windows when the dev server runs in background mode. The detached child process is now spawned withwindowsHide: true, so console-subsystem grandchildren (such asworkerd.exe) no longer get a new focus-stealing window allocated by Windows Terminal.#17510
eaa1fb0Thanks @astrobot-houston! - Fixes theglob()loader watcher so negation patterns like!docs/drafts/**correctly exclude files during development, matching the behavior of the initial scan. Previously, negations were treated as independent matchers, causing unrelated files (including.astro/data-store.json) to be ingested as collection entries#17511
704e570Thanks @astrobot-houston! - Fixes TypeScript path aliases fromtsconfig.jsonnot resolving inastro.config.tsv7.1.3Compare Source
Patch Changes
630b382Thanks @astrobot-houston! - Fixes image optimization duringastro buildusing too many parallel processes in CPU-limited containers. Builds now respect the container's CPU limit, reducing peak memory usage and avoiding out-of-memory crashes.v7.1.2Compare Source
Patch Changes
#17445
a5f7230Thanks @ocavue! - Updates dependencycookieto v2. Cookie values made entirely of URL-safe characters are no longer percent-encoded inSet-Cookieheaders; encoded values round-trip exactly as before.#17402
a89c137Thanks @farrosfr! - Fixes a bug where mutatedAstro.localsduring the request lifecycle are lost and not passed to custom error pages (404.astro/500.astro)#17405
91992efThanks @Araluma! - Prevents an unhandled promise rejection from the prefetchfetchfallback. In WebKit (Safari),<link rel="prefetch">is unsupported, so prefetch uses thefetch()fallback; on a flaky connection that fetch rejects withTypeError: Load failed, and because the promise was not awaited or caught, it surfaced as an unhandled rejection to the page's global error handlers. The best-effort prefetch now swallows the failure with.catch().v7.1.1Compare Source
Patch Changes
4b03702Thanks @matthewp! - Fixes encoded request paths being routed incorrectly when using domain-based i18nv7.1.0Compare Source
Minor Changes
#17302
5f4dc03Thanks @astrobot-houston! - Adds a newdeferRenderoption to theglob()content loaderWhen set to
true, renderable entries (such as Markdown) are not rendered during content sync. Instead, rendering is deferred until the entry is actually rendered in a page, using the same on-demand path that.mdxfiles already use.This reduces memory usage during
astro buildfor large collections whose rendered output is much larger than the source — for example, Markdown that uses heavy rehype plugins likerehype-katex. Such builds could previously run out of memory while storing the eagerly-rendered HTML for every entry.By default
deferRenderisfalse, preserving the existing behavior of rendering entries eagerly during sync so their rendered HTML can be cached across builds.#17296
30698a2Thanks @ematipico! - Adds a new experimentalcollectionStorageoption for controlling how the content layer persists its data storeBy default, Astro serializes the entire content layer data store to a single file (
.astro/data-store.json). For very large content collections, this file can grow large enough to hit platform file-size limits.Set
experimental.collectionStorage: 'chunked'to instead split the data store across many smaller, content-addressed files inside a.astro/data-store/directory, described by a manifest:Because each part file is named by a hash of its contents, unchanged parts keep the same name across builds and are not rewritten, and identical parts are deduplicated. The default value is
'single-file', which preserves the current behavior.#17214
44c4989Thanks @ematipico! - Adds support for the more specific CSP directivesscript-src-elem,script-src-attr,style-src-elem, andstyle-src-attrthrough a newkindoption.Previously,
CSPwas only scoped to genericscript-src/style-srcdirectives. Now each source or hash can be scoped to a narrower directive — for example, to allow inlinestyleattributes (such as those fromdefine:varsor Shiki) without loosening the policy for your<style>and<link>elements.Scoping sources and hashes in your config
Each entry in
resourcesandhashescan be an object with akindproperty. Depending on whether you usescriptDirectiveorstyleDirective,"element"targetsscript-src-elemorstyle-src-elem,"attribute"targetsscript-src-attrorstyle-src-attr, and"default"(the same as a bare string or hash) targetsscript-srcorstyle-src.Scoping at runtime
The same
kindoption is available on the runtime CSP API, where the existing methods now also accept an object:#17258
84814d4Thanks @astrobot-houston! - Adds a newformat()option to thepaginateutility. Theformat()option is a function that accepts the current URL of the page, and returns a new URL.For example, when your host only supports URLs using the
.htmlextension, you can useformat()to add it to the generated URLs:#17331
7db6420Thanks @matthewp! - Adds a--ignore-lockflag toastro devfor starting a dev server without checking or writing the lock file, so it can run alongside an already-running dev server for the same project.The new instance is not tracked by
astro dev stop,astro dev status, orastro dev logs.--ignore-lockcannot be combined with--background(or an auto-detected AI agent environment, which runs dev servers in the background automatically) or--force, since those rely on the lock file.#17389
16de021Thanks @florian-lefebvre! - Allows passing URL entrypoints when configuring the loggerMatching other APIs like session drivers or font providers, the logger entrypoint can now be a URL:
Patch Changes
#17332
4407483Thanks @astrobot-houston! - Fixes the JSON logger crashing withprocess is not definedin non-Node runtimes like Cloudflare's workerd. The JSON logger now usesconsole.log/console.errorinstead ofprocess.stdout/process.stderr, matching the pattern already used by the console logger.#17391
186a1e7Thanks @florian-lefebvre! - Fixes a case where an integration could not update the logger withupdateConfig()#17394
d9f99e1Thanks @matthewp! - Fixes element-specific CSP directives to preserve the existing behavior of configured script and style resources#17374
b2d1b3eThanks @astrobot-houston! - Fixes dev server returning 404 for?urlimported assets when accessed via browser navigation#17390
ed71eafThanks @florian-lefebvre! - Removes an unused and undocumented generic from theAstroLoggerDestinationtype#17393
092da56Thanks @matthewp! - Hardens generated transition styles, development metadata, and server island URLs when embedding dynamic valuesv7.0.9Compare Source
Patch Changes
#17286
a249317Thanks @astrobot-houston! - Fixes the first browser visit afterastro devstarts triggering an immediate full page reload#17369
a94d4a5Thanks @adamchal! - Fixes an issue where a client island could permanently fail to hydrate if the first attempt to load its component failed. Islands now reliably recover from transient import failures, which previously did not work for React components duringastro dev.v7.0.8Compare Source
Patch Changes
#17363
3f4efc5Thanks @astrobot-houston! - Fixesastro preview --opennot opening a browser when using an adapter with a custom preview entrypoint, such as@astrojs/cloudflare#17313
e2e319dThanks @ronits2407! - Exposes theAstroRuntimeLoggerinterface to allow users to properly type the logger functions at runtime.#17328
025cc74Thanks @matthewp! - Fixesastro dev --forcenot replacing an already-running dev server#17353
2bba277Thanks @ematipico! - Updates the Astro compiler to the latest version, which fixes many regressions. Refer to the changelog for more details.#17344
79a41e0Thanks @adamchal! - Improves rendering performance for pages with many component instances, such as repeated MDX<Content />components.Updated dependencies [
64b0d66]:v7.0.7Compare Source
Patch Changes
#17318
23a4120Thanks @astrobot-houston! - Fixes CSS module scoped-name hash mismatch inastro devwhen usingvite.css.transformer: 'lightningcss'with content collections. Previously, a component importing a CSS module and rendered via content collectionrender()would get different class name hashes in the element and the injected<style>tag, causing styles not to apply.#17323
4298883Thanks @ematipico! - Fixes a dev server memory leak which caused Node.js to emit warnings in the console.#17323
4298883Thanks @ematipico! - Fixes a dev server crash when a.htmlor/index.htmlsuffixed request (such as thosenetlify devprobes as pretty-URL fallbacks) matched a dynamic endpoint route, causing aTypeError: Missing parametererror#17325
cebc404Thanks @astrobot-houston! - Fixes a bug where CSS@importrules could end up mid-stylesheet after inline CSS chunks were merged during build, causing browsers to silently ignore them#17323
4298883Thanks @ematipico! - Fixes a build regression that could leave unresolved preload markers in inlined scripts with external dynamic importsUpdated dependencies [
4298883,4298883]:v7.0.6Compare Source
Patch Changes
#17261
79aa99cThanks @astrobot-houston! - Fixes a false deprecation warning formarkdown.gfmandmarkdown.smartypantswhen using the Container API#17247
f94280dThanks @chatman-media! - Fixes route generation throwing "Missing parameter" (or silently dropping the segment) when a dynamic param's value is0. The generator used truthy checks instead of checking forundefined, sopaginate(posts, { params: { categoryId: 0 } })would crash even though0is a perfectly valid param value.#17278
6f11739Thanks @astrobot-houston! - Fixes missing CSS for virtual style modules (e.g., responsive image layout styles) in dev mode when JavaScript is disabled#17250
0b30b35Thanks @matthewp! - Fixes thesecurity.checkOrigincheck so it is applied consistently to Astro Actions and on-demand endpoints, regardless of how the request pipeline is composed. Previously, the origin check could be skipped in the composableastro/honopipeline depending on the order of themiddleware()primitive (or when it was omitted).#17274
8c3579bThanks @astrobot-houston! - Fixes missingrender()type overload for live collection entries. Previously, callingrender()on aLiveDataEntryproduced a TypeScript error when using onlylive.config.tswithout acontent.config.ts.#17257
4208297Thanks @astrobot-houston! - Fixesastro checkfailing to find@astrojs/checkandtypescriptwhen astro is installed in a directory outside the project tree (e.g. pnpm virtual store)#17272
b428648Thanks @matthewp! - Fixes island component paths so that extensionless imports (e.g.import { Counter } from '../components/Counter') resolve to the real file on disk, matching Vite's extension order and directoryindexresolution. This makes theinclude/excludeoptions of JSX renderer integrations (React, Preact, Solid) match components imported without a file extension, and removes the spurious React 19 "Invalid hook call" warning logged on every request in dev whenincludewas set alongside another JSX renderer#17279
2aeaa44Thanks @astrobot-houston! - Fixes a bug where<Picture inferSize>with a remote image could fail withFailedToFetchRemoteImageDimensionswhen the image server rate-limits requests (e.g. HTTP 429). Remote dimensions are now resolved once per render instead of once per output format.#17251
5240e26Thanks @matthewp! - Hardens the handling of attribute rendering when using with custom elements.#17248
429bd62Thanks @astrobot-houston! - Fixes a crash when using Astro'sgetViteConfigwith Vitest browser mode (e.g., Storybook vitest runner). Astro now skips dev server setup inside Vitest, preventing errors.#17260
14524c0Thanks @matthewp! - Fixes a regression where a<script>inside a component rendered throughAstro.slots.render()was hoisted out of its original position instead of staying next to its component contentUpdated dependencies [
eb6f97e]:v7.0.5Compare Source
Patch Changes
#17242
9c05ba4Thanks @matthewp! - Fixes an error that could occur after the dev server restarts when using an adapter such as@astrojs/cloudflare, where a request would fail with a500referencing a missing pre-bundled dependency:#17202
c6d254dThanks @matthewp! - Refactors path alias resolution to use Vite's nativetsconfigPathsoptionThis is an internal change with no expected impact on user projects. Astro now defers tsconfig and jsconfig
pathsalias resolution to Vite, keeping a small fallback for a few CSS cases Vite does not yet handle.#17123
72e29bdThanks @martrapp! - Fixes an issue where the ClientRouter wipes head elements after page transitions if the<head>contains aserver:defercomponent.#17232
257505eThanks @matthewp! - Fixes a bug where<style>tags from components such as a content collection'sContentcould be silently dropped from the output when anawaitappeared before the component in an.astrofile's markup.#17193
a7352fdThanks @jan-kubica! - Fixes the background dev server failing to start whenastrois hoisted outside the project'snode_modules(for example bun workspaces). The background process is now spawned from Astro's own resolved location instead of a path assumed under the project root.#17255
581d171Thanks @astrobot-houston! - Fixes prefetch not working for links insideserver:defercomponentsv7.0.4Compare Source
Patch Changes
7ba0bb1](https://redirect.github.com/withConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.