Open
Conversation
b1e5ecb to
c8f804a
Compare
c8f804a to
4ded7cb
Compare
4ded7cb to
8baa932
Compare
|
8baa932 to
7fb9f41
Compare
961691a to
daa05b0
Compare
4130f00 to
e36decc
Compare
407da6e to
d7863bc
Compare
153d422 to
2821f3d
Compare
cb018a7 to
a664b95
Compare
a2938cf to
a98e6b7
Compare
a98e6b7 to
109230d
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
13.0.0-beta.1→13.0.0-beta.126.0.0-beta.3→6.0.0-beta.18Release Notes
withastro/astro (@astrojs/cloudflare)
v13.0.0-beta.12Compare Source
Patch Changes
#15696
a9fd221Thanks @Princesseuh! - Fixes duplicate logging showing up in some cases when prerendering pages#15694
66449c9Thanks @matthewp! - Fixes deployment of static sites with the Cloudflare adapterFixes an issue with detecting and building fully static sites that caused deployment errors when using
output: 'static'with the Cloudflare adapterUpdated dependencies []:
v13.0.0-beta.11Compare Source
Patch Changes
#15495
5b99e90Thanks @leekeh! - Refactors to usemiddlewareModeadapter feature (set toclassic)Updated dependencies []:
v13.0.0-beta.10Compare Source
Patch Changes
#15669
d5a888bThanks @florian-lefebvre! - Removes thecssescdependencyThis CommonJS dependency could sometimes cause errors because Astro is ESM-only. It is now replaced with a built-in ESM-friendly implementation.
#15648
802426bThanks @rururux! - Restore and fix<Code />component functionality on Cloudflare Workers.Updated dependencies []:
v13.0.0-beta.9Compare Source
Major Changes
957b9feThanks @rururux! - Changes the default image service fromcompiletocloudflare-binding. Image services options that resulted in broken images in development due to Node JS incompatiblities have now been updated to use the noop passthrough image service in dev mode. - (Cloudflare v13 and Astro6 upgrade guidance)Minor Changes
#15435
957b9feThanks @rururux! - Adds support for configuring the image service as an object with separatebuildandruntimeoptionsIt is now possible to set both a build-time and runtime service independently. Currently,
'compile'is the only available build time option. The supported runtime options are'passthrough'(default) and'cloudflare-binding':See the Cloudflare adapter
imageServicedocs for more information about configuring your image service.#15556
8fb329bThanks @florian-lefebvre! - Adds support for more@cloudflare/vite-pluginoptionsThe adapter now accepts the following options from Cloudflare's Vite plugin:
auxiliaryWorkersconfigPathinspectorPortpersistStateremoteBindingsexperimental.headersAndRedirectsDevModeSupportFor example, you can now set
inspectorPortto provide a custom port for debugging your Workers:Patch Changes
#15565
30cd6dbThanks @ematipico! - Fixes an issue where the use of theCodecomponent would result in an unexpected error.#15588
425ea16Thanks @rururux! - Fixes an issue whereesbuildwould throw a "Top-level return cannot be used inside an ECMAScript module" error during dependency scanning in certain environments.#15636
5ecd04cThanks @florian-lefebvre! - Adds an error when running on Stackblitz, sinceworkerddoesn't support itUpdated dependencies []:
v13.0.0-beta.8Compare Source
Major Changes
#15480
e118214Thanks @alexanderniebuhr! - Drops official support for Cloudflare Pages in favor of Cloudflare WorkersThe Astro Cloudflare adapter now only supports deployment to Cloudflare Workers by default in order to comply with Cloudflare's recommendations for new projects. If you are currently deploying to Cloudflare Pages, consider migrating to Workers by following the Cloudflare guide for an optimal experience and full feature support.
Patch Changes
#15478
ee519e5Thanks @matthewp! - Fixes fully static sites to not output server-side worker code. When all routes are prerendered, the_worker.jsdirectory is now removed from the build output.Updated dependencies []:
v13.0.0-beta.7Compare Source
Patch Changes
#15452
e1aa3f3Thanks @matthewp! - Fixes server-side dependencies not being discovered ahead of time during developmentPreviously, imports in
.astrofile frontmatter were not scanned by Vite's dependency optimizer, causing a "new dependencies optimized" message and page reload when the dependency was first encountered. Astro is now able to scan these dependencies ahead of time.#15450
50c9129Thanks @florian-lefebvre! - Fixes a case wherebuild.serverEntrywould not be respected when using the new Adapter APIUpdated dependencies []:
v13.0.0-beta.6Compare Source
Major Changes
#15345
840fbf9Thanks @matthewp! - Removes thecloudflareModulesadapter optionThe
cloudflareModulesoption has been removed because it is no longer necessary. Cloudflare natively supports importing.sql,.wasm, and other module types.What should I do?
Remove the
cloudflareModulesoption from your Cloudflare adapter configuration if you were using it:import cloudflare from '@​astrojs/cloudflare'; export default defineConfig({ adapter: cloudflare({ - cloudflareModules: true }) });Minor Changes
#15077
a164c77Thanks @matthewp! - Adds support for prerendering pages using the workerd runtime.The Cloudflare adapter now uses the new
setPrerenderer()API to prerender pages via HTTP requests to a local preview server running workerd, instead of using Node.js. This ensures prerendered pages are built using the same runtime that serves them in production.Patch Changes
#15432
e2ad69eThanks @OliverSpeir! - Removes unnecessary warning about sharp from being printed at start of dev server and buildUpdated dependencies [
a164c77,a18d727]:v13.0.0-beta.5Compare Source
Major Changes
#15400
41eb284Thanks @florian-lefebvre! - Removes theworkerEntryPointoption, which wasn't used anymore. Set themainfield of your wrangler config insteadSee how to migrate
Patch Changes
v13.0.0-beta.4Compare Source
Patch Changes
#15391
5d996ccThanks @florian-lefebvre! - Fixes types of thehandle()function exported from/handler, that could be incompatible with types generated bywrangler types#15386
a0234a3Thanks @OliverSpeir! - Updatesastro add cloudflareto use the latest validcompatibility_datein the wrangler config, if availableUpdated dependencies [
240c317]:v13.0.0-beta.3Compare Source
Patch Changes
#15336
9cce92eThanks @ascorbic! - Fixes a dev server issue where framework components from linked packages would fail to load with a 504 error.This could occur when using
client:onlyor other client directives with components from monorepo packages (linked viafile:or workspace protocol). The first request would trigger Vite's dependency optimizer mid-request, causing concurrent client module requests to fail.Updated dependencies []:
v13.0.0-beta.2Compare Source
Patch Changes
#15309
4b9c8b8Thanks @ematipico! - Update the underneath@cloudflare/workers-typeslibrary to address a warning emitted by the package manager during the installation.#15255
a66783aThanks @florian-lefebvre! - Fixes a case where the types ofhandle()could mismatch with the ones from the user's project. They now rely on globals, that can be obtained by runningwrangler typesUpdated dependencies []:
withastro/astro (astro)
v6.0.0-beta.18Compare Source
Major Changes
#15668
1118ac4Thanks @florian-lefebvre! - Changes TypeScript configuration - (v6 upgrade guidance)#15726
6f19eccThanks @ocavue! - Updates dependencyshikito v4Check Shiki's upgrade guide.
Minor Changes
#15694
66449c9Thanks @matthewp! - AddspreserveBuildClientDiroption to adapter featuresAdapters can now opt in to preserving the client/server directory structure for static builds by setting
preserveBuildClientDir: truein their adapter features. When enabled, static builds will output files tobuild.clientinstead of directly tooutDir.This is useful for adapters that require a consistent directory structure regardless of the build output type, such as deploying to platforms with specific file organization requirements.
#15579
08437d5Thanks @ascorbic! - Adds two new experimental flags for a Route Caching API and further configuration-level Route Rules for controlling SSR response caching.Route caching gives you a platform-agnostic way to cache server-rendered responses, based on web standard cache headers. You set caching directives in your routes using
Astro.cache(in.astropages) orcontext.cache(in API routes and middleware), and Astro translates them into the appropriate headers or runtime behavior depending on your adapter. You can also define cache rules for routes declaratively in your config usingexperimental.routeRules, without modifying route code.This feature requires on-demand rendering. Prerendered pages are already static and do not use route caching.
Getting started
Enable the feature by configuring
experimental.cachewith a cache provider in your Astro config:Using
Astro.cacheandcontext.cacheIn
.astropages, useAstro.cache.set()to control caching:In API routes and middleware, use
context.cache:Cache options
cache.set()accepts the following options:maxAge(number): Time in seconds the response is considered fresh.swr(number): Stale-while-revalidate window in seconds. During this window, stale content is served while a fresh response is generated in the background.tags(string[]): Cache tags for targeted invalidation. Tags accumulate across multipleset()calls within a request.lastModified(Date): When multipleset()calls providelastModified, the most recent date wins.etag(string): Entity tag for conditional requests.Call
cache.set(false)to explicitly opt out of caching for a request.Multiple calls to
cache.set()within a single request are merged: scalar values use last-write-wins,lastModifieduses most-recent-wins, and tags accumulate.Invalidation
Purge cached entries by tag or path using
cache.invalidate():Config-level route rules
Use
experimental.routeRulesto set default cache options for routes without modifying route code. Supports Nitro-style shortcuts for ergonomic configuration:Route patterns support static paths, dynamic parameters (
[slug]), and rest parameters ([...path]). Per-routecache.set()calls merge with (and can override) the config-level defaults.You can also read the current cache state via
cache.options:Cache providers
Cache behavior is determined by the configured cache provider. There are two types:
CDN-Cache-Control,Cache-Tag) and let the CDN handle caching. Astro strips these headers before sending the response to the client.onRequest()to intercept and cache responses in-process, adding anX-Astro-Cacheheader (HIT/MISS/STALE) for observability.Built-in memory cache provider
Astro includes a built-in, in-memory LRU runtime cache provider. Import
memoryCachefromastro/configto configure it.Features:
X-Astro-Cacheresponse header:HIT,MISS, orSTALE?b=2&a=1and?a=1&b=2hit the same entry)utm_*,fbclid,gclid, etc.) excluded from cache keys by defaultVaryheader support — responses that setVaryautomatically get separate cache entries per variantquery.exclude(glob patterns) andquery.include(allowlist)For more information on enabling and using this feature in your project, see the Experimental Route Caching docs.
For a complete overview and to give feedback on this experimental API, see the Route Caching RFC.
Patch Changes
#15721
e6e146cThanks @matthewp! - Fixes action route handling to return 404 for requests to prototype method names likeconstructorortoStringused as action paths#15704
862d77bThanks @umutkeltek! - Fixes i18n fallback middleware intercepting non-404 responsesThe fallback middleware was triggering for all responses with status >= 300, including legitimate 3xx redirects, 403 forbidden, and 5xx server errors. This broke auth flows and form submissions on localized server routes. The fallback now correctly only triggers for 404 (page not found) responses.
#15703
829182bThanks @matthewp! - Fixes server islands returning a 500 error in dev mode for adapters that do not setadapterFeatures.buildOutput(e.g.@astrojs/netlify)#15749
573d188Thanks @ascorbic! - Fixes a bug that causedsession.regenerate()to silently lose session dataPreviously, regenerated session data was not saved under the new session ID unless
set()was also called.#15685
1a323e5Thanks @jcayzac! - Fix regression where SVG images in content collectionimage()fields could not be rendered as inline components. This behavior is now restored while preserving the TLA deadlock fix.#15740
c5016fcThanks @matthewp! - Removes an escape hatch that skipped attribute escaping for URL values containing&, ensuring all dynamic attribute values are consistently escaped#15744
fabb710Thanks @matthewp! - Fixes cookie handling during error page rendering to ensure cookies set by middleware are consistently included in the response#15742
9d9699cThanks @matthewp! - HardensclientAddressresolution to respectsecurity.allowedDomainsforX-Forwarded-For, consistent with the existing handling ofX-Forwarded-Host,X-Forwarded-Proto, andX-Forwarded-Port. TheX-Forwarded-Forheader is now only used to determineAstro.clientAddresswhen the request's host has been validated against anallowedDomainsentry. Without a matching domain,clientAddressfalls back to the socket's remote address.#15696
a9fd221Thanks @Princesseuh! - Fixes images not working in MDX when using the Cloudflare adapter in certain cases#15693
4db2089Thanks @ArmandPhilippot! - Fixes the links to Astro Docs to match the v6 structure.#15717
4000aaaThanks @matthewp! - Ensures that URLs with multiple leading slashes (e.g.//admin) are normalized to a single slash before reaching middleware, so that pathname checks likecontext.url.pathname.startsWith('/admin')work consistently regardless of the request URL format#15752
918d394Thanks @ascorbic! - Fixes an issue where a session ID from a cookie with no matching server-side data was accepted as-is. The session now generates a new ID when the cookie value has no corresponding storage entry.#15743
3b4252aThanks @matthewp! - Hardens config-based redirects with catch-all parameters to prevent producing protocol-relative URLs (e.g.//example.com) in theLocationheader#15718
14f37b8Thanks @florian-lefebvre! - Fixes a case where internal headers may leak when rendering error pagesUpdated dependencies [
6f19ecc,f94d3c5]:v6.0.0-beta.17Compare Source
Minor Changes
#15495
5b99e90Thanks @leekeh! - Adds a newmiddlewareModeadapter feature to replace the previousedgeMiddlewareoption.This feature only impacts adapter authors. If your adapter supports
edgeMiddleware, you should upgrade to the newmiddlewareModeoption to specify the middleware mode for your adapter as soon as possible. TheedgeMiddlewarefeature is deprecated and will be removed in a future major release.export default function createIntegration() { return { name: '@​example/my-adapter', hooks: { 'astro:config:done': ({ setAdapter }) => { setAdapter({ name: '@​example/my-adapter', serverEntrypoint: '@​example/my-adapter/server.js', adapterFeatures: { - edgeMiddleware: true + middlewareMode: 'edge' } }); }, }, }; }Patch Changes
#15657
cb625b6Thanks @qzio! - Adds a newsecurity.actionBodySizeLimitoption to configure the maximum size of Astro Actions request bodies.This lets you increase the default 1 MB limit when your actions need to accept larger payloads. For example, actions that handle file uploads or large JSON payloads can now opt in to a higher limit.
If you do not set this option, Astro continues to enforce the 1 MB default to help prevent abuse.
Updated dependencies [
1fa4177]:v6.0.0-beta.16Compare Source
Minor Changes
#15646
0dd9d00Thanks @delucis! - Removes redundantfetchpriorityattributes from the output of Astro’s<Image>componentPreviously, Astro would always include
fetchpriority="auto"on images not using thepriorityattribute.However, this is the default value, so specifying it is redundant. This change omits the attribute by default.
Patch Changes
#15661
7150a2eThanks @ematipico! - Fixes a build error when generating projects with 100k+ static routes.#15603
5bc2b2cThanks @0xRozier! - Fixes a deadlock that occurred when using SVG images in content collections#15669
d5a888bThanks @florian-lefebvre! - Removes thecssescdependencyThis CommonJS dependency could sometimes cause errors because Astro is ESM-only. It is now replaced with a built-in ESM-friendly implementation.
v6.0.0-beta.15Compare Source
Minor Changes
#15471
32b4302Thanks @ematipico! - Adds a new experimental flagqueuedRenderingto enable a queue-based rendering engineThe new engine is based on a two-pass process, where the first pass
traverses the tree of components, emits an ordered queue, and then the queue is rendered.
The new engine does not use recursion, and comes with two customizable options.
Early benchmarks showed significant speed improvements and memory efficiency in big projects.
Queue-rendered based
The new engine can be enabled in your Astro config with
experimental.queuedRendering.enabledset totrue, and can be further customized with additional sub-features.Pooling
With the new engine enabled, you now have the option to have a pool of nodes that can be saved and reused across page rendering. Node pooling has no effect when rendering pages on demand (SSR) because these rendering requests don't share memory. However, it can be very useful for performance when building static pages.
Content caching
The new engine additionally unlocks a new
contentCacheoption. This allows you to cache values of nodes during the rendering phase. This is currently a boolean feature with no further customization (e.g. size of cache) that uses sensible defaults for most large content collections:When disabled, the pool engine won't cache strings, but only types.
For more information on enabling and using this feature in your project, see the experimental queued rendering docs for more details.
#15543
d43841dThanks @Princesseuh! - Adds a newexperimental.rustCompilerflag to opt into the experimental Rust-based Astro compilerThis experimental compiler is faster, provides better error messages, and generally has better support for modern JavaScript, TypeScript, and CSS features.
After enabling in your Astro config, the
@astrojs/compiler-rspackage must also be installed into your project separately:This new compiler is still in early development and may exhibit some differences compared to the existing Go-based compiler. Notably, this compiler is generally more strict in regard to invalid HTML syntax and may throw errors in cases where the Go-based compiler would have been more lenient. For example, unclosed tags (e.g.
<p>My paragraph) will now result in errors.For more information about using this experimental feature in your project, especially regarding expected differences and limitations, please see the experimental Rust compiler reference docs. To give feedback on the compiler, or to keep up with its development, see the RFC for a new compiler for Astro for more information and discussion.
Patch Changes
#15565
30cd6dbThanks @ematipico! - Fixes an issue where the use of the Astro internal logger couldn't work with Cloudflare Vite plugin.#15562
e14a51dThanks @florian-lefebvre! - Removes types for theastro:ssr-manifestmodule, which was removed#15435
957b9feThanks @rururux! - Improves compatibility of the built-in image endpoint with runtimes that don't support CJS dependencies correctly#15640
4c1a801Thanks @ematipico! - Reverts the support of Shiki with CSP. Unfortunately, after exhaustive tests, the highlighter can't be supported to cover all cases.Adds a warning when both Content Security Policy (CSP) and Shiki syntax highlighting are enabled, as they are incompatible due to Shiki's use of inline styles
#15605
f6473fdThanks @ascorbic! - Improves.astrocomponent SSR rendering performance by up to 2x.This includes several optimizations to the way that Astro generates and renders components on the server. These are mostly micro-optimizations, but they add up to a significant improvement in performance. Most pages will benefit, but pages with many components will see the biggest improvement, as will pages with lots of strings (e.g. text-heavy pages with lots of HTML elements).
#15514
999a7ddThanks @veeceey! - Fixes font flash (FOUT) during ClientRouter navigation by preserving inline<style>elements and font preload links in the head during page transitions.Previously,
@font-facedeclarations from the<Font>component were removed and re-inserted on every client-side navigation, causing the browser to re-evaluate them.#15580
a92333cThanks @ematipico! - Fixes a build error when generating projects with a large number of static routes#15549
be1c87eThanks @0xRozier! - Fixes an issue where original (unoptimized) images from prerendered pages could be kept in the build output during SSR builds.#15565
30cd6dbThanks @ematipico! - Fixes an issue where the use of theCodecomponent would result in an unexpected error.#15585
98ea30cThanks @matthewp! - Add a default body size limit for server actions to prevent oversized requests from exhausting memory.#15565
30cd6dbThanks @ematipico! - Fixes an issue where the new Astro v6 development server didn't log anything when navigating the pages.#15591
1ed07bfThanks @renovate! - Upgradesdevalueto v5.6.3#15633
9d293c2Thanks @jwoyo! - Fixes a case where<script>tags from components passed as slots to server islands were not included in the response#15586
35bc814Thanks @matthewp! - Fixes an issue where allowlists were not being enforced when handling remote imagesv6.0.0-beta.14Compare Source
Patch Changes
#15573
d789452Thanks @matthewp! - Clear the route cache on content changes so slug pages reflect updated data during dev.#15560
170ed89Thanks @z0mt3c! - Fix X-Forwarded-Proto validation when allowedDomains includes both protocol and hostname fields. The protocol check no longer fails due to hostname mismatch against the hardcoded test URL.#15563
e959698Thanks @ematipico! - Fixes an issue where warnings would be logged during the build using one of the official adaptersv6.0.0-beta.13Compare Source
Major Changes
84d6efdThanks @ematipico! - Changes how styles applied to code blocks are emitted to support CSP - (v6 upgrade guidance)Minor Changes
#15529
a509941Thanks @florian-lefebvre! - Adds a new build-in font providernpmto access fonts installed as NPM packagesYou can now add web fonts specified in your
package.jsonthrough Astro's type-safe Fonts API. Thenpmfont provider allows you to add fonts either from locally installed packages innode_modulesor from a CDN.Set
fontProviders.npm()as your fonts provider along with the requirednameandcssVariablevalues, and addoptionsas needed:See the NPM font provider reference documentation for more details.
#15548
5b8f573Thanks @florian-lefebvre! - Adds a new optionalembeddedLangsprop to the<Code />component to support languages beyond the primarylangThis allows, for example, highlighting
.vuefiles with a<script setup lang="tsx">block correctly:See the
<Code />component documentation for more details.#15483
7be3308Thanks @florian-lefebvre! - Addsstreamingoption to thecreateApp()function in the Adapter API, mirroring the same functionality available when creating a newAppinstanceAn adapter's
createApp()function now acceptsstreaming(defaults totrue) as an option. HTML streaming breaks a document into chunks to send over the network and render on the page in order. This normally results in visitors seeing your HTML as fast as possible but factors such as network conditions and waiting for data fetches can block page rendering.HTML streaming helps with performance and generally provides a better visitor experience. In most cases, disabling streaming is not recommended.
However, when you need to disable HTML streaming (e.g. your host only supports non-streamed HTML caching at the CDN level), you can opt out of the default behavior by passing
streaming: falsetocreateApp():See more about the
createApp()function in the Adapter API reference.Patch Changes
#15542
9760404Thanks @rururux! - Improves rendering by preservinghidden="until-found"value in attribues#15550
58df907Thanks @florian-lefebvre! - Improves the JSDoc annotations for theAstroAdaptertype#15507
07f6610Thanks @matthewp! - Avoid bundling SSR renderers when only API endpoints are dynamic#15459
a4406b4Thanks @florian-lefebvre! - Fixes a case wherecontext.cspwas logging warnings in development that should be logged in production onlyUpdated dependencies [
84d6efd]:v6.0.0-beta.12Compare Source
Major Changes
#15535
dfe2e22Thanks @florian-lefebvre! - DeprecatesloadManifest()andloadApp()fromastro/app/node(Adapter API) - (v6 upgrade guidance)#15461
9f21b24Thanks @florian-lefebvre! - BREAKING CHANGE to the v6 beta Adapter API only: renamesentryTypetoentrypointResolutionand updates possible valuesAstro 6 introduced a way to let adapters have more control over the entrypoint by passing
entryType: 'self'tosetAdapter(). However during beta development, the name was unclear and confusing.entryTypeis now renamed toentrypointResolutionand its possible values are updated:legacy-dynamicbecomesexplicit.selfbecomesauto.If you are building an adapter with v6 beta and specifying
entryType, update it:setAdapter({ // ... - entryType: 'legacy-dynamic' + entrypointResolution: 'explicit' }) setAdapter({ // ... - entryType: 'self' + entrypointResolution: 'auto' })#15461
9f21b24Thanks @florian-lefebvre! - DeprecatescreateExports()andstart()(Adapter API) - (v6 upgrade guidance)#15535 [
dfe2e22](https://redirect.github.com/withastro/astro/commit/dfe2e22042f92172442ab32777b3cce906Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.