Update dependency astro to v4.2.0 #46

Merged
jahanson merged 1 commit from renovate/astro-4.x-lockfile into main 2024-01-18 05:31:11 -06:00
Collaborator

This PR contains the following updates:

Package Type Update Change
astro (source) dependencies minor 4.1.2 -> 4.2.0

Release Notes

withastro/astro (astro)

v4.2.0

Compare Source

Minor Changes
  • #​9566 165cfc154be477337037185c32b308616d1ed6fa Thanks @​OliverSpeir! - Allows remark plugins to pass options specifying how images in .md files will be optimized

  • #​9661 d6edc7540864cf5d294d7b881eb886a3804f6d05 Thanks @​ematipico! - Adds new helper functions for adapter developers.

    • Astro.clientAddress can now be passed directly to the app.render() method.
    const response = await app.render(request, { clientAddress: '012.123.23.3' });
    
    • Helper functions for converting Node.js HTTP request and response objects to web-compatible Request and Response objects are now provided as static methods on the NodeApp class.
    http.createServer((nodeReq, nodeRes) => {
      const request: Request = NodeApp.createRequest(nodeReq);
      const response = await app.render(request);
      await NodeApp.writeResponse(response, nodeRes);
    });
    
    • Cookies added via Astro.cookies.set() can now be automatically added to the Response object by passing the addCookieHeader option to app.render().
    -const response = await app.render(request)
    -const setCookieHeaders: Array<string> = Array.from(app.setCookieHeaders(webResponse));
    
    -if (setCookieHeaders.length) {
    -    for (const setCookieHeader of setCookieHeaders) {
    -        headers.append('set-cookie', setCookieHeader);
    -    }
    -}
    +const response = await app.render(request, { addCookieHeader: true })
    
  • #​9638 f1a61268061b8834f39a9b38bca043ae41caed04 Thanks @​ematipico! - Adds a new i18n.routing config option redirectToDefaultLocale to disable automatic redirects of the root URL (/) to the default locale when prefixDefaultLocale: true is set.

    In projects where every route, including the default locale, is prefixed with /[locale]/ path, this property allows you to control whether or not src/pages/index.astro should automatically redirect your site visitors from / to /[defaultLocale].

    You can now opt out of this automatic redirection by setting redirectToDefaultLocale: false:

    // astro.config.mjs
    export default defineConfig({
      i18n: {
        defaultLocale: 'en',
        locales: ['en', 'fr'],
        routing: {
          prefixDefaultLocale: true,
          redirectToDefaultLocale: false,
        },
      },
    });
    
  • #​9671 8521ff77fbf7e867701cc30d18253856914dbd1b Thanks @​bholmesdev! - Removes the requirement for non-content files and assets inside content collections to be prefixed with an underscore. For files with extensions like .astro or .css, you can now remove underscores without seeing a warning in the terminal.

    src/content/blog/
    post.mdx
    - _styles.css
    - _Component.astro
    + styles.css
    + Component.astro
    

    Continue to use underscores in your content collections to exclude individual content files, such as drafts, from the build output.

  • #​9567 3a4d5ec8001ebf95c917fdc0d186d29650533d93 Thanks @​OliverSpeir! - Improves the a11y-missing-content rule and error message for audit feature of dev-overlay. This also fixes an error where this check was falsely reporting accessibility errors.

  • #​9643 e9a72d9a91a3741566866bcaab11172cb0dc7d31 Thanks @​blackmann! - Adds a new markdown.shikiConfig.transformers config option. You can use this option to transform the Shikiji hast (AST format of the generated HTML) to customize the final HTML. Also updates Shikiji to the latest stable version.

    See Shikiji's documentation for more details about creating your own custom transformers, and a list of common transformers you can add directly to your project.

  • #​9644 a5f1682347e602330246129d4666a9227374c832 Thanks @​rossrobino! - Adds an experimental flag clientPrerender to prerender your prefetched pages on the client with the Speculation Rules API.

    // astro.config.mjs
    {
      prefetch: {
        prefetchAll: true,
        defaultStrategy: 'viewport',
      },
      experimental: {
        clientPrerender: true,
      },
    }
    

    Enabling this feature overrides the default prefetch behavior globally to prerender links on the client according to your prefetch configuration. Instead of appending a <link> tag to the head of the document or fetching the page with JavaScript, a <script> tag will be appended with the corresponding speculation rules.

    Client side prerendering requires browser support. If the Speculation Rules API is not supported, prefetch will fallback to the supported strategy.

    See the Prefetch Guide for more prefetch options and usage.

  • #​9439 fd17f4a40b83d14350dce691aeb79d87e8fcaf40 Thanks @​Fryuni! - Adds an experimental flag globalRoutePriority to prioritize redirects and injected routes equally alongside file-based project routes, following the same route priority order rules for all routes.

    // astro.config.mjs
    export default defineConfig({
      experimental: {
        globalRoutePriority: true,
      },
    });
    

    Enabling this feature ensures that all routes in your project follow the same, predictable route priority order rules. In particular, this avoids an issue where redirects or injected routes (e.g. from an integration) would always take precedence over local route definitions, making it impossible to override some routes locally.

    The following table shows which route builds certain page URLs when file-based routes, injected routes, and redirects are combined as shown below:

    • File-based route: /blog/post/[pid]
    • File-based route: /[page]
    • Injected route: /blog/[...slug]
    • Redirect: /blog/tags/[tag] -> /[tag]
    • Redirect: /posts -> /blog

    URLs are handled by the following routes:

    Page Current Behavior Global Routing Priority Behavior
    /blog/tags/astro Injected route /blog/[...slug] Redirect to /tags/[tag]
    /blog/post/0 Injected route /blog/[...slug] File-based route /blog/post/[pid]
    /posts File-based route /[page] Redirect to /blog

    In the event of route collisions, where two routes of equal route priority attempt to build the same URL, Astro will log a warning identifying the conflicting routes.

