22.md (13195B)
1 # PR #22 Bump astro from 4.0.6 to 4.2.1 2 3 - **Status:** closed 4 - **Author:** @dependabot[bot] 5 - **Created:** 2024-01-22T01:47:48Z 6 - **Branch:** dependabot/npm_and_yarn/astro-4.2.1 → main 7 - **Closed:** 2024-01-29T01:25:46Z 8 - **Labels:** dependencies, javascript 9 - **Diff:** [22.diff](./22.diff) 10 11 --- 12 13 Bumps [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) from 4.0.6 to 4.2.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.2.1</h2> 19 <h3>Patch Changes</h3> 20 <ul> 21 <li><a href="https://redirect.github.com/withastro/astro/pull/9726">#9726</a> <a href="https://github.com/withastro/astro/commit/a4b696def3a7eb18c1ae48b10fd3758a1874b6fe"><code>a4b696def3a7eb18c1ae48b10fd3758a1874b6fe</code></a> Thanks <a href="https://github.com/Fryuni"><code>@Fryuni</code></a>! - Fixes a regression in routing priority between <code>index.astro</code> and dynamic routes with rest parameters</li> 22 </ul> 23 <h2>astro@4.2.0</h2> 24 <h3>Minor Changes</h3> 25 <ul> 26 <li> 27 <p><a href="https://redirect.github.com/withastro/astro/pull/9566">#9566</a> <a href="https://github.com/withastro/astro/commit/165cfc154be477337037185c32b308616d1ed6fa"><code>165cfc154be477337037185c32b308616d1ed6fa</code></a> Thanks <a href="https://github.com/OliverSpeir"><code>@OliverSpeir</code></a>! - Allows remark plugins to pass options specifying how images in <code>.md</code> files will be optimized</p> 28 </li> 29 <li> 30 <p><a href="https://redirect.github.com/withastro/astro/pull/9661">#9661</a> <a href="https://github.com/withastro/astro/commit/d6edc7540864cf5d294d7b881eb886a3804f6d05"><code>d6edc7540864cf5d294d7b881eb886a3804f6d05</code></a> Thanks <a href="https://github.com/ematipico"><code>@ematipico</code></a>! - Adds new helper functions for adapter developers.</p> 31 <ul> 32 <li><code>Astro.clientAddress</code> can now be passed directly to the <code>app.render()</code> method.</li> 33 </ul> 34 <pre lang="ts"><code>const response = await app.render(request, { clientAddress: '012.123.23.3' }); 35 </code></pre> 36 <ul> 37 <li>Helper functions for converting Node.js HTTP request and response objects to web-compatible <code>Request</code> and <code>Response</code> objects are now provided as static methods on the <code>NodeApp</code> class.</li> 38 </ul> 39 <pre lang="ts"><code>http.createServer((nodeReq, nodeRes) => { 40 const request: Request = NodeApp.createRequest(nodeReq); 41 const response = await app.render(request); 42 await NodeApp.writeResponse(response, nodeRes); 43 }); 44 </code></pre> 45 <ul> 46 <li>Cookies added via <code>Astro.cookies.set()</code> can now be automatically added to the <code>Response</code> object by passing the <code>addCookieHeader</code> option to <code>app.render()</code>.</li> 47 </ul> 48 <pre lang="diff"><code>-const response = await app.render(request) 49 -const setCookieHeaders: Array<string> = Array.from(app.setCookieHeaders(webResponse)); 50 <p>-if (setCookieHeaders.length) {</p> 51 <ul> 52 <li>for (const setCookieHeader of setCookieHeaders) {</li> 53 <li> 54 <pre><code> headers.append('set-cookie', setCookieHeader); 55 </code></pre> 56 </li> 57 <li>} 58 -} 59 +const response = await app.render(request, { addCookieHeader: true }) 60 </code></pre></li> 61 </ul> 62 </li> 63 <li> 64 <p><a href="https://redirect.github.com/withastro/astro/pull/9638">#9638</a> <a href="https://github.com/withastro/astro/commit/f1a61268061b8834f39a9b38bca043ae41caed04"><code>f1a61268061b8834f39a9b38bca043ae41caed04</code></a> Thanks <a href="https://github.com/ematipico"><code>@ematipico</code></a>! - Adds a new <code>i18n.routing</code> config option <code>redirectToDefaultLocale</code> to disable automatic redirects of the root URL (<code>/</code>) to the default locale when <code>prefixDefaultLocale: true</code> is set.</p> 65 <p>In projects where every route, including the default locale, is prefixed with <code>/[locale]/</code> path, this property allows you to control whether or not <code>src/pages/index.astro</code> should automatically redirect your site visitors from <code>/</code> to <code>/[defaultLocale]</code>.</p> 66 <p>You can now opt out of this automatic redirection by setting <code>redirectToDefaultLocale: false</code>:</p> 67 <pre lang="js"><code>// astro.config.mjs 68 </code></pre> 69 </li> 70 </ul> 71 <!-- raw HTML omitted --> 72 </blockquote> 73 <p>... (truncated)</p> 74 </details> 75 <details> 76 <summary>Changelog</summary> 77 <p><em>Sourced from <a href="https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md">astro's changelog</a>.</em></p> 78 <blockquote> 79 <h2>4.2.1</h2> 80 <h3>Patch Changes</h3> 81 <ul> 82 <li><a href="https://redirect.github.com/withastro/astro/pull/9726">#9726</a> <a href="https://github.com/withastro/astro/commit/a4b696def3a7eb18c1ae48b10fd3758a1874b6fe"><code>a4b696def3a7eb18c1ae48b10fd3758a1874b6fe</code></a> Thanks <a href="https://github.com/Fryuni"><code>@Fryuni</code></a>! - Fixes a regression in routing priority between <code>index.astro</code> and dynamic routes with rest parameters</li> 83 </ul> 84 <h2>4.2.0</h2> 85 <h3>Minor Changes</h3> 86 <ul> 87 <li> 88 <p><a href="https://redirect.github.com/withastro/astro/pull/9566">#9566</a> <a href="https://github.com/withastro/astro/commit/165cfc154be477337037185c32b308616d1ed6fa"><code>165cfc154be477337037185c32b308616d1ed6fa</code></a> Thanks <a href="https://github.com/OliverSpeir"><code>@OliverSpeir</code></a>! - Allows remark plugins to pass options specifying how images in <code>.md</code> files will be optimized</p> 89 </li> 90 <li> 91 <p><a href="https://redirect.github.com/withastro/astro/pull/9661">#9661</a> <a href="https://github.com/withastro/astro/commit/d6edc7540864cf5d294d7b881eb886a3804f6d05"><code>d6edc7540864cf5d294d7b881eb886a3804f6d05</code></a> Thanks <a href="https://github.com/ematipico"><code>@ematipico</code></a>! - Adds new helper functions for adapter developers.</p> 92 <ul> 93 <li><code>Astro.clientAddress</code> can now be passed directly to the <code>app.render()</code> method.</li> 94 </ul> 95 <pre lang="ts"><code>const response = await app.render(request, { clientAddress: '012.123.23.3' }); 96 </code></pre> 97 <ul> 98 <li>Helper functions for converting Node.js HTTP request and response objects to web-compatible <code>Request</code> and <code>Response</code> objects are now provided as static methods on the <code>NodeApp</code> class.</li> 99 </ul> 100 <pre lang="ts"><code>http.createServer((nodeReq, nodeRes) => { 101 const request: Request = NodeApp.createRequest(nodeReq); 102 const response = await app.render(request); 103 await NodeApp.writeResponse(response, nodeRes); 104 }); 105 </code></pre> 106 <ul> 107 <li>Cookies added via <code>Astro.cookies.set()</code> can now be automatically added to the <code>Response</code> object by passing the <code>addCookieHeader</code> option to <code>app.render()</code>.</li> 108 </ul> 109 <pre lang="diff"><code>-const response = await app.render(request) 110 -const setCookieHeaders: Array<string> = Array.from(app.setCookieHeaders(webResponse)); 111 <p>-if (setCookieHeaders.length) {</p> 112 <ul> 113 <li>for (const setCookieHeader of setCookieHeaders) {</li> 114 <li> 115 <pre><code> headers.append('set-cookie', setCookieHeader); 116 </code></pre> 117 </li> 118 <li>} 119 -} 120 +const response = await app.render(request, { addCookieHeader: true }) 121 </code></pre></li> 122 </ul> 123 </li> 124 <li> 125 <p><a href="https://redirect.github.com/withastro/astro/pull/9638">#9638</a> <a href="https://github.com/withastro/astro/commit/f1a61268061b8834f39a9b38bca043ae41caed04"><code>f1a61268061b8834f39a9b38bca043ae41caed04</code></a> Thanks <a href="https://github.com/ematipico"><code>@ematipico</code></a>! - Adds a new <code>i18n.routing</code> config option <code>redirectToDefaultLocale</code> to disable automatic redirects of the root URL (<code>/</code>) to the default locale when <code>prefixDefaultLocale: true</code> is set.</p> 126 <p>In projects where every route, including the default locale, is prefixed with <code>/[locale]/</code> path, this property allows you to control whether or not <code>src/pages/index.astro</code> should automatically redirect your site visitors from <code>/</code> to <code>/[defaultLocale]</code>.</p> 127 <p>You can now opt out of this automatic redirection by setting <code>redirectToDefaultLocale: false</code>:</p> 128 </li> 129 </ul> 130 <!-- raw HTML omitted --> 131 </blockquote> 132 <p>... (truncated)</p> 133 </details> 134 <details> 135 <summary>Commits</summary> 136 <ul> 137 <li><a href="https://github.com/withastro/astro/commit/138ae524eca0d4a35f88dc05288b7e7f73abea75"><code>138ae52</code></a> [ci] release (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/9727">#9727</a>)</li> 138 <li><a href="https://github.com/withastro/astro/commit/8bc3b66d4de7d480aa1526ef045a7545841b9c70"><code>8bc3b66</code></a> [ci] format</li> 139 <li><a href="https://github.com/withastro/astro/commit/a4b696def3a7eb18c1ae48b10fd3758a1874b6fe"><code>a4b696d</code></a> Fix regression in the routing priority of index routes (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/9726">#9726</a>)</li> 140 <li><a href="https://github.com/withastro/astro/commit/259c30e7fcef6a9a3ab421b924abd2da9d3fb1b5"><code>259c30e</code></a> Fix eslint warnings (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/9721">#9721</a>)</li> 141 <li><a href="https://github.com/withastro/astro/commit/2292d0b580d405dd2d8500d43e25056cf4d58dec"><code>2292d0b</code></a> [ci] release (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/9709">#9709</a>)</li> 142 <li><a href="https://github.com/withastro/astro/commit/7e1db8b4ce2da9e044ea0393e533c6db2561ac90"><code>7e1db8b</code></a> Avoid vite 5.1 warning (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/9719">#9719</a>)</li> 143 <li><a href="https://github.com/withastro/astro/commit/0fa8557de46d5390481641f585292a3aa37b4972"><code>0fa8557</code></a> [ci] format</li> 144 <li><a href="https://github.com/withastro/astro/commit/3ff704c0b600106fe4082bf513c395ff17e7e163"><code>3ff704c</code></a> [docs] fix syntax error, avoid a Markdown table (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/9713">#9713</a>)</li> 145 <li><a href="https://github.com/withastro/astro/commit/96bfc4be764fdbff355bc8b716480b1d96040f4c"><code>96bfc4b</code></a> [ci] format</li> 146 <li><a href="https://github.com/withastro/astro/commit/fd17f4a40b83d14350dce691aeb79d87e8fcaf40"><code>fd17f4a</code></a> Implement priority overrides for injected routes and redirects (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/9439">#9439</a>)</li> 147 <li>Additional commits viewable in <a href="https://github.com/withastro/astro/commits/astro@4.2.1/packages/astro">compare view</a></li> 148 </ul> 149 </details> 150 <br /> 151 152 153 [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 154 155 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`. 156 157 [//]: # (dependabot-automerge-start) 158 [//]: # (dependabot-automerge-end) 159 160 --- 161 162 <details> 163 <summary>Dependabot commands and options</summary> 164 <br /> 165 166 You can trigger Dependabot actions by commenting on this PR: 167 - `@dependabot rebase` will rebase this PR 168 - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it 169 - `@dependabot merge` will merge this PR after your CI passes on it 170 - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it 171 - `@dependabot cancel merge` will cancel a previously requested merge and block automerging 172 - `@dependabot reopen` will reopen this PR if it is closed 173 - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually 174 - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency 175 - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) 176 - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) 177 - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) 178 - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency 179 - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions 180 181 182 </details> 183 184 185 ## Comments 186 187 ### @dependabot[bot] — 2024-01-29T01:25:45Z 188 189 Superseded by #24. 190