Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
b6fbdaa
fix(cli): hardcoded supported Node.js version (#10742)
ematipico Aug 6, 2024
a7dba90
chore: enter pre mode
Princesseuh Aug 6, 2024
bbd8bfd
Update changeset base branch (#11632)
bluwy Aug 6, 2024
83a2a64
Update to new shiki token names (#11661)
bluwy Aug 9, 2024
7dc0680
Merge branch 'main' into next
Princesseuh Aug 9, 2024
f965fab
Merge branch 'main' into next
Princesseuh Aug 12, 2024
5a3c1d1
chore: update tag
Princesseuh Aug 13, 2024
e90f559
Fix attribute rendering for boolean values (take 2) (#11660)
bluwy Aug 13, 2024
e853526
Merge branch 'main' into next
Princesseuh Aug 14, 2024
a050954
Allow snapshot releases against next
matthewp Aug 15, 2024
d8f9a83
Reset the preview release branch
matthewp Aug 15, 2024
40b95a1
Merge branch 'main' into next
Princesseuh Aug 16, 2024
d74617c
Refactor/types (#11715)
Princesseuh Aug 16, 2024
d37390e
Merge branch 'main' into next
Princesseuh Aug 19, 2024
7ffcae1
Merge branch 'main' into next
Princesseuh Aug 19, 2024
3822e57
Remove @astrojs/lit (#11680)
matthewp Aug 19, 2024
8a53517
Remove functionPerRoute option (#11714)
matthewp Aug 19, 2024
4018362
ci: use docs's 5.0 beta branch for smoke tests
Princesseuh Aug 19, 2024
f239242
[ci] release (alpha) (#11627)
astrobot-houston Aug 19, 2024
6617491
Cleanup unused JSX code (#11741)
bluwy Aug 20, 2024
787fed8
Merge branch 'main' into next
Princesseuh Aug 20, 2024
cfa6a47
feat: remove the squoosh image service (#11770)
Princesseuh Aug 20, 2024
9a2aaa0
fix(assets): Remove TLA by making compiledContent async (#11782)
Princesseuh Aug 20, 2024
4cd6c43
Use GET and preload links on Server Islands (#11732)
matthewp Aug 20, 2024
ea71b90
feat(next): make astro:env stable (#11679)
florian-lefebvre Aug 21, 2024
e9e2139
Remove legacy route prioritization (#11798)
matthewp Aug 23, 2024
7c0ccfc
feat: change default value of `checkOrigin` (#11788)
ematipico Aug 23, 2024
5966acc
[ci] release (alpha) (#11787)
astrobot-houston Aug 23, 2024
05139ef
feat(next): add `Astro.routePattern` (#11698)
ematipico Aug 27, 2024
7315050
Deprecate Astro.glob (#11826)
matthewp Aug 27, 2024
a83e362
Prevent usage of astro:content in the client (#11827)
matthewp Aug 27, 2024
36e6dee
Remove unused dependencies in next (#11789)
bluwy Aug 28, 2024
4e5cc5a
Add base to paginate (#11253)
kevinzunigacuellar Aug 28, 2024
9393243
Make directRenderScript the default (#11791)
bluwy Aug 28, 2024
68601a9
Merge branch 'main' into next
Princesseuh Aug 28, 2024
c7a2ded
fix: some merge issues
Princesseuh Aug 28, 2024
3eeaf6b
refactor: `Astro.routePattern` is `RouteData.route` (#11867)
ematipico Aug 29, 2024
027b839
Merge branch 'main' into next
Princesseuh Aug 29, 2024
8ce54b5
fix: remove type for directRenderScript
Princesseuh Aug 29, 2024
96a6aec
fix: type imports in actions
Princesseuh Aug 29, 2024
e311cc0
Merge branch 'main' into next
ascorbic Aug 29, 2024
342b9a9
test: fix regression (#11873)
ematipico Aug 29, 2024
01b48a4
[docs] formatting for config ref docs (#11876)
sarah11918 Aug 29, 2024
534d3ed
[ci] release (alpha) (#11853)
astrobot-houston Aug 30, 2024
edd8ae9
Remove unused babel dependencies
bluwy Aug 31, 2024
560ef15
Refactor createShikiHighlighter (#11825)
bluwy Sep 2, 2024
2bdde80
Set external: true when loading astro config (#11819)
bluwy Sep 2, 2024
3ab3b4e
Clean up Astro metadata in vfile.data (#11861)
bluwy Sep 2, 2024
a1d78b7
Merge branch 'main' into next
ascorbic Sep 2, 2024
4563ffc
Fix merge
ascorbic Sep 2, 2024
334948c
feat: allow integrations to refresh content layer data (#11878)
ascorbic Sep 3, 2024
da473ec
[ci] release (alpha) (#11903)
astrobot-houston Sep 3, 2024
5a39da8
Merge branch 'main' into next
ascorbic Sep 3, 2024
3804711
feat(next): better tsconfig (#11859)
florian-lefebvre Sep 3, 2024
b5d827b
Export `LoaderContext` types (#11914)
ascorbic Sep 4, 2024
c3dce83
Unflag content layer (#11911)
ascorbic Sep 4, 2024
70865b3
[ci] release (alpha) (#11910)
astrobot-houston Sep 4, 2024
a8a3d2c
feat(next): ctx.isPrerendered (#11875)
florian-lefebvre Sep 5, 2024
5b4e3ab
feat(next): envField jsdoc (#11927)
florian-lefebvre Sep 6, 2024
50ca656
Merge output: hybrid and output: static (#11824)
Princesseuh Sep 6, 2024
fa4671c
[error docs] Update error messages that reference src/content/ (#11943)
sarah11918 Sep 7, 2024
46ea29f
Fix `build.client` and `build.server` resolve behaviour (#11916)
bluwy Sep 9, 2024
0a269b6
fix: changelog
florian-lefebvre Sep 9, 2024
26dc381
[ci] release (alpha) (#11926)
astrobot-houston Sep 9, 2024
50a0146
feat: allow arrays of patterns for glob loader (#11952)
ascorbic Sep 9, 2024
d7e950f
feat(hybrid): Clean logging and misc tweaks for hybrid removal (#11942)
Princesseuh Sep 9, 2024
b6a5f39
feat: changesets for the hybrid removal (#11941)
Princesseuh Sep 10, 2024
f13c357
[docs] update legacy collections error messages (#11961)
sarah11918 Sep 10, 2024
4410130
fix: add refresh context to schema for loader args (#11960)
ascorbic Sep 10, 2024
a1176a1
[ci] release (alpha) (#11954)
astrobot-houston Sep 10, 2024
40760a8
Merge branch 'main' into next
Princesseuh Sep 10, 2024
518433e
feat(assets): Allow customising the route of the image endpoint (#11908)
Princesseuh Sep 10, 2024
74722cb
feat(next): reference astro/client from astro/config (#11925)
florian-lefebvre Sep 11, 2024
7f4e162
[docs] update legacy collections error messages (again) (#11972)
sarah11918 Sep 12, 2024
60211de
Export the RenderResult type (#11974)
ascorbic Sep 12, 2024
d813262
Unflag Server Islands (#11955)
matthewp Sep 12, 2024
ee38b3a
refactor(next): send `IntegrationRouteData` to integrations (#11864)
ematipico Sep 13, 2024
f7f2338
refactor: rework supportedAstroFeatures (#11806)
Princesseuh Sep 13, 2024
f15922d
[ci] release (alpha) (#11962)
astrobot-houston Sep 13, 2024
d84e444
feat: add default exclude to tsconfigs (#11982)
Princesseuh Sep 13, 2024
3e70853
feat(next): underscore redirects (#11989)
florian-lefebvre Sep 13, 2024
a604a0c
Rename the ViewTransitions component to ClientRouter (#11980)
matthewp Sep 13, 2024
d7a396c
Remove experimental.serverIslands flag (#11991)
matthewp Sep 13, 2024
bf90a53
feat(next): TODOs (#11987)
florian-lefebvre Sep 13, 2024
4724b14
Merge branch 'main' into next
matthewp Sep 13, 2024
6e1602c
[ci] release (alpha) (#11988)
astrobot-houston Sep 13, 2024
2062958
Update an error message (#11999)
sarah11918 Sep 15, 2024
f10a3b7
Fix vitest in Astro 5 (#12009)
matthewp Sep 16, 2024
cfdaab2
docs: update `security.checkOrigin` JSDoc comment (#12011)
ArmandPhilippot Sep 16, 2024
948ad8e
[ci] release (alpha) (#12010)
astrobot-houston Sep 16, 2024
5608338
feat: update to beta (#12008)
Princesseuh Sep 17, 2024
efcc4bb
fix: attempt to version at beta 1
Princesseuh Sep 17, 2024
e6cf724
fix: version at beta 0
Princesseuh Sep 17, 2024
9481f8f
fix: only bump packages that needs it
Princesseuh Sep 17, 2024
0eb1463
fix: make db a minor
Princesseuh Sep 17, 2024
6860beb
[ci] release (beta) (#12012)
astrobot-houston Sep 17, 2024
837ee3a
Encode action result in cookie (#12016)
matthewp Sep 17, 2024
b082702
Merge branch 'main' into next
ascorbic Sep 18, 2024
83cc37d
chore: remove outdate config from test
ascorbic Sep 19, 2024
10a756a
fix: treat images with initial slash as local, and resolve with vite …
ascorbic Sep 19, 2024
ddc3a08
fix: handle trailing slash on the image endpoint (#12022)
Princesseuh Sep 19, 2024
325a57c
fix: correctly parse inline loader values (#12035)
ascorbic Sep 20, 2024
cb5d3ae
Release a beta for Svelte and Vue (#12060)
Princesseuh Sep 24, 2024
7fa6f78
Merge branch 'main' into next
Princesseuh Sep 24, 2024
d1e5977
fix: dynamically imported middlewares
Princesseuh Sep 24, 2024
7968eab
[ci] release (beta) (#12017)
astrobot-houston Sep 24, 2024
61d248e
feat: makes it so astro add does not set output server by default (#1…
Princesseuh Sep 25, 2024
9693ad4
fix: check origin in static build (#12070)
ematipico Sep 25, 2024
acf264d
Replace ora with yocto-spinner (#12073)
bluwy Sep 25, 2024
a19530e
Parse frontmatter ourselves (#12075)
bluwy Sep 26, 2024
0a1036e
feat(next): codegenDir and update .astro paths (#11963)
florian-lefebvre Sep 26, 2024
21b5e80
feat: custom file formats in file content loader (#12047)
rgodha24 Sep 29, 2024
8679954
feat(next): remove CCC (#12081)
florian-lefebvre Sep 30, 2024
e748c48
Merge branch 'main' into next
bluwy Oct 1, 2024
74ace46
Format
ascorbic Oct 1, 2024
2eb62d0
Merge branch 'main' into next
florian-lefebvre Oct 1, 2024
ece0344
[ci] release (beta) (#12072)
astrobot-houston Oct 1, 2024
a195629
Merge branch 'main' into next
ascorbic Oct 1, 2024
7febf1f
feat(routing): decode pathname early, don't decode `params` (#12079)
ematipico Oct 2, 2024
8f064fa
fix changeset
ematipico Oct 2, 2024
7a1d54a
Merge branch 'main' into next
ascorbic Oct 4, 2024
423dfc1
Bump vite to beta (#11979)
bluwy Oct 4, 2024
953e6e0
Merge branch 'main' into next
ascorbic Oct 4, 2024
abf9a89
Implement legacy collections using glob (#11976)
ascorbic Oct 4, 2024
55e9cd8
fix: copy server URLs to Vite dev server (#12127)
ascorbic Oct 4, 2024
dcc1e89
Fix-component-undefined-svelte-v5 (#12102)
hermit99 Oct 5, 2024
b75758f
Merge branch 'main' into next
Princesseuh Oct 7, 2024
676b2c6
[ci] release (beta) (#12100)
astrobot-houston Oct 7, 2024
1cd3085
fix: don't strip "slug" from content layer data (#12168)
ascorbic Oct 9, 2024
15fa9ba
fix(routing): correct redirects in dev (#12169)
ematipico Oct 9, 2024
9fc86e5
Merge branch 'main' into next
bluwy Oct 10, 2024
ce1f53c
Remove start comand from templates (next) (#12200)
TheOtterlord Oct 15, 2024
a393154
Merge branch 'main' into next
bluwy Oct 15, 2024
51d13e2
feat: accept `URL` for entry points (#12226)
ematipico Oct 15, 2024
157e266
Merge branch 'main' into next
delucis Oct 15, 2024
4ade067
Fix lockfile
delucis Oct 15, 2024
c929e5d
[ci] release (beta) (#12170)
astrobot-houston Oct 15, 2024
58d1d9e
Merge branch 'main' into next
ematipico Oct 17, 2024
2649a73
fix merge mistake during resolution
ematipico Oct 17, 2024
93351bc
Support custom mode (#12150)
bluwy Oct 17, 2024
8232ba2
ci: fix syntax error (#12271)
ematipico Oct 21, 2024
166ea96
Fix fs-fixture version
bluwy Oct 21, 2024
eb41d13
feat(next): make defineConfig generic (#12243)
florian-lefebvre Oct 21, 2024
57dedbf
Merge branch 'main' into next
ematipico Oct 22, 2024
c6a458c
update lock file
ematipico Oct 22, 2024
6469518
chore: fix test setup
ascorbic Oct 22, 2024
90ae100
Unset charset=utf-8 content-type for md/mdx pages (#12231)
bluwy Oct 24, 2024
4e9a3ac
feat: update `astro add vercel` (#12268)
ematipico Oct 25, 2024
7196c24
fix(routing): don't check headers for prenredered pages (#12302)
ematipico Oct 25, 2024
2365c94
Add support for Svelte 5 @render syntax
Robertsson Oct 28, 2024
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
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .changeset/afraid-apricots-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
'astro': minor
---

Adapters can now specify the build output type they're intended for using the `adapterFeatures.buildOutput` property. This property can be used to always generate a server output, even if the project doesn't have any server-rendered pages.

```ts
{
'astro:config:done': ({ setAdapter, config }) => {
setAdapter({
name: 'my-adapter',
adapterFeatures: {
buildOutput: 'server',
},
});
},
}
```

If your adapter specifies `buildOutput: 'static'`, and the user's project contains server-rendered pages, Astro will warn in development and error at build time. Note that a hybrid output, containing both static and server-rendered pages, is considered to be a `server` output, as a server is required to serve the server-rendered pages.
9 changes: 9 additions & 0 deletions .changeset/blue-boats-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'astro': major
---

Unflag globalRoutePriority

The previously experimental feature `globalRoutePriority` is now the default in Astro 5.

This was a refactoring of route prioritization in Astro, making it so that injected routes, file-based routes, and redirects are all prioritized using the same logic. This feature has been enabled for all Starlight projects since it was added and should not affect most users.
14 changes: 14 additions & 0 deletions .changeset/blue-sloths-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'astro': patch
---

`render()` signature now takes `renderOptions` as 2nd argument

The signature for `app.render()` has changed, and the second argument is now an options object called `renderOptions` with more options for customizing rendering.

The `renderOptions` are:

- `addCookieHeader`: Determines whether Astro will set the `Set-Cookie` header, otherwise the adapter is expected to do so itself.
- `clientAddress`: The client IP address used to set `Astro.clientAddress`.
- `locals`: An object of locals that's set to `Astro.locals`.
- `routeData`: An object specifying the route to use.
21 changes: 21 additions & 0 deletions .changeset/brave-elephants-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
'astro': major
---

### [changed]: `entryPoint` type inside the hook `astro:build:ssr`
In Astro v4.x, the `entryPoint` type was `RouteData`.

Astro v5.0 the `entryPoint` type is `IntegrationRouteData`, which contains a subset of the `RouteData` type. The fields `isIndex` and `fallbackRoutes` were removed.

#### What should I do?
Update your adapter to change the type of `entryPoint` from `RouteData` to `IntegrationRouteData`.

```diff
-import type {RouteData} from 'astro';
+import type {IntegrationRouteData} from "astro"

-function useRoute(route: RouteData) {
+function useRoute(route: IntegrationRouteData) {

}
```
5 changes: 5 additions & 0 deletions .changeset/breezy-colts-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/markdoc': patch
---

Uses latest version of `@astrojs/markdown-remark` with updated Shiki APIs
5 changes: 5 additions & 0 deletions .changeset/chatty-teachers-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": major
---

The lowest version of Node supported by Astro is now Node v18.17.1 and higher.
15 changes: 15 additions & 0 deletions .changeset/chilly-terms-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
'astro': major
---

Updates how the `build.client` and `build.server` option values get resolved to match existing documentation. With this fix, the option values will now correctly resolve relative to the `outDir` option. So if `outDir` is set to `./dist/nested/`, then by default:

- `build.client` will resolve to `<root>/dist/nested/client/`
- `build.server` will resolve to `<root>/dist/nested/server/`

Previously the values were incorrectly resolved:

- `build.client` was resolved to `<root>/dist/nested/dist/client/`
- `build.server` was resolved to `<root>/dist/nested/dist/server/`

If you were relying on the previous build paths, make sure that your project code is updated to the new build paths.
7 changes: 7 additions & 0 deletions .changeset/clean-camels-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'astro': major
---

Adds a default exclude and include value to the tsconfig presets. `{projectDir}/dist` is now excluded by default, and `{projectDir}/.astro/types.d.ts` and `{projectDir}/**/*` are included by default.

Both of these options can be overridden by setting your own values to the corresponding settings in your `tsconfig.json` file.
13 changes: 13 additions & 0 deletions .changeset/clean-donuts-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@astrojs/markdown-remark': major
'astro': major
---

Cleans up Astro-specfic metadata attached to `vfile.data` in Remark and Rehype plugins. Previously, the metadata was attached in different locations with inconsistent names. The metadata is now renamed as below:

- `vfile.data.__astroHeadings` -> `vfile.data.astro.headings`
- `vfile.data.imagePaths` -> `vfile.data.astro.imagePaths`

The types of `imagePaths` has also been updated from `Set<string>` to `string[]`. The `vfile.data.astro.frontmatter` metadata is left unchanged.

While we don't consider these APIs public, they can be accessed by Remark and Rehype plugins that want to re-use Astro's metadata. If you are using these APIs, make sure to access them in the new locations.
5 changes: 5 additions & 0 deletions .changeset/cold-bananas-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Correctly parse values returned from inline loader
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": "main",
"baseBranch": "next",
"updateInternalDependencies": "patch",
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
Expand Down
25 changes: 25 additions & 0 deletions .changeset/cool-mangos-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
'astro': major
---

The `locals` object can no longer be overridden

Middleware, API endpoints, and pages can no longer override the `locals` object in its entirety. You can still append values onto the object, but you can not replace the entire object and delete its existing values.

If you were previously overwriting like so:

```js
ctx.locals = {
one: 1,
two: 2
}
```

This can be changed to an assignment on the existing object instead:

```js
Object.assign(ctx.locals, {
one: 1,
two: 2
})
```
5 changes: 5 additions & 0 deletions .changeset/cuddly-shoes-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes an issue where the refresh context data was not passed correctly to content layer loaders
45 changes: 45 additions & 0 deletions .changeset/curvy-walls-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
'astro': patch
---

Adds a new function `refreshContent` to the `astro:server:setup` hook that allows integrations to refresh the content layer. This can be used, for example, to register a webhook endpoint during dev, or to open a socket to a CMS to listen for changes.

By default, `refreshContent` will refresh all collections. You can optionally pass a `loaders` property, which is an array of loader names. If provided, only collections that use those loaders will be refreshed. For example, A CMS integration could use this property to only refresh its own collections.

You can also pass a `context` object to the loaders. This can be used to pass arbitrary data, such as the webhook body, or an event from the websocket.

```ts
{
name: 'my-integration',
hooks: {
'astro:server:setup': async ({ server, refreshContent }) => {
server.middlewares.use('/_refresh', async (req, res) => {
if(req.method !== 'POST') {
res.statusCode = 405
res.end('Method Not Allowed');
return
}
let body = '';
req.on('data', chunk => {
body += chunk.toString();
});
req.on('end', async () => {
try {
const webhookBody = JSON.parse(body);
await refreshContent({
context: { webhookBody },
loaders: ['my-loader']
});
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ message: 'Content refreshed successfully' }));
} catch (error) {
res.writeHead(500, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ error: 'Failed to refresh content: ' + error.message }));
}
});
});
}
}
}
```

9 changes: 9 additions & 0 deletions .changeset/dirty-cooks-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@astrojs/mdx': major
---

Handles the breaking change in Astro where content pages (including `.mdx` pages located within `src/pages/`) no longer respond with `charset=utf-8` in the `Content-Type` header.

For MDX pages without layouts, `@astrojs/mdx` will automatically add the `<meta charset="utf-8">` tag to the page by default. This reduces the boilerplate needed to write with non-ASCII characters. If your MDX pages have a layout, the layout component should include the `<meta charset="utf-8">` tag.

If you require `charset=utf-8` to render your page correctly, make sure that your layout components have the `<meta charset="utf-8">` tag added.
5 changes: 5 additions & 0 deletions .changeset/dry-lamps-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Update error link to on-demand rendering guide
18 changes: 18 additions & 0 deletions .changeset/dry-worms-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
'astro': major
---

The `image.endpoint` config now allow customizing the route of the image endpoint in addition to the entrypoint. This can be useful in niche situations where the default route `/_image` conflicts with an existing route or your local server setup.

```js
import { defineConfig } from "astro/config";

defineConfig({
image: {
endpoint: {
route: "/image",
entrypoint: "./src/image_endpoint.ts"
}
},
})
```
5 changes: 5 additions & 0 deletions .changeset/dull-moles-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Prevents Vite emitting an error when restarting itself
14 changes: 14 additions & 0 deletions .changeset/eight-days-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'astro': major
'@astrojs/mdx': major
'@astrojs/markdown-remark': major
'@astrojs/db': minor
'@astrojs/web-vitals': major
'@astrojs/underscore-redirects': minor
---

Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release.

Starting from this release, no breaking changes will be introduced unless absolutely necessary.

To learn how to upgrade, check out the [Astro v5.0 upgrade guide in our beta docs site](https://5-0-0-beta.docs.astro.build/en/guides/upgrade-to/v5/).
5 changes: 5 additions & 0 deletions .changeset/eighty-bags-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Exports the `RenderResult` type
48 changes: 48 additions & 0 deletions .changeset/eighty-boxes-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
'astro': major
---

The `astro:env` feature introduced behind a flag in [v4.10.0](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md#x4100) is no longer experimental and is available for general use. If you have been waiting for stabilization before using `astro:env`, you can now do so.

This feature lets you configure a type-safe schema for your environment variables, and indicate whether they should be available on the server or the client.

To configure a schema, add the `env` option to your Astro config and define your client and server variables. If you were previously using this feature, please remove the experimental flag from your Astro config and move your entire `env` configuration unchanged to a top-level option.

```js
import { defineConfig, envField } from 'astro/config'

export default defineConfig({
env: {
schema: {
API_URL: envField.string({ context: "client", access: "public", optional: true }),
PORT: envField.number({ context: "server", access: "public", default: 4321 }),
API_SECRET: envField.string({ context: "server", access: "secret" }),
}
}
})
```

You can import and use your defined variables from the appropriate `/client` or `/server` module:

```astro
---
import { API_URL } from "astro:env/client"
import { API_SECRET_TOKEN } from "astro:env/server"

const data = await fetch(`${API_URL}/users`, {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_SECRET_TOKEN}`
},
})
---

<script>
import { API_URL } from "astro:env/client"

fetch(`${API_URL}/ping`)
</script>
```

Please see our [guide to using environment variables](https://docs.astro.build/en/guides/environment-variables/#astroenv) for more about this feature.
14 changes: 14 additions & 0 deletions .changeset/eighty-donkeys-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'astro': minor
---

The following renderer fields and integration fields now accept `URL` as a type:

**Renderers**:
- `AstroRenderer.clientEntrpoint`
- `AstroRenderer.serverEntrypoint`

**Integrations**:
- `InjectedRoute.entrypoint`
- `AstroIntegrationMiddleware.entrypoint`
- `DevToolbarAppEntry.entrypoint`
5 changes: 5 additions & 0 deletions .changeset/eighty-ligers-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/svelte': patch
---

Fixes an Reference Error that occurred during client transitions
11 changes: 11 additions & 0 deletions .changeset/five-jars-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'astro': patch
---

Updates Astro's default `<script>` rendering strategy and removes the `experimental.directRenderScript` option as this is now the default behavior: scripts are always rendered directly. This new strategy prevents scripts from being executed in pages where they are not used.

Scripts will directly render as declared in Astro files (including existing features like TypeScript, importing `node_modules`, and deduplicating scripts). You can also now conditionally render scripts in your Astro file.

However, this means scripts are no longer hoisted to the `<head>`, multiple scripts on a page are no longer bundled together, and the `<script>` tag may interfere with the CSS styling.

As this is a potentially breaking change to your script behavior, please review your `<script>` tags and ensure that they behave as expected.
7 changes: 7 additions & 0 deletions .changeset/fluffy-jars-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'astro': major
---

Removes the `assets` property on `supportedAstroFeatures` for adapters, as it did not reflect reality properly in many cases.

Now, relating to assets, only a single `sharpImageService` property is available, determining if the adapter is compatible with the built-in sharp image service.
5 changes: 5 additions & 0 deletions .changeset/forty-trains-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': minor
---

Improves `defineConfig` type safety. TypeScript will now error if a group of related configuration options do not have consistent types. For example, you will now see an error if your language set for `i18n.defaultLocale` is not one of the supported locales specified in `i18n.locales`.
5 changes: 5 additions & 0 deletions .changeset/fresh-pandas-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes a type and an example in documenting the `security.checkOrigin` property of Astro config.
5 changes: 5 additions & 0 deletions .changeset/funny-wolves-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Allows "slug" as a field in content layer data
Loading
Loading