61.md (11907B)
1 # PR #61 Bump astro from 4.0.6 to 4.10.1 2 3 - **Status:** closed 4 - **Author:** @dependabot[bot] 5 - **Created:** 2024-06-10T01:45:53Z 6 - **Branch:** dependabot/npm_and_yarn/astro-4.10.1 → main 7 - **Closed:** 2024-06-17T01:25:49Z 8 - **Labels:** dependencies, javascript 9 - **Diff:** [61.diff](./61.diff) 10 11 --- 12 13 Bumps [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) from 4.0.6 to 4.10.1. 14 <details> 15 <summary>Release notes</summary> 16 <p><em>Sourced from <a href="https://github.com/withastro/astro/releases">astro's releases</a>.</em></p> 17 <blockquote> 18 <h2>astro@4.10.1</h2> 19 <h3>Patch Changes</h3> 20 <ul> 21 <li> 22 <p><a href="https://redirect.github.com/withastro/astro/pull/11198">#11198</a> <a href="https://github.com/withastro/astro/commit/8b9a499d3733e9d0fc6a0bd067ece19bd36f4726"><code>8b9a499</code></a> Thanks <a href="https://github.com/florian-lefebvre"><code>@florian-lefebvre</code></a>! - Fixes a case where <code>astro:env</code> <code>getSecret</code> would not retrieve environment variables properly in dev and build modes</p> 23 </li> 24 <li> 25 <p><a href="https://redirect.github.com/withastro/astro/pull/11206">#11206</a> <a href="https://github.com/withastro/astro/commit/734b98fecf0212cd76be3c935a49f84a9a7dab34"><code>734b98f</code></a> Thanks <a href="https://github.com/florian-lefebvre"><code>@florian-lefebvre</code></a>! - <strong>BREAKING CHANGE to the experimental <code>astro:env</code> feature only</strong></p> 26 <p>Updates the adapter <code>astro:env</code> entrypoint from <code>astro:env/setup</code> to <code>astro/env/setup</code></p> 27 </li> 28 <li> 29 <p><a href="https://redirect.github.com/withastro/astro/pull/11205">#11205</a> <a href="https://github.com/withastro/astro/commit/8c4539145f0b6a735b65852b2f2b1a7e9f5a9c3f"><code>8c45391</code></a> Thanks <a href="https://github.com/Nin3lee"><code>@Nin3lee</code></a>! - Fixes a typo in the config reference</p> 30 </li> 31 </ul> 32 <h2>astro@4.10.0</h2> 33 <h3>Minor Changes</h3> 34 <ul> 35 <li> 36 <p><a href="https://redirect.github.com/withastro/astro/pull/10974">#10974</a> <a href="https://github.com/withastro/astro/commit/2668ef984104574f25f29ef75e2572a0745d1666"><code>2668ef9</code></a> Thanks <a href="https://github.com/florian-lefebvre"><code>@florian-lefebvre</code></a>! - Adds experimental support for the <code>astro:env</code> API.</p> 37 <p>The <code>astro:env</code> API lets you configure a type-safe schema for your environment variables, and indicate whether they should be available on the server or the client. Import and use your defined variables from the appropriate <code>/client</code> or <code>/server</code> module:</p> 38 <pre lang="astro"><code>--- 39 import { PUBLIC_APP_ID } from 'astro:env/client'; 40 import { PUBLIC_API_URL, getSecret } from 'astro:env/server'; 41 const API_TOKEN = getSecret('API_TOKEN'); 42 <h2>const data = await fetch(<code>${PUBLIC_API_URL}/users</code>, { 43 method: 'POST', 44 headers: { 45 'Content-Type': 'application/json', 46 Authorization: <code>Bearer ${API_TOKEN}</code>, 47 }, 48 body: JSON.stringify({ appId: PUBLIC_APP_ID }), 49 });</h2> 50 <p></code></pre></p> 51 <p>To define the data type and properties of your environment variables, declare a schema in your Astro config in <code>experimental.env.schema</code>. The <code>envField</code> helper allows you define your variable as a string, number, or boolean and pass properties in an object:</p> 52 <pre lang="js"><code>// astro.config.mjs 53 import { defineConfig, envField } from 'astro/config'; 54 <p>export default defineConfig({ 55 experimental: { 56 env: { 57 schema: { 58 PUBLIC_API_URL: envField.string({ context: 'client', access: 'public', optional: true }), 59 PUBLIC_PORT: envField.number({ context: 'server', access: 'public', default: 4321 }), 60 API_SECRET: envField.string({ context: 'server', access: 'secret' }), 61 }, 62 }, 63 </code></pre></p> 64 </li> 65 </ul> 66 <!-- raw HTML omitted --> 67 </blockquote> 68 <p>... (truncated)</p> 69 </details> 70 <details> 71 <summary>Changelog</summary> 72 <p><em>Sourced from <a href="https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md">astro's changelog</a>.</em></p> 73 <blockquote> 74 <h2>4.10.1</h2> 75 <h3>Patch Changes</h3> 76 <ul> 77 <li> 78 <p><a href="https://redirect.github.com/withastro/astro/pull/11198">#11198</a> <a href="https://github.com/withastro/astro/commit/8b9a499d3733e9d0fc6a0bd067ece19bd36f4726"><code>8b9a499</code></a> Thanks <a href="https://github.com/florian-lefebvre"><code>@florian-lefebvre</code></a>! - Fixes a case where <code>astro:env</code> <code>getSecret</code> would not retrieve environment variables properly in dev and build modes</p> 79 </li> 80 <li> 81 <p><a href="https://redirect.github.com/withastro/astro/pull/11206">#11206</a> <a href="https://github.com/withastro/astro/commit/734b98fecf0212cd76be3c935a49f84a9a7dab34"><code>734b98f</code></a> Thanks <a href="https://github.com/florian-lefebvre"><code>@florian-lefebvre</code></a>! - <strong>BREAKING CHANGE to the experimental <code>astro:env</code> feature only</strong></p> 82 <p>Updates the adapter <code>astro:env</code> entrypoint from <code>astro:env/setup</code> to <code>astro/env/setup</code></p> 83 </li> 84 <li> 85 <p><a href="https://redirect.github.com/withastro/astro/pull/11205">#11205</a> <a href="https://github.com/withastro/astro/commit/8c4539145f0b6a735b65852b2f2b1a7e9f5a9c3f"><code>8c45391</code></a> Thanks <a href="https://github.com/Nin3lee"><code>@Nin3lee</code></a>! - Fixes a typo in the config reference</p> 86 </li> 87 </ul> 88 <h2>4.10.0</h2> 89 <h3>Minor Changes</h3> 90 <ul> 91 <li> 92 <p><a href="https://redirect.github.com/withastro/astro/pull/10974">#10974</a> <a href="https://github.com/withastro/astro/commit/2668ef984104574f25f29ef75e2572a0745d1666"><code>2668ef9</code></a> Thanks <a href="https://github.com/florian-lefebvre"><code>@florian-lefebvre</code></a>! - Adds experimental support for the <code>astro:env</code> API.</p> 93 <p>The <code>astro:env</code> API lets you configure a type-safe schema for your environment variables, and indicate whether they should be available on the server or the client. Import and use your defined variables from the appropriate <code>/client</code> or <code>/server</code> module:</p> 94 <pre lang="astro"><code>--- 95 import { PUBLIC_APP_ID } from 'astro:env/client'; 96 import { PUBLIC_API_URL, getSecret } from 'astro:env/server'; 97 const API_TOKEN = getSecret('API_TOKEN'); 98 <h2>const data = await fetch(<code>${PUBLIC_API_URL}/users</code>, { 99 method: 'POST', 100 headers: { 101 'Content-Type': 'application/json', 102 Authorization: <code>Bearer ${API_TOKEN}</code>, 103 }, 104 body: JSON.stringify({ appId: PUBLIC_APP_ID }), 105 });</h2> 106 <p></code></pre></p> 107 <p>To define the data type and properties of your environment variables, declare a schema in your Astro config in <code>experimental.env.schema</code>. The <code>envField</code> helper allows you define your variable as a string, number, or boolean and pass properties in an object:</p> 108 <pre lang="js"><code>// astro.config.mjs 109 import { defineConfig, envField } from 'astro/config'; 110 <p>export default defineConfig({ 111 experimental: { 112 env: { 113 schema: { 114 PUBLIC_API_URL: envField.string({ context: 'client', access: 'public', optional: true }), 115 PUBLIC_PORT: envField.number({ context: 'server', access: 'public', default: 4321 }), 116 API_SECRET: envField.string({ context: 'server', access: 'secret' }), 117 </code></pre></p> 118 </li> 119 </ul> 120 <!-- raw HTML omitted --> 121 </blockquote> 122 <p>... (truncated)</p> 123 </details> 124 <details> 125 <summary>Commits</summary> 126 <ul> 127 <li><a href="https://github.com/withastro/astro/commit/2da877bfe97144ff5110d011b9bfba270ccfc620"><code>2da877b</code></a> [ci] release (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/11201">#11201</a>)</li> 128 <li><a href="https://github.com/withastro/astro/commit/734b98fecf0212cd76be3c935a49f84a9a7dab34"><code>734b98f</code></a> feat(astro): update astro env setup (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/11206">#11206</a>)</li> 129 <li><a href="https://github.com/withastro/astro/commit/8c4539145f0b6a735b65852b2f2b1a7e9f5a9c3f"><code>8c45391</code></a> fix(astro:) config reference typo (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/11205">#11205</a>)</li> 130 <li><a href="https://github.com/withastro/astro/commit/368e4ced10b7a629c9ad94800ccf2a1243038921"><code>368e4ce</code></a> [ci] format</li> 131 <li><a href="https://github.com/withastro/astro/commit/8b9a499d3733e9d0fc6a0bd067ece19bd36f4726"><code>8b9a499</code></a> fix(astro): getSecret in dev and build (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/11198">#11198</a>)</li> 132 <li><a href="https://github.com/withastro/astro/commit/48d53094cdbbcd4363d6c77aac13161c5cde5064"><code>48d5309</code></a> [ci] release (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/11186">#11186</a>)</li> 133 <li><a href="https://github.com/withastro/astro/commit/97fbe938a9b07d52d61011da4bd5a8b5ad85a700"><code>97fbe93</code></a> fix: merge userConfig inside <code>getViteConfig</code> (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/11194">#11194</a>)</li> 134 <li><a href="https://github.com/withastro/astro/commit/a64428d11b3499ebed4f76f1f0dd1ca8bc6b0518"><code>a64428d</code></a> [ci] format</li> 135 <li><a href="https://github.com/withastro/astro/commit/6e29a172f153d15fac07320488fae01dece71748"><code>6e29a17</code></a> Make Astro.url in format: 'preserve' match dev (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/11191">#11191</a>)</li> 136 <li><a href="https://github.com/withastro/astro/commit/58b10a073192030a251cff8ad706ab5b015180c9"><code>58b10a0</code></a> Fix throw <code>AstroUserError</code> in mdx (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/11192">#11192</a>)</li> 137 <li>Additional commits viewable in <a href="https://github.com/withastro/astro/commits/astro@4.10.1/packages/astro">compare view</a></li> 138 </ul> 139 </details> 140 <br /> 141 142 143 [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 144 145 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`. 146 147 [//]: # (dependabot-automerge-start) 148 [//]: # (dependabot-automerge-end) 149 150 --- 151 152 <details> 153 <summary>Dependabot commands and options</summary> 154 <br /> 155 156 You can trigger Dependabot actions by commenting on this PR: 157 - `@dependabot rebase` will rebase this PR 158 - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it 159 - `@dependabot merge` will merge this PR after your CI passes on it 160 - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it 161 - `@dependabot cancel merge` will cancel a previously requested merge and block automerging 162 - `@dependabot reopen` will reopen this PR if it is closed 163 - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually 164 - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency 165 - `@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) 166 - `@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) 167 - `@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) 168 169 170 </details> 171 172 173 ## Comments 174 175 ### @dependabot[bot] — 2024-06-17T01:25:49Z 176 177 Superseded by #64. 178