Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
0665caa
chore: changeset
florian-lefebvre Sep 15, 2025
845172f
feat: enable prerelease mode (#14384)
florian-lefebvre Sep 15, 2025
d70d99b
Merge branch 'main' into next
ascorbic Sep 18, 2025
0758881
Delete .changeset/spotty-toes-know.md
florian-lefebvre Sep 19, 2025
6f78172
Merge branch 'main' into next
florian-lefebvre Sep 19, 2025
c69c7de
Remove deprecated ViewTransitions component (#14400)
ellielok Sep 19, 2025
73ba60f
Merge branch 'main' into next
florian-lefebvre Sep 22, 2025
ab230f5
Merge branch 'main' into next
florian-lefebvre Sep 22, 2025
1672c5e
Merge branch 'main' into next
florian-lefebvre Sep 23, 2025
2570c4b
feat!: clean up internal symbols usage (#14420)
florian-lefebvre Sep 23, 2025
3bda3ce
fix: remove legacy content collections (#14407)
ascorbic Sep 23, 2025
24380c7
Merge branch 'main' into next
florian-lefebvre Sep 23, 2025
51a697d
chore: fix content collection tests (#14431)
ascorbic Sep 24, 2025
b45b7a4
Merge branch 'main' into next
florian-lefebvre Sep 24, 2025
861b9cc
feat!: remove emitESMImage() (#14426)
florian-lefebvre Sep 24, 2025
af1c11f
Merge branch 'main' into next
florian-lefebvre Sep 24, 2025
3530bdc
Merge branch 'main' into next
florian-lefebvre Sep 24, 2025
4f11510
feat(astro)!: update `i18n.redirectToDefaultLocale` default (#14406)
florian-lefebvre Sep 25, 2025
df6d2d7
feat!: remove Astro.glob (#14421)
florian-lefebvre Sep 25, 2025
e131261
feat!: drop node 18 and 20 (#14427)
florian-lefebvre Sep 25, 2025
36c3d72
Merge branch 'main' into next
florian-lefebvre Sep 25, 2025
eea321b
feat: update minimum node version to 22.12 (#14436)
florian-lefebvre Sep 25, 2025
257c9af
Merge branch 'main' into next
florian-lefebvre Sep 26, 2025
eeb7a04
Merge branch 'main' into next
florian-lefebvre Sep 27, 2025
ecb0b98
feat: update vite (#14445)
florian-lefebvre Sep 29, 2025
ece667a
feat: cleanup integration api (#14446)
florian-lefebvre Sep 29, 2025
b1d87ec
feat: deprecate Astro in getStaticPaths (#14432)
florian-lefebvre Sep 29, 2025
87a3e87
Merge branch 'main' into next
ascorbic Sep 29, 2025
117f22e
fix: deps
florian-lefebvre Sep 29, 2025
55a1a91
feat: deprecate import.meta.env.ASSETS_PREFIX (#14461)
florian-lefebvre Oct 1, 2025
049da87
feat!: trailing slash never for endpoints with file extension (#14457)
florian-lefebvre Oct 1, 2025
4b60420
Merge branch 'main' into next
florian-lefebvre Oct 2, 2025
564ba76
feat: remove deprecated experimental errors (#14474)
florian-lefebvre Oct 2, 2025
9fdfd4c
feat: clean deprecated APIs (#14462)
florian-lefebvre Oct 2, 2025
36a461b
feat: stabilize experimental preserveScriptOrder option (#14480)
florian-lefebvre Oct 3, 2025
805ebc9
feat: remove renderScript option (#14479)
florian-lefebvre Oct 3, 2025
25fe093
feat!: remove rewrite from action context (#14477)
florian-lefebvre Oct 3, 2025
6f67c6e
feat: stabilize static import meta env (#14485)
florian-lefebvre Oct 3, 2025
7bcec81
Merge branch 'main' into next
florian-lefebvre Oct 7, 2025
ae36ca2
Merge branch 'main' into next
florian-lefebvre Oct 8, 2025
f135f5b
Update next (#14530)
florian-lefebvre Oct 13, 2025
d6ba12a
Merge branch 'main' into next
florian-lefebvre Oct 13, 2025
c1b6021
Merge branch 'main' into next
florian-lefebvre Oct 16, 2025
8d61777
fix: remove impossible i18n case (#14547)
florian-lefebvre Oct 16, 2025
727b0a2
feat!: stabilize experimental.headingIdCompat (#14494)
florian-lefebvre Oct 16, 2025
946a5e5
Merge branch 'main' into next
ascorbic Oct 16, 2025
23f2801
Merge branch 'main' into next
florian-lefebvre Oct 16, 2025
a12c431
Merge branch 'main' into next
florian-lefebvre Oct 20, 2025
82dbb56
fix: test
florian-lefebvre Oct 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 27 additions & 0 deletions .changeset/beige-clowns-read.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
'astro': major
---

Removes `entryPoints` on `astro:build:ssr` hook (Integration API)

In Astro 5.0, `functionPerRoute` was deprecated. That meant that `entryPoints` on the `astro:build:ssr` hook was always empty. Astro integrations may have continued to work, even while `entryPoints` was not providing any useful data.

Astro 6.0 removes the `entryPoints` map passed to this hook entirely. Integrations may no longer include `entryPoints`.

#### What should I do?

Remove any instance of `entryPoints` passed to `astro:build:ssr`. This should be safe to remove because this logic was not providing any useful data, but you may need to restructure your code accordingly for its removal:

```diff
// my-integration.mjs
const integration = () => {
return {
name: 'my-integration',
hooks: {
'astro:build:ssr': (params) => {
- someLogic(params.entryPoints)
},
}
}
}
```
22 changes: 22 additions & 0 deletions .changeset/busy-olives-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'astro': major
---

Removes the deprecated `emitESMImage()` function

In Astro 5.6.2, the `emitESMImage()` function was deprecated in favor of `emitImageMetadata()`, which removes two deprecated arguments that were not meant to be exposed for public use: `_watchMode` and `experimentalSvgEnabled`.

Astro 6.0 removes `emitESMImage()` entirely. Update to `emitImageMetadata()` to keep your current behavior.

#### What should I do?

Replace all occurrences of the `emitESMImage()` with `emitImageMetadata()` and remove unused arguments:

```diff
-import { emitESMImage } from 'astro/assets/utils';
+import { emitImageMetadata } from 'astro/assets/utils';

const imageId = '/images/photo.jpg';
-const result = await emitESMImage(imageId, false, false);
+const result = await emitImageMetadata(imageId);
```
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "origin/main",
"baseBranch": "origin/next",
"updateInternalDependencies": "patch",
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
Expand Down
40 changes: 40 additions & 0 deletions .changeset/cuddly-worlds-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
'astro': major
---

Removes `routes` on `astro:build:done` hook (Integration API)

In Astro 5.0, accessing `routes` on the `astro:build:done` hook was deprecated in favour of a new `astro:routes:resolved` hook. However, Astro integrations may have continued to function using the `routes` array.

Astro 6.0 removes the `routes` array passed to this hook entirely. Instead, the `astro:routes:resolved` hook must be used.

#### What should I do?

Remove any instance of `routes` passed to `astro:build:done` in your Astro integration and replace it with the new `astro:routes:resolved` hook. You can access `distURL` on the newly exposed `assets` map:

```diff
// my-integration.mjs
const integration = () => {
+ let routes
return {
name: 'my-integration',
hooks: {
+ 'astro:routes:resolved': (params) => {
+ routes = params.routes
+ },
'astro:build:done': ({
- routes
+ assets
}) => {
+ for (const route of routes) {
+ const distURL = assets.get(route.pattern)
+ if (distURL) {
+ Object.assign(route, { distURL })
+ }
+ }
console.log(routes)
}
}
}
}
```
19 changes: 19 additions & 0 deletions .changeset/cyan-crews-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'astro': major
---

Removes the old `app.render()` signature (Adapter API)

In Astro 4.0, the `app.render()` signature that allowed passing `routeData` and `locals` as optional arguments was deprecated in favor of a single optional `renderOptions` argument.

Astro 6.0 removes this signature entirely. Attempting to pass these separate arguments will now cause an error in your project.

#### What should I do?

Review your `app.render` calls and pass `routeData` and `locals` as properties of an object instead of as multiple independent arguments:

```diff
// my-adapter/entrypoint.ts
-app.render(request, routeData, locals)
+app.render(request, { routeData, locals })
```
20 changes: 20 additions & 0 deletions .changeset/dull-mangos-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
'astro': major
---

Removes `prefetch()` `with` option

In Astro 4.8.4, the `with` option of the programmatic `prefetch()` function was deprecated in favor of a more sensible default behavior that no longer required specifying the priority of prefetching for each page.

Astro 6.0 removes this option entirely and it is no longer possible to configure the priority of prefetching by passing the `with` option. Attempting to do so will now cause errors.

By default, Astro's prefetching now uses an automatic approach that will always try to use `<link rel="prefetch>` if supported, or will fall back to `fetch()`.

#### What should I do?

Review your `prefetch()` calls and remove the `with` option if it still exists:

```diff
-prefetch('/about', { with: 'fetch' });
+prefetch('/about');
```
27 changes: 27 additions & 0 deletions .changeset/fast-bushes-fall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
'astro': major
---

Deprecates `Astro` in `getStaticPaths()`

In Astro 5.x, it was possible to access an `Astro` object inside `getStaticPaths()`. However, despite being typed the same as the `Astro` object accessible in the frontmatter, this object only had `site` and `generator` properties. This could lead to confusion about which `Astro` object properties were available inside `getStaticPaths()`.

Astro 6.0 deprecates this object for `getStaticPaths()` to avoid confusion and improves error handling when attempting to access `Astro` values that are unavailable. Using `Astro.site` or `Astro.generator` within `getStaticPaths()` will now log a deprecation warning, and accessing any other property will throw a specific error with a helpful message. In a future major version, this object will be removed entirely, and accessing `Astro.site` or `Astro.generator` will also throw an error.

#### What should I do?

Update your `getStaticPaths()` function if you were attempting to access any `Astro` properties inside its scope. Remove `Astro.generator` entirely, and replace all occurrences of `Astro.site()` with `import.meta.env.SITE`:

```diff
---
// src/pages/blog/[slug].astro
import { getPages } from "../../../utils/data";

export async function getStaticPaths() {
- console.log(Astro.generator);
- return getPages(Astro.site);
+ return getPages(import.meta.env.SITE);
}
---
```

18 changes: 18 additions & 0 deletions .changeset/giant-areas-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
'astro': major
---

Updates trailing slash behavior of endpoint URLs.

In Astro v5.0, custom endpoints whose URL ended in a file extension (e.g. `/src/pages/sitemap.xml.ts` ) could be accessed with a trailing slash (`/sitemap.xml/`) or without (`/sitemap.xml`), regardless of the value configured for `build.trailingSlash`.

In Astro v6.0, these endpoints can only be accessed without a trailing slash. This is true regardless of your `build.trailingSlash` configuration.

#### What should I do?

Review your links to your custom endpoints that include a file extension in the URL and remove any trailing slashes:

```diff
-<a href="/sitemap.xml/">Sitemap</a>
+<a href="/sitemap.xml">Sitemap</a>
```
24 changes: 24 additions & 0 deletions .changeset/good-camels-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@astrojs/markdoc': minor
'@astrojs/mdx': major
'@astrojs/markdown-remark': major
'astro': major
---

Updates Markdown heading ID generation

In Astro 5.x, an additional default processing step to Markdown stripped trailing hyphens from the end of IDs for section headings ending in special characters. This provided a cleaner `id` value, but could lead to incompatibilities rendering your Markdown across platforms.

In Astro 5.5, the `experimental.headingIdCompat` flag was introduced to allow you to make the IDs generated by Astro for Markdown headings compatible with common platforms like GitHub and npm, using the popular [`github-slugger`](https://github.com/Flet/github-slugger) package.

Astro 6.0 removes this experimental flag and makes this the new default behavior in Astro: trailing hyphens from the end of IDs for headings ending in special characters are no longer removed.

#### What should I do?

If you have manual links to headings, you may need to update some anchor link values with a new trailing hyphen.

If you were previously using this experimental feature, remove this experimental flag from your configuration.

If you were previously using the `rehypeHeadingIds` plugin directly to enforce compatibility, remove the `headingIdCompat` option as it no longer exists.

See the [Astro 6.0 upgrade guide](https://docs.astro.build/en/guides/upgrade-to/v6/#changed-markdown-heading-id-generation) for upgrade examples, and instructions to create a custom rehype plulgin if you want to keep the old ID generation for backward compatibility reasons.
21 changes: 21 additions & 0 deletions .changeset/green-garlics-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
'astro': major
---

Deprecates `import.meta.env.ASSETS_PREFIX`

In Astro 5.x, it was possible to access `build.assetsPrefix` in your Astro config via the built-in environment variable `import.meta.env.ASSETS_PREFIX`. However, Astro v5.7.0 introduced the `astro:config` virtual model to expose a non-exhaustive, serializable, type-safe version of the Astro configuration which included access to `build.assetsPrefix` directly. This became the preferred way to access the prefix for Astro-generated asset links when set, although the environment variable still existed.

Astro 6.0 deprecates this variable in favor of `build.assetsPrefix` from the `astro:config/server` module.

#### What should I do?

Replace any occurances of `import.meta.env.ASSETS_PREFIX` with the `build.assetsPrefix` import from `astro:config/server`. This is a drop-in replacement to provide the existing value, and no other changes to your code should be necessary:

```diff
import { someLogic } from "./utils"
+import { build } from "astro:config/server"

-someLogic(import.meta.env.ASSETS_PREFIX)
+someLogic(build.assetsPrefix)
```
24 changes: 24 additions & 0 deletions .changeset/kind-pears-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'astro': major
---

Removes `Astro.glob()`

In Astro 5.0, `Astro.glob()` was deprecated in favor of using `getCollection()` to query your collections, and `import.meta.glob()` to query other source files in your project.

Astro 6.0 removes `Astro.glob()` entirely. Update to `import.meta.glob()` to keep your current behavior.

#### What should I do?

Replace all use of `Astro.glob()` with `import.meta.glob()`. Note that `import.meta.glob()` no longer returns a `Promise`, so you may have to update your code accordingly. You should not require any updates to your glob patterns.

```astro
---
// src/pages/blog.astro
-const posts = await Astro.glob('./posts/*.md');
+const posts = Object.values(import.meta.glob('./posts/*.md', { eager: true }));
---
{posts.map((post) => <li><a href={post.url}>{post.frontmatter.title}</a></li>)}
```

Where appropriate, consider using content collections to organize your content, which has its own newer, more performant querying functions.
31 changes: 31 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"mode": "pre",
"tag": "next",
"initialVersions": {
"astro": "5.13.7",
"@astrojs/prism": "3.3.0",
"@astrojs/rss": "4.0.12",
"create-astro": "4.13.1",
"@astrojs/db": "0.17.2",
"@astrojs/alpinejs": "0.4.9",
"@astrojs/cloudflare": "12.6.8",
"@astrojs/markdoc": "0.15.6",
"@astrojs/mdx": "4.3.5",
"@astrojs/netlify": "6.5.10",
"@astrojs/node": "9.4.3",
"@astrojs/partytown": "2.1.4",
"@astrojs/preact": "4.1.1",
"@astrojs/react": "4.3.1",
"@astrojs/sitemap": "3.5.1",
"@astrojs/solid-js": "5.1.1",
"@astrojs/svelte": "7.1.1",
"@astrojs/vercel": "8.2.7",
"@astrojs/vue": "5.1.1",
"@astrojs/internal-helpers": "0.7.2",
"@astrojs/markdown-remark": "6.3.6",
"@astrojs/telemetry": "3.3.0",
"@astrojs/underscore-redirects": "1.0.0",
"@astrojs/upgrade": "0.6.2"
},
"changesets": []
}
29 changes: 29 additions & 0 deletions .changeset/pretty-forks-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
'astro': major
---

Removes the `handleForms` prop for the `<ClientRouter />` component

In Astro 4.0, the `handleForms` prop of the `<ClientRouter />` component was deprecated, as it was no longer necessary to opt in to handling `submit` events for `form` elements. This functionality has been built in by default and the property, if still included in your project, silently had no impact on form submission.

Astro 6.0 removes this prop entirely and it now must be removed to avoid errors in your project.

#### What should I do?

Remove the `handleForms` property from your `<ClientRouter />` component if it exists. It has provided no additional functionality, and so removing it should not change any behavior in your project:

```diff
---
// title="src/pages/index.astro
import { ClientRouter } from "astro:transitions";
---
<html>
<head>
- <ClientRouter handleForms />
+ <ClientRouter />
</head>
<body>
<!-- stuff here -->
</body>
</html>
```
37 changes: 37 additions & 0 deletions .changeset/puny-poems-create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
'@astrojs/markdoc': minor
'@astrojs/preact': major
'@astrojs/svelte': major
'@astrojs/react': major
'@astrojs/solid-js': major
'@astrojs/mdx': major
'create-astro': major
'@astrojs/prism': major
'@astrojs/upgrade': minor
'astro': major
---

Increases minimum Node.js version to 22.12.0

Node 18 reached its End of Life in March 2025 and Node 20 is scheduled to reach its End of Life in April 2026.

Astro v6.0 drops Node 18 and Node 20 support entirely so that all Astro users can take advantage of Node's more modern features.

#### What should I do?

Check that both your development environment and your deployment environment are using **Node `22.12.0` or higher**.

1. Check your local version of Node using:

```sh
node -v
```

2. Check your deployment environment's own documentation to verify that they support Node 22.

You can specify Node `22.12.0` for your Astro project either in a dashboard configuration setting or a `.nvmrc` file.

```bash
# .nvmrc
22.12.0
```
26 changes: 26 additions & 0 deletions .changeset/rich-horses-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
'astro': major
---

Removes the deprecated `<ViewTransitions />` component

In Astro 5.0, the `<ViewTransitions />` component was renamed to `<ClientRouter />` to clarify the role of the component. The new name makes it more clear that the features you get from Astro's `<ClientRouter />` routing component are slightly different from the native CSS-based MPA router. However, a deprecated version of the `<ViewTransitions />` component still existed and may have functioned in Astro 5.x.

Astro 6.0 removes the `<ViewTransitions />` component entirely and it can no longer be used in your project. Update to the `<ClientRouter />` component to continue to use these features.

#### What should I do?

Replace all occurrences of the `ViewTransitions` import and component with `ClientRouter`:

```diff
// src/layouts/MyLayout.astro"
- import { ViewTransitions } from 'astro:transitions';
+ import { ClientRouter } from 'astro:transitions';
<html>
<head>
...
- <ViewTransitions />
+ <ClientRouter />
</head>
</html>
```
Loading
Loading