0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

[ci] release (#12762)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Houston (Bot) 2024-12-19 04:23:46 -08:00 committed by GitHub
parent e56af4a3d7
commit 3f557b2e32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 140 additions and 159 deletions

View file

@ -1,5 +0,0 @@
---
'astro': patch
---
Fixes an issue where Astro i18n didn't properly show the 404 page when using fallback and the option `prefixDefaultLocale` set to `true`.

View file

@ -1,5 +0,0 @@
---
'astro': patch
---
Adds types for `?url&inline` and `?url&no-inline` [import queries](https://vite.dev/guide/assets.html#explicit-inline-handling) added in Vite 6

View file

@ -1,5 +0,0 @@
---
'astro': patch
---
Fixed changes to vite configuration made in the astro:build:setup integration hook having no effect when target is "client"

View file

@ -1,36 +0,0 @@
---
'astro': minor
---
Adds experimental session support
Sessions are used to store user state between requests for server-rendered pages, such as login status, shopping cart contents, or other user-specific data.
```astro
---
export const prerender = false; // Not needed in 'server' mode
const cart = await Astro.session.get('cart');
---
<a href="/checkout">🛒 {cart?.length ?? 0} items</a>
```
Sessions are available in on-demand rendered/SSR pages, API endpoints, actions and middleware. To enable session support, you must configure a storage driver.
If you are using the Node.js adapter, you can use the `fs` driver to store session data on the filesystem:
```js
// astro.config.mjs
{
adapter: node({ mode: 'standalone' }),
experimental: {
session: {
// Required: the name of the unstorage driver
driver: "fs",
},
},
}
```
If you are deploying to a serverless environment, you can use drivers such as `redis`, `netlify-blobs`, `vercel-kv`, or `cloudflare-kv-binding` and optionally pass additional configuration options.
For more information, including using the session API with other adapters and a full list of supported drivers, see [the docs for experimental session support](https://docs.astro.build/en/reference/experimental-flags/sessions/). For even more details, and to leave feedback and participate in the development of this feature, [the Sessions RFC](https://github.com/withastro/roadmap/pull/1055).

View file

@ -1,7 +0,0 @@
---
'astro': minor
---
Improves asset caching of remote images
Astro will now store [entity tags](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) and the [Last-Modified](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified) date for cached remote images and use them to revalidate the cache when it goes stale.

View file

@ -1,5 +0,0 @@
---
'astro': patch
---
Clears the content layer cache when the Astro config is changed

View file

@ -1,44 +0,0 @@
---
'astro': minor
---
Adds a new `getActionPath()` helper available from `astro:actions`
Astro 5.1 introduces a new helper function, `getActionPath()` to give you more flexibility when calling your action.
Calling `getActionPath()` with your action returns its URL path so you can make a `fetch()` request with custom headers, or use your action with an API such as `navigator.sendBeacon()`. Then, you can [handle the custom-formatted returned data](https://docs.astro.build/en/guides/actions/#handling-returned-data) as needed, just as if you had called an action directly.
This example shows how to call a defined `like` action passing the `Authorization` header and the [`keepalive`](https://developer.mozilla.org/en-US/docs/Web/API/Request/keepalive) option:
```astro
<script>
// src/components/my-component.astro
import { actions, getActionPath } from 'astro:actions'
await fetch(getActionPath(actions.like), {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer YOUR_TOKEN'
},
body: JSON.stringify({ id: 'YOUR_ID' }),
keepalive: true
})
</script>
```
This example shows how to call the same `like` action using the [`sendBeacon`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon) API:
```astro
<script>
// src/components/my-component.astro
import { actions, getActionPath } from 'astro:actions'
navigator.sendBeacon(
getActionPath(actions.like),
new Blob([JSON.stringify({ id: 'YOUR_ID' })], {
type: 'application/json'
})
)
</script>
```

View file

@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.9"
"astro": "^5.1.0"
}
}

View file

@ -13,6 +13,6 @@
"@astrojs/mdx": "^4.0.2",
"@astrojs/rss": "^4.0.10",
"@astrojs/sitemap": "^3.2.1",
"astro": "^5.0.9"
"astro": "^5.1.0"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^5.0.9"
"astro": "^5.1.0"
},
"peerDependencies": {
"astro": "^4.0.0 || ^5.0.0"

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/react": "^4.1.1",
"astro": "^5.0.9",
"astro": "^5.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vitest": "^2.1.6"

View file

@ -13,6 +13,6 @@
"@astrojs/alpinejs": "^0.4.0",
"@types/alpinejs": "^3.13.10",
"alpinejs": "^3.14.3",
"astro": "^5.0.9"
"astro": "^5.1.0"
}
}

View file

@ -17,7 +17,7 @@
"@astrojs/vue": "^5.0.2",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"astro": "^5.0.9",
"astro": "^5.1.0",
"preact": "^10.24.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",

View file

@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/preact": "^4.0.0",
"@preact/signals": "^1.3.0",
"astro": "^5.0.9",
"astro": "^5.1.0",
"preact": "^10.24.3"
}
}

