fix(deps): update astro monorepo #358
Open
+1,499
−1,574
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:
12.2.1
->12.5.0
5.3.0
->5.7.4
Release Notes
withastro/astro (@astrojs/cloudflare)
v12.5.0
Compare Source
Minor Changes
#13527
2fd6a6b
Thanks @ascorbic! - The experimental session API introduced in Astro 5.1 is now stable and ready for production use.Sessions are used to store user state between requests for on-demand rendered pages. You can use them to store user data, such as authentication tokens, shopping cart contents, or any other data that needs to persist across requests:
v12.4.1
Compare Source
Patch Changes
#13596
3752519
Thanks @jsparkdev! - update vite to latest version to fix CVE#13547
360cb91
Thanks @jsparkdev! - Updates vite to the latest versionUpdated dependencies []:
v12.4.0
Compare Source
Minor Changes
#13514
a9aafec
Thanks @ascorbic! - Automatically configures Cloudflare KV storage when experimental sessions are enabledIf the
experimental.session
flag is enabled when using the Cloudflare adapter, Astro will automatically configure the session storage using the Cloudflare KV driver. You can still manually configure the session storage if you need to use a different driver or want to customize the session storage configuration. If you want to use sessions, you will need to create the KV namespace and declare it in your wrangler config. You can do this using the Wrangler CLI:This will log the id of the created namespace. You can then add it to your
wrangler.json
/wrangler.toml
file like this:By default it uses the binding name
SESSION
, but if you want to use a different binding name you can do so by passing thesessionKVBindingName
option to the adapter. For example:See the Cloudflare KV docs for more details on setting up KV namespaces.
See the experimental session docs for more information on configuring session storage.
Patch Changes
#13526
ff9d69e
Thanks @jsparkdev! - updatevite
to the latest versionUpdated dependencies []:
v12.3.1
Compare Source
Patch Changes
#13505
a98ae5b
Thanks @ematipico! - Updates the dependencyvite
to the latest.Updated dependencies []:
v12.3.0
Compare Source
Minor Changes
#13444
9721f4a
Thanks @florian-lefebvre! - Adds globalastro:env
supportCloudflare workers now support importing
env
in the global scope. Until now, callingastro:env
APIs had to be done within request scope or the values wereundefined
.With this release, they can be called anywhere server-side, like any other official adapter.
Patch Changes
#13463
d5ad591
Thanks @ascorbic! - Fixes a bug that caused builds to fail when a base directory is configuredUpdated dependencies []:
v12.2.4
Compare Source
Patch Changes
042d1de
]:v12.2.3
Compare Source
Patch Changes
#13323
80926fa
Thanks @ematipico! - Updatesesbuild
andvite
to the latest to avoid false positives audits warnings caused byesbuild
.Updated dependencies [
1e11f5e
]:v12.2.2
Patch Changes
#13304
6efd57d
Thanks @ematipico! - Fixes a small issue where the package was pulling an outdated version of its internal dependencies.#13201
065157c
Thanks @ekwoka! - Includes onerror passthrough param for Cloudflare Image Service#13299
2e1321e
Thanks @bluwy! - Usestinyglobby
for globbing filesUpdated dependencies []:
withastro/astro (astro)
v5.7.4
Compare Source
Patch Changes
#13647
ffbe8f2
Thanks @ascorbic! - Fixes a bug that caused a session error to be logged when using actions without sessions#13646
6744842
Thanks @florian-lefebvre! - Fixes a case where extra font sources were removed when using the experimental fonts API#13635
d75cac4
Thanks @florian-lefebvre! - The experimental fonts API now generates optimized fallbacks for every weight and stylev5.7.3
Compare Source
Patch Changes
#13643
67b7493
Thanks @tanishqmanuja! - Fixes a case where the font facesrc
format would be invalid when using the experimental fonts API#13639
23410c6
Thanks @florian-lefebvre! - Fixes a case where some font families would not be downloaded when using the same font provider several times, using the experimental fonts APIv5.7.2
Compare Source
Patch Changes
#13632
cb05cfb
Thanks @florian-lefebvre! - Improves the optimized fallback name generated by the experimental Fonts API#13630
3e7db4f
Thanks @florian-lefebvre! - Fixes a case where fonts using a local provider would not work because of an invalid generatedsrc
#13634
516de7d
Thanks @ematipico! - Fixes a regression where usingnext('/')
didn't correctly return the requested route.#13632
cb05cfb
Thanks @florian-lefebvre! - Improves the quality of optimized fallbacks generated by the experimental Fonts API#13616
d475afc
Thanks @lfilho! - Fixes a regression where relative static redirects didn't work as expected.v5.7.1
Compare Source
Patch Changes
#13594
dc4a015
Thanks @florian-lefebvre! - Reduces the number of font files downloaded#13627
7f1a624
Thanks @florian-lefebvre! - Fixes a case where using the<Font />
component would throw a Rollup error during the build#13626
3838efe
Thanks @florian-lefebvre! - Updates fallback font generation to always read font files returned by font providers#13625
f1311d2
Thanks @florian-lefebvre! - Updates the<Font />
component so that preload links are generated before the style tag ifpreload
is passed#13622
a70d32a
Thanks @ascorbic! - Improve autocomplete for session keysv5.7.0
Compare Source
Minor Changes
#13527
2fd6a6b
Thanks @ascorbic! - The experimental session API introduced in Astro 5.1 is now stable and ready for production use.Sessions are used to store user state between requests for on-demand rendered pages. You can use them to store user data, such as authentication tokens, shopping cart contents, or any other data that needs to persist across requests:
v5.6.2
Compare Source
Patch Changes
#13606
793ecd9
Thanks @natemoo-re! - Fixes a regression that allowed prerendered code to leak into the server bundle.#13576
1c60ec3
Thanks @ascorbic! - Reduces duplicate code in server islands scripts by extracting shared logic into a helper function.#13588
57e59be
Thanks @natemoo-re! - Fixes a memory leak when using SVG assets.#13589
5a0563d
Thanks @ematipico! - Deprecates the asset utility functionemitESMImage()
and adds a newemitImageMetadata()
to be used insteadThe function
emitESMImage()
is now deprecated. It will continue to function, but it is no longer recommended nor supported. This function will be completely removed in a next major release of Astro.Please replace it with the new function
emitImageMetadata()
as soon as you are able to do so:The new function returns the same signature as the previous one. However, the new function removes two deprecated arguments that were not meant to be exposed for public use:
_watchMode
andexperimentalSvgEnabled
. Since it was possible to access these with the old function, you may need to verify that your code still works as intended withemitImageMetadata()
.#13596
3752519
Thanks @jsparkdev! - update vite to latest version to fix CVE#13547
360cb91
Thanks @jsparkdev! - Updates vite to the latest version#13548
e588527
Thanks @ryuapp! - Support for Deno to install npm pacakges.Deno requires npm prefix to install packages on npm. For example, to install react, we need to run
deno add npm:react
. But currently the command executed isdeno add react
, which doesn't work. So, we change the package names to have an npm prefix if you are using Deno.#13587
a0774b3
Thanks @robertoms99! - Fixes an issue with the client router where some attributes of the root element were not updated during swap, including the transition scope.v5.6.1
Compare Source
Patch Changes
#13519
3323f5c
Thanks @florian-lefebvre! - Refactors some internals to improve Rolldown compatibility#13545
a7aff41
Thanks @stramel! - Prevent empty attributes from appearing in the SVG output#13552
9cd0fd4
Thanks @ematipico! - Fixes an issue where Astro validated the i18n configuration incorrectly, causing false positives in downstream libraries.v5.6.0
Compare Source
Minor Changes
#13403
dcb9526
Thanks @yurynix! - Adds a new optionalprerenderedErrorPageFetch
option in the Adapter API to allow adapters to provide custom implementations for fetching prerendered error pages.Now, adapters can override the default
fetch()
behavior, for example whenfetch()
is unavailable or when you cannot call the server from itself.The following example provides a custom fetch for
500.html
and404.html
, reading them from disk instead of performing an HTTP call:If no value is provided, Astro will fallback to its default behavior for fetching error pages.
Read more about this feature in the Adapter API reference.
#13482
ff257df
Thanks @florian-lefebvre! - Updates Astro config validation to also run for the Integration API. An error log will specify which integration is failing the validation.Now, Astro will first validate the user configuration, then validate the updated configuration after each integration
astro:config:setup
hook has run. This meansupdateConfig()
calls will no longer accept invalid configuration.This fixes a situation where integrations could potentially update a project with a malformed configuration. These issues should now be caught and logged so that you can update your integration to only set valid configurations.
#13405
21e7e80
Thanks @Marocco2! - Adds a neweagerness
option forprefetch()
when usingexperimental.clientPrerender
With the experimental
clientPrerender
flag enabled, you can use theeagerness
option onprefetch()
to suggest to the browser how eagerly it should prefetch/prerender link targets.This follows the same API described in the Speculation Rules API and allows you to balance the benefit of reduced wait times against bandwidth, memory, and CPU costs for your site visitors.
For example, you can now use
prefetch()
programmatically with large sets of links and avoid browser limits in place to guard against over-speculating (prerendering/prefetching too many links). Seteagerness: 'moderate'
to take advantage of First In, First Out (FIFO) strategies and browser heuristics to let the browser decide when to prerender/prefetch them and in what order:#13482
ff257df
Thanks @florian-lefebvre! - Improves integrations error handlingIf an error is thrown from an integration hook, an error log will now provide information about the concerned integration and hook
Patch Changes
#13539
c43bf8c
Thanks @ascorbic! - Adds a newsession.load()
method to the experimental session API that allows you to load a session by ID.When using the experimental sessions API, you don't normally need to worry about managing the session ID and cookies: Astro automatically reads the user's cookies and loads the correct session when needed. However, sometimes you need more control over which session to load.
The new
load()
method allows you to manually load a session by ID. This is useful if you are handling the session ID yourself, or if you want to keep track of a session without using cookies. For example, you might want to restore a session from a logged-in user on another device, or work with an API endpoint that doesn't use cookies.If a session with that ID doesn't exist, a new one will be created. This allows you to generate a session ID in the client if needed.
For more information, see the experimental sessions docs.
#13488
d777420
Thanks @stramel! - BREAKING CHANGE to the experimental SVG Component API onlyRemoves some previously available prop, attribute, and configuration options from the experimental SVG API. These items are no longer available and must be removed from your code:
The
title
prop has been removed until we can settle on the correct balance between developer experience and accessibility. Please replace anytitle
props on your components witharia-label
:Sprite mode has been temporarily removed while we consider a new implementation that addresses how this feature was being used in practice. This means that there are no longer multiple
mode
options, and all SVGs will be inline. All instances ofmode
must be removed from your project as you can no longer control a mode:The default
role
is no longer applied due to developer feedback. Please add the appropriaterole
on each component individually as needed:The
size
prop has been removed to better work in combination withviewBox
and additional styles/attributes. Please replacesize
with explicitwidth
andheight
attributes:v5.5.6
Compare Source
Patch Changes
#13429
06de673
Thanks @ematipico! - TheActionAPIContext.rewrite
method is deprecated and will be removed in a future major version of Astro#13524
82cd583
Thanks @ematipico! - Fixes a bug where the functionsAstro.preferredLocale
andAstro.preferredLocaleList
would return the incorrect localeswhen the Astro configuration specifies a list of
codes
. Before, the functions would return thepath
, instead now the functionsreturn a list built from
codes
.#13526
ff9d69e
Thanks @jsparkdev! - updatevite
to the latest versionv5.5.5
Compare Source
Patch Changes
#13510
5b14d33
Thanks @florian-lefebvre! - Fixes a case whereastro:env
secrets used in actions would not be available#13485
018fbe9
Thanks @ascorbic! - Fixes a bug that caused cookies to ignore custom decode function if has() had been called before#13505
a98ae5b
Thanks @ematipico! - Updates the dependencyvite
to the latest.#13483
fc2dcb8
Thanks @ematipico! - Fixes a bug where an Astro adapter couldn't call the middleware when there isn't a route that matches the incoming request.v5.5.4
Compare Source
Patch Changes
#13457
968e713
Thanks @ascorbic! - Sets correct response status text for custom error pages#13447
d80ba2b
Thanks @ematipico! - Fixes an issue wheresite
was added to the generated redirects.#13481
e9e9245
Thanks @martrapp! - Makes server island work with the client router again.#13484
8b5e4dc
Thanks @ascorbic! - Display useful errors when config loading fails because of Node addons being disabled on Stackblitzv5.5.3
Compare Source
Patch Changes
#13437
013fa87
Thanks @Vardhaman619! - Handle server.allowedHosts when the value is true without attempting to push it into an array.#13324
ea74336
Thanks @ematipico! - Upgrade to shiki v3#13372
7783dbf
Thanks @ascorbic! - Fixes a bug that caused some very large data stores to save incomplete data.#13358
8c21663
Thanks @ematipico! - Adds a new function calledinsertPageRoute
to the Astro Container API.The new function is useful when testing routes that, for some business logic, use
Astro.rewrite
.For example, if you have a route
/blog/post
and for some business decision there's a rewrite to/generic-error
, the container API implementation will look like this:This new method only works for page routes, which means that endpoints aren't supported.
#13426
565583b
Thanks @ascorbic! - Fixes a bug that caused theastro add
command to ignore the--yes
flag for third-party integrations#13428
9cac9f3
Thanks @matthewp! - Prevent bad value in x-forwarded-host from crashing request#13432
defad33
Thanks @P4tt4te! - Fix an issue in the Container API, where therenderToString
function doesn't render adequately nested slots when they are components.Updated dependencies [
ea74336
]:v5.5.2
Compare Source
Patch Changes
#13415
be866a1
Thanks @ascorbic! - Reuses experimental session storage object between requests. This prevents memory leaks and improves performance for drivers that open persistent connections to a database.#13420
2f039b9
Thanks @ematipico! - It fixes an issue that caused some regressions in how styles are bundled.v5.5.1
Compare Source
Patch Changes
65903c9
Thanks @ascorbic! - Makes experimental flag optionalv5.5.0
Compare Source
Minor Changes
#13402
3e7b498
Thanks @ematipico! - Adds a new experimental flag calledexperimental.preserveScriptOrder
that renders<script>
and<style>
tags in the same order as they are defined.When rendering multiple
<style>
and<script>
tags on the same page, Astro currently reverses their order in your generated HTML output. This can give unexpected results, for example CSS styles being overridden by earlier defined style tags when your site is built.With the new
preserveScriptOrder
flag enabled, Astro will generate the styles in the order they are defined:For example, the following component has two
<style>
tags, and both define the same style for thebody
tag:Once the project is compiled, Astro will create an inline style where
yellow
appears first, and thenred
. Ultimately, thered
background is applied:When
experimental.preserveScriptOrder
is set totrue
, the order of the two styles is kept as it is, and in the style generatedred
appears first, and thenyellow
:This is a breaking change to how Astro renders project code that contains multiple
<style>
and<script>
tags in the same component. If you were previously compensating for Astro's behavior by writing these out of order, you will need to update your code.This will eventually become the new default Astro behavior, so we encourage you to add this experimental style and script ordering as soon as you are able! This will help us test the new behavior and ensure your code is ready when this becomes the new normal.
For more information as this feature develops, please see the experimental script order docs.
#13352
cb886dc
Thanks @delucis! - Adds support for a newexperimental.headingIdCompat
flagBy default, Astro removes a trailing
-
from the end of IDs it generates for headings ending withspecial characters. This differs from the behavior of common Markdown processors.
You can now disable this behavior with a new configuration flag:
This can be useful when heading IDs and anchor links need to behave consistently across your site
and other platforms such as GitHub and npm.
If you are using the
rehypeHeadingIds
plugin directly, you can also pass this new option:#13311
a3327ff
Thanks @chrisirhc! - Adds a new configuration option for Markdown syntax highlightingexcludeLangs
This option provides better support for diagramming tools that rely on Markdown code blocks, such as Mermaid.js and D2 by allowing you to exclude specific languages from Astro's default syntax highlighting.
This option allows you to avoid rendering conflicts with tools that depend on the code not being highlighted without forcing you to disable syntax highlighting for other code blocks.
The following example configuration will exclude highlighting for
mermaid
andmath
code blocks:Read more about this new option in the Markdown syntax highlighting configuration docs.
Patch Changes
#13404
4e78b4d
Thanks @ascorbic! - Fixes a bug in error handling that saving a content file with a schema error would display an "unhandled rejection" error instead of the correct schema error#13379
d59eb22
Thanks @martrapp! - Fixes an edge case where the client router executed scripts twice when used with a custom swap function that only swaps parts of the DOM.#13393
6b8fdb8
Thanks @renovate! - Updatesprimsjs
to version 1.30.0, which adds support for more languages and fixes a security advisory which does not affect Astro.#13374
7b75bc5
Thanks @ArmandPhilippot! - Fixes the documentation of the i18n configuration wheremanual
was presented as a key ofrouting
instead of an available value.#13380
9bfa6e6
Thanks @martrapp! - Fixes an issue where astro:page-load fires before all scripts are executed#13407
0efdc22
Thanks @ascorbic! - Displays correct error message when sharp isn't installedUpdated dependencies [
cb886dc
,a3327ff
]:v5.4.3
Compare Source
Patch Changes
#13381
249d52a
Thanks @martrapp! - Adds thetypes
property to the viewTransition object when the ClientRouter simulates parts of the View Transition API on browsers w/o native support.#13367
3ce4ad9
Thanks @ematipico! - Adds documentation to various utility functions used for remote image services#13347
d83f92a
Thanks @bluwy! - Updates internal CSS chunking behavior for Astro components' scoped styles. This may result in slightly more CSS chunks created, but should allow the scoped styles to only be included on pages that use them.#13388
afadc70
Thanks @ematipico! - Fixes a bug whereastro:config/server
andastro:config/client
had incorrect types.#13355
042d1de
Thanks @ematipico! - Adds documentation to the assets utilities for remote service images.#13395
6d1c63f
Thanks @bluwy! - Usespackage-manager-detector
to detect the package manager used in the project#13363
a793636
Thanks @ematipico! - Fixes an issue where the internal functionmakeSvgComponent
was incorrectly exposed as a public API.Updated dependencies [
042d1de
]:v5.4.2
Compare Source
Patch Changes
#12985
84e94cc
Thanks @matthewp! - Prevent re-executing scripts in client router#13349
50e2e0b
Thanks @ascorbic! - Correctly escapes attributes in Markdown images#13262
0025df3
Thanks @ematipico! - Refactor Astro Actions to not use a middleware. Doing so should avoid unexpected issues when using the Astro middleware at the edge.v5.4.1
Compare Source
Patch Changes
#13336
8f632ef
Thanks @ematipico! - Fixes a regression where some asset utilities were move across monorepo, and not re-exported anymore.#13320
b5dabe9
Thanks @{! - Adds support for typing experimental session dataYou can add optional types to your session data by creating a
src/env.d.ts
file in your project that extends the globalApp.SessionData
interface. For example:Any keys not defined in this interface will be treated as
any
.Then when you access
Astro.session
in your components, any defined keys will be typed correctly:v5.4.0
Compare Source
Minor Changes
5be12b2
Thanks @Fryuni! - Exposes extra APIs for scripting and testing.Config helpers
Two new helper functions exported from
astro/config
:mergeConfig()
allows users to merge partially defined Astro configurations on top of a base config while following the merge rules ofupdateConfig()
available for integrations.validateConfig()
allows users to validate that a given value is a valid Astro configuration and fills in default values as necessary.These helpers are particularly useful for integration authors and for developers writing scripts that need to manipulate Astro configurations programmatically.
Programmatic build
The
build
API now receives a second optionalBuildOptions
argument where users can specify:devOutput
(defaultfalse
): output a development-based build similar to code transformed inastro dev
.teardownCompiler
(defaulttrue
): teardown the compiler WASM instance after build.These options provide more control when running Astro builds programmatically, especially for testing scenarios or custom build pipelines.
#13278
4a43c4b
Thanks @ematipico! - Adds a new configuration optionserver.allowedHosts
and CLI option--allowed-hosts
.Now you can specify the hostnames that the dev and preview servers are allowed to respond to. This is useful for allowing additional subdomains, or running the dev server in a web container.
allowedHosts
checks the Host header on HTTP requests from browsers and if it doesn't match, it will reject the request to prevent CSRF and XSS attacks.// astro.
Configuration
📅 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 becomes conflicted, 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.