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:
3.3.4
->3.6.2
5.1.0
->5.1.2
4.8.2
->4.16.5
Release Notes
withastro/astro (@astrojs/react)
v3.6.2
Compare Source
Patch Changes
7adb350
Thanks @bluwy! - Prevents throwing errors when checking if a component is a React component in runtimev3.6.1
Compare Source
Patch Changes
#11571
1c3265a
Thanks @bholmesdev! - BREAKING CHANGE to the experimental Actions API only. Install the latest@astrojs/react
integration as well if you're using React 19 features.Make
.safe()
the default return value for actions. This means{ data, error }
will be returned when calling an action directly. If you prefer to get the data while allowing errors to throw, chain the.orThrow()
modifier.v3.6.0
Compare Source
Minor Changes
#11234
4385bf7
Thanks @ematipico! - Adds a new function calledaddServerRenderer
to the Container API. Use this function to manually store renderers inside the instance of your container.This new function should be preferred when using the Container API in environments like on-demand pages:
v3.5.0
Compare Source
Minor Changes
#11144
803dd80
Thanks @ematipico! - The integration now exposes a function calledgetContainerRenderer
, that can be used inside the Container APIs to load the relative renderer.v3.4.0
Compare Source
Minor Changes
#11071
8ca7c73
Thanks @bholmesdev! - Adds two new functionsexperimental_getActionState()
andexperimental_withState()
to support the React 19useActionState()
hook when using Astro Actions. This introduces progressive enhancement when calling an Action with thewithState()
utility.This example calls a
like
action that accepts apostId
and returns the number of likes. Pass this action to theexperimental_withState()
function to apply progressive enhancement info, and apply touseActionState()
to track the result:You can also access the state stored by
useActionState()
from your actionhandler
. Callexperimental_getActionState()
with the API context, and optionally apply a type to the result:withastro/astro (@astrojs/tailwind)
v5.1.2
Compare Source
Patch Changes
8e500f2
Thanks @delucis! - Adds keywords topackage.json
to improve categorization in the Astro integrations catalogv5.1.1
Compare Source
Patch Changes
dcd1158
Thanks @matthewp! - Make @astrojs/tailwind compat with Astro 5withastro/astro (astro)
v4.16.5
Compare Source
Patch Changes
ff68ba5
Thanks @martrapp! - Fixes an issue with cssesc in dev mode when settingvite.ssr.noExternal: true
v4.16.4
Compare Source
Patch Changes
#12223
79ffa5d
Thanks @ArmandPhilippot! - Fixes a false positive reported by the dev toolbar Audit app where a label was considered missing when associated with a buttonThe
button
element can be used with a label (e.g. to create a switch) and should not be reported as an accessibility issue when used as a child of alabel
.#12199
c351352
Thanks @ematipico! - Fixes a regression in the computation ofAstro.currentLocale
#12222
fb55695
Thanks @ematipico! - Fixes an issue where the edge middleware couldn't correctly compute the client IP address when callingctx.clientAddress()
v4.16.3
Compare Source
Patch Changes
#12220
b049359
Thanks @bluwy! - Fixes accidental internalsetOnSetGetEnv
parameter rename that caused runtime errors#12197
2aa2dfd
Thanks @ematipico! - Fix a regression where a port was incorrectly added to theAstro.url
v4.16.2
Compare Source
Patch Changes
12b0022
Thanks @bluwy! - Reverts https://github.com/withastro/astro/pull/12173 which causedCan't modify immutable headers
warnings and 500 errors on Cloudflare Pagesv4.16.1
Compare Source
Patch Changes
#12177
a4ffbfa
Thanks @matthewp! - Ensure we target scripts for execution in the routerUsing
document.scripts
is unsafe because if the application has aname="scripts"
this will shadow the built-indocument.scripts
. Fix is to usegetElementsByTagName
to ensure we're only grabbing real scripts.#12173
2d10de5
Thanks @ematipico! - Fixes a bug where Astro Actions couldn't redirect to the correct pathname when there was a rewrite involved.v4.16.0
Compare Source
Minor Changes
#12039
710a1a1
Thanks @ematipico! - Adds amarkdown.shikiConfig.langAlias
option that allows aliasing a non-supported code language to a known language. This is useful when the language of your code samples is not a built-in Shiki language, but you want your Markdown source to contain an accurate language while also displaying syntax highlighting.The following example configures Shiki to highlight
cjs
code blocks using thejavascript
syntax highlighter:Then in your Markdown, you can use the alias as the language for a code block for syntax highlighting:
#11984
3ac2263
Thanks @chaegumi! - Adds a newbuild.concurreny
configuration option to specify the number of pages to build in parallelIn most cases, you should not change the default value of
1
.Use this option only when other attempts to reduce the overall rendering time (e.g. batch or cache long running tasks like fetch calls or data access) are not possible or are insufficient.
Use this option only if the refactors are not possible. If the number is set too high, the page rendering may slow down due to insufficient memory resources and because JS is single-threaded.
Patch Changes
#12160
c6fd1df
Thanks @louisescher! - Fixes a bug whereastro.config.mts
andastro.config.cts
weren't reloading the dev server upon modifications.#12130
e96bcae
Thanks @thehansys! - Fixes a bug in the parsing ofx-forwarded-\*
Request
headers, where multiple values assigned to those headers were not correctly parsed.Now, headers like
x-forwarded-proto: https,http
are correctly parsed.#12147
9db755a
Thanks @ascorbic! - Skips setting statusMessage header for HTTP/2 responseHTTP/2 doesn't support status message, so setting this was logging a warning.
#12151
bb6d37f
Thanks @ematipico! - Fixes an issue whereAstro.currentLocale
wasn't incorrectly computed when thedefaultLocale
belonged to a custom locale path.Updated dependencies [
710a1a1
]:v4.15.12
Compare Source
Patch Changes
#12121
2490ceb
Thanks @ascorbic! - Support passing the valuesInfinity
and-Infinity
as island props.#12118
f47b347
Thanks @Namchee! - Removes thestrip-ansi
dependency in favor of the native Node API#12126
6e1dfeb
Thanks @ascorbic! - Clear content layer cache when astro version changes#12117
a46839a
Thanks @ArmandPhilippot! - Updates Vite links to use their new domain#12124
499fbc9
Thanks @ascorbic! - Allows special characters in Action names#12123
b8673df
Thanks @Princesseuh! - Fixes missingbody
property on CollectionEntry types for content layer entries#12132
de35daa
Thanks @jcayzac! - Updates thecookie
dependency to avoid the CVE 2024-47764 vulnerability.#12113
a54e520
Thanks @ascorbic! - Adds a helpful error when attempting to render an undefined collection entryv4.15.11
Compare Source
Patch Changes
#12097
11d447f
Thanks @ascorbic! - Fixes error where references in content layer schemas sometimes incorrectly report as missing#12108
918953b
Thanks @lameuler! - Fixes a bug where data URL images were not correctly handled. The bug resulted in anENAMETOOLONG
error.#12105
42037f3
Thanks @ascorbic! - Returns custom statusText that has been set in a Response#12109
ea22558
Thanks @ematipico! - Fixes a regression that was introduced by an internal refactor of how the middleware is loaded by the Astro application. The regression was introduced by #11550.When the edge middleware feature is opted in, Astro removes the middleware function from the SSR manifest, and this wasn't taken into account during the refactor.
#12106
d3a74da
Thanks @ascorbic! - Handles case where an immutable Response object is returned from an endpoint#12090
d49a537
Thanks @markjaquith! - Server islands: changes the server island HTML placeholder comment so that it is much less likely to get removed by HTML minifiers.v4.15.10
Compare Source
Patch Changes
#12084
12dae50
Thanks @Princesseuh! - Adds missing filePath property on content layer entries#12046
d7779df
Thanks @martrapp! - View transitions: Fixes Astro's fade animation to prevent flashing during morph transitions.#12043
1720c5b
Thanks @bluwy! - Fixes injected endpointprerender
option detection#12095
76c5fbd
Thanks @TheOtterlord! - Fix installing non-stable versions of integrations withastro add
v4.15.9
Compare Source
Patch Changes
#12034
5b3ddfa
Thanks @ematipico! - Fixes an issue where the middleware wasn't called when a project uses404.astro
.#12042
243ecb6
Thanks @ematipico! - Fixes a problem in the Container API, where a polyfill wasn't correctly applied. This caused an issue in some environments wherecrypto
isn't supported.#12038
26ea5e8
Thanks @ascorbic! - Resolves image paths in content layer with initial slash as project-relativeWhen using the
image()
schema helper, previously paths with an initial slash were treated as public URLs. This was to match the behavior of markdown images. However this is a change from before, where paths with an initial slash were treated as project-relative. This change restores the previous behavior, so that paths with an initial slash are treated as project-relative.v4.15.8
Compare Source
Patch Changes
#12014
53cb41e
Thanks @ascorbic! - Fixes an issue where component styles were not correctly included in rendered MDX#12031
8c0cae6
Thanks @ematipico! - Fixes a bug where the rewrite vianext(/*..*/)
inside a middleware didn't compute the newAPIContext.params
#12026
40e7a1b
Thanks @bluwy! - Initializes the Markdown processor only when there's.md
files#12028
d3bd673
Thanks @bluwy! - Handles route collision detection only if it matchesgetStaticPaths
#12027
dd3b753
Thanks @fviolette! - Addselected
to the list of boolean attributes#12001
9be3e1b
Thanks @uwej711! - Remove dependency on path-to-regexpv4.15.7
Compare Source
Patch Changes
#12000
a2f8c5d
Thanks @ArmandPhilippot! - Fixes an outdated link used to document Content Layer API#11915
0b59fe7
Thanks @azhirov! - Fix: prevent island from re-rendering when using transition:persist (#11854)v4.15.6
Compare Source
Patch Changes
#11993
ffba5d7
Thanks @matthewp! - Fix getStaticPaths regressionThis reverts a previous change meant to remove a dependency, to fix a regression with multiple nested spread routes.
#11964
06eff60
Thanks @TheOtterlord! - Add wayland (wl-copy) support toastro info
v4.15.5
Compare Source
Patch Changes
#11939
7b09c62
Thanks @bholmesdev! - Adds support for Zod discriminated unions on Action form inputs. This allows forms with different inputs to be submitted to the same action, using a given input to decide which object should be used for validation.This example accepts either a
create
orupdate
form submission, and uses thetype
field to determine which object to validate against.The corresponding
create
andupdate
forms may look like this:v4.15.4
Compare Source
Patch Changes
#11879
bd1d4aa
Thanks @matthewp! - Allow passing a cryptography key via ASTRO_KEYFor Server islands Astro creates a cryptography key in order to hash props for the islands, preventing accidental leakage of secrets.
If you deploy to an environment with rolling updates then there could be multiple instances of your app with different keys, causing potential key mismatches.
To fix this you can now pass the
ASTRO_KEY
environment variable to your build in order to reuse the same key.To generate a key use:
This will print out an environment variable to set like:
#11935
c58193a
Thanks @Princesseuh! - Fixesastro add
not using the proper export point when adding certain adaptersv4.15.3
Compare Source
Patch Changes
#11902
d63bc50
Thanks @ascorbic! - Fixes case where content layer did not update during clean dev builds on Linux and Windows#11886
7ff7134
Thanks @matthewp! - Fixes a missing error message when actions throws duringastro sync
#11904
ca54e3f
Thanks @wtchnm! - perf(assets): avoid downloading original image when using cachev4.15.2
Compare Source
Patch Changes
#11870
8e5257a
Thanks @ArmandPhilippot! - Fixes typo in documenting thefallbackType
property in i18n routing#11884
e450704
Thanks @ascorbic! - Correctly handles content layer data where the transformed value does not match the input schema#11900
80b4a18
Thanks @delucis! - Fixes the user-facing type of the newi18n.routing.fallbackType
option to be optionalv4.15.1
Compare Source
Patch Changes
#11872
9327d56
Thanks @bluwy! - Fixesastro add
importing adapters and integrations#11767
d1bd1a1
Thanks @ascorbic! - Refactors content layer sync to use a queuev4.15.0
Compare Source
Minor Changes
#11729
1c54e63
Thanks @ematipico! - Adds a new variantsync
for theastro:config:setup
hook'scommand
property. This value is set when calling the commandastro sync
.If your integration previously relied on knowing how many variants existed for the
command
property, you must update your logic to account for this new option.#11743
cce0894
Thanks @ph1p! - Adds a new, optional propertytimeout
for theclient:idle
directive.This value allows you to specify a maximum time to wait, in milliseconds, before hydrating a UI framework component, even if the page is not yet done with its initial load. This means you can delay hydration for lower-priority UI elements with more control to ensure your element is interactive within a specified time frame.
#11677
cb356a5
Thanks @ematipico! - Adds a new optionfallbackType
toi18n.routing
configuration that allows you to control how fallback pages are handled.When
i18n.fallback
is configured, this new routing option controls whether to redirect to the fallback page, or to rewrite the fallback page's content in place.The
"redirect"
option is the default value and matches the current behavior of the existing fallback system.The option
"rewrite"
uses the new rewriting system to create fallback pages that render content on the original, requested URL without a browser refresh.For example, the following configuration will generate a page
/fr/index.html
that will contain the same HTML rendered by the page/en/index.html
whensrc/pages/fr/index.astro
does not exist.#11708
62b0d20
Thanks @martrapp! - Adds a new objectswapFunctions
to expose the necessary utility functions onastro:transitions/client
that allow you to build custom swap functions to be used with view transitions.The example below uses these functions to replace Astro's built-in default
swap
function with one that only swaps the<main>
part of the page:See the view transitions guide for more information about hooking into the
astro:before-swap
lifecycle event and adding a custom swap implementation.#11843
5b4070e
Thanks @bholmesdev! - Exposesz
from the newastro:schema
module. This is the new recommended import source for all Zod utilities when using Astro Actions.v4.14.6
Compare Source
Patch Changes
#11847
45b599c
Thanks @ascorbic! - Fixes a case where Vite would be imported by the SSR runtime, causing bundling errors and bloat.#11822
6fcaab8
Thanks @bluwy! - Marks internalvite-plugin-fileurl
plugin withenforce: 'pre'
#11713
497324c
Thanks @voidfill! - Prevents prefetching of the same urls with different hashes.#11814
2bb72c6
Thanks @eduardocereto! - Updates the documentation for experimental Content Layer API with a corrected code example#11842
1ffaae0
Thanks @stephan281094! - Fixes a typo in theMissingImageDimension
error message#11828
20d47aa
Thanks @bholmesdev! - Improves error message when invalid data is returned by an Action.v4.14.5
Compare Source
Patch Changes
#11809
62e97a2
Thanks @bholmesdev! - Fixes usage of.transform()
,.refine()
,.passthrough()
, and other effects on Action form inputs.#11812
260c4be
Thanks @bholmesdev! - ExposesActionAPIContext
type from theastro:actions
module.#11813
3f7630a
Thanks @bholmesdev! - Fixes unexpectedundefined
value when calling an action from the client without a return value.v4.14.4
Compare Source
Patch Changes
#11794
3691a62
Thanks @bholmesdev! - Fixes unexpected warning log when using Actions on "hybrid" rendered projects.#11801
9f943c1
Thanks @delucis! - Fixes a bug where thefilePath
property was not available on content collection entries when using the content layerfile()
loader with a JSON file that contained an object instead of an array. This was breaking use of theimage()
schema utility among other things.v4.14.3
Compare Source
Patch Changes
#11780
c6622ad
Thanks @Princesseuh! - Deprecates the Squoosh image service, to be removed in Astro 5.0. We recommend migrating to the default Sharp service.#11790
41c3fcb
Thanks @sarah11918! - Updates the documentation for experimentalastro:env
with a corrected link to the RFC proposal#11773
86a3391
Thanks @ematipico! - Changes messages logged when using unsupported, deprecated, or experimental adapter features for clarity#11745
89bab1e
Thanks @bluwy! - Prints prerender dynamic value usage warning only if it's used#11774
c6400ab
Thanks @florian-lefebvre! - Fixes the path returned byinjectTypes
#11730
2df49a6
Thanks @florian-lefebvre! - Simplifies path operations ofastro sync
#11771
49650a4
Thanks @florian-lefebvre! - Fixes an error thrown byastro sync
when anastro:env
virtual module is imported inside the Content Collections config#11744
b677429
Thanks @bluwy! - Disables the WebSocket server when creating a Vite server for loading config filesv4.14.2
Compare Source
Patch Changes
391324d
Thanks @bluwy! - Reverts back toyargs-parser
package for CLI argument parsingv4.14.1
Compare Source
Patch Changes
#11725
6c1560f
Thanks @ascorbic! - Prevents content layer importing node builtins in runtime#11692
35af73a
Thanks @matthewp! - Prevent errant HTML from crashing server islandsWhen an HTML minifier strips away the server island comment, the script can't correctly know where the end of the fallback content is. This makes it so that it simply doesn't remove any DOM in that scenario. This means the fallback isn't removed, but it also doesn't crash the browser.
#11727
3c2f93b
Thanks @florian-lefebvre! - Fixes a type issue when using the Content Layer in devv4.14.0
Compare Source
Minor Changes
#11657
a23c69d
Thanks @bluwy! - Deprecates the option for route-generating files to export a dynamic value forprerender
. Only static values are now supported (e.g.export const prerender = true
or= false
). This allows for better treeshaking and bundling configuration in the future.Adds a new
"astro:route:setup"
hook to the Integrations API to allow you to dynamically set options for a route at build or request time through an integration, such as enabling on-demand server rendering.To migrate from a dynamic export to the new hook, update or remove any dynamic
prerender
exports from individual routing files:// src/pages/blog/[slug].astro - export const prerender = import.meta.env.PRERENDER
Instead, create an integration with the
"astro:route:setup"
hook and update the route'sprerender
option:#11360
a79a8b0
Thanks @ascorbic! - Adds a newinjectTypes()
utility to the Integration API and refactors how type generation worksUse
injectTypes()
in theastro:config:done
hook to inject types into your user's project by adding a new a*.d.ts
file.The
filename
property will be used to generate a file at/.astro/integrations/<normalized_integration_name>/<normalized_filename>.d.ts
and must end with".d.ts"
.The
content
property will create the body of the file, and must be valid TypeScript.Additionally,
injectTypes()
returns a URL to the normalized path so you can overwrite its content later on, or manipulate it in any way you want.Codegen has been refactored. Although
src/env.d.ts
will continue to work as is, we recommend you update it:#11605
d3d99fb
Thanks @jcayzac! - Adds a new propertymeta
to Astro's built-in<Code />
component.This allows you to provide a value for Shiki's
meta
attribute to pass options to transformers.The following example passes an option to highlight lines 1 and 3 to Shiki's
tranformerMetaHighlight
:v4.13.4
Compare Source
Patch Changes
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ 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.