withastro/astro (astro)
### [`v4.7.0`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#470)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.6.4...astro@4.7.0)
##### Minor Changes
- [#10665](https://togithub.com/withastro/astro/pull/10665) [`7b4f284`](https://togithub.com/withastro/astro/commit/7b4f2840203fe220758934f1366485f788727f0d) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Adds new utilities to ease the creation of toolbar apps including `defineToolbarApp` to make it easier to define your toolbar app and `app` and `server` helpers for easier communication between the toolbar and the server. These new utilities abstract away some of the boilerplate code that is common in toolbar apps, and lower the barrier of entry for app authors.
For example, instead of creating an event listener for the `app-toggled` event and manually typing the value in the callback, you can now use the `onAppToggled` method. Additionally, communicating with the server does not require knowing any of the Vite APIs anymore, as a new `server` object is passed to the `init` function that contains easy to use methods for communicating with the server.
```diff
import { defineToolbarApp } from "astro/toolbar";
export default defineToolbarApp({
init(canvas, app, server) {
- app.addEventListener("app-toggled", (e) => {
- console.log(`App is now ${state ? "enabled" : "disabled"}`);.
- });
+ app.onToggled(({ state }) => {
+ console.log(`App is now ${state ? "enabled" : "disabled"}`);
+ });
- if (import.meta.hot) {
- import.meta.hot.send("my-app:my-client-event", { message: "world" });
- }
+ server.send("my-app:my-client-event", { message: "world" })
- if (import.meta.hot) {
- import.meta.hot.on("my-server-event", (data: {message: string}) => {
- console.log(data.message);
- });
- }
+ server.on<{ message: string }>("my-server-event", (data) => {
+ console.log(data.message); // data is typed using the type parameter
+ });
},
})
```
Server helpers are also available on the server side, for use in your integrations, through the new `toolbar` object:
```ts
"astro:server:setup": ({ toolbar }) => {
toolbar.on<{ message: string }>("my-app:my-client-event", (data) => {
console.log(data.message);
toolbar.send("my-server-event", { message: "hello" });
});
}
```
This is a backwards compatible change and your your existing dev toolbar apps will continue to function. However, we encourage you to build your apps with the new helpers, following the [updated Dev Toolbar API documentation](https://docs.astro.build/en/reference/dev-toolbar-app-reference/).
- [#10734](https://togithub.com/withastro/astro/pull/10734) [`6fc4c0e`](https://togithub.com/withastro/astro/commit/6fc4c0e420da7629b4cfc28ee7efce1d614447be) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Astro will now automatically check for updates when you run the dev server. If a new version is available, a message will appear in the terminal with instructions on how to update. Updates will be checked once per 10 days, and the message will only appear if the project is multiple versions behind the latest release.
This behavior can be disabled by running `astro preferences disable checkUpdates` or setting the `ASTRO_DISABLE_UPDATE_CHECK` environment variable to `false`.
- [#10762](https://togithub.com/withastro/astro/pull/10762) [`43ead8f`](https://togithub.com/withastro/astro/commit/43ead8fbd5112823118060175c7a4a22522cc325) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Enables type checking for JavaScript files when using the `strictest` TS config. This ensures consistency with Astro's other TS configs, and fixes type checking for integrations like Astro DB when using an `astro.config.mjs`.
If you are currently using the `strictest` preset and would like to still disable `.js` files, set `allowJS: false` in your `tsconfig.json`.
##### Patch Changes
- [#10861](https://togithub.com/withastro/astro/pull/10861) [`b673bc8`](https://togithub.com/withastro/astro/commit/b673bc850593d5af25793d0358c00797477fa373) Thanks [@mingjunlu](https://togithub.com/mingjunlu)! - Fixes an issue where `astro build` writes type declaration files to `outDir` when it's outside of root directory.
- [#10684](https://togithub.com/withastro/astro/pull/10684) [`8b59d5d`](https://togithub.com/withastro/astro/commit/8b59d5d078ff40576b8cbee432279c6ad044a1a9) Thanks [@PeterDraex](https://togithub.com/PeterDraex)! - Update sharp to 0.33 to fix issue with Alpine Linux
### [`v4.6.4`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#464)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.6.3...astro@4.6.4)
##### Patch Changes
- [#10846](https://togithub.com/withastro/astro/pull/10846) [`3294f7a`](https://togithub.com/withastro/astro/commit/3294f7a343e036d2ad9ac8d5f792ad0d4f43a399) Thanks [@matthewp](https://togithub.com/matthewp)! - Prevent getCollection breaking in vitest
- [#10856](https://togithub.com/withastro/astro/pull/10856) [`30cf82a`](https://togithub.com/withastro/astro/commit/30cf82ac3e970a6a3c0f07db1340dd7152d1c35d) Thanks [@robertvanhoesel](https://togithub.com/robertvanhoesel)! - Prevents inputs with a name attribute of action or method to break ViewTransitions' form submission
- [#10833](https://togithub.com/withastro/astro/pull/10833) [`8d5f3e8`](https://togithub.com/withastro/astro/commit/8d5f3e8656027023f9fda51c66b0213ffe16d3a5) Thanks [@renovate](https://togithub.com/apps/renovate)! - Updates `esbuild` dependency to v0.20. This should not affect projects in most cases.
- [#10801](https://togithub.com/withastro/astro/pull/10801) [`204b782`](https://togithub.com/withastro/astro/commit/204b7820e6de22d97fa2a7b988180c42155c8387) Thanks [@rishi-raj-jain](https://togithub.com/rishi-raj-jain)! - Fixes an issue where images in MD required a relative specifier (e.g. `./`)
Now, you can use the standard `![](relative/img.png)` syntax in MD files for images colocated in the same folder: no relative specifier required!
There is no need to update your project; your existing images will still continue to work. However, you may wish to remove any relative specifiers from these MD images as they are no longer necessary:
```diff
- ![A cute dog](./dog.jpg)
+ ![A cute dog](dog.jpg)
```
- [#10841](https://togithub.com/withastro/astro/pull/10841) [`a2df344`](https://togithub.com/withastro/astro/commit/a2df344bff15647c2bfb3f49e3f7b66aa069d6f4) Thanks [@martrapp](https://togithub.com/martrapp)! - Due to regression on mobile WebKit browsers, reverts a change made for JavaScript animations during view transitions.
### [`v4.6.3`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#463)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.6.2...astro@4.6.3)
##### Patch Changes
- [#10799](https://togithub.com/withastro/astro/pull/10799) [`dc74afca9f5eebc2d61331298d6ef187d92051e0`](https://togithub.com/withastro/astro/commit/dc74afca9f5eebc2d61331298d6ef187d92051e0) Thanks [@martrapp](https://togithub.com/martrapp)! - Fixes an issue with persisted non-text input fields that have the focus during view transition navigation.
- [#10773](https://togithub.com/withastro/astro/pull/10773) [`35e43ecdaae7adc4b9a0b974192a033568cfb3f0`](https://togithub.com/withastro/astro/commit/35e43ecdaae7adc4b9a0b974192a033568cfb3f0) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Improves performance for frequent use of small components.
- [#10763](https://togithub.com/withastro/astro/pull/10763) [`63132771373ce1510be3e8814897accc0bf62ef8`](https://togithub.com/withastro/astro/commit/63132771373ce1510be3e8814897accc0bf62ef8) Thanks [@matthewp](https://togithub.com/matthewp)! - Invalidate CC cache manifest when lockfile or config changes
- [#10811](https://togithub.com/withastro/astro/pull/10811) [`77822a822b04b5113726f713df104e8667333c59`](https://togithub.com/withastro/astro/commit/77822a822b04b5113726f713df104e8667333c59) Thanks [@AvinashReddy3108](https://togithub.com/AvinashReddy3108)! - Update list of available integrations in the `astro add` CLI help.
### [`v4.6.2`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#462)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.6.1...astro@4.6.2)
##### Patch Changes
- [#10732](https://togithub.com/withastro/astro/pull/10732) [`a92e263beb6e0166f1f13c97803d1861793e2a99`](https://togithub.com/withastro/astro/commit/a92e263beb6e0166f1f13c97803d1861793e2a99) Thanks [@rishi-raj-jain](https://togithub.com/rishi-raj-jain)! - Correctly sets `build.assets` directory during `vite` config setup
- [#10776](https://togithub.com/withastro/astro/pull/10776) [`1607face67051b16d4648555f1001b2a9308e377`](https://togithub.com/withastro/astro/commit/1607face67051b16d4648555f1001b2a9308e377) Thanks [@fshafiee](https://togithub.com/fshafiee)! - Fixes cookies type inference
- [#10796](https://togithub.com/withastro/astro/pull/10796) [`90669472df3a05b33f0de46fd2d039e3eba7f7dd`](https://togithub.com/withastro/astro/commit/90669472df3a05b33f0de46fd2d039e3eba7f7dd) Thanks [@bluwy](https://togithub.com/bluwy)! - Disables streaming when rendering site with `output: "static"`
- [#10782](https://togithub.com/withastro/astro/pull/10782) [`b0589d05538fcc77dd3c38198bf93f3548362cd8`](https://togithub.com/withastro/astro/commit/b0589d05538fcc77dd3c38198bf93f3548362cd8) Thanks [@nektro](https://togithub.com/nektro)! - Handles possible null value when calling `which-pm` during dynamic package installation
- [#10774](https://togithub.com/withastro/astro/pull/10774) [`308b5d8c122f44e7724bb2f3ad3aa5c43a83e584`](https://togithub.com/withastro/astro/commit/308b5d8c122f44e7724bb2f3ad3aa5c43a83e584) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fixes `astro add` sometimes modifying `baseUrl` unintentionally
- [#10783](https://togithub.com/withastro/astro/pull/10783) [`4dbd545304d1a8af903c8c97f237eb55c988c40b`](https://togithub.com/withastro/astro/commit/4dbd545304d1a8af903c8c97f237eb55c988c40b) Thanks [@jurajkapsz](https://togithub.com/jurajkapsz)! - Fixes Picture component specialFormatsFallback fallback check
- [#10775](https://togithub.com/withastro/astro/pull/10775) [`06843121450899ecf0390ca4efaff6c9a6fe0f75`](https://togithub.com/withastro/astro/commit/06843121450899ecf0390ca4efaff6c9a6fe0f75) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fixes assets endpoint in serverless returning 404 in certain situations where the website might be under a protected route
- [#10787](https://togithub.com/withastro/astro/pull/10787) [`699f4559a279b374bddb3e5e48c72afe2709e8e7`](https://togithub.com/withastro/astro/commit/699f4559a279b374bddb3e5e48c72afe2709e8e7) Thanks [@martrapp](https://togithub.com/martrapp)! - Fixes a timing issue in the view transition simulation.
### [`v4.6.1`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#461)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.6.0...astro@4.6.1)
##### Patch Changes
- [#10708](https://togithub.com/withastro/astro/pull/10708) [`742866c5669a2be4f8b5a4c861cadb933c381415`](https://togithub.com/withastro/astro/commit/742866c5669a2be4f8b5a4c861cadb933c381415) Thanks [@horo-fox](https://togithub.com/horo-fox)! - Limits parallel imports within `getCollection()` to prevent EMFILE errors when accessing files
- [#10755](https://togithub.com/withastro/astro/pull/10755) [`c6d59b6fb7db20af957a8706c8159c50619235ef`](https://togithub.com/withastro/astro/commit/c6d59b6fb7db20af957a8706c8159c50619235ef) Thanks [@ematipico](https://togithub.com/ematipico)! - Fixes a case where the i18n fallback failed to correctly redirect to the index page with SSR enabled
### [`v4.6.0`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#460)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.18...astro@4.6.0)
##### Minor Changes
- [#10591](https://togithub.com/withastro/astro/pull/10591) [`39988ef8e2c4c4888543c973e06d9b9939e4ac95`](https://togithub.com/withastro/astro/commit/39988ef8e2c4c4888543c973e06d9b9939e4ac95) Thanks [@mingjunlu](https://togithub.com/mingjunlu)! - Adds a new dev toolbar settings option to change the horizontal placement of the dev toolbar on your screen: bottom left, bottom center, or bottom right.
- [#10689](https://togithub.com/withastro/astro/pull/10689) [`683d51a5eecafbbfbfed3910a3f1fbf0b3531b99`](https://togithub.com/withastro/astro/commit/683d51a5eecafbbfbfed3910a3f1fbf0b3531b99) Thanks [@ematipico](https://togithub.com/ematipico)! - Deprecate support for versions of Node.js older than `v18.17.1` for Node.js 18, older than `v20.0.3` for Node.js 20, and the complete Node.js v19 release line.
This change is in line with Astro's [Node.js support policy](https://docs.astro.build/en/upgrade-astro/#support).
- [#10678](https://togithub.com/withastro/astro/pull/10678) [`2e53b5fff6d292b7acdf8c30a6ecf5e5696846a1`](https://togithub.com/withastro/astro/commit/2e53b5fff6d292b7acdf8c30a6ecf5e5696846a1) Thanks [@ematipico](https://togithub.com/ematipico)! - Adds a new experimental security option to prevent [Cross-Site Request Forgery (CSRF) attacks](https://owasp.org/www-community/attacks/csrf). This feature is available only for pages rendered on demand:
```js
import { defineConfig } from 'astro/config';
export default defineConfig({
experimental: {
security: {
csrfProtection: {
origin: true,
},
},
},
});
```
Enabling this setting performs a check that the "origin" header, automatically passed by all modern browsers, matches the URL sent by each `Request`.
This experimental "origin" check is executed only for pages rendered on demand, and only for the requests ` POST, `PATCH` , `DELETE`and`PUT`with one of the following`content-type\` headers: 'application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'.
It the "origin" header doesn't match the pathname of the request, Astro will return a 403 status code and won't render the page.
- [#10193](https://togithub.com/withastro/astro/pull/10193) [`440681e7b74511a17b152af0fd6e0e4dc4014025`](https://togithub.com/withastro/astro/commit/440681e7b74511a17b152af0fd6e0e4dc4014025) Thanks [@ematipico](https://togithub.com/ematipico)! - Adds a new i18n routing option `manual` to allow you to write your own i18n middleware:
```js
import { defineConfig } from 'astro/config';
// astro.config.mjs
export default defineConfig({
i18n: {
locales: ['en', 'fr'],
defaultLocale: 'fr',
routing: 'manual',
},
});
```
Adding `routing: "manual"` to your i18n config disables Astro's own i18n middleware and provides you with helper functions to write your own: `redirectToDefaultLocale`, `notFound`, and `redirectToFallback`:
```js
// middleware.js
import { redirectToDefaultLocale } from 'astro:i18n';
export const onRequest = defineMiddleware(async (context, next) => {
if (context.url.startsWith('/about')) {
return next();
} else {
return redirectToDefaultLocale(context, 302);
}
});
```
Also adds a `middleware` function that manually creates Astro's i18n middleware. This allows you to extend Astro's i18n routing instead of completely replacing it. Run `middleware` in combination with your own middleware, using the `sequence` utility to determine the order:
```js title="src/middleware.js"
import { defineMiddleware, sequence } from 'astro:middleware';
import { middleware } from 'astro:i18n'; // Astro's own i18n routing config
export const userMiddleware = defineMiddleware();
export const onRequest = sequence(
userMiddleware,
middleware({
redirectToDefaultLocale: false,
prefixDefaultLocale: true,
})
);
```
- [#10671](https://togithub.com/withastro/astro/pull/10671) [`9e14a78cb05667af9821948c630786f74680090d`](https://togithub.com/withastro/astro/commit/9e14a78cb05667af9821948c630786f74680090d) Thanks [@fshafiee](https://togithub.com/fshafiee)! - Adds the `httpOnly`, `sameSite`, and `secure` options when deleting a cookie
##### Patch Changes
- [#10747](https://togithub.com/withastro/astro/pull/10747) [`994337c99f84304df1147a14504659439a9a7326`](https://togithub.com/withastro/astro/commit/994337c99f84304df1147a14504659439a9a7326) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixes an issue where functions could not be used as named slots.
- [#10750](https://togithub.com/withastro/astro/pull/10750) [`7e825604ddf90c989537e07939a39dc249343897`](https://togithub.com/withastro/astro/commit/7e825604ddf90c989537e07939a39dc249343897) Thanks [@OliverSpeir](https://togithub.com/OliverSpeir)! - Fixes a false positive for "Invalid `tabindex` on non-interactive element" rule for roleless elements ( `div` and `span` ).
- [#10745](https://togithub.com/withastro/astro/pull/10745) [`d51951ce6278d4b59deed938d65e1cb72b5102df`](https://togithub.com/withastro/astro/commit/d51951ce6278d4b59deed938d65e1cb72b5102df) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixes an issue where CLI commands could not report the reason for failure before exiting.
- [#10661](https://togithub.com/withastro/astro/pull/10661) [`e2cd7f4291912dadd4a654bc7917856c58a72a97`](https://togithub.com/withastro/astro/commit/e2cd7f4291912dadd4a654bc7917856c58a72a97) Thanks [@liruifengv](https://togithub.com/liruifengv)! - Fixed errorOverlay theme toggle bug.
- Updated dependencies \[[`ccafa8d230f65c9302421a0ce0a0adc5824bfd55`](https://togithub.com/withastro/astro/commit/ccafa8d230f65c9302421a0ce0a0adc5824bfd55), [`683d51a5eecafbbfbfed3910a3f1fbf0b3531b99`](https://togithub.com/withastro/astro/commit/683d51a5eecafbbfbfed3910a3f1fbf0b3531b99)]:
- [@astrojs/markdown-remark](https://togithub.com/astrojs/markdown-remark)[@5](https://togithub.com/5).1.0
- [@astrojs/telemetry](https://togithub.com/astrojs/telemetry)[@3](https://togithub.com/3).1.0
### [`v4.5.18`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4518)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.17...astro@4.5.18)
##### Patch Changes
- [#10728](https://togithub.com/withastro/astro/pull/10728) [`f508c4b7d54316e737f454a3777204b23636d4a0`](https://togithub.com/withastro/astro/commit/f508c4b7d54316e737f454a3777204b23636d4a0) Thanks [@ematipico](https://togithub.com/ematipico)! - Fixes a regression where some very **specific** code rendered using `expressive-code` was not escaped properly.
- [#10737](https://togithub.com/withastro/astro/pull/10737) [`8a30f257b1f3618b01212a591b82ad7a63c82fbb`](https://togithub.com/withastro/astro/commit/8a30f257b1f3618b01212a591b82ad7a63c82fbb) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixes a regression where constructing and returning 404 responses from a middleware resulted in the dev server getting stuck in a loop.
- [#10719](https://togithub.com/withastro/astro/pull/10719) [`b21b3ba307235510707ee9f5bd49f71473a07004`](https://togithub.com/withastro/astro/commit/b21b3ba307235510707ee9f5bd49f71473a07004) Thanks [@ematipico](https://togithub.com/ematipico)! - Fixes a false positive for `div` and `span` elements when running the Dev Toolbar accessibility audits.
Those are special elements that don't have an interaction assigned by default. Instead, it is assigned through the `role` attribute. This means that cases like the following are now deemed correct:
```html
```
### [`v4.5.17`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4517)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.16...astro@4.5.17)
##### Patch Changes
- [#10688](https://togithub.com/withastro/astro/pull/10688) [`799f6f3f29a3ef4f76347870a209ffa89651adfa`](https://togithub.com/withastro/astro/commit/799f6f3f29a3ef4f76347870a209ffa89651adfa) Thanks [@bluwy](https://togithub.com/bluwy)! - Marks renderer `jsxImportSource` and `jsxTransformOptions` options as deprecated as they are no longer used since Astro 3.0
- [#10657](https://togithub.com/withastro/astro/pull/10657) [`93d353528fa1a85b67e3f1e9514ed2a1b42dfd94`](https://togithub.com/withastro/astro/commit/93d353528fa1a85b67e3f1e9514ed2a1b42dfd94) Thanks [@natemoo-re](https://togithub.com/natemoo-re)! - Improves the color contrast for notification badges on dev toolbar apps
- [#10693](https://togithub.com/withastro/astro/pull/10693) [`1d26e9c7f7d8f47e33bc68d3b30bbffce25c7b63`](https://togithub.com/withastro/astro/commit/1d26e9c7f7d8f47e33bc68d3b30bbffce25c7b63) Thanks [@apetta](https://togithub.com/apetta)! - Adds the `disableremoteplayback` attribute to MediaHTMLAttributes interface
- [#10695](https://togithub.com/withastro/astro/pull/10695) [`a15975e41cb5eaf6ed8eb3ebaee676a17e433052`](https://togithub.com/withastro/astro/commit/a15975e41cb5eaf6ed8eb3ebaee676a17e433052) Thanks [@bluwy](https://togithub.com/bluwy)! - Skips prerender chunk if building with static output
- [#10707](https://togithub.com/withastro/astro/pull/10707) [`5e044a5eafaa206d2ef8b62c37d1bcd37f0a4078`](https://togithub.com/withastro/astro/commit/5e044a5eafaa206d2ef8b62c37d1bcd37f0a4078) Thanks [@horo-fox](https://togithub.com/horo-fox)! - Logs an error when a page's `getStaticPaths` fails
- [#10686](https://togithub.com/withastro/astro/pull/10686) [`fa0f593890502faf5709ab881fe0e45519d2f7af`](https://togithub.com/withastro/astro/commit/fa0f593890502faf5709ab881fe0e45519d2f7af) Thanks [@bluwy](https://togithub.com/bluwy)! - Prevents inlining scripts if used by other chunks when using the `experimental.directRenderScript` option
### [`v4.5.16`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4516)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.15...astro@4.5.16)
##### Patch Changes
- [#10679](https://togithub.com/withastro/astro/pull/10679) [`ca6bb1f31ef041e6ccf8ef974856fa945ff5bb31`](https://togithub.com/withastro/astro/commit/ca6bb1f31ef041e6ccf8ef974856fa945ff5bb31) Thanks [@martrapp](https://togithub.com/martrapp)! - Generates missing popstate events for Firefox when navigating to hash targets on the same page.
- [#10669](https://togithub.com/withastro/astro/pull/10669) [`0464563e527f821e53d78028d9bbf3c4e1050f5b`](https://togithub.com/withastro/astro/commit/0464563e527f821e53d78028d9bbf3c4e1050f5b) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fixes Astro waiting infinitely in CI when a required package was not installed
### [`v4.5.15`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4515)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.14...astro@4.5.15)
##### Patch Changes
- [#10666](https://togithub.com/withastro/astro/pull/10666) [`55ddb2ba4889480f776a8d29b9dcd531b9f5ab3e`](https://togithub.com/withastro/astro/commit/55ddb2ba4889480f776a8d29b9dcd531b9f5ab3e) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixes an issue where forwarded requests did not include hostname on node-based adapters. This also makes error pages more reliable.
- [#10642](https://togithub.com/withastro/astro/pull/10642) [`4f5dc14f315eba7ea6ec5cc8e5dacb0cb81288dd`](https://togithub.com/withastro/astro/commit/4f5dc14f315eba7ea6ec5cc8e5dacb0cb81288dd) Thanks [@OliverSpeir](https://togithub.com/OliverSpeir)! - Fixes typing issues when using `format` and `quality` options with remote images
- [#10616](https://togithub.com/withastro/astro/pull/10616) [`317d18ef8c9cf4fd13647518e3fd352774a86481`](https://togithub.com/withastro/astro/commit/317d18ef8c9cf4fd13647518e3fd352774a86481) Thanks [@NikolaRHristov](https://togithub.com/NikolaRHristov)! - This change disables the `sharp` `libvips` image cache as it errors when the
file is too small and operations are happening too fast (runs into a race
condition)
### [`v4.5.14`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4514)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.13...astro@4.5.14)
##### Patch Changes
- [#10470](https://togithub.com/withastro/astro/pull/10470) [`320c309ca9fbe51c40e6ba846d04a0cb49aced5f`](https://togithub.com/withastro/astro/commit/320c309ca9fbe51c40e6ba846d04a0cb49aced5f) Thanks [@liruifengv](https://togithub.com/liruifengv)! - improves `client:only` error message
- [#10496](https://togithub.com/withastro/astro/pull/10496) [`ce985631129e49f7ea90e6ea690ef9f9cf0e6987`](https://togithub.com/withastro/astro/commit/ce985631129e49f7ea90e6ea690ef9f9cf0e6987) Thanks [@florian-lefebvre](https://togithub.com/florian-lefebvre)! - Makes the warning less scary when adding 3rd-party integrations using `astro add`
### [`v4.5.13`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4513)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.12...astro@4.5.13)
##### Patch Changes
- [#10495](https://togithub.com/withastro/astro/pull/10495) [`046d69d517118ab5c0e71604b321729d66ddffff`](https://togithub.com/withastro/astro/commit/046d69d517118ab5c0e71604b321729d66ddffff) Thanks [@satyarohith](https://togithub.com/satyarohith)! - This patch allows astro to run in node-compat mode in Deno. Deno doesn't support
construction of response from async iterables in node-compat mode so we need to
use ReadableStream.
- [#10605](https://togithub.com/withastro/astro/pull/10605) [`a16a829f4e25ad5c9a1b4557ec089fc8ab53320f`](https://togithub.com/withastro/astro/commit/a16a829f4e25ad5c9a1b4557ec089fc8ab53320f) Thanks [@martrapp](https://togithub.com/martrapp)! - Fixes an issue with outdated page titles in browser history when using text fragments in view transition navigation.
- [#10584](https://togithub.com/withastro/astro/pull/10584) [`e648c5575a8774af739231cfa9fc27a32086aa5f`](https://togithub.com/withastro/astro/commit/e648c5575a8774af739231cfa9fc27a32086aa5f) Thanks [@duanwilliam](https://togithub.com/duanwilliam)! - Fixes a bug where JSX runtime would error on components with nullish prop values in certain conditions.
- [#10608](https://togithub.com/withastro/astro/pull/10608) [`e31bea0704890ff92ce4f9b0ce536c1c90715f2c`](https://togithub.com/withastro/astro/commit/e31bea0704890ff92ce4f9b0ce536c1c90715f2c) Thanks [@matthewp](https://togithub.com/matthewp)! - Fixes bug with head content being pushed into body
- Updated dependencies \[[`2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de`](https://togithub.com/withastro/astro/commit/2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de), [`374efcdff9625ca43309d89e3b9cfc9174351512`](https://togithub.com/withastro/astro/commit/374efcdff9625ca43309d89e3b9cfc9174351512)]:
- [@astrojs/markdown-remark](https://togithub.com/astrojs/markdown-remark)[@5](https://togithub.com/5).0.0
### [`v4.5.12`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4512)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.11...astro@4.5.12)
##### Patch Changes
- [#10596](https://togithub.com/withastro/astro/pull/10596) [`20463a6c1e1271d8dc3cb0ab3419ee5c72abd218`](https://togithub.com/withastro/astro/commit/20463a6c1e1271d8dc3cb0ab3419ee5c72abd218) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Add `removeBase` function
- Updated dependencies \[[`20463a6c1e1271d8dc3cb0ab3419ee5c72abd218`](https://togithub.com/withastro/astro/commit/20463a6c1e1271d8dc3cb0ab3419ee5c72abd218)]:
- [@astrojs/internal-helpers](https://togithub.com/astrojs/internal-helpers)[@0](https://togithub.com/0).4.0
### [`v4.5.11`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4511)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.10...astro@4.5.11)
##### Patch Changes
- [#10567](https://togithub.com/withastro/astro/pull/10567) [`fbdc10f90f7baa5c49f2f53e3e4ce8f453814c01`](https://togithub.com/withastro/astro/commit/fbdc10f90f7baa5c49f2f53e3e4ce8f453814c01) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fixes `astro:assets` not working when using complex config with `vite.build.rollupOptions.output.assetFileNames`
- [#10593](https://togithub.com/withastro/astro/pull/10593) [`61e283e5a0d95b6ef5d3c4c985d6ee78f74bbd8e`](https://togithub.com/withastro/astro/commit/61e283e5a0d95b6ef5d3c4c985d6ee78f74bbd8e) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fixes Polymorphic type helper causing TypeScript errors in certain cases after the previous update
- [#10543](https://togithub.com/withastro/astro/pull/10543) [`0fd36bdb383297b32cc523b57d2442132da41595`](https://togithub.com/withastro/astro/commit/0fd36bdb383297b32cc523b57d2442132da41595) Thanks [@matthewp](https://togithub.com/matthewp)! - Fixes inline stylesheets with content collections cache
- [#10582](https://togithub.com/withastro/astro/pull/10582) [`a05953538fcf524786385830b99c0c5a015173e8`](https://togithub.com/withastro/astro/commit/a05953538fcf524786385830b99c0c5a015173e8) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixes an issue where the dev server got stuck in a loop while routing responses with a 404 status code to the 404 route.
### [`v4.5.10`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4510)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.9...astro@4.5.10)
##### Patch Changes
- [#10549](https://togithub.com/withastro/astro/pull/10549) [`54c2f9707f5d038630143f769e3075c698474654`](https://togithub.com/withastro/astro/commit/54c2f9707f5d038630143f769e3075c698474654) Thanks [@admirsaheta](https://togithub.com/admirsaheta)! - Updates the `HTMLAttributes` type exported from `astro` to allow data attributes
- [#10562](https://togithub.com/withastro/astro/pull/10562) [`348c1ca1323d0516c2dcf8e963343cd12cb5407f`](https://togithub.com/withastro/astro/commit/348c1ca1323d0516c2dcf8e963343cd12cb5407f) Thanks [@apetta](https://togithub.com/apetta)! - Fixes minor type issues inside the built-in components of Astro
- [#10550](https://togithub.com/withastro/astro/pull/10550) [`34fa8e131b85531e6629390307108ffc4adb7ed1`](https://togithub.com/withastro/astro/commit/34fa8e131b85531e6629390307108ffc4adb7ed1) Thanks [@Skn0tt](https://togithub.com/Skn0tt)! - Fixes bug where server builds would include unneeded assets in SSR Function, potentially leading to upload errors on Vercel, Netlify because of size limits
- Updated dependencies \[[`c585528f446ccca3d4c643f4af5d550b93c18902`](https://togithub.com/withastro/astro/commit/c585528f446ccca3d4c643f4af5d550b93c18902)]:
- [@astrojs/markdown-remark](https://togithub.com/astrojs/markdown-remark)[@4](https://togithub.com/4).3.2
### [`v4.5.9`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#459)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.8...astro@4.5.9)
##### Patch Changes
- [#10532](https://togithub.com/withastro/astro/pull/10532) [`8306ce1ff7b71a2a0d7908336c9be462a54d395a`](https://togithub.com/withastro/astro/commit/8306ce1ff7b71a2a0d7908336c9be462a54d395a) Thanks [@martrapp](https://togithub.com/martrapp)! - Fixes a style issue of `client:only` components in DEV mode during view transitions.
- [#10473](https://togithub.com/withastro/astro/pull/10473) [`627e47d67af4846cea2acf26a96b4124001b26fc`](https://togithub.com/withastro/astro/commit/627e47d67af4846cea2acf26a96b4124001b26fc) Thanks [@bluwy](https://togithub.com/bluwy)! - Fixes and improves performance when rendering Astro JSX
Configuration
š Schedule: Branch creation - At any time (no schedule defined), 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 has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
4.5.8
->4.7.0
Release Notes
withastro/astro (astro)
### [`v4.7.0`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#470) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.6.4...astro@4.7.0) ##### Minor Changes - [#10665](https://togithub.com/withastro/astro/pull/10665) [`7b4f284`](https://togithub.com/withastro/astro/commit/7b4f2840203fe220758934f1366485f788727f0d) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Adds new utilities to ease the creation of toolbar apps including `defineToolbarApp` to make it easier to define your toolbar app and `app` and `server` helpers for easier communication between the toolbar and the server. These new utilities abstract away some of the boilerplate code that is common in toolbar apps, and lower the barrier of entry for app authors. For example, instead of creating an event listener for the `app-toggled` event and manually typing the value in the callback, you can now use the `onAppToggled` method. Additionally, communicating with the server does not require knowing any of the Vite APIs anymore, as a new `server` object is passed to the `init` function that contains easy to use methods for communicating with the server. ```diff import { defineToolbarApp } from "astro/toolbar"; export default defineToolbarApp({ init(canvas, app, server) { - app.addEventListener("app-toggled", (e) => { - console.log(`App is now ${state ? "enabled" : "disabled"}`);. - }); + app.onToggled(({ state }) => { + console.log(`App is now ${state ? "enabled" : "disabled"}`); + }); - if (import.meta.hot) { - import.meta.hot.send("my-app:my-client-event", { message: "world" }); - } + server.send("my-app:my-client-event", { message: "world" }) - if (import.meta.hot) { - import.meta.hot.on("my-server-event", (data: {message: string}) => { - console.log(data.message); - }); - } + server.on<{ message: string }>("my-server-event", (data) => { + console.log(data.message); // data is typed using the type parameter + }); }, }) ``` Server helpers are also available on the server side, for use in your integrations, through the new `toolbar` object: ```ts "astro:server:setup": ({ toolbar }) => { toolbar.on<{ message: string }>("my-app:my-client-event", (data) => { console.log(data.message); toolbar.send("my-server-event", { message: "hello" }); }); } ``` This is a backwards compatible change and your your existing dev toolbar apps will continue to function. However, we encourage you to build your apps with the new helpers, following the [updated Dev Toolbar API documentation](https://docs.astro.build/en/reference/dev-toolbar-app-reference/). - [#10734](https://togithub.com/withastro/astro/pull/10734) [`6fc4c0e`](https://togithub.com/withastro/astro/commit/6fc4c0e420da7629b4cfc28ee7efce1d614447be) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Astro will now automatically check for updates when you run the dev server. If a new version is available, a message will appear in the terminal with instructions on how to update. Updates will be checked once per 10 days, and the message will only appear if the project is multiple versions behind the latest release. This behavior can be disabled by running `astro preferences disable checkUpdates` or setting the `ASTRO_DISABLE_UPDATE_CHECK` environment variable to `false`. - [#10762](https://togithub.com/withastro/astro/pull/10762) [`43ead8f`](https://togithub.com/withastro/astro/commit/43ead8fbd5112823118060175c7a4a22522cc325) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Enables type checking for JavaScript files when using the `strictest` TS config. This ensures consistency with Astro's other TS configs, and fixes type checking for integrations like Astro DB when using an `astro.config.mjs`. If you are currently using the `strictest` preset and would like to still disable `.js` files, set `allowJS: false` in your `tsconfig.json`. ##### Patch Changes - [#10861](https://togithub.com/withastro/astro/pull/10861) [`b673bc8`](https://togithub.com/withastro/astro/commit/b673bc850593d5af25793d0358c00797477fa373) Thanks [@mingjunlu](https://togithub.com/mingjunlu)! - Fixes an issue where `astro build` writes type declaration files to `outDir` when it's outside of root directory. - [#10684](https://togithub.com/withastro/astro/pull/10684) [`8b59d5d`](https://togithub.com/withastro/astro/commit/8b59d5d078ff40576b8cbee432279c6ad044a1a9) Thanks [@PeterDraex](https://togithub.com/PeterDraex)! - Update sharp to 0.33 to fix issue with Alpine Linux ### [`v4.6.4`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#464) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.6.3...astro@4.6.4) ##### Patch Changes - [#10846](https://togithub.com/withastro/astro/pull/10846) [`3294f7a`](https://togithub.com/withastro/astro/commit/3294f7a343e036d2ad9ac8d5f792ad0d4f43a399) Thanks [@matthewp](https://togithub.com/matthewp)! - Prevent getCollection breaking in vitest - [#10856](https://togithub.com/withastro/astro/pull/10856) [`30cf82a`](https://togithub.com/withastro/astro/commit/30cf82ac3e970a6a3c0f07db1340dd7152d1c35d) Thanks [@robertvanhoesel](https://togithub.com/robertvanhoesel)! - Prevents inputs with a name attribute of action or method to break ViewTransitions' form submission - [#10833](https://togithub.com/withastro/astro/pull/10833) [`8d5f3e8`](https://togithub.com/withastro/astro/commit/8d5f3e8656027023f9fda51c66b0213ffe16d3a5) Thanks [@renovate](https://togithub.com/apps/renovate)! - Updates `esbuild` dependency to v0.20. This should not affect projects in most cases. - [#10801](https://togithub.com/withastro/astro/pull/10801) [`204b782`](https://togithub.com/withastro/astro/commit/204b7820e6de22d97fa2a7b988180c42155c8387) Thanks [@rishi-raj-jain](https://togithub.com/rishi-raj-jain)! - Fixes an issue where images in MD required a relative specifier (e.g. `./`) Now, you can use the standard `![](relative/img.png)` syntax in MD files for images colocated in the same folder: no relative specifier required! There is no need to update your project; your existing images will still continue to work. However, you may wish to remove any relative specifiers from these MD images as they are no longer necessary: ```diff - ![A cute dog](./dog.jpg) + ![A cute dog](dog.jpg) ``` - [#10841](https://togithub.com/withastro/astro/pull/10841) [`a2df344`](https://togithub.com/withastro/astro/commit/a2df344bff15647c2bfb3f49e3f7b66aa069d6f4) Thanks [@martrapp](https://togithub.com/martrapp)! - Due to regression on mobile WebKit browsers, reverts a change made for JavaScript animations during view transitions. ### [`v4.6.3`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#463) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.6.2...astro@4.6.3) ##### Patch Changes - [#10799](https://togithub.com/withastro/astro/pull/10799) [`dc74afca9f5eebc2d61331298d6ef187d92051e0`](https://togithub.com/withastro/astro/commit/dc74afca9f5eebc2d61331298d6ef187d92051e0) Thanks [@martrapp](https://togithub.com/martrapp)! - Fixes an issue with persisted non-text input fields that have the focus during view transition navigation. - [#10773](https://togithub.com/withastro/astro/pull/10773) [`35e43ecdaae7adc4b9a0b974192a033568cfb3f0`](https://togithub.com/withastro/astro/commit/35e43ecdaae7adc4b9a0b974192a033568cfb3f0) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Improves performance for frequent use of small components. - [#10763](https://togithub.com/withastro/astro/pull/10763) [`63132771373ce1510be3e8814897accc0bf62ef8`](https://togithub.com/withastro/astro/commit/63132771373ce1510be3e8814897accc0bf62ef8) Thanks [@matthewp](https://togithub.com/matthewp)! - Invalidate CC cache manifest when lockfile or config changes - [#10811](https://togithub.com/withastro/astro/pull/10811) [`77822a822b04b5113726f713df104e8667333c59`](https://togithub.com/withastro/astro/commit/77822a822b04b5113726f713df104e8667333c59) Thanks [@AvinashReddy3108](https://togithub.com/AvinashReddy3108)! - Update list of available integrations in the `astro add` CLI help. ### [`v4.6.2`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#462) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.6.1...astro@4.6.2) ##### Patch Changes - [#10732](https://togithub.com/withastro/astro/pull/10732) [`a92e263beb6e0166f1f13c97803d1861793e2a99`](https://togithub.com/withastro/astro/commit/a92e263beb6e0166f1f13c97803d1861793e2a99) Thanks [@rishi-raj-jain](https://togithub.com/rishi-raj-jain)! - Correctly sets `build.assets` directory during `vite` config setup - [#10776](https://togithub.com/withastro/astro/pull/10776) [`1607face67051b16d4648555f1001b2a9308e377`](https://togithub.com/withastro/astro/commit/1607face67051b16d4648555f1001b2a9308e377) Thanks [@fshafiee](https://togithub.com/fshafiee)! - Fixes cookies type inference - [#10796](https://togithub.com/withastro/astro/pull/10796) [`90669472df3a05b33f0de46fd2d039e3eba7f7dd`](https://togithub.com/withastro/astro/commit/90669472df3a05b33f0de46fd2d039e3eba7f7dd) Thanks [@bluwy](https://togithub.com/bluwy)! - Disables streaming when rendering site with `output: "static"` - [#10782](https://togithub.com/withastro/astro/pull/10782) [`b0589d05538fcc77dd3c38198bf93f3548362cd8`](https://togithub.com/withastro/astro/commit/b0589d05538fcc77dd3c38198bf93f3548362cd8) Thanks [@nektro](https://togithub.com/nektro)! - Handles possible null value when calling `which-pm` during dynamic package installation - [#10774](https://togithub.com/withastro/astro/pull/10774) [`308b5d8c122f44e7724bb2f3ad3aa5c43a83e584`](https://togithub.com/withastro/astro/commit/308b5d8c122f44e7724bb2f3ad3aa5c43a83e584) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fixes `astro add` sometimes modifying `baseUrl` unintentionally - [#10783](https://togithub.com/withastro/astro/pull/10783) [`4dbd545304d1a8af903c8c97f237eb55c988c40b`](https://togithub.com/withastro/astro/commit/4dbd545304d1a8af903c8c97f237eb55c988c40b) Thanks [@jurajkapsz](https://togithub.com/jurajkapsz)! - Fixes Picture component specialFormatsFallback fallback check - [#10775](https://togithub.com/withastro/astro/pull/10775) [`06843121450899ecf0390ca4efaff6c9a6fe0f75`](https://togithub.com/withastro/astro/commit/06843121450899ecf0390ca4efaff6c9a6fe0f75) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fixes assets endpoint in serverless returning 404 in certain situations where the website might be under a protected route - [#10787](https://togithub.com/withastro/astro/pull/10787) [`699f4559a279b374bddb3e5e48c72afe2709e8e7`](https://togithub.com/withastro/astro/commit/699f4559a279b374bddb3e5e48c72afe2709e8e7) Thanks [@martrapp](https://togithub.com/martrapp)! - Fixes a timing issue in the view transition simulation. ### [`v4.6.1`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#461) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.6.0...astro@4.6.1) ##### Patch Changes - [#10708](https://togithub.com/withastro/astro/pull/10708) [`742866c5669a2be4f8b5a4c861cadb933c381415`](https://togithub.com/withastro/astro/commit/742866c5669a2be4f8b5a4c861cadb933c381415) Thanks [@horo-fox](https://togithub.com/horo-fox)! - Limits parallel imports within `getCollection()` to prevent EMFILE errors when accessing files - [#10755](https://togithub.com/withastro/astro/pull/10755) [`c6d59b6fb7db20af957a8706c8159c50619235ef`](https://togithub.com/withastro/astro/commit/c6d59b6fb7db20af957a8706c8159c50619235ef) Thanks [@ematipico](https://togithub.com/ematipico)! - Fixes a case where the i18n fallback failed to correctly redirect to the index page with SSR enabled ### [`v4.6.0`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#460) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.18...astro@4.6.0) ##### Minor Changes - [#10591](https://togithub.com/withastro/astro/pull/10591) [`39988ef8e2c4c4888543c973e06d9b9939e4ac95`](https://togithub.com/withastro/astro/commit/39988ef8e2c4c4888543c973e06d9b9939e4ac95) Thanks [@mingjunlu](https://togithub.com/mingjunlu)! - Adds a new dev toolbar settings option to change the horizontal placement of the dev toolbar on your screen: bottom left, bottom center, or bottom right. - [#10689](https://togithub.com/withastro/astro/pull/10689) [`683d51a5eecafbbfbfed3910a3f1fbf0b3531b99`](https://togithub.com/withastro/astro/commit/683d51a5eecafbbfbfed3910a3f1fbf0b3531b99) Thanks [@ematipico](https://togithub.com/ematipico)! - Deprecate support for versions of Node.js older than `v18.17.1` for Node.js 18, older than `v20.0.3` for Node.js 20, and the complete Node.js v19 release line. This change is in line with Astro's [Node.js support policy](https://docs.astro.build/en/upgrade-astro/#support). - [#10678](https://togithub.com/withastro/astro/pull/10678) [`2e53b5fff6d292b7acdf8c30a6ecf5e5696846a1`](https://togithub.com/withastro/astro/commit/2e53b5fff6d292b7acdf8c30a6ecf5e5696846a1) Thanks [@ematipico](https://togithub.com/ematipico)! - Adds a new experimental security option to prevent [Cross-Site Request Forgery (CSRF) attacks](https://owasp.org/www-community/attacks/csrf). This feature is available only for pages rendered on demand: ```js import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { security: { csrfProtection: { origin: true, }, }, }, }); ``` Enabling this setting performs a check that the "origin" header, automatically passed by all modern browsers, matches the URL sent by each `Request`. This experimental "origin" check is executed only for pages rendered on demand, and only for the requests ` POST, `PATCH` , `DELETE`and`PUT`with one of the following`content-type\` headers: 'application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'. It the "origin" header doesn't match the pathname of the request, Astro will return a 403 status code and won't render the page. - [#10193](https://togithub.com/withastro/astro/pull/10193) [`440681e7b74511a17b152af0fd6e0e4dc4014025`](https://togithub.com/withastro/astro/commit/440681e7b74511a17b152af0fd6e0e4dc4014025) Thanks [@ematipico](https://togithub.com/ematipico)! - Adds a new i18n routing option `manual` to allow you to write your own i18n middleware: ```js import { defineConfig } from 'astro/config'; // astro.config.mjs export default defineConfig({ i18n: { locales: ['en', 'fr'], defaultLocale: 'fr', routing: 'manual', }, }); ``` Adding `routing: "manual"` to your i18n config disables Astro's own i18n middleware and provides you with helper functions to write your own: `redirectToDefaultLocale`, `notFound`, and `redirectToFallback`: ```js // middleware.js import { redirectToDefaultLocale } from 'astro:i18n'; export const onRequest = defineMiddleware(async (context, next) => { if (context.url.startsWith('/about')) { return next(); } else { return redirectToDefaultLocale(context, 302); } }); ``` Also adds a `middleware` function that manually creates Astro's i18n middleware. This allows you to extend Astro's i18n routing instead of completely replacing it. Run `middleware` in combination with your own middleware, using the `sequence` utility to determine the order: ```js title="src/middleware.js" import { defineMiddleware, sequence } from 'astro:middleware'; import { middleware } from 'astro:i18n'; // Astro's own i18n routing config export const userMiddleware = defineMiddleware(); export const onRequest = sequence( userMiddleware, middleware({ redirectToDefaultLocale: false, prefixDefaultLocale: true, }) ); ``` - [#10671](https://togithub.com/withastro/astro/pull/10671) [`9e14a78cb05667af9821948c630786f74680090d`](https://togithub.com/withastro/astro/commit/9e14a78cb05667af9821948c630786f74680090d) Thanks [@fshafiee](https://togithub.com/fshafiee)! - Adds the `httpOnly`, `sameSite`, and `secure` options when deleting a cookie ##### Patch Changes - [#10747](https://togithub.com/withastro/astro/pull/10747) [`994337c99f84304df1147a14504659439a9a7326`](https://togithub.com/withastro/astro/commit/994337c99f84304df1147a14504659439a9a7326) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixes an issue where functions could not be used as named slots. - [#10750](https://togithub.com/withastro/astro/pull/10750) [`7e825604ddf90c989537e07939a39dc249343897`](https://togithub.com/withastro/astro/commit/7e825604ddf90c989537e07939a39dc249343897) Thanks [@OliverSpeir](https://togithub.com/OliverSpeir)! - Fixes a false positive for "Invalid `tabindex` on non-interactive element" rule for roleless elements ( `div` and `span` ). - [#10745](https://togithub.com/withastro/astro/pull/10745) [`d51951ce6278d4b59deed938d65e1cb72b5102df`](https://togithub.com/withastro/astro/commit/d51951ce6278d4b59deed938d65e1cb72b5102df) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixes an issue where CLI commands could not report the reason for failure before exiting. - [#10661](https://togithub.com/withastro/astro/pull/10661) [`e2cd7f4291912dadd4a654bc7917856c58a72a97`](https://togithub.com/withastro/astro/commit/e2cd7f4291912dadd4a654bc7917856c58a72a97) Thanks [@liruifengv](https://togithub.com/liruifengv)! - Fixed errorOverlay theme toggle bug. - Updated dependencies \[[`ccafa8d230f65c9302421a0ce0a0adc5824bfd55`](https://togithub.com/withastro/astro/commit/ccafa8d230f65c9302421a0ce0a0adc5824bfd55), [`683d51a5eecafbbfbfed3910a3f1fbf0b3531b99`](https://togithub.com/withastro/astro/commit/683d51a5eecafbbfbfed3910a3f1fbf0b3531b99)]: - [@astrojs/markdown-remark](https://togithub.com/astrojs/markdown-remark)[@5](https://togithub.com/5).1.0 - [@astrojs/telemetry](https://togithub.com/astrojs/telemetry)[@3](https://togithub.com/3).1.0 ### [`v4.5.18`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4518) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.17...astro@4.5.18) ##### Patch Changes - [#10728](https://togithub.com/withastro/astro/pull/10728) [`f508c4b7d54316e737f454a3777204b23636d4a0`](https://togithub.com/withastro/astro/commit/f508c4b7d54316e737f454a3777204b23636d4a0) Thanks [@ematipico](https://togithub.com/ematipico)! - Fixes a regression where some very **specific** code rendered using `expressive-code` was not escaped properly. - [#10737](https://togithub.com/withastro/astro/pull/10737) [`8a30f257b1f3618b01212a591b82ad7a63c82fbb`](https://togithub.com/withastro/astro/commit/8a30f257b1f3618b01212a591b82ad7a63c82fbb) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixes a regression where constructing and returning 404 responses from a middleware resulted in the dev server getting stuck in a loop. - [#10719](https://togithub.com/withastro/astro/pull/10719) [`b21b3ba307235510707ee9f5bd49f71473a07004`](https://togithub.com/withastro/astro/commit/b21b3ba307235510707ee9f5bd49f71473a07004) Thanks [@ematipico](https://togithub.com/ematipico)! - Fixes a false positive for `div` and `span` elements when running the Dev Toolbar accessibility audits. Those are special elements that don't have an interaction assigned by default. Instead, it is assigned through the `role` attribute. This means that cases like the following are now deemed correct: ```html ``` ### [`v4.5.17`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4517) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.16...astro@4.5.17) ##### Patch Changes - [#10688](https://togithub.com/withastro/astro/pull/10688) [`799f6f3f29a3ef4f76347870a209ffa89651adfa`](https://togithub.com/withastro/astro/commit/799f6f3f29a3ef4f76347870a209ffa89651adfa) Thanks [@bluwy](https://togithub.com/bluwy)! - Marks renderer `jsxImportSource` and `jsxTransformOptions` options as deprecated as they are no longer used since Astro 3.0 - [#10657](https://togithub.com/withastro/astro/pull/10657) [`93d353528fa1a85b67e3f1e9514ed2a1b42dfd94`](https://togithub.com/withastro/astro/commit/93d353528fa1a85b67e3f1e9514ed2a1b42dfd94) Thanks [@natemoo-re](https://togithub.com/natemoo-re)! - Improves the color contrast for notification badges on dev toolbar apps - [#10693](https://togithub.com/withastro/astro/pull/10693) [`1d26e9c7f7d8f47e33bc68d3b30bbffce25c7b63`](https://togithub.com/withastro/astro/commit/1d26e9c7f7d8f47e33bc68d3b30bbffce25c7b63) Thanks [@apetta](https://togithub.com/apetta)! - Adds the `disableremoteplayback` attribute to MediaHTMLAttributes interface - [#10695](https://togithub.com/withastro/astro/pull/10695) [`a15975e41cb5eaf6ed8eb3ebaee676a17e433052`](https://togithub.com/withastro/astro/commit/a15975e41cb5eaf6ed8eb3ebaee676a17e433052) Thanks [@bluwy](https://togithub.com/bluwy)! - Skips prerender chunk if building with static output - [#10707](https://togithub.com/withastro/astro/pull/10707) [`5e044a5eafaa206d2ef8b62c37d1bcd37f0a4078`](https://togithub.com/withastro/astro/commit/5e044a5eafaa206d2ef8b62c37d1bcd37f0a4078) Thanks [@horo-fox](https://togithub.com/horo-fox)! - Logs an error when a page's `getStaticPaths` fails - [#10686](https://togithub.com/withastro/astro/pull/10686) [`fa0f593890502faf5709ab881fe0e45519d2f7af`](https://togithub.com/withastro/astro/commit/fa0f593890502faf5709ab881fe0e45519d2f7af) Thanks [@bluwy](https://togithub.com/bluwy)! - Prevents inlining scripts if used by other chunks when using the `experimental.directRenderScript` option ### [`v4.5.16`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4516) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.15...astro@4.5.16) ##### Patch Changes - [#10679](https://togithub.com/withastro/astro/pull/10679) [`ca6bb1f31ef041e6ccf8ef974856fa945ff5bb31`](https://togithub.com/withastro/astro/commit/ca6bb1f31ef041e6ccf8ef974856fa945ff5bb31) Thanks [@martrapp](https://togithub.com/martrapp)! - Generates missing popstate events for Firefox when navigating to hash targets on the same page. - [#10669](https://togithub.com/withastro/astro/pull/10669) [`0464563e527f821e53d78028d9bbf3c4e1050f5b`](https://togithub.com/withastro/astro/commit/0464563e527f821e53d78028d9bbf3c4e1050f5b) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fixes Astro waiting infinitely in CI when a required package was not installed ### [`v4.5.15`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4515) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.14...astro@4.5.15) ##### Patch Changes - [#10666](https://togithub.com/withastro/astro/pull/10666) [`55ddb2ba4889480f776a8d29b9dcd531b9f5ab3e`](https://togithub.com/withastro/astro/commit/55ddb2ba4889480f776a8d29b9dcd531b9f5ab3e) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixes an issue where forwarded requests did not include hostname on node-based adapters. This also makes error pages more reliable. - [#10642](https://togithub.com/withastro/astro/pull/10642) [`4f5dc14f315eba7ea6ec5cc8e5dacb0cb81288dd`](https://togithub.com/withastro/astro/commit/4f5dc14f315eba7ea6ec5cc8e5dacb0cb81288dd) Thanks [@OliverSpeir](https://togithub.com/OliverSpeir)! - Fixes typing issues when using `format` and `quality` options with remote images - [#10616](https://togithub.com/withastro/astro/pull/10616) [`317d18ef8c9cf4fd13647518e3fd352774a86481`](https://togithub.com/withastro/astro/commit/317d18ef8c9cf4fd13647518e3fd352774a86481) Thanks [@NikolaRHristov](https://togithub.com/NikolaRHristov)! - This change disables the `sharp` `libvips` image cache as it errors when the file is too small and operations are happening too fast (runs into a race condition) ### [`v4.5.14`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4514) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.13...astro@4.5.14) ##### Patch Changes - [#10470](https://togithub.com/withastro/astro/pull/10470) [`320c309ca9fbe51c40e6ba846d04a0cb49aced5f`](https://togithub.com/withastro/astro/commit/320c309ca9fbe51c40e6ba846d04a0cb49aced5f) Thanks [@liruifengv](https://togithub.com/liruifengv)! - improves `client:only` error message - [#10496](https://togithub.com/withastro/astro/pull/10496) [`ce985631129e49f7ea90e6ea690ef9f9cf0e6987`](https://togithub.com/withastro/astro/commit/ce985631129e49f7ea90e6ea690ef9f9cf0e6987) Thanks [@florian-lefebvre](https://togithub.com/florian-lefebvre)! - Makes the warning less scary when adding 3rd-party integrations using `astro add` ### [`v4.5.13`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4513) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.12...astro@4.5.13) ##### Patch Changes - [#10495](https://togithub.com/withastro/astro/pull/10495) [`046d69d517118ab5c0e71604b321729d66ddffff`](https://togithub.com/withastro/astro/commit/046d69d517118ab5c0e71604b321729d66ddffff) Thanks [@satyarohith](https://togithub.com/satyarohith)! - This patch allows astro to run in node-compat mode in Deno. Deno doesn't support construction of response from async iterables in node-compat mode so we need to use ReadableStream. - [#10605](https://togithub.com/withastro/astro/pull/10605) [`a16a829f4e25ad5c9a1b4557ec089fc8ab53320f`](https://togithub.com/withastro/astro/commit/a16a829f4e25ad5c9a1b4557ec089fc8ab53320f) Thanks [@martrapp](https://togithub.com/martrapp)! - Fixes an issue with outdated page titles in browser history when using text fragments in view transition navigation. - [#10584](https://togithub.com/withastro/astro/pull/10584) [`e648c5575a8774af739231cfa9fc27a32086aa5f`](https://togithub.com/withastro/astro/commit/e648c5575a8774af739231cfa9fc27a32086aa5f) Thanks [@duanwilliam](https://togithub.com/duanwilliam)! - Fixes a bug where JSX runtime would error on components with nullish prop values in certain conditions. - [#10608](https://togithub.com/withastro/astro/pull/10608) [`e31bea0704890ff92ce4f9b0ce536c1c90715f2c`](https://togithub.com/withastro/astro/commit/e31bea0704890ff92ce4f9b0ce536c1c90715f2c) Thanks [@matthewp](https://togithub.com/matthewp)! - Fixes bug with head content being pushed into body - Updated dependencies \[[`2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de`](https://togithub.com/withastro/astro/commit/2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de), [`374efcdff9625ca43309d89e3b9cfc9174351512`](https://togithub.com/withastro/astro/commit/374efcdff9625ca43309d89e3b9cfc9174351512)]: - [@astrojs/markdown-remark](https://togithub.com/astrojs/markdown-remark)[@5](https://togithub.com/5).0.0 ### [`v4.5.12`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4512) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.11...astro@4.5.12) ##### Patch Changes - [#10596](https://togithub.com/withastro/astro/pull/10596) [`20463a6c1e1271d8dc3cb0ab3419ee5c72abd218`](https://togithub.com/withastro/astro/commit/20463a6c1e1271d8dc3cb0ab3419ee5c72abd218) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Add `removeBase` function - Updated dependencies \[[`20463a6c1e1271d8dc3cb0ab3419ee5c72abd218`](https://togithub.com/withastro/astro/commit/20463a6c1e1271d8dc3cb0ab3419ee5c72abd218)]: - [@astrojs/internal-helpers](https://togithub.com/astrojs/internal-helpers)[@0](https://togithub.com/0).4.0 ### [`v4.5.11`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4511) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.10...astro@4.5.11) ##### Patch Changes - [#10567](https://togithub.com/withastro/astro/pull/10567) [`fbdc10f90f7baa5c49f2f53e3e4ce8f453814c01`](https://togithub.com/withastro/astro/commit/fbdc10f90f7baa5c49f2f53e3e4ce8f453814c01) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fixes `astro:assets` not working when using complex config with `vite.build.rollupOptions.output.assetFileNames` - [#10593](https://togithub.com/withastro/astro/pull/10593) [`61e283e5a0d95b6ef5d3c4c985d6ee78f74bbd8e`](https://togithub.com/withastro/astro/commit/61e283e5a0d95b6ef5d3c4c985d6ee78f74bbd8e) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fixes Polymorphic type helper causing TypeScript errors in certain cases after the previous update - [#10543](https://togithub.com/withastro/astro/pull/10543) [`0fd36bdb383297b32cc523b57d2442132da41595`](https://togithub.com/withastro/astro/commit/0fd36bdb383297b32cc523b57d2442132da41595) Thanks [@matthewp](https://togithub.com/matthewp)! - Fixes inline stylesheets with content collections cache - [#10582](https://togithub.com/withastro/astro/pull/10582) [`a05953538fcf524786385830b99c0c5a015173e8`](https://togithub.com/withastro/astro/commit/a05953538fcf524786385830b99c0c5a015173e8) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixes an issue where the dev server got stuck in a loop while routing responses with a 404 status code to the 404 route. ### [`v4.5.10`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4510) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.9...astro@4.5.10) ##### Patch Changes - [#10549](https://togithub.com/withastro/astro/pull/10549) [`54c2f9707f5d038630143f769e3075c698474654`](https://togithub.com/withastro/astro/commit/54c2f9707f5d038630143f769e3075c698474654) Thanks [@admirsaheta](https://togithub.com/admirsaheta)! - Updates the `HTMLAttributes` type exported from `astro` to allow data attributes - [#10562](https://togithub.com/withastro/astro/pull/10562) [`348c1ca1323d0516c2dcf8e963343cd12cb5407f`](https://togithub.com/withastro/astro/commit/348c1ca1323d0516c2dcf8e963343cd12cb5407f) Thanks [@apetta](https://togithub.com/apetta)! - Fixes minor type issues inside the built-in components of Astro - [#10550](https://togithub.com/withastro/astro/pull/10550) [`34fa8e131b85531e6629390307108ffc4adb7ed1`](https://togithub.com/withastro/astro/commit/34fa8e131b85531e6629390307108ffc4adb7ed1) Thanks [@Skn0tt](https://togithub.com/Skn0tt)! - Fixes bug where server builds would include unneeded assets in SSR Function, potentially leading to upload errors on Vercel, Netlify because of size limits - Updated dependencies \[[`c585528f446ccca3d4c643f4af5d550b93c18902`](https://togithub.com/withastro/astro/commit/c585528f446ccca3d4c643f4af5d550b93c18902)]: - [@astrojs/markdown-remark](https://togithub.com/astrojs/markdown-remark)[@4](https://togithub.com/4).3.2 ### [`v4.5.9`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#459) [Compare Source](https://togithub.com/withastro/astro/compare/astro@4.5.8...astro@4.5.9) ##### Patch Changes - [#10532](https://togithub.com/withastro/astro/pull/10532) [`8306ce1ff7b71a2a0d7908336c9be462a54d395a`](https://togithub.com/withastro/astro/commit/8306ce1ff7b71a2a0d7908336c9be462a54d395a) Thanks [@martrapp](https://togithub.com/martrapp)! - Fixes a style issue of `client:only` components in DEV mode during view transitions. - [#10473](https://togithub.com/withastro/astro/pull/10473) [`627e47d67af4846cea2acf26a96b4124001b26fc`](https://togithub.com/withastro/astro/commit/627e47d67af4846cea2acf26a96b4124001b26fc) Thanks [@bluwy](https://togithub.com/bluwy)! - Fixes and improves performance when rendering Astro JSXConfiguration
š Schedule: Branch creation - At any time (no schedule defined), 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.
This PR has been generated by Mend Renovate. View repository job log here.