Title: Bump astro from 4.16.7 to 5.7.0 by dependabot[bot] · Pull Request #343 · emeraldjava/emeraldjava.github.io · GitHub
Open Graph Title: Bump astro from 4.16.7 to 5.7.0 by dependabot[bot] · Pull Request #343 · emeraldjava/emeraldjava.github.io
X Title: Bump astro from 4.16.7 to 5.7.0 by dependabot[bot] · Pull Request #343 · emeraldjava/emeraldjava.github.io
Description: Bumps astro from 4.16.7 to 5.7.0.
Release notes
Sourced from astro's releases.
astro@5.7.0
Minor Changes
#13527 2fd6a6b Thanks @ascorbic! - The experimental session API introduced in Astro 5.1 is now stable and ready for production use.
Sessions are used to store user state between requests for on-demand rendered pages. You can use them to store user data, such as authentication tokens, shopping cart contents, or any other data that needs to persist across requests:
---
export const prerender = false; // Not needed with 'server' output
const cart = await Astro.session.get('cart');
---
🛒 {cart?.length ?? 0} items
Configuring session storage
Sessions require a storage driver to store the data. The Node, Cloudflare and Netlify adapters automatically configure a default driver for you, but other adapters currently require you to specify a custom storage driver in your configuration.
If you are using an adapter that doesn't have a default driver, or if you want to choose a different driver, you can configure it using the session configuration option:
import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel';
export default defineConfig({
adapter: vercel(),
session: {
driver: 'upstash',
},
});
Using sessions
Sessions are available in on-demand rendered pages, API endpoints, actions and middleware.
In pages and components, you can access the session using Astro.session:
---
const cart = await Astro.session.get('cart');
---
🛒 {cart?.length ?? 0} items
In endpoints, actions, and middleware, you can access the session using context.session:
... (truncated)
Changelog
Sourced from astro's changelog.
5.7.0
Minor Changes
#13527 2fd6a6b Thanks @ascorbic! - The experimental session API introduced in Astro 5.1 is now stable and ready for production use.
Sessions are used to store user state between requests for on-demand rendered pages. You can use them to store user data, such as authentication tokens, shopping cart contents, or any other data that needs to persist across requests:
---
export const prerender = false; // Not needed with 'server' output
const cart = await Astro.session.get('cart');
---
🛒 {cart?.length ?? 0} items
Configuring session storage
Sessions require a storage driver to store the data. The Node, Cloudflare and Netlify adapters automatically configure a default driver for you, but other adapters currently require you to specify a custom storage driver in your configuration.
If you are using an adapter that doesn't have a default driver, or if you want to choose a different driver, you can configure it using the session configuration option:
import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel';
export default defineConfig({
adapter: vercel(),
session: {
driver: 'upstash',
},
});
Using sessions
Sessions are available in on-demand rendered pages, API endpoints, actions and middleware.
In pages and components, you can access the session using Astro.session:
---
const cart = await Astro.session.get('cart');
---
🛒 {cart?.length ?? 0} items
In endpoints, actions, and middleware, you can access the session using context.session:
... (truncated)
Commits
59af0cb [ci] release (#13610)
406501a feat: unflag svg component feature (#13578)
93470a1 add missing message to a Fonts API error (#13612)
0e5b4ce [ci] format
f5de51e fix(routing): handle base path with trailing slash 'never' configuration (#13...
29ab38e [ci] format
b1fe521 feat(fonts): experimental release (#12775)
762cc7f [ci] format
df3fd54 feat: make astro:config stable (#13560)
3903068 [ci] format
Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot show
Open Graph Description: Bumps astro from 4.16.7 to 5.7.0. Release notes Sourced from astro's releases. astro@5.7.0 Minor Changes #13527 2fd6a6b Thanks @ascorbic! - The experimental session API introduced in Astro...
X Description: Bumps astro from 4.16.7 to 5.7.0. Release notes Sourced from astro's releases. astro@5.7.0 Minor Changes #13527 2fd6a6b Thanks @ascorbic! - The experimental session API introduced in A...
Opengraph URL: https://github.com/emeraldjava/emeraldjava.github.io/pull/343
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:85d29c09-d23e-fe9a-6dc3-53c85e6e1549 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B6E0:3FA0DD:2CDBCD:3A8525:6972FEA5 |
| html-safe-nonce | 36728bd1b2c8d91e767d6f636d9b5f140fd5ee3fe3135476c4cfd05cb51d07b1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkUwOjNGQTBERDoyQ0RCQ0Q6M0E4NTI1OjY5NzJGRUE1IiwidmlzaXRvcl9pZCI6IjIyNDM3OTY2NDIxMTQ1MDIzMDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | bfa7399bb61c0946dd3653dc2e9ffae662bab1faeb88d077cbd9578753d3be8e |
| hovercard-subject-tag | pull_request:2462823354 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/emeraldjava/emeraldjava.github.io/pull/343/files |
| twitter:image | https://avatars.githubusercontent.com/in/29110?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/29110?s=400&v=4 |
| og:image:alt | Bumps astro from 4.16.7 to 5.7.0. Release notes Sourced from astro's releases. astro@5.7.0 Minor Changes #13527 2fd6a6b Thanks @ascorbic! - The experimental session API introduced in Astro... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9946c12a4847916f32068429cb2ad536f7d8450fc8b70730d0e9aa7861057db8 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/emeraldjava/emeraldjava.github.io git https://github.com/emeraldjava/emeraldjava.github.io.git |
| octolytics-dimension-user_id | 229760 |
| octolytics-dimension-user_login | emeraldjava |
| octolytics-dimension-repository_id | 17636941 |
| octolytics-dimension-repository_nwo | emeraldjava/emeraldjava.github.io |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17636941 |
| octolytics-dimension-repository_network_root_nwo | emeraldjava/emeraldjava.github.io |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f92f1208f12997e73ccb28d2f389b2adab0c98a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width