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
astro@5.0.0-beta.3
Minor Changes
#12047
21b5e80
Thanks @rgodha24! - Adds a new optionalparser
property to the built-infile()
loader for content collections to support additional file types such astoml
andcsv
.The
file()
loader now accepts a second argument that defines aparser
function. This allows you to specify a custom parser (e.g.toml.parse
orcsv-parse
) to create a collection from a file's contents. Thefile()
loader will automatically detect and parse JSON and YAML files (based on their file extension) with no need for aparser
.This works with any type of custom file formats including
csv
andtoml
. The following example defines a content collectiondogs
using a.toml
file.After importing TOML's parser, you can load the
dogs
collection into your project by passing both a file path andparser
to thefile()
loader.The
parser
argument also allows you to load a single collection from a nested JSON document. For example, this JSON file contains multiple collections:You can seperate these collections by passing a custom
parser
to thefile()
loader like so:And it continues to work with maps of
id
todata
#12071
61d248e
Thanks @Princesseuh! -astro add
no longer automatically setsoutput: 'server'
. Since the default value of output now allows for server-rendered pages, it no longer makes sense to default to full server builds when you add an adapter#11963
0a1036e
Thanks @florian-lefebvre! - Adds a newcreateCodegenDir()
function to theastro:config:setup
hook in the Integrations APIIn 4.14, we introduced the
injectTypes
utility on theastro:config:done
hook. It can create.d.ts
files and make their types available to user's projects automatically. Under the hood, it creates a file in<root>/.astro/integrations/<normalized_integration_name>
.While the
.astro
directory has always been the preferred place to write code generated files, it has also been prone to mistakes. For example, you can write a.astro/types.d.ts
file, breaking Astro types. Or you can create a file that overrides a file created by another integration.In this release,
<root>/.astro/integrations/<normalized_integration_name>
can now be retrieved in theastro:config:setup
hook by callingcreateCodegenDir()
. It allows you to have a dedicated folder, avoiding conflicts with another integration or Astro itself. This directory is created by calling this function so it's safe to write files to it directly:#12081
8679954
Thanks @florian-lefebvre! - Removes the experimentalcontentCollectionsCache
introduced in3.5.0
.Astro Content Layer API independently solves some of the caching and performance issues with legacy content collections that this strategy attempted to address. This feature has been replaced with continued work on improvements to the content layer. If you were using this experimental feature, you must now remove the flag from your Astro config as it no longer exists:
export default defineConfig({ experimental: { - contentCollectionsCache: true } })
The
cacheManifest
boolean argument is no longer passed to theastro:build:done
integration hook:const integration = { name: "my-integration", hooks: { "astro:build:done": ({ - cacheManifest, logger }) => {} } }
Patch Changes
#12073
acf264d
Thanks @bluwy! - Replacesora
withyocto-spinner
#12075
a19530e
Thanks @bluwy! - Parses frontmatter ourselves#12070
9693ad4
Thanks @ematipico! - Fixes an issue where the check origin middleware was incorrectly injected when the build output was"static"
Updated dependencies [
a19530e
]:@astrojs/db@0.14.0-beta.2
Patch Changes
#12073
acf264d
Thanks @bluwy! - Replacesora
withyocto-spinner
Updated dependencies [
acf264d
]:@astrojs/markdoc@0.11.5-beta.1
Patch Changes
#12075
a19530e
Thanks @bluwy! - Parses frontmatter ourselvesUpdated dependencies [
a19530e
]:@astrojs/mdx@4.0.0-beta.2
Patch Changes
#12075
a19530e
Thanks @bluwy! - Parses frontmatter ourselvesUpdated dependencies [
a19530e
]:@astrojs/markdown-remark@6.0.0-beta.2
Patch Changes
a19530e
Thanks @bluwy! - Parses frontmatter ourselves@astrojs/studio@0.1.2-beta.0
Patch Changes
acf264d
Thanks @bluwy! - Replacesora
withyocto-spinner