chore(deps): update astro monorepo #903
Open
+473
−115
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.2.7
->4.3.0
7.0.13
->7.1.0
5.0.13
->5.1.0
5.7.14
->5.12.0
Release Notes
withastro/astro (@astrojs/react)
v4.3.0
Compare Source
Minor Changes
#13809
3c3b492
Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
withastro/astro (@astrojs/svelte)
v7.1.0
Compare Source
Minor Changes
#13809
3c3b492
Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
withastro/astro (@astrojs/vue)
v5.1.0
Compare Source
Minor Changes
#13809
3c3b492
Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
withastro/astro (astro)
v5.12.0
Compare Source
Minor Changes
#13971
fe35ee2
Thanks @adamhl8! - Adds an experimental flagrawEnvValues
to disable coercion ofimport.meta.env
values (e.g. converting strings to other data types) that are populated fromprocess.env
Astro allows you to configure a type-safe schema for your environment variables, and converts variables imported via
astro:env
into the expected type.However, Astro also converts your environment variables used through
import.meta.env
in some cases, and this can prevent access to some values such as the strings"true"
(which is converted to a boolean value), and"1"
(which is converted to a number).The
experimental.rawEnvValues
flag disables coercion ofimport.meta.env
values that are populated fromprocess.env
, allowing you to use the raw value.To enable this feature, add the experimental flag in your Astro config:
If you were relying on this coercion, you may need to update your project code to apply it manually:
See the experimental raw environment variables reference docs for more information.
#13941
6bd5f75
Thanks @aditsachde! - Adds support for TOML files to Astro's built-inglob()
andfile()
content loaders.In Astro 5.2, Astro added support for using TOML frontmatter in Markdown files instead of YAML. However, if you wanted to use TOML files as local content collection entries themselves, you needed to write your own loader.
Astro 5.12 now directly supports loading data from TOML files in content collections in both the
glob()
and thefile()
loaders.If you had added your own TOML content parser for the
file()
loader, you can now remove it as this functionality is now included:Note that TOML does not support top-level arrays. Instead, the
file()
loader considers each top-level table to be an independent entry. The table header is populated in theid
field of the entry object.See Astro's content collections guide for more information on using the built-in content loaders.
Patch Changes
6bd5f75
]:v5.11.2
Compare Source
Patch Changes
#14064
2eb77d8
Thanks @jp-knj! - Allows usingtsconfig
compilerOptions.paths
without settingcompilerOptions.baseUrl
#14068
10189c0
Thanks @jsparkdev! - Fixes the incorrect CSS import path shown in the terminal message during Tailwind integration setup.v5.11.1
Compare Source
Patch Changes
#14045
3276b79
Thanks @ghubo! - Fixes a problem where importing animated.avif
files returns aNoImageMetadata
error.#14041
0c4d5f8
Thanks @dixslyf! - Fixes a<ClientRouter />
bug where the fallback view transition animations when exiting a pageran too early for browsers that do not support the View Transition API.
This bug prevented
event.viewTransition?.skipTransition()
from skipping the page exit animationwhen used in an
astro:before-swap
event hook.v5.11.0
Compare Source
Minor Changes
#13972
db8f8be
Thanks @ematipico! - Updates theNodeApp.match()
function in the Adapter API to accept a second, optional parameter to allow adapter authors to add headers to static, prerendered pages.NodeApp.match(request)
currently checks whether there is a route that matches the givenRequest
. If there is a prerendered route, the function returnsundefined
, because static routes are already rendered and their headers cannot be updated.When the new, optional boolean parameter is passed (e.g.
NodeApp.match(request, true)
), Astro will return the first matched route, even when it's a prerendered route. This allows your adapter to now access static routes and provides the opportunity to set headers for these pages, for example, to implement a Content Security Policy (CSP).Patch Changes
#14029
42562f9
Thanks @ematipico! - Fixes a bug where server islands wouldn't be correctly rendered when they are rendered inside fragments.Now the following examples work as expected:
v5.10.2
Compare Source
Patch Changes
#14000
3cbedae
Thanks @feelixe! - Fix routePattern JSDoc examples to show correct return values#13990
de6cfd6
Thanks @isVivek99! - Fixes a case whereastro:config/client
andastro:config/server
virtual modules would not contain config passed to integrationsupdateConfig()
during the build#14019
a160d1e
Thanks @ascorbic! - Removes the requirement to settype: 'live'
when defining experimental live content collectionsPreviously, live collections required a
type
andloader
configured. Now, Astro can determine that your collection is alive
collection without defining it explicitly.This means it is now safe to remove
type: 'live'
from your collections defined insrc/live.config.ts
:import { defineLiveCollection } from 'astro:content'; import { storeLoader } from '@​mystore/astro-loader'; const products = defineLiveCollection({ - type: 'live', loader: storeLoader({ apiKey: process.env.STORE_API_KEY, endpoint: 'https://api.mystore.com/v1', }), }); export const collections = { products };
This is not a breaking change: your existing live collections will continue to work even if you still include
type: 'live'
. However, we suggest removing this line at your earliest convenience for future compatibility when the feature becomes stable and this config option may be removed entirely.#13966
598da21
Thanks @msamoylov! - Fixes a broken link on the default 404 page in developmentv5.10.1
Compare Source
Patch Changes
#13988
609044c
Thanks @ascorbic! - Fixes a bug in live collections that caused it to incorrectly complain about the collection being defined in the wrong file#13909
b258d86
Thanks @isVivek99! - Fixes rendering of special boolean attributes for custom elements#13983
e718375
Thanks @florian-lefebvre! - Fixes a case where the toolbar audit would incorrectly flag images processed by Astro in content collections documents#13999
f077b68
Thanks @ascorbic! - AddslastModified
field to experimental live collection cache hintsLive loaders can now set a
lastModified
field in the cache hints for entries and collections to indicate when the data was last modified. This is then available in thecacheHint
field returned bygetCollection
andgetEntry
.#13987
08f34b1
Thanks @ematipico! - Adds an informative message in dev mode when the CSP feature is enabled.#14005
82aad62
Thanks @ematipico! - Fixes a bug where inline styles and scripts didn't work when CSP was enabled. Now when adding<styles>
elements inside an Astro component, their hashes care correctly computed.#13985
0b4c641
Thanks @jsparkdev! - Updates wrong linkv5.10.0
Compare Source
Minor Changes
#13917
e615216
Thanks @ascorbic! - Adds a newpriority
attribute for Astro's image components.This change introduces a new
priority
option for the<Image />
and<Picture />
components, which automatically sets theloading
,decoding
, andfetchpriority
attributes to their optimal values for above-the-fold images which should be loaded immediately.It is a boolean prop, and you can use the shorthand syntax by simply adding
priority
as a prop to the<Image />
or<Picture />
component. When set, it will apply the following attributes:loading="eager"
decoding="sync"
fetchpriority="high"
The individual attributes can still be set manually if you need to customize your images further.
By default, the Astro
<Image />
component generates<img>
tags that lazy-load their content by settingloading="lazy"
anddecoding="async"
. This improves performance by deferring the loading of images that are not immediately visible in the viewport, and gives the best scores in performance audits like Lighthouse.The new
priority
attribute will override those defaults and automatically add the best settings for your high-priority assets.This option was previously available for experimental responsive images, but now it is a standard feature for all images.
Usage
#13917
e615216
Thanks @ascorbic! - The responsive images feature introduced behind a flag in v5.0.0 is no longer experimental and is available for general use.The new responsive images feature in Astro automatically generates optimized images for different screen sizes and resolutions, and applies the correct attributes to ensure that images are displayed correctly on all devices.
Enable the
or component, or configure a default
image.responsiveStyles
option in your Astro config. Then, set alayout
attribute on anyimage.layout
, for instantly responsive images with automatically generatedsrcset
andsizes
attributes based on the image's dimensions and the layout type.Displaying images correctly on the web can be challenging, and is one of the most common performance issues seen in sites. This new feature simplifies the most challenging part of the process: serving your site visitor an image optimized for their viewing experience, and for your website's performance.
For full details, see the updated Image guide.
Migration from Experimental Responsive Images
The
experimental.responsiveImages
flag has been removed, and all experimental image configuration options have been renamed to their final names.If you were using the experimental responsive images feature, you'll need to update your configuration:
Remove the experimental flag
export default defineConfig({ experimental: { - responsiveImages: true, }, });
Update image configuration options
During the experimental phase, default styles were applied automatically to responsive images. Now, you need to explicitly set the
responsiveStyles
option totrue
if you want these styles applied.export default defineConfig({ image: { + responsiveStyles: true, }, });
The experimental image configuration options have been renamed:
Before:
After:
Component usage remains the same
The
layout
,fit
, andposition
props on<Image>
and<Picture>
components work exactly the same as before:If you weren't using the experimental responsive images feature, no changes are required.
Please see the Image guide for more information on using responsive images in Astro.
#13685
3c04c1f
Thanks @ascorbic! - Adds experimental support for live content collectionsLive content collections are a new type of content collection that fetch their data at runtime rather than build time. This allows you to access frequently-updated data from CMSs, APIs, databases, or other sources using a unified API, without needing to rebuild your site when the data changes.
Live collections vs build-time collections
In Astro 5.0, the content layer API added support for adding diverse content sources to content collections. You can create loaders that fetch data from any source at build time, and then access it inside a page via
getEntry()
andgetCollection()
. The data is cached between builds, giving fast access and updates.However there is no method for updating the data store between builds, meaning any updates to the data need a full site deploy, even if the pages are rendered on-demand. This means that content collections are not suitable for pages that update frequently. Instead, today these pages tend to access the APIs directly in the frontmatter. This works, but leads to a lot of boilerplate, and means users don't benefit from the simple, unified API that content loaders offer. In most cases users tend to individually create loader libraries that they share between pages.
Live content collections solve this problem by allowing you to create loaders that fetch data at runtime, rather than build time. This means that the data is always up-to-date, without needing to rebuild the site.
How to use
To enable live collections add the
experimental.liveContentCollections
flag to yourastro.config.mjs
file:Then create a new
src/live.config.ts
file (alongside yoursrc/content.config.ts
if you have one) to define your live collections with a live loader and optionally a schema using the newdefineLiveCollection()
function from theastro:content
module.You can then use the dedicated
getLiveCollection()
andgetLiveEntry()
functions to access your live data:v5.9.4
Compare Source
Patch Changes
#13951
7eb88f1
Thanks @ascorbic! - Fixes a issue that caused errors when using an adapter-provided session driver with custom options#13953
448bddc
Thanks @zaitovalisher! - Fixes a bug where quotes were not added to the 'strict-dynamic' CSP directivev5.9.3
Compare Source
Patch Changes
#13923
a9ac5ed
Thanks @ematipico! - BREAKING CHANGE to the experimental Content Security Policy (CSP) onlyChanges the behavior of experimental Content Security Policy (CSP) to now serve hashes differently depending on whether or not a page is prerendered:
<meta>
element for static pages.Response
headercontent-security-policy
for on-demand rendered pages.This new strategy allows you to add CSP content that is not supported in a
<meta>
element (e.g.report-uri
,frame-ancestors
, and sandbox directives) to on-demand rendered pages.No change to your project code is required as this is an implementation detail. However, this will result in a different HTML output for pages that are rendered on demand. Please check your production site to verify that CSP is working as intended.
To keep up to date with this developing feature, or to leave feedback, visit the CSP Roadmap proposal.
#13926
953a249
Thanks @ematipico! - Adds a new Astro Adapter Feature calledexperimentalStaticHeaders
to allow your adapter to receive theHeaders
for rendered static pages.Adapters that enable support for this feature can access header values directly, affecting their handling of some Astro features such as Content Security Policy (CSP). For example, Astro will no longer serve the CSP
<meta http-equiv="content-security-policy">
element in static pages to adapters with this support.Astro will serve the value of the header inside a map that can be retrieved from the hook
astro:build:generated
. Adapters can read this mapping and use their hosting headers capabilities to create a configuration file.A new field called
experimentalRouteToHeaders
will contain a map ofMap<IntegrationResolvedRoute, Headers>
where theHeaders
type contains the headers emitted by the rendered static route.To enable support for this experimental Astro Adapter Feature, add it to your
adapterFeatures
in your adapter config:See the Adapter API docs for more information about providing adapter features.
#13697
af83b85
Thanks @benosmac! - Fixes issues with fallback route pattern matching wheni18n.routing.fallbackType
isrewrite
.generatePath
when building fallback routes and checking for existing translated pagesNow for a route to be matched it needs to be inside a named
[locale]
folder. This fixes an issue whereroute.pattern.test()
incorrectly matched dynamic routes, causing the page to be skipped.findRouteToRewrite
Now the requested pathname must exist in
route.distURL
for a dynamic route to match. This fixes an issue whereroute.pattern.test()
incorrectly matched dynamic routes, causing the build to fail.#13924
1cd8c3b
Thanks @qw-in! - Fixes an edge case whereisPrerendered
was incorrectly set tofalse
for static redirects.#13926
953a249
Thanks @ematipico! - Fixes an issue where the experimental CSPmeta
element wasn't placed in the<head>
element as early as possible, causing these policies to not apply to styles and scripts that came before themeta
element.v5.9.2
Compare Source
Patch Changes
#13919
423fe60
Thanks @ematipico! - Fixes a bug where Astro added quotes to the CSP resources.Only certain resources require quotes (e.g.
'self'
but nothttps://cdn.example.com
), so Astro no longer adds quotes to any resources. You must now provide the quotes yourself for resources such as'self'
when necessary:#13914
76c5480
Thanks @ematipico! - BREAKING CHANGE to the experimental Content Security Policy feature onlyRemoves support for experimental Content Security Policy (CSP) when using the
<ClientRouter />
component for view transitions.It is no longer possible to enable experimental CSP while using Astro's view transitions. Support was already unstable with the
<ClientRouter />
because CSP required making its underlying implementation asynchronous. This caused breaking changes for several users and therefore, this PR removes support completely.If you are currently using the component for view transitions, please remove the experimental CSP flag as they cannot be used together.
import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { - csp: true } });
Alternatively, to continue using experimental CSP in your project, you can consider migrating to the browser native View Transition API and remove the
<ClientRouter />
from your project. You may be able to achieve similar results if you are not using Astro's enhancements to the native View Transitions and Navigation APIs.Support might be reintroduced in future releases. You can follow this experimental feature's development in the CSP RFC.
v5.9.1
Compare Source
Patch Changes
#13899
7a1303d
Thanks @reknih! - Fix bug where error pages would return invalid bodies if the upstream response was compressed#13902
051bc30
Thanks @arHSM! - Fixes a bug where vite virtual module ids were incorrectly added in the dev server#13905
81f71ca
Thanks @jsparkdev! - Fixes wrong contents in CSP meta tag.#13907
8246bcc
Thanks @martrapp! - Fixes a bug that caused view transition names to be lost.#13901
37fa0a2
Thanks @ansg191! - fix fallback not being removed when server island is renderedv5.9.0
Compare Source
Minor Changes
#13802
0eafe14
Thanks @ematipico! - Adds experimental Content Security Policy (CSP) supportCSP is an important feature to provide fine-grained control over resources that can or cannot be downloaded and executed by a document. In particular, it can help protect against cross-site scripting (XSS) attacks.
Enabling this feature adds additional security to Astro's handling of processed and bundled scripts and styles by default, and allows you to further configure these, and additional, content types. This new experimental feature has been designed to work in every Astro rendering environment (static pages, dynamic pages and single page applications), while giving you maximum flexibility and with type-safety in mind.
It is compatible with most of Astro's features such as client islands, and server islands, although Astro's view transitions using the
<ClientRouter />
are not yet fully supported. Inline scripts are not supported out of the box, but you can provide your own hashes for external and inline scripts.To enable this feature, add the experimental flag in your Astro config:
For more information on enabling and using this feature in your project, see the Experimental CSP docs.
For a complete overview, and to give feedback on this experimental API, see the Content Security Policy RFC.
#13850
1766d22
Thanks @ascorbic! - Provides a Markdown renderer to content loadersWhen creating a content loader, you will now have access to a
renderMarkdown
function that allows you to render Markdown content directly within your loaders. It uses the same settings and plugins as the renderer used for Markdown files in Astro, and follows any Markdown settings you have configured in your Astro project.This allows you to render Markdown content from various sources, such as a CMS or other data sources, directly in your loaders without needing to preprocess the Markdown content separately.
The return value of
renderMarkdown
is an object with two properties:html
andmetadata
. These match therendered
property of content entries in content collections, so you can use them to render the content in your components or pages.v5.8.2
Compare Source
Patch Changes
#13877
5a7797f
Thanks @yuhang-dong! - Fixes a bug that causedAstro.rewrite
to fail when used insequence
d middleware#13872
442b841
Thanks @isVivek99! - Fixes rendering of thedownload
attribute when it has a boolean valuev5.8.1
Compare Source
Patch Changes
#13037
de2fc9b
Thanks @nanarino! - Fixes rendering of thepopover
attribute when it has a boolean value#13851
45ae95a
Thanks @ascorbic! - Allows disabling default styles for responsive imagesThis change adds a new
image.experimentalDefaultStyles
option that allows you to disable the default styles applied to responsive images.When using experimental responsive images, Astro applies default styles to ensure the images resize correctly. In most cases this is what you want – and they are applied with low specificity so your own styles override them. However in some cases you may want to disable these default styles entirely. This is particularly useful when using Tailwind 4, because it uses CSS cascade layers to apply styles, making it difficult to override the default styles.
image.experimentalDefaultStyles
is a boolean option that defaults totrue
, so you can change it in your Astro config file like this:#13858
cb1a168
Thanks @florian-lefebvre! - Fixes the warning shown when client directives are used on Astro components#12574
da266d0
Thanks @apatel369! - Allows using server islands in mdx files#13843
fbcfa68
Thanks @z1haze! - Export typeAstroSession
to allow use in explicitly typed safe code.v5.8.0
Compare Source
Minor Changes
#13809
3c3b492
Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
Patch Changes
3c3b492
]:Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ 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.