Patch Changes

v4.1.3

Compare Source

Patch Changes

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | dependencies | minor | [`4.1.2` -> `4.2.0`](https://renovatebot.com/diffs/npm/astro/4.1.2/4.2.0) | --- ### Release Notes <details> <summary>withastro/astro (astro)</summary> ### [`v4.2.0`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#420) [Compare Source](https://github.com/withastro/astro/compare/astro@4.1.3...astro@4.2.0) ##### Minor Changes - [#&#8203;9566](https://github.com/withastro/astro/pull/9566) [`165cfc154be477337037185c32b308616d1ed6fa`](https://github.com/withastro/astro/commit/165cfc154be477337037185c32b308616d1ed6fa) Thanks [@&#8203;OliverSpeir](https://github.com/OliverSpeir)! - Allows remark plugins to pass options specifying how images in `.md` files will be optimized - [#&#8203;9661](https://github.com/withastro/astro/pull/9661) [`d6edc7540864cf5d294d7b881eb886a3804f6d05`](https://github.com/withastro/astro/commit/d6edc7540864cf5d294d7b881eb886a3804f6d05) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Adds new helper functions for adapter developers. - `Astro.clientAddress` can now be passed directly to the `app.render()` method. ```ts const response = await app.render(request, { clientAddress: '012.123.23.3' }); ``` - Helper functions for converting Node.js HTTP request and response objects to web-compatible `Request` and `Response` objects are now provided as static methods on the `NodeApp` class. ```ts http.createServer((nodeReq, nodeRes) => { const request: Request = NodeApp.createRequest(nodeReq); const response = await app.render(request); await NodeApp.writeResponse(response, nodeRes); }); ``` - Cookies added via `Astro.cookies.set()` can now be automatically added to the `Response` object by passing the `addCookieHeader` option to `app.render()`. ```diff -const response = await app.render(request) -const setCookieHeaders: Array<string> = Array.from(app.setCookieHeaders(webResponse)); -if (setCookieHeaders.length) { - for (const setCookieHeader of setCookieHeaders) { - headers.append('set-cookie', setCookieHeader); - } -} +const response = await app.render(request, { addCookieHeader: true }) ``` - [#&#8203;9638](https://github.com/withastro/astro/pull/9638) [`f1a61268061b8834f39a9b38bca043ae41caed04`](https://github.com/withastro/astro/commit/f1a61268061b8834f39a9b38bca043ae41caed04) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Adds a new `i18n.routing` config option `redirectToDefaultLocale` to disable automatic redirects of the root URL (`/`) to the default locale when `prefixDefaultLocale: true` is set. In projects where every route, including the default locale, is prefixed with `/[locale]/` path, this property allows you to control whether or not `src/pages/index.astro` should automatically redirect your site visitors from `/` to `/[defaultLocale]`. You can now opt out of this automatic redirection by setting `redirectToDefaultLocale: false`: ```js // astro.config.mjs export default defineConfig({ i18n: { defaultLocale: 'en', locales: ['en', 'fr'], routing: { prefixDefaultLocale: true, redirectToDefaultLocale: false, }, }, }); ``` - [#&#8203;9671](https://github.com/withastro/astro/pull/9671) [`8521ff77fbf7e867701cc30d18253856914dbd1b`](https://github.com/withastro/astro/commit/8521ff77fbf7e867701cc30d18253856914dbd1b) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Removes the requirement for non-content files and assets inside content collections to be prefixed with an underscore. For files with extensions like `.astro` or `.css`, you can now remove underscores without seeing a warning in the terminal. ```diff src/content/blog/ post.mdx - _styles.css - _Component.astro + styles.css + Component.astro ``` Continue to use underscores in your content collections to exclude individual content files, such as drafts, from the build output. - [#&#8203;9567](https://github.com/withastro/astro/pull/9567) [`3a4d5ec8001ebf95c917fdc0d186d29650533d93`](https://github.com/withastro/astro/commit/3a4d5ec8001ebf95c917fdc0d186d29650533d93) Thanks [@&#8203;OliverSpeir](https://github.com/OliverSpeir)! - Improves the a11y-missing-content rule and error message for audit feature of dev-overlay. This also fixes an error where this check was falsely reporting accessibility errors. - [#&#8203;9643](https://github.com/withastro/astro/pull/9643) [`e9a72d9a91a3741566866bcaab11172cb0dc7d31`](https://github.com/withastro/astro/commit/e9a72d9a91a3741566866bcaab11172cb0dc7d31) Thanks [@&#8203;blackmann](https://github.com/blackmann)! - Adds a new `markdown.shikiConfig.transformers` config option. You can use this option to transform the Shikiji hast (AST format of the generated HTML) to customize the final HTML. Also updates Shikiji to the latest stable version. See [Shikiji's documentation](https://shikiji.netlify.app/guide/transformers) for more details about creating your own custom transformers, and [a list of common transformers](https://shikiji.netlify.app/packages/transformers) you can add directly to your project. - [#&#8203;9644](https://github.com/withastro/astro/pull/9644) [`a5f1682347e602330246129d4666a9227374c832`](https://github.com/withastro/astro/commit/a5f1682347e602330246129d4666a9227374c832) Thanks [@&#8203;rossrobino](https://github.com/rossrobino)! - Adds an experimental flag `clientPrerender` to prerender your prefetched pages on the client with the [Speculation Rules API](https://developer.mozilla.org/en-US/docs/Web/API/Speculation_Rules_API). ```js // astro.config.mjs { prefetch: { prefetchAll: true, defaultStrategy: 'viewport', }, experimental: { clientPrerender: true, }, } ``` Enabling this feature overrides the default `prefetch` behavior globally to prerender links on the client according to your `prefetch` configuration. Instead of appending a `<link>` tag to the head of the document or fetching the page with JavaScript, a `<script>` tag will be appended with the corresponding speculation rules. Client side prerendering requires browser support. If the Speculation Rules API is not supported, `prefetch` will fallback to the supported strategy. See the [Prefetch Guide](https://docs.astro.build/en/guides/prefetch/) for more `prefetch` options and usage. - [#&#8203;9439](https://github.com/withastro/astro/pull/9439) [`fd17f4a40b83d14350dce691aeb79d87e8fcaf40`](https://github.com/withastro/astro/commit/fd17f4a40b83d14350dce691aeb79d87e8fcaf40) Thanks [@&#8203;Fryuni](https://github.com/Fryuni)! - Adds an experimental flag `globalRoutePriority` to prioritize redirects and injected routes equally alongside file-based project routes, following the same [route priority order rules](https://docs.astro.build/en/core-concepts/routing/#route-priority-order) for all routes. ```js // astro.config.mjs export default defineConfig({ experimental: { globalRoutePriority: true, }, }); ``` Enabling this feature ensures that all routes in your project follow the same, predictable route priority order rules. In particular, this avoids an issue where redirects or injected routes (e.g. from an integration) would always take precedence over local route definitions, making it impossible to override some routes locally. The following table shows which route builds certain page URLs when file-based routes, injected routes, and redirects are combined as shown below: - File-based route: `/blog/post/[pid]` - File-based route: `/[page]` - Injected route: `/blog/[...slug]` - Redirect: `/blog/tags/[tag]` -> `/[tag]` - Redirect: `/posts` -> `/blog` URLs are handled by the following routes: | Page | Current Behavior | Global Routing Priority Behavior | | ------------------ | -------------------------------- | ----------------------------------- | | `/blog/tags/astro` | Injected route `/blog/[...slug]` | Redirect to `/tags/[tag]` | | `/blog/post/0` | Injected route `/blog/[...slug]` | File-based route `/blog/post/[pid]` | | `/posts` | File-based route `/[page]` | Redirect to `/blog` | In the event of route collisions, where two routes of equal route priority attempt to build the same URL, Astro will log a warning identifying the conflicting routes. ##### Patch Changes - [#&#8203;9719](https://github.com/withastro/astro/pull/9719) [`7e1db8b4ce2da9e044ea0393e533c6db2561ac90`](https://github.com/withastro/astro/commit/7e1db8b4ce2da9e044ea0393e533c6db2561ac90) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Refactors Vite config to avoid Vite 5.1 warnings - [#&#8203;9439](https://github.com/withastro/astro/pull/9439) [`fd17f4a40b83d14350dce691aeb79d87e8fcaf40`](https://github.com/withastro/astro/commit/fd17f4a40b83d14350dce691aeb79d87e8fcaf40) Thanks [@&#8203;Fryuni](https://github.com/Fryuni)! - Updates [Astro's routing priority rules](https://docs.astro.build/en/core-concepts/routing/#route-priority-order) to prioritize the most specifically-defined routes. Now, routes with **more defined path segments** will take precedence over less specific routes. For example, `/blog/posts/[pid].astro` (3 path segments) takes precedence over `/blog/[...slug].astro` (2 path segments). This means that: - `/pages/blog/posts/[id].astro` will build routes of the form `/blog/posts/1` and `/blog/posts/a` - `/pages/blog/[...slug].astro` will build routes of a variety of forms, including `blog/1` and `/blog/posts/1/a`, but will not build either of the previous routes. For a complete list of Astro's routing priority rules, please see the [routing guide](https://docs.astro.build/en/core-concepts/routing/#route-priority-order). This should not be a breaking change, but you may wish to inspect your built routes to ensure that your project is unaffected. - [#&#8203;9706](https://github.com/withastro/astro/pull/9706) [`1539e04a8e5865027b3a8718c6f142885e7c8d88`](https://github.com/withastro/astro/commit/1539e04a8e5865027b3a8718c6f142885e7c8d88) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Simplifies HMR handling, improves circular dependency invalidation, and fixes Astro styles invalidation - Updated dependencies \[[`165cfc154be477337037185c32b308616d1ed6fa`](https://github.com/withastro/astro/commit/165cfc154be477337037185c32b308616d1ed6fa), [`e9a72d9a91a3741566866bcaab11172cb0dc7d31`](https://github.com/withastro/astro/commit/e9a72d9a91a3741566866bcaab11172cb0dc7d31)]: - [@&#8203;astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)[@&#8203;4](https://github.com/4).1.0 ### [`v4.1.3`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#413) [Compare Source](https://github.com/withastro/astro/compare/astro@4.1.2...astro@4.1.3) ##### Patch Changes - [#&#8203;9665](https://github.com/withastro/astro/pull/9665) [`d02a3c48a3ce204649d22e17b1e26fb5a6a60bcf`](https://github.com/withastro/astro/commit/d02a3c48a3ce204649d22e17b1e26fb5a6a60bcf) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Disables internal file watcher for one-off Vite servers to improve start-up performance - [#&#8203;9664](https://github.com/withastro/astro/pull/9664) [`1bf0ddd2777ae5f9fde3fd854a9e75aa56c080f2`](https://github.com/withastro/astro/commit/1bf0ddd2777ae5f9fde3fd854a9e75aa56c080f2) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Improves HMR for Astro style and script modules - [#&#8203;9668](https://github.com/withastro/astro/pull/9668) [`74008cc23853ed507b144efab02300202c5386ed`](https://github.com/withastro/astro/commit/74008cc23853ed507b144efab02300202c5386ed) Thanks [@&#8203;Princesseuh](https://github.com/Princesseuh)! - Fix the passthrough image service not generating `srcset` values properly - [#&#8203;9693](https://github.com/withastro/astro/pull/9693) [`d38b2a4fe827e956662fcf457d1f1f84832c2f15`](https://github.com/withastro/astro/commit/d38b2a4fe827e956662fcf457d1f1f84832c2f15) Thanks [@&#8203;kidylee](https://github.com/kidylee)! - Disables View Transition form handling when the `action` property points to an external URL - [#&#8203;9678](https://github.com/withastro/astro/pull/9678) [`091097e60ef38dadb87d7c8c1fc9cb939a248921`](https://github.com/withastro/astro/commit/091097e60ef38dadb87d7c8c1fc9cb939a248921) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Adds an error during the build phase in case `i18n.routing.prefixDefaultLocale` is set to `true` and the index page is missing. - [#&#8203;9659](https://github.com/withastro/astro/pull/9659) [`39050c6e1f77dc21e87716d95e627a654828ee74`](https://github.com/withastro/astro/commit/39050c6e1f77dc21e87716d95e627a654828ee74) Thanks [@&#8203;Princesseuh](https://github.com/Princesseuh)! - Fix Astro wrongfully deleting certain images imported with `?url` when used in tandem with `astro:assets` - [#&#8203;9685](https://github.com/withastro/astro/pull/9685) [`35d54b3ddb3310ab4c505d49bd4937b2d25e4078`](https://github.com/withastro/astro/commit/35d54b3ddb3310ab4c505d49bd4937b2d25e4078) Thanks [@&#8203;lilnasy](https://github.com/lilnasy)! - Fixes an issue where anchor elements within a custom component could not trigger a view transition. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy45MS40IiwidXBkYXRlZEluVmVyIjoiMzcuOTEuNCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
smeagol-help added 1 commit 2024-01-16 06:00:47 -06:00
smeagol-help force-pushed renovate/astro-4.x-lockfile from 27f4b14134 to 3cb63821ec 2024-01-18 05:00:23 -06:00 Compare
smeagol-help changed title from Update dependency astro to v4.1.3 to Update dependency astro to v4.2.0 2024-01-18 05:00:49 -06:00
jahanson merged commit d8f256dbdb into main 2024-01-18 05:31:11 -06:00
jahanson deleted branch renovate/astro-4.x-lockfile 2024-01-18 05:31:11 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jahanson/joehanson-dev#46
No description provided.