Update dependency astro to v5
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| astro (source) | ^4.5.18 -> ^5.0.0 |
Release Notes
withastro/astro (astro)
v5.1.1
Patch Changes
-
#12782
f3d8385Thanks @fhiromasa! - update comment in packages/astro/src/types/public/common.ts -
#12789
f632b94Thanks @ascorbic! - Pass raw frontmatter to remark plugins in glob loader -
#12799
739dbfbThanks @ascorbic! - Upgrades Vite to pin esbuild
v5.1.0
Minor Changes
-
#12441
b4fec3cThanks @ascorbic! - Adds experimental session supportSessions are used to store user state between requests for server-rendered pages, such as login status, shopping cart contents, or other user-specific data.
v5.0.9
Patch Changes
- #12756
95795f8Thanks @matthewp! - Remove debug logging from build
v5.0.8
Patch Changes
- #12749
039d022Thanks @matthewp! - Clean server sourcemaps from static output
v5.0.7
Patch Changes
- #12746
c879f50Thanks @matthewp! - Remove all assets created from the server build
v5.0.6
Patch Changes
-
#12597
564ac6cThanks @florian-lefebvre! - Fixes an issue where image and server islands routes would not be passed to theastro:routes:resolvedhook during builds -
#12718
ccc5ad1Thanks @ematipico! - Fixes an issue where Astro couldn't correctly handle i18n fallback when using the i18n middleware -
#12728
ee66a45Thanks @argyleink! - Adds type support for theclosedbyattribute for<dialog>elements -
#12709
e3bfd93Thanks @mtwilliams-code! - Fixes a bug where Astro couldn't correctly parseparamsandpropswhen receiving i18n fallback URLs -
#12657
14dffccThanks @darkmaga! - Trailing slash support for actions -
#12715
029661dThanks @ascorbic! - Fixes a bug that caused errors in dev when editing sites with large numbers of MDX pages -
#12729
8b1cecdThanks @JoeMorgan! - "Addedinertto htmlBooleanAttributes" -
#12726
7c7398cThanks @florian-lefebvre! - Fixes a case where failing content entries inastro checkwould not be surfaced
v5.0.5
Patch Changes
-
#12705
0d1eab5Thanks @ascorbic! - Fixes a bug where MDX files with certain characters in the name would cause builds to fail -
#12707
2aaed2dThanks @ematipico! - Fixes a bug where the middleware was incorrectly imported during the build -
#12697
1c4a032Thanks @ascorbic! - Fix a bug that caused builds to fail if an image had a quote mark in its name -
#12694
495f46bThanks @ematipico! - Fixes a bug where the experimental featureexperimental.svgwas incorrectly used when generating ESM images -
#12658
3169593Thanks @jurajkapsz! - Fixes astro info copy to clipboard process not returning to prompt in certain cases. -
#12712
b01c74aThanks @ascorbic! - Fixes a bug which misidentified pages as markdown if a query string ended in a markdown extension
v5.0.4
Patch Changes
-
#12653
e21c7e6Thanks @sarah11918! - Updates a reference in an error message -
#12585
a9373c0Thanks @florian-lefebvre! - Fixes a case whereprocess.envwould be frozen despite changes made to environment variables in development -
#12695
a203d5dThanks @ascorbic! - Throws a more helpful error when images are missing
v5.0.3
Patch Changes
-
#12645
8704c54Thanks @sarah11918! - Updates some reference links in error messages for new v5 docs. -
#12641
48ca399Thanks @ascorbic! - Fixes a bug whereastro info --copywasn't working correctly onmacOSsystems. -
#12461
62939adThanks @kyr0! - Removes the misleading log message telling that a custom renderer is not recognized while it clearly is and works. -
#12642
ff18b9cThanks @ematipico! - Provides more information when logging a warning for accessingAstro.request.headersin prerendered pages -
#12634
03958d9Thanks @delucis! - Improves error message formatting for user config and content collection frontmatter -
#12547
6b6e18dThanks @mtwilliams-code! - Fixes a bug where URL search parameters weren't passed when using the i18nfallbackfeature. -
#12449
e6b8017Thanks @apatel369! - Fixes an issue where the customassetFileNamesconfiguration caused assets to be incorrectly moved to the server directory instead of the client directory, resulting in 404 errors when accessed from the client side. -
#12518
e216250Thanks @ematipico! - Fixes an issue where SSR error pages would return duplicated custom headers. -
#12625
74bfad0Thanks @ematipico! - Fixes an issue where theexperimental.svghad incorrect type, resulting in some errors in the editors. -
#12631
dec0305Thanks @ascorbic! - Fixes a bug where the class attribute was rendered twice on the image component -
#12623
0e4fecbThanks @ascorbic! - Correctly handles images in content collections with uppercase file extensions -
#12633
8a551c1Thanks @bluwy! - Cleans up content layer sync during builds and programmaticsync()calls -
#12640
22e405aThanks @ascorbic! - Fixes a bug that caused content collections to be returned empty when run in a test environment -
#12613
306c9f9Thanks @matthewp! - Fix use of cloned requests in middleware with clientAddressWhen using
context.clientAddressorAstro.clientAddressAstro looks up the address in a hidden property. Cloning a request can cause this hidden property to be lost.The fix is to pass the address as an internal property instead, decoupling it from the request.
v5.0.2
Patch Changes
- #12601
0724929Thanks @ascorbic! - Includes "undefined" in types for getEntry
v5.0.1
Patch Changes
v5.0.0
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, theentryPointtype 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 entryPoint from RouteData to IntegrationRouteData.
-import type {RouteData} from 'astro';
+import type {IntegrationRouteData} from "astro"
-function useRoute(route: RouteData) {
+function useRoute(route: IntegrationRouteData) {
}
-
#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.imagePaths
The 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:
ctx.locals = { one: 1, two: 2, };This can be changed to an assignment on the existing object instead:
Object.assign(ctx.locals, { one: 1, two: 2, }); -
#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.import { defineConfig } from 'astro/config'; defineConfig({ image: { endpoint: { route: '/image', entrypoint: './src/image_endpoint.ts', }, }, }); -
#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.import { defineConfig, envField } from 'astro/config'; export default defineConfig({ env: { schema: { API_URL: envField.string({ context: 'client', access: 'public', optional: true }), PORT: envField.number({ context: 'server', access: 'public', default: 4321 }), API_SECRET: envField.string({ context: 'server', access: 'secret' }), }, }, });You can import and use your defined variables from the appropriate
/clientor/servermodule:
Configuration
📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.