withastro/astro (astro)
### [`v4.0.1`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#401)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.0.0...astro@4.0.1)
##### Patch Changes
- [#9315](https://togithub.com/withastro/astro/pull/9315) [`631e5d01b`](https://togithub.com/withastro/astro/commit/631e5d01b00efee6970466c38201cb0e67ec74cf) Thanks [@ematipico](https://togithub.com/ematipico)! - Fixes an issue where logs that weren't grouped together by route when building the app.
### [`v4.0.0`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#400)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@3.6.4...astro@4.0.0)
##### Major Changes
- [#9138](https://togithub.com/withastro/astro/pull/9138) [`abf601233`](https://togithub.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3) Thanks [@bluwy](https://togithub.com/bluwy)! - Updates the unified, remark, and rehype dependencies to latest. Make sure to update your custom remark and rehype plugins as well to be compatible with the latest versions.
**Potentially breaking change:** The default value of `markdown.remarkRehype.footnoteBackLabel` is changed from `"Back to content"` to `"Back to reference 1"`. See the `mdast-util-to-hast` [commit](https://togithub.com/syntax-tree/mdast-util-to-hast/commit/56c88e45690be138fad9f0bf367b939d09816863) for more information.
- [#9181](https://togithub.com/withastro/astro/pull/9181) [`cdabf6ef0`](https://togithub.com/withastro/astro/commit/cdabf6ef02be7220fd2b6bdcef924ceca089381e) Thanks [@bluwy](https://togithub.com/bluwy)! - Removes support for returning simple objects from endpoints (deprecated since Astro 3.0). You should return a `Response` instead.
`ResponseWithEncoding` is also removed. You can refactor the code to return a response with an array buffer instead, which is encoding agnostic.
The types for middlewares have also been revised. To type a middleware function, you should now use `MiddlewareHandler` instead of `MiddlewareResponseHandler`. If you used `defineMiddleware()` to type the function, no changes are needed.
- [#9263](https://togithub.com/withastro/astro/pull/9263) [`3cbd8ea75`](https://togithub.com/withastro/astro/commit/3cbd8ea7534910e3beae396dcfa93ce87dcdd91f) Thanks [@bluwy](https://togithub.com/bluwy)! - Removes additional deprecated APIs:
- The Astro preview server now returns a 404 status instead of a 301 redirect when requesting assets from the public directory without a base.
- Removes special handling when referencing the `astro/client-image` type. You should use the `astro/client` type instead.
- Removes deprecated built-in `rss` support in `getStaticPaths`. You should use `@astrojs/rss` instead.
- Removes deprecated `Astro.request.params` support. You should use `Astro.params` instead.
- [#9271](https://togithub.com/withastro/astro/pull/9271) [`47604bd5b`](https://togithub.com/withastro/astro/commit/47604bd5b5bb2ea63922b657bac104c010575c20) Thanks [@matthewp](https://togithub.com/matthewp)! - Renames Dev Overlay to Dev Toolbar
The previously named experimental Dev Overlay is now known as the Astro Dev Toolbar. Overlay plugins have been renamed as Toolbar Apps. All APIs have been updated to reflect this name change.
To not break existing APIs, aliases for the Toolbar-based names have been created. The previous API names will continue to function but will be deprecated in the future. All documentation has been updated to reflect Toolbar-based names.
- [#9122](https://togithub.com/withastro/astro/pull/9122) [`1c48ed286`](https://togithub.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721) Thanks [@bluwy](https://togithub.com/bluwy)! - Adds Vite 5 support. There are no breaking changes from Astro. Check the [Vite migration guide](https://vitejs.dev/guide/migration.html) for details of the breaking changes from Vite instead.
- [#9225](https://togithub.com/withastro/astro/pull/9225) [`c421a3d17`](https://togithub.com/withastro/astro/commit/c421a3d17911aeda29b5204f6d568ae87e329eaf) Thanks [@natemoo-re](https://togithub.com/natemoo-re)! - Removes the opt-in `handleForms` property for ``. Form submissions are now handled by default and this property is no longer necessary. This default behavior can be disabled by setting `data-astro-reload` on relevant `` elements.
- [#9196](https://togithub.com/withastro/astro/pull/9196) [`37697a2c5`](https://togithub.com/withastro/astro/commit/37697a2c5511572dc29c0a4ea46f90c2f62be8e6) Thanks [@bluwy](https://togithub.com/bluwy)! - Removes support for Shiki custom language's `path` property. The language JSON file should be imported and passed to the option instead.
```diff
// astro.config.js
+ import customLang from './custom.tmLanguage.json'
export default defineConfig({
markdown: {
shikiConfig: {
langs: [
- { path: './custom.tmLanguage.json' },
+ customLang,
],
},
},
})
```
- [#9199](https://togithub.com/withastro/astro/pull/9199) [`49aa215a0`](https://togithub.com/withastro/astro/commit/49aa215a01ee1c4805316c85bb0aea6cfbc25a31) Thanks [@lilnasy](https://togithub.com/lilnasy)! - This change only affects maintainers of third-party adapters. In the Integration API, the `app.render()` method of the `App` class has been simplified.
Instead of two optional arguments, it now takes a single optional argument that is an object with two optional properties: `routeData` and `locals`.
```diff
app.render(request)
- app.render(request, routeData)
+ app.render(request, { routeData })
- app.render(request, routeData, locals)
+ app.render(request, { routeData, locals })
- app.render(request, undefined, locals)
+ app.render(request, { locals })
```
The current signature is deprecated but will continue to function until next major version.
- [#9212](https://togithub.com/withastro/astro/pull/9212) [`c0383ea0c`](https://togithub.com/withastro/astro/commit/c0383ea0c102cb62b7235823c706a090ba08715f) Thanks [@alexanderniebuhr](https://togithub.com/alexanderniebuhr)! - Removes deprecated `app.match()` option, `matchNotFound`
- [#9168](https://togithub.com/withastro/astro/pull/9168) [`153a5abb9`](https://togithub.com/withastro/astro/commit/153a5abb905042ac68b712514dc9ec387d3e6b17) Thanks [@bluwy](https://togithub.com/bluwy)! - Removes deprecated features from Astro 3.0
- Adapters are now required to pass `supportedAstroFeatures` to specify a list of features they support.
- The `build.split` and `build.excludeMiddleware` options are removed. Use `functionPerRoute` and `edgeMiddleware` from adapters instead.
- The `markdown.drafts` option and draft feature is removed. Use content collections instead.
- Lowercase endpoint names are no longer supported. Use uppercase endpoint names instead.
- `getHeaders()` exported from markdown files is removed. Use `getHeadings()` instead.
##### Minor Changes
- [#9105](https://togithub.com/withastro/astro/pull/9105) [`6201bbe96`](https://togithub.com/withastro/astro/commit/6201bbe96c2a083fb201e4a43a9bd88499821a3e) Thanks [@FredKSchott](https://togithub.com/FredKSchott)! - Update CLI logging experience
- [#9200](https://togithub.com/withastro/astro/pull/9200) [`b4b851f5a`](https://togithub.com/withastro/astro/commit/b4b851f5a46b32ee531db5dc39ccd2aa7af7bcfd) Thanks [@ematipico](https://togithub.com/ematipico)! - Adds a new way to configure the `i18n.locales` array.
Developers can now assign a custom URL path prefix that can span multiple language codes:
```js
// astro.config.mjs
export default defineConfig({
experimental: {
i18n: {
defaultLocale: 'english',
locales: ['de', { path: 'english', codes: ['en', 'en-US'] }, 'fr'],
},
},
});
```
With the above configuration, the URL prefix of the default locale will be `/english/`. When computing `Astro.preferredLocale`, Astro will use the `codes`.
- [#9115](https://togithub.com/withastro/astro/pull/9115) [`3b77889b4`](https://togithub.com/withastro/astro/commit/3b77889b47750ed6e17c7858780dc4aae9201b58) Thanks [@natemoo-re](https://togithub.com/natemoo-re)! - Adds the `astro preferences` command to manage user preferences. User preferences are specific to individual Astro users, unlike the `astro.config.mjs` file which changes behavior for everyone working on a project.
User preferences are scoped to the current project by default, stored in a local `.astro/settings.json` file. Using the `--global` flag, user preferences can also be applied to every Astro project on the current machine. Global user preferences are stored in an operating system-specific location.
```sh
```
### [`v3.6.4`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#364)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@3.6.3...astro@3.6.4)
##### Patch Changes
- [#9226](https://togithub.com/withastro/astro/pull/9226) [`8f8a40e93`](https://togithub.com/withastro/astro/commit/8f8a40e93d6a0774ba84a6f5db8c42cd81db005e) Thanks [@outofambit](https://togithub.com/outofambit)! - Fix i18n fallback routing with routing strategy of always-prefix
- [#9179](https://togithub.com/withastro/astro/pull/9179) [`3f28336d9`](https://togithub.com/withastro/astro/commit/3f28336d9a52d7e4364d455ee3128d14d10a078a) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixes an issue where the presence of a slot in a page led to an error.
- [#9219](https://togithub.com/withastro/astro/pull/9219) [`067a65f5b`](https://togithub.com/withastro/astro/commit/067a65f5b4d163bf1944cf47e6bf891f0b93553f) Thanks [@natemoo-re](https://togithub.com/natemoo-re)! - Fix edge case where `
This PR contains the following updates:
^3.0.0
->^4.0.0
Release Notes
withastro/astro (astro)
### [`v4.0.1`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#401) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.0.0...astro@4.0.1) ##### Patch Changes - [#9315](https://togithub.com/withastro/astro/pull/9315) [`631e5d01b`](https://togithub.com/withastro/astro/commit/631e5d01b00efee6970466c38201cb0e67ec74cf) Thanks [@ematipico](https://togithub.com/ematipico)! - Fixes an issue where logs that weren't grouped together by route when building the app. ### [`v4.0.0`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#400) [Compare Source](https://togithub.com/withastro/astro/compare/astro@3.6.4...astro@4.0.0) ##### Major Changes - [#9138](https://togithub.com/withastro/astro/pull/9138) [`abf601233`](https://togithub.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3) Thanks [@bluwy](https://togithub.com/bluwy)! - Updates the unified, remark, and rehype dependencies to latest. Make sure to update your custom remark and rehype plugins as well to be compatible with the latest versions. **Potentially breaking change:** The default value of `markdown.remarkRehype.footnoteBackLabel` is changed from `"Back to content"` to `"Back to reference 1"`. See the `mdast-util-to-hast` [commit](https://togithub.com/syntax-tree/mdast-util-to-hast/commit/56c88e45690be138fad9f0bf367b939d09816863) for more information. - [#9181](https://togithub.com/withastro/astro/pull/9181) [`cdabf6ef0`](https://togithub.com/withastro/astro/commit/cdabf6ef02be7220fd2b6bdcef924ceca089381e) Thanks [@bluwy](https://togithub.com/bluwy)! - Removes support for returning simple objects from endpoints (deprecated since Astro 3.0). You should return a `Response` instead. `ResponseWithEncoding` is also removed. You can refactor the code to return a response with an array buffer instead, which is encoding agnostic. The types for middlewares have also been revised. To type a middleware function, you should now use `MiddlewareHandler` instead of `MiddlewareResponseHandler`. If you used `defineMiddleware()` to type the function, no changes are needed. - [#9263](https://togithub.com/withastro/astro/pull/9263) [`3cbd8ea75`](https://togithub.com/withastro/astro/commit/3cbd8ea7534910e3beae396dcfa93ce87dcdd91f) Thanks [@bluwy](https://togithub.com/bluwy)! - Removes additional deprecated APIs: - The Astro preview server now returns a 404 status instead of a 301 redirect when requesting assets from the public directory without a base. - Removes special handling when referencing the `astro/client-image` type. You should use the `astro/client` type instead. - Removes deprecated built-in `rss` support in `getStaticPaths`. You should use `@astrojs/rss` instead. - Removes deprecated `Astro.request.params` support. You should use `Astro.params` instead. - [#9271](https://togithub.com/withastro/astro/pull/9271) [`47604bd5b`](https://togithub.com/withastro/astro/commit/47604bd5b5bb2ea63922b657bac104c010575c20) Thanks [@matthewp](https://togithub.com/matthewp)! - Renames Dev Overlay to Dev Toolbar The previously named experimental Dev Overlay is now known as the Astro Dev Toolbar. Overlay plugins have been renamed as Toolbar Apps. All APIs have been updated to reflect this name change. To not break existing APIs, aliases for the Toolbar-based names have been created. The previous API names will continue to function but will be deprecated in the future. All documentation has been updated to reflect Toolbar-based names. - [#9122](https://togithub.com/withastro/astro/pull/9122) [`1c48ed286`](https://togithub.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721) Thanks [@bluwy](https://togithub.com/bluwy)! - Adds Vite 5 support. There are no breaking changes from Astro. Check the [Vite migration guide](https://vitejs.dev/guide/migration.html) for details of the breaking changes from Vite instead. - [#9225](https://togithub.com/withastro/astro/pull/9225) [`c421a3d17`](https://togithub.com/withastro/astro/commit/c421a3d17911aeda29b5204f6d568ae87e329eaf) Thanks [@natemoo-re](https://togithub.com/natemoo-re)! - Removes the opt-in `handleForms` property for `