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 was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/mdx@3.0.0
Major Changes
#10935
ddd8e49
Thanks @bluwy! - Refactors the MDX transformation to rely only on the unified pipeline. Babel and esbuild transformations are removed, which should result in faster build times. The refactor requires using Astro v4.8.0 but no other changes are necessary.#10935
ddd8e49
Thanks @bluwy! - Allows integrations after the MDX integration to updatemarkdown.remarkPlugins
andmarkdown.rehypePlugins
, and have the plugins work in MDX too.If your integration relies on Astro's previous behavior that prevents integrations from adding remark/rehype plugins for MDX, you will now need to configure
@astrojs/mdx
withextendMarkdownConfig: false
and explicitly specify anyremarkPlugins
andrehypePlugins
options instead.#10935
ddd8e49
Thanks @bluwy! - Renames theoptimize.customComponentNames
option tooptimize.ignoreElementNames
to better reflect its usecase. Its behaviour is not changed and should continue to work as before.#10935
ddd8e49
Thanks @bluwy! - Replaces the internalremark-images-to-component
plugin withrehype-images-to-component
to let users use additional rehype plugins for imagesPatch Changes
#10935
ddd8e49
Thanks @bluwy! - Simplifies plain MDX components as hast element nodes to further improve HTML string inlining for theoptimize
option#10935
ddd8e49
Thanks @bluwy! - Allows Vite plugins to transform.mdx
files before the MDX plugin transforms it#10935
ddd8e49
Thanks @bluwy! - Updates theoptimize
option to group static sibling nodes as a<Fragment />
. This reduces the number of AST nodes and simplifies runtime rendering of MDX pages.#10935
ddd8e49
Thanks @bluwy! - Tags the MDX component export for quicker component checks while rendering#10935
ddd8e49
Thanks @bluwy! - Fixesexport const components
keys detection for theoptimize
option#10935
ddd8e49
Thanks @bluwy! - Improvesoptimize
handling for MDX components with attributes and inline MDX componentsastro@4.8.0
Minor Changes
#10935
ddd8e49
Thanks @bluwy! - Exportsastro/jsx/rehype.js
with utilities to generate an Astro metadata object#10625
698c2d9
Thanks @goulvenclech! - Adds the ability for multiple pages to use the same component as anentrypoint
when building an Astro integration. This change is purely internal, and aligns the build process with the behaviour in the development server.#10906
7bbd664
Thanks @Princesseuh! - Adds a new radio checkbox component to the dev toolbar UI library (astro-dev-toolbar-radio-checkbox
)#10963
61f47a6
Thanks @delucis! - Adds support for passing an inline Astro configuration object togetViteConfig()
If you are using
getViteConfig()
to configure the Vitest test runner, you can now pass a second argument to control how Astro is configured. This makes it possible to configure unit tests with different Astro options when using Vitest’s workspaces feature.#10867
47877a7
Thanks @ematipico! - Adds experimental rewriting in Astro with a newrewrite()
function and the middlewarenext()
function.The feature is available via an experimental flag in
astro.config.mjs
:When enabled, you can use
rewrite()
to render another page without changing the URL of the browser in Astro pages and endpoints.The middleware
next()
function now accepts a parameter with the same type as therewrite()
function. For example, withnext("/")
, you can call the next middleware function with a newRequest
.#10858
c0c509b
Thanks @z.string(),! - Adds experimental support for the Actions API. Actions let you define type-safe endpoints you can query from client components with progressive enhancement built in.Actions help you write type-safe backend functions you can call from anywhere. Enable server rendering using the
output
property and add theactions
flag to theexperimental
object:Declare all your actions in
src/actions/index.ts
. This file is the global actions handler.Define an action using the
defineAction()
utility from theastro:actions
module. These accept thehandler
property to define your server-side request handler. If your action accepts arguments, apply theinput
property to validate parameters with Zod.This example defines two actions:
like
andcomment
. Thelike
action accepts a JSON object with apostId
string, while thecomment
action accepts FormData withpostId
,author
, andbody
strings. Eachhandler
updates your database and return a type-safe response.Then, call an action from your client components using the
actions
object fromastro:actions
. You can pass a type-safe object when using JSON, or a FormData object when usingaccept: 'form'
in your action definition:For a complete overview, and to give feedback on this experimental API, see the Actions RFC.
#10906
7bbd664
Thanks @Princesseuh! - Adds a newbuttonBorderRadius
property to theastro-dev-toolbar-button
component for the dev toolbar component library. This property can be useful to make a fully rounded button with an icon in the center.Patch Changes
#10977
59571e8
Thanks @BryceRussell! - Improve error message when accessingclientAddress
on prerendered routes#10935
ddd8e49
Thanks @bluwy! - Improves the error message when failed to render MDX components#10917
3412535
Thanks @jakobhellermann! - Fixes a case where the local server would crash when the host also contained the port, eg. withX-Forwarded-Host: hostname:8080
andX-Forwarded-Port: 8080
headers#10959
685fc22
Thanks @bluwy! - Refactors internal handling of styles and scripts for content collections to improve build performance#10889
4d905cc
Thanks @matthewp! - Preserve content modules properly in cache#10955
2978287
Thanks @florian-lefebvre! - HandlesAstroUserError
s thrown while syncing content collections and exportsBaseSchema
andCollectionConfig
types@astrojs/preact@3.3.0
Minor Changes
#10938
fd508a0
Thanks @florian-lefebvre! - Adds adevtools
optionYou can enable Preact devtools in development by setting
devtools: true
in yourpreact()
integration config:@astrojs/solid-js@4.2.0
Minor Changes
#10937
7179930
Thanks @florian-lefebvre! - Adds adevtools
optionYou can enable the official Solid Devtools while working in development mode by setting
devtools: true
in yoursolid()
integration config and addingsolid-devtools
to your project dependencies:@astrojs/vercel@7.6.0
Minor Changes
f0acd30
Thanks @ematipico! - Implements the vercel skew protection@astrojs/vue@4.2.0
Minor Changes
#10929
082abb8
Thanks @florian-lefebvre! - Adds adevtools
optionYou can enable the official Vue DevTools while working in development mode by setting
devtools:true
in yourvue()
integration config:@astrojs/db@0.11.1
Patch Changes
a134318
Thanks @matthewp! - Convert non-ISO date to UTC time@astrojs/react@3.3.3
Patch Changes
d47baa4
Thanks @matthewp! - Updates package to support React 19 beta@astrojs/web-vitals@0.1.1
Patch Changes
e63e96b
Thanks @delucis! - Fixes a runtime issue where Vite was unintentionally pulled into the server code