Skip to content

Commit 6fc8371

Browse files
chore(deps-dev): bump astro from 5.6.2 to 5.7.0 (#6768)
Bumps [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) from 5.6.2 to 5.7.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/withastro/astro/releases">astro's releases</a>.</em></p> <blockquote> <h2>[email protected]</h2> <h3>Minor Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/withastro/astro/pull/13527">#13527</a> <a href="https://github.com/withastro/astro/commit/2fd6a6b7aa51a4713af7fac37d5dfd824543c1bc"><code>2fd6a6b</code></a> Thanks <a href="https://github.com/ascorbic"><code>@​ascorbic</code></a>! - The experimental session API introduced in Astro 5.1 is now stable and ready for production use.</p> <p>Sessions are used to store user state between requests for <a href="https://astro.build/en/guides/on-demand-rendering/">on-demand rendered pages</a>. 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:</p> <pre lang="astro"><code>--- export const prerender = false; // Not needed with 'server' output const cart = await Astro.session.get('cart'); --- <p>&lt;a href=&quot;/checkout&quot;&gt;🛒 {cart?.length ?? 0} items&lt;/a&gt; </code></pre></p> <h4>Configuring session storage</h4> <p>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.</p> <p>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 <code>session</code> configuration option:</p> <pre lang="js"><code>import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; <p>export default defineConfig({ adapter: vercel(), session: { driver: 'upstash', }, }); </code></pre></p> <h4>Using sessions</h4> <p>Sessions are available in on-demand rendered pages, API endpoints, actions and middleware.</p> <p>In pages and components, you can access the session using <code>Astro.session</code>:</p> <pre lang="astro"><code>--- const cart = await Astro.session.get('cart'); --- <p>&lt;a href=&quot;/checkout&quot;&gt;🛒 {cart?.length ?? 0} items&lt;/a&gt; </code></pre></p> <p>In endpoints, actions, and middleware, you can access the session using <code>context.session</code>:</p> </li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md">astro's changelog</a>.</em></p> <blockquote> <h2>5.7.0</h2> <h3>Minor Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/withastro/astro/pull/13527">#13527</a> <a href="https://github.com/withastro/astro/commit/2fd6a6b7aa51a4713af7fac37d5dfd824543c1bc"><code>2fd6a6b</code></a> Thanks <a href="https://github.com/ascorbic"><code>@​ascorbic</code></a>! - The experimental session API introduced in Astro 5.1 is now stable and ready for production use.</p> <p>Sessions are used to store user state between requests for <a href="https://astro.build/en/guides/on-demand-rendering/">on-demand rendered pages</a>. 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:</p> <pre lang="astro"><code>--- export const prerender = false; // Not needed with 'server' output const cart = await Astro.session.get('cart'); --- <p>&lt;a href=&quot;/checkout&quot;&gt;🛒 {cart?.length ?? 0} items&lt;/a&gt; </code></pre></p> <h4>Configuring session storage</h4> <p>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.</p> <p>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 <code>session</code> configuration option:</p> <pre lang="js"><code>import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; <p>export default defineConfig({ adapter: vercel(), session: { driver: 'upstash', }, }); </code></pre></p> <h4>Using sessions</h4> <p>Sessions are available in on-demand rendered pages, API endpoints, actions and middleware.</p> <p>In pages and components, you can access the session using <code>Astro.session</code>:</p> <pre lang="astro"><code>--- const cart = await Astro.session.get('cart'); --- <p>&lt;a href=&quot;/checkout&quot;&gt;🛒 {cart?.length ?? 0} items&lt;/a&gt; </code></pre></p> <p>In endpoints, actions, and middleware, you can access the session using <code>context.session</code>:</p> </li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/withastro/astro/commit/59af0cbd0a36a983cd9fefbbca669dae84ce1e94"><code>59af0cb</code></a> [ci] release (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/13610">#13610</a>)</li> <li><a href="https://github.com/withastro/astro/commit/406501aeb7f314ae5c31f31a373c270e3b9ec715"><code>406501a</code></a> feat: unflag svg component feature (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/13578">#13578</a>)</li> <li><a href="https://github.com/withastro/astro/commit/93470a14c2e3afb28aa10cf2781f5f775a106a55"><code>93470a1</code></a> add missing <code>message</code> to a Fonts API error (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/13612">#13612</a>)</li> <li><a href="https://github.com/withastro/astro/commit/0e5b4cedda0b16db5b8dd4ffdc831479bb1d44db"><code>0e5b4ce</code></a> [ci] format</li> <li><a href="https://github.com/withastro/astro/commit/f5de51e94755cdbeaa19667309b5f1aa0c416bd4"><code>f5de51e</code></a> fix(routing): handle base path with trailing slash 'never' configuration (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/13">#13</a>...</li> <li><a href="https://github.com/withastro/astro/commit/29ab38e57bde32983a23501a531c1a1871f81dc6"><code>29ab38e</code></a> [ci] format</li> <li><a href="https://github.com/withastro/astro/commit/b1fe521e2c45172b786594c50c0ca595105a6d68"><code>b1fe521</code></a> feat(fonts): experimental release (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/12775">#12775</a>)</li> <li><a href="https://github.com/withastro/astro/commit/762cc7f2c7450133a36f06f555b5a8bce459ab2f"><code>762cc7f</code></a> [ci] format</li> <li><a href="https://github.com/withastro/astro/commit/df3fd5434514b68cf1fe499a2e28bc1215bd253d"><code>df3fd54</code></a> feat: make <code>astro:config</code> stable (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/13560">#13560</a>)</li> <li><a href="https://github.com/withastro/astro/commit/3903068d846ea3865ac14c3ce98ab0e460ce7598"><code>3903068</code></a> [ci] format</li> <li>Additional commits viewable in <a href="https://github.com/withastro/astro/commits/[email protected]/packages/astro">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=astro&package-manager=npm_and_yarn&previous-version=5.6.2&new-version=5.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> 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 <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
1 parent cd9aeda commit 6fc8371

File tree

2 files changed

+230
-5
lines changed

2 files changed

+230
-5
lines changed

package-lock.json

+229-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)