View file

@ -13,7 +13,7 @@
"@astrojs/react": "^4.1.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"astro": "^5.0.9",
"astro": "^5.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}

View file

@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^5.0.0",
"astro": "^5.0.9",
"astro": "^5.1.0",
"solid-js": "^1.9.3"
}
}

View file

@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/svelte": "^7.0.1",
"astro": "^5.0.9",
"astro": "^5.1.0",
"svelte": "^5.1.16"
}
}

View file

@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/vue": "^5.0.2",
"astro": "^5.0.9",
"astro": "^5.1.0",
"vue": "^3.5.12"
}
}

View file

@ -11,6 +11,6 @@
},
"dependencies": {
"@astrojs/node": "^9.0.0",
"astro": "^5.0.9"
"astro": "^5.1.0"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^5.0.9"
"astro": "^5.1.0"
},
"peerDependencies": {
"astro": "^4.0.0"

View file

@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.9"
"astro": "^5.1.0"
}
}

View file

@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.9"
"astro": "^5.1.0"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/node": "^9.0.0",
"@astrojs/svelte": "^7.0.1",
"astro": "^5.0.9",
"astro": "^5.1.0",
"svelte": "^5.1.16"
}
}

View file

@ -9,7 +9,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.9",
"astro": "^5.1.0",
"sass": "^1.80.6",
"sharp": "^0.33.3"
}

View file

@ -15,6 +15,6 @@
"./app": "./dist/app.js"
},
"devDependencies": {
"astro": "^5.0.9"
"astro": "^5.1.0"
}
}

View file

@ -11,6 +11,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.12.3",
"astro": "^5.0.9"
"astro": "^5.1.0"
}
}

View file

@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/mdx": "^4.0.2",
"@astrojs/preact": "^4.0.0",
"astro": "^5.0.9",
"astro": "^5.1.0",
"preact": "^10.24.3"
}
}

View file

@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/preact": "^4.0.0",
"@nanostores/preact": "^0.5.2",
"astro": "^5.0.9",
"astro": "^5.1.0",
"nanostores": "^0.11.3",
"preact": "^10.24.3"
}

View file

@ -13,7 +13,7 @@
"@astrojs/mdx": "^4.0.2",
"@astrojs/tailwind": "^5.1.3",
"@types/canvas-confetti": "^1.6.4",
"astro": "^5.0.9",
"astro": "^5.1.0",
"autoprefixer": "^10.4.20",
"canvas-confetti": "^1.9.3",
"postcss": "^8.4.49",

View file

@ -11,7 +11,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^5.0.9",
"astro": "^5.1.0",
"vitest": "^2.1.6"
}
}

View file

@ -1,5 +1,98 @@
# astro
## 5.1.0
### Minor Changes
- [#12441](https://github.com/withastro/astro/pull/12441) [`b4fec3c`](https://github.com/withastro/astro/commit/b4fec3c7d17ed92dcaaeea5e2545aae6dfd19e53) Thanks [@ascorbic](https://github.com/ascorbic)! - Adds experimental session support
Sessions are used to store user state between requests for server-rendered pages, such as login status, shopping cart contents, or other user-specific data.
```astro
---
export const prerender = false; // Not needed in 'server' mode
const cart = await Astro.session.get('cart');
---
<a href="/checkout">🛒 {cart?.length ?? 0} items</a>
```
Sessions are available in on-demand rendered/SSR pages, API endpoints, actions and middleware. To enable session support, you must configure a storage driver.
If you are using the Node.js adapter, you can use the `fs` driver to store session data on the filesystem:
```js
// astro.config.mjs
{
adapter: node({ mode: 'standalone' }),
experimental: {
session: {
// Required: the name of the unstorage driver
driver: "fs",
},
},
}
```
If you are deploying to a serverless environment, you can use drivers such as `redis`, `netlify-blobs`, `vercel-kv`, or `cloudflare-kv-binding` and optionally pass additional configuration options.
For more information, including using the session API with other adapters and a full list of supported drivers, see [the docs for experimental session support](https://docs.astro.build/en/reference/experimental-flags/sessions/). For even more details, and to leave feedback and participate in the development of this feature, [the Sessions RFC](https://github.com/withastro/roadmap/pull/1055).
- [#12426](https://github.com/withastro/astro/pull/12426) [`3dc02c5`](https://github.com/withastro/astro/commit/3dc02c57e4060cb2bde7c4e05d91841dd5dd8eb7) Thanks [@oliverlynch](https://github.com/oliverlynch)! - Improves asset caching of remote images
Astro will now store [entity tags](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) and the [Last-Modified](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified) date for cached remote images and use them to revalidate the cache when it goes stale.
- [#12721](https://github.com/withastro/astro/pull/12721) [`c9d5110`](https://github.com/withastro/astro/commit/c9d51107d0a4b58a9ced486b28d09118f3885254) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Adds a new `getActionPath()` helper available from `astro:actions`
Astro 5.1 introduces a new helper function, `getActionPath()` to give you more flexibility when calling your action.
Calling `getActionPath()` with your action returns its URL path so you can make a `fetch()` request with custom headers, or use your action with an API such as `navigator.sendBeacon()`. Then, you can [handle the custom-formatted returned data](https://docs.astro.build/en/guides/actions/#handling-returned-data) as needed, just as if you had called an action directly.
This example shows how to call a defined `like` action passing the `Authorization` header and the [`keepalive`](https://developer.mozilla.org/en-US/docs/Web/API/Request/keepalive) option:
```astro
<script>
// src/components/my-component.astro
import { actions, getActionPath } from 'astro:actions';
await fetch(getActionPath(actions.like), {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer YOUR_TOKEN',
},
body: JSON.stringify({ id: 'YOUR_ID' }),
keepalive: true,
});
</script>
```
This example shows how to call the same `like` action using the [`sendBeacon`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon) API:
```astro
<script>
// src/components/my-component.astro
import { actions, getActionPath } from 'astro:actions';
navigator.sendBeacon(
getActionPath(actions.like),
new Blob([JSON.stringify({ id: 'YOUR_ID' })], {
type: 'application/json',
}),
);
</script>
```
### Patch Changes
- [#12786](https://github.com/withastro/astro/pull/12786) [`e56af4a`](https://github.com/withastro/astro/commit/e56af4a3d7039673658e4a014158969ea5076e32) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where Astro i18n didn't properly show the 404 page when using fallback and the option `prefixDefaultLocale` set to `true`.
- [#12758](https://github.com/withastro/astro/pull/12758) [`483da89`](https://github.com/withastro/astro/commit/483da89cf68d68ec792ff8721d469ed10dc14e4a) Thanks [@delucis](https://github.com/delucis)! - Adds types for `?url&inline` and `?url&no-inline` [import queries](https://vite.dev/guide/assets.html#explicit-inline-handling) added in Vite 6
- [#12763](https://github.com/withastro/astro/pull/12763) [`8da2318`](https://github.com/withastro/astro/commit/8da231855162af245f2b3664babb68dff0ba390f) Thanks [@rbsummers](https://github.com/rbsummers)! - Fixed changes to vite configuration made in the astro:build:setup integration hook having no effect when target is "client"
- [#12767](https://github.com/withastro/astro/pull/12767) [`36c1e06`](https://github.com/withastro/astro/commit/36c1e0697da9fdc453a7a9a3c84e0e79cd0cb376) Thanks [@ascorbic](https://github.com/ascorbic)! - Clears the content layer cache when the Astro config is changed
## 5.0.9
### Patch Changes

View file

@ -1,6 +1,6 @@
{
"name": "astro",
"version": "5.0.9",
"version": "5.1.0",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",

View file

@ -142,7 +142,7 @@ importers:
examples/basics:
dependencies:
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
examples/blog:
@ -157,13 +157,13 @@ importers:
specifier: ^3.2.1
version: link:../../packages/integrations/sitemap
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
examples/component:
devDependencies:
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
examples/container-with-vitest:
@ -172,7 +172,7 @@ importers:
specifier: ^4.1.1
version: link:../../packages/integrations/react
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
react:
specifier: ^18.3.1
@ -203,7 +203,7 @@ importers:
specifier: ^3.14.3
version: 3.14.3
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
examples/framework-multiple:
@ -230,7 +230,7 @@ importers:
specifier: ^18.3.1
version: 18.3.1
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
preact:
specifier: ^10.24.3
@ -260,7 +260,7 @@ importers:
specifier: ^1.3.0
version: 1.3.0(preact@10.24.3)
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
preact:
specifier: ^10.24.3
@ -278,7 +278,7 @@ importers:
specifier: ^18.3.1
version: 18.3.1
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
react:
specifier: ^18.3.1
@ -293,7 +293,7 @@ importers:
specifier: ^5.0.0
version: link:../../packages/integrations/solid
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
solid-js:
specifier: ^1.9.3
@ -305,7 +305,7 @@ importers:
specifier: ^7.0.1
version: link:../../packages/integrations/svelte
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
svelte:
specifier: ^5.1.16
@ -317,7 +317,7 @@ importers:
specifier: ^5.0.2
version: link:../../packages/integrations/vue
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
vue:
specifier: ^3.5.12
@ -329,25 +329,25 @@ importers:
specifier: ^9.0.0
version: 9.0.0(astro@packages+astro)
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
examples/integration:
devDependencies:
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
examples/minimal:
dependencies:
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
examples/portfolio:
dependencies:
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
examples/ssr:
@ -359,7 +359,7 @@ importers:
specifier: ^7.0.1
version: link:../../packages/integrations/svelte
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
svelte:
specifier: ^5.1.16
@ -368,7 +368,7 @@ importers:
examples/starlog:
dependencies:
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
sass:
specifier: ^1.80.6
@ -380,7 +380,7 @@ importers:
examples/toolbar-app:
devDependencies:
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
examples/with-markdoc:
@ -389,7 +389,7 @@ importers:
specifier: ^0.12.3
version: link:../../packages/integrations/markdoc
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
examples/with-mdx:
@ -401,7 +401,7 @@ importers:
specifier: ^4.0.0
version: link:../../packages/integrations/preact
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
preact:
specifier: ^10.24.3
@ -416,7 +416,7 @@ importers:
specifier: ^0.5.2
version: 0.5.2(nanostores@0.11.3)(preact@10.24.3)
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
nanostores:
specifier: ^0.11.3
@ -437,7 +437,7 @@ importers:
specifier: ^1.6.4
version: 1.6.4
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
autoprefixer:
specifier: ^10.4.20
@ -455,7 +455,7 @@ importers:
examples/with-vitest:
dependencies:
astro:
specifier: ^5.0.9
specifier: ^5.1.0
version: link:../../packages/astro
vitest:
specifier: ^2.1.6
@ -9111,7 +9111,6 @@ packages:
libsql@0.4.5:
resolution: {integrity: sha512-sorTJV6PNt94Wap27Sai5gtVLIea4Otb2LUiAUyr3p6BPOScGMKGt5F1b5X/XgkNtcsDKeX5qfeBDj+PdShclQ==}
cpu: [x64, arm64, wasm32]
os: [darwin, linux, win32]
lilconfig@2.1.0:
@ -11159,9 +11158,6 @@ packages:
resolution: {integrity: sha512-M/wqwtOEjgb956/+m5ZrYT/Iq6Hax0OakWbokj8+9PXOnB7b/4AxESHieEtnNEy7ZpjsjYW1/5nK8fATQMmRxw==}
peerDependencies:
vue: '>=3.2.13'
peerDependenciesMeta:
vue:
optional: true
vite@5.4.11:
resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==}
@ -17981,7 +17977,6 @@ snapshots:
vite-svg-loader@5.1.0(vue@3.5.13(typescript@5.7.2)):
dependencies:
svgo: 3.3.2
optionalDependencies:
vue: 3.5.13(typescript@5.7.2)
vite@5.4.11(@types/node@18.19.50)(sass@1.82.0):