Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/content/docs/en/guides/upgrade-to/v6.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,7 @@ src/pages/test%25file.astro
src/pages/test-file.astro
```


### Removed: `astro:ssr-manifest` virtual module (Integration API)

<SourcePR number="14306" title="feat: integrate vite environments"/>
Expand Down Expand Up @@ -1571,6 +1572,18 @@ If you want to keep the old ID generation for backward compatibility reasons, yo

<ReadMore>Learn more about [Heading IDs](/en/guides/markdown-content/#heading-ids).</ReadMore>

### Changed: Route pathname normalization

<SourcePR number="???" title="???"/>

Since Astro v6, route pathnames are partially decoded during route normalization. This means `Astro.url.pathname` may differ from `new URL(Astro.request.url).pathname` for percent-encoded route segments.

This also affects route params derived from normalized pathnames.

#### What should I do?

If you need access to the original encoded pathname, use `new URL(Astro.request.url).pathname` instead of `Astro.url.pathname`.

### Changed: `getStaticPaths()` cannot return `params` of type number

<SourcePR number="14586" title="fix!: disallow number in getStaticPaths params"/>
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/en/reference/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ See also: [`params`](/en/reference/routing-reference/#params)
<Since v="1.0.0" />
</p>

`url` is a [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) object constructed from the current `request.url` value. It is useful for interacting with individual properties of the request URL, like pathname and origin.
A normalized [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) object derived from the current `request.url` value. It is useful for interacting with individual properties of the request URL, like pathname and origin.

`Astro.url` is equivalent to doing `new URL(Astro.request.url)`.
Since Astro v6, the pathname may be partially decoded during route normalization. This means `Astro.url.pathname` may differ from `new URL(Astro.request.url).pathname` for percent-encoded route segments.

`url` will be a `localhost` URL in dev mode. When building a site, prerendered routes will receive a URL based on the [`site`](/en/reference/configuration-reference/#site) and [`base`](/en/reference/configuration-reference/#base) options. If `site` is not configured, prerendered pages will receive a `localhost` URL during builds as well.

Expand Down
Loading