Update dependency astro to v5 - autoclosed #18
Closed
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:
^4.15.3->^5.0.0By merging this PR, the issue #19 will be automatically resolved and closed:
Release Notes
withastro/astro (astro)
v5.0.0Compare Source
Major Changes
#11798
e9e2139Thanks @matthewp! - Unflag globalRoutePriorityThe previously experimental feature
globalRoutePriorityis now the default in Astro 5.This was a refactoring of route prioritization in Astro, making it so that injected routes, file-based routes, and redirects are all prioritized using the same logic. This feature has been enabled for all Starlight projects since it was added and should not affect most users.
#11864
ee38b3aThanks @ematipico! - ### [changed]:entryPointtype inside the hookastro:build:ssrIn Astro v4.x, the
entryPointtype wasRouteData.Astro v5.0 the
entryPointtype isIntegrationRouteData, which contains a subset of theRouteDatatype. The fieldsisIndexandfallbackRouteswere removed.What should I do?
Update your adapter to change the type of
entryPointfromRouteDatatoIntegrationRouteData.#12524
9f44019Thanks @bluwy! - Bumps Vite to ^6.0.1 and handles its breaking changes#10742
b6fbdaaThanks @ematipico! - The lowest version of Node supported by Astro is now Node v18.17.1 and higher.#11916
46ea29fThanks @bluwy! - Updates how thebuild.clientandbuild.serveroption values get resolved to match existing documentation. With this fix, the option values will now correctly resolve relative to theoutDiroption. So ifoutDiris set to./dist/nested/, then by default:build.clientwill resolve to<root>/dist/nested/client/build.serverwill resolve to<root>/dist/nested/server/Previously the values were incorrectly resolved:
build.clientwas resolved to<root>/dist/nested/dist/client/build.serverwas resolved to<root>/dist/nested/dist/server/If you were relying on the previous build paths, make sure that your project code is updated to the new build paths.
#11982
d84e444Thanks @Princesseuh! - Adds a default exclude and include value to the tsconfig presets.{projectDir}/distis now excluded by default, and{projectDir}/.astro/types.d.tsand{projectDir}/**/*are included by default.Both of these options can be overridden by setting your own values to the corresponding settings in your
tsconfig.jsonfile.#11861
3ab3b4eThanks @bluwy! - Cleans up Astro-specfic metadata attached tovfile.datain 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.headingsvfile.data.imagePaths->vfile.data.astro.imagePathsThe types of
imagePathshas also been updated fromSet<string>tostring[]. Thevfile.data.astro.frontmattermetadata 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.
#11987
bf90a53Thanks @florian-lefebvre! - Thelocalsobject can no longer be overriddenMiddleware, API endpoints, and pages can no longer override the
localsobject in its entirety. You can still append values onto the object, but you can not replace the entire object and delete its existing values.If you were previously overwriting like so:
This can be changed to an assignment on the existing object instead:
#11908
518433eThanks @Princesseuh! - Theimage.endpointconfig now allow customizing the route of the image endpoint in addition to the entrypoint. This can be useful in niche situations where the default route/_imageconflicts with an existing route or your local server setup.#12008
5608338Thanks @Princesseuh! - Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release.Starting from this release, no breaking changes will be introduced unless absolutely necessary.
To learn how to upgrade, check out the Astro v5.0 upgrade guide in our beta docs site.
#11679
ea71b90Thanks @florian-lefebvre! - Theastro:envfeature introduced behind a flag in v4.10.0 is no longer experimental and is available for general use. If you have been waiting for stabilization before usingastro:env, you can now do so.This feature lets you configure a type-safe schema for your environment variables, and indicate whether they should be available on the server or the client.
To configure a schema, add the
envoption to your Astro config and define your client and server variables. If you were previously using this feature, please remove the experimental flag from your Astro config and move your entireenvconfiguration unchanged to a top-level option.You can import and use your defined variables from the appropriate
/clientor/servermodule: