Merged
Conversation
7142fdc to
5298038
Compare
c190201 to
0b93b58
Compare
0b93b58 to
bcb07bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
nextis currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, runchangeset pre exitonnext.Releases
astro@5.0.0-beta.4
Major Changes
#11979
423dfc1Thanks @bluwy! - Bumpsvitedependency to v6.0.0-beta.2. The version is pinned and will be updated as new Vite versions publish to prevent unhandled breaking changes. For the full list of Vite-specific changes, see its changelog.#12100
abf9a89Thanks @astrobot-houston! - Refactors legacycontentanddatacollections to use the Content Layer APIglob()loader for better performance and to support backwards compatibility. Also introduces thelegacy.collectionsflag for projects that are unable to update to the new behavior immediately.By default, collections that use the old types (
contentordata) and do not define aloaderare now implemented under the hood using the Content Layer API's built-inglob()loader, with extra backward-compatibility handling.In order to achieve backwards compatibility with existing
contentcollections, the following have been implemented:globloader collection is defined, with patterns that match the previous handling (matchessrc/content/<collection name>/**/*.mdand other content extensions depending on installed integrations, with underscore-prefixed files and folders ignored)slugfield is added with the same format as beforerender()method is added to the entry, so they can be called usingentry.render()getEntryBySlugis supportedIn order to achieve backwards compatibility with existing
datacollections, the following have been implemented:globloader collection is defined, with patterns that match the previous handling (matchessrc/content/<collection name>/**/*{.json,.yaml}and other data extensions, with underscore-prefixed files and folders ignored)getDataEntryByIdis supportedWhile this backwards compatibility implementation is able to emulate most of the features of legacy collections, there are some differences and limitations that may cause breaking changes to existing collections:
src/content/, even if they were not defined insrc/content/config.ts. This behavior is now deprecated, and collections should always be defined insrc/content/config.ts. For existing collections, these can just be empty declarations (e.g.const blog = defineCollection({})) and Astro will implicitly define your legacy collection for you in a way that is compatible with the new loading behavior.layoutfield is not supported in Markdown collection entries. This property is intended only for standalone page files located insrc/pages/and not likely to be in your collection entries. However, if you were using this property, you must now create dynamic routes that include your page styling.getCollection(), the order in which entries are returned may be different than before. If you need a specific order, you should sort the collection entries yourself.image().refine()is not supported. If you need to validate the properties of an image you will need to do this at runtime in your page or component.keyargument ofgetEntry(collection, key)is typed asstring, rather than having types for every entry.A new legacy configuration flag
legacy.collectionsis added for users that want to keep their current legacy (content and data) collections behavior (available in Astro v2 - v4), or who are not yet ready to update their projects:When set, no changes to your existing collections are necessary, and the restrictions on storing both new and old collections continue to exist: legacy collections (only) must continue to remain in
src/content/, while new collections using a loader from the Content Layer API are forbidden in that folder.#12079
7febf1fThanks @ematipico! -paramspassed ingetStaticPathsare no longer automatically decoded.[changed]:
paramsaren't decoded anymore.In Astro v4.x,
paramsin were automatically decoded usingdecodeURIComponent.Astro v5.0 doesn't automatically decode
paramsingetStaticPathsanymore, so you'll need to manually decode them yourself if neededWhat should I do?
If you were relying on the automatic decode, you'll need to manually decode it using
decodeURI.Note that the use of
decodeURIComponent) is discouraged forgetStaticPathsbecause it decodes more characters than it should, for example/,?,#and more.Patch Changes
55e9cd8Thanks @ascorbic! - Prevents Vite emitting an error when restarting itself@astrojs/svelte@6.0.0-beta.1
Patch Changes
dcc1e89Thanks @hermit99! - Fixes an Reference Error that occurred during client transitions