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 next, this PR will be updated.
next
is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, runchangeset pre exit
onnext
.Releases
[email protected]
Major Changes
#11861
3ab3b4e
Thanks @bluwy! - Cleans up Astro-specfic metadata attached tovfile.data
in Remark and Rehype plugins. Previously, the metadata was attached in different locations with inconsistent names. The metadata is now renamed as below:vfile.data.__astroHeadings
->vfile.data.astro.headings
vfile.data.imagePaths
->vfile.data.astro.imagePaths
The types of
imagePaths
has also been updated fromSet<string>
tostring[]
. Thevfile.data.astro.frontmatter
metadata is left unchanged.While we don't consider these APIs public, they can be accessed by Remark and Rehype plugins that want to re-use Astro's metadata. If you are using these APIs, make sure to access them in the new locations.
#11825
560ef15
Thanks @bluwy! - Updates internal Shiki rehype plugin to highlight code blocks as hast (using Shiki'scodeToHast()
API). This allows a more direct Markdown and MDX processing, and improves the performance when building the project, but may cause issues with existing Shiki transformers.If you are using Shiki transformers passed to
markdown.shikiConfig.transformers
, you must make sure they do not use thepostprocess
hook as it no longer runs on code blocks in.md
and.mdx
files. (See the Shiki documentation on transformer hooks for more information).Code blocks in
.mdoc
files and<Code />
component do not use the internal Shiki rehype plugin and are unaffected.#11819
2bdde80
Thanks @bluwy! - Updates the Astro config loading flow to ignore processing locally-linked dependencies with Vite (e.g.npm link
, in a monorepo, etc). Instead, they will be normally imported by the Node.js runtime the same way as other dependencies fromnode_modules
.Previously, Astro would process locally-linked dependencies which were able to use Vite features like TypeScript when imported by the Astro config file.
However, this caused confusion as integration authors may test against a package that worked locally, but not when published. This method also restricts using CJS-only dependencies because Vite requires the code to be ESM. Therefore, Astro's behaviour is now changed to ignore processing any type of dependencies by Vite.
In most cases, make sure your locally-linked dependencies are built to JS before running the Astro project, and the config loading should work as before.
Patch Changes
#11878
334948c
Thanks @ascorbic! - Adds a new functionrefreshContent
to theastro:server:setup
hook that allows integrations to refresh the content layer. This can be used, for example, to register a webhook endpoint during dev, or to open a socket to a CMS to listen for changes.By default,
refreshContent
will refresh all collections. You can optionally pass aloaders
property, which is an array of loader names. If provided, only collections that use those loaders will be refreshed. For example, A CMS integration could use this property to only refresh its own collections.You can also pass a
context
object to the loaders. This can be used to pass arbitrary data, such as the webhook body, or an event from the websocket.Updated dependencies [
3ab3b4e
,560ef15
,3ab3b4e
]:@astrojs/[email protected]
Major Changes
#11861
3ab3b4e
Thanks @bluwy! - Cleans up Astro-specfic metadata attached tovfile.data
in Remark and Rehype plugins. Previously, the metadata was attached in different locations with inconsistent names. The metadata is now renamed as below:vfile.data.__astroHeadings
->vfile.data.astro.headings
vfile.data.imagePaths
->vfile.data.astro.imagePaths
The types of
imagePaths
has also been updated fromSet<string>
tostring[]
. Thevfile.data.astro.frontmatter
metadata is left unchanged.While we don't consider these APIs public, they can be accessed by Remark and Rehype plugins that want to re-use Astro's metadata. If you are using these APIs, make sure to access them in the new locations.
#11825
560ef15
Thanks @bluwy! - Updates return object ofcreateShikiHighlighter
ascodeToHast
andcodeToHtml
to allow generating either the hast or html string directly#11861
3ab3b4e
Thanks @bluwy! - RemovesInvalidAstroDataError
,safelyGetAstroData
, andsetVfileFrontmatter
APIs in favour ofisFrontmatterValid
@astrojs/[email protected]
Patch Changes
#11825
560ef15
Thanks @bluwy! - Uses latest version of@astrojs/markdown-remark
with updated Shiki APIsUpdated dependencies [
3ab3b4e
,560ef15
,3ab3b4e
]:@astrojs/[email protected]
Patch Changes
#11861
3ab3b4e
Thanks @bluwy! - Updates@astrojs/markdown-remark
and handle its breaking changesUpdated dependencies [
3ab3b4e
,560ef15
,3ab3b4e
]: