Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency astro to v5.5.2 #1312

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 13, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
astro (source) 5.4.3 -> 5.5.2 age adoption passing confidence

Release Notes

withastro/astro (astro)

v5.5.2

Compare Source

Patch Changes
  • #​13415 be866a1 Thanks @​ascorbic! - Reuses experimental session storage object between requests. This prevents memory leaks and improves performance for drivers that open persistent connections to a database.

  • #​13420 2f039b9 Thanks @​ematipico! - It fixes an issue that caused some regressions in how styles are bundled.

v5.5.1

Compare Source

Patch Changes

v5.5.0

Compare Source

Minor Changes
  • #​13402 3e7b498 Thanks @​ematipico! - Adds a new experimental flag called experimental.preserveScriptOrder that renders <script> and <style> tags in the same order as they are defined.

    When rendering multiple <style> and <script> tags on the same page, Astro currently reverses their order in your generated HTML output. This can give unexpected results, for example CSS styles being overridden by earlier defined style tags when your site is built.

    With the new preserveScriptOrder flag enabled, Astro will generate the styles in the order they are defined:

    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
      experimental: {
        preserveScriptOrder: true,
      },
    });

    For example, the following component has two <style> tags, and both define the same style for the body tag:

    <p>I am a component</p>
    <style>
      body {
        background: red;
      }
    </style>
    <style>
      body {
        background: yellow;
      }
    </style>

    Once the project is compiled, Astro will create an inline style where yellow appears first, and then red. Ultimately, the red background is applied:

    body {
      background: #ff0;
    }
    body {
      background: red;
    }

    When experimental.preserveScriptOrder is set to true, the order of the two styles is kept as it is, and in the style generated red appears first, and then yellow:

    body {
      background: red;
    }
    body {
      background: #ff0;
    }

    This is a breaking change to how Astro renders project code that contains multiple <style> and <script> tags in the same component. If you were previously compensating for Astro's behavior by writing these out of order, you will need to update your code.

    This will eventually become the new default Astro behavior, so we encourage you to add this experimental style and script ordering as soon as you are able! This will help us test the new behavior and ensure your code is ready when this becomes the new normal.

    For more information as this feature develops, please see the experimental script order docs.

  • #​13352 cb886dc Thanks @​delucis! - Adds support for a new experimental.headingIdCompat flag

    By default, Astro removes a trailing - from the end of IDs it generates for headings ending with
    special characters. This differs from the behavior of common Markdown processors.

    You can now disable this behavior with a new configuration flag:

    // astro.config.mjs
    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
      experimental: {
        headingIdCompat: true,
      },
    });

    This can be useful when heading IDs and anchor links need to behave consistently across your site
    and other platforms such as GitHub and npm.

    If you are using the rehypeHeadingIds plugin directly, you can also pass this new option:

    // astro.config.mjs
    import { defineConfig } from 'astro/config';
    import { rehypeHeadingIds } from '@&#8203;astrojs/markdown-remark';
    import { otherPluginThatReliesOnHeadingIDs } from 'some/plugin/source';
    
    export default defineConfig({
      markdown: {
        rehypePlugins: [
          [rehypeHeadingIds, { experimentalHeadingIdCompat: true }],
          otherPluginThatReliesOnHeadingIDs,
        ],
      },
    });
  • #​13311 a3327ff Thanks @​chrisirhc! - Adds a new configuration option for Markdown syntax highlighting excludeLangs

    This option provides better support for diagramming tools that rely on Markdown code blocks, such as Mermaid.js and D2 by allowing you to exclude specific languages from Astro's default syntax highlighting.

    This option allows you to avoid rendering conflicts with tools that depend on the code not being highlighted without forcing you to disable syntax highlighting for other code blocks.

    The following example configuration will exclude highlighting for mermaid and math code blocks:

    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
      markdown: {
        syntaxHighlight: {
          type: 'shiki',
          excludeLangs: ['mermaid', 'math'],
        },
      },
    });

    Read more about this new option in the Markdown syntax highlighting configuration docs.

Patch Changes

Configuration

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

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, 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 was generated by Mend Renovate. View the repository job log.

@renovate renovate bot enabled auto-merge (squash) March 13, 2025 22:19
Copy link

codesandbox bot commented Mar 13, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 13, 2025
@renovate renovate bot force-pushed the renovate/astro-monorepo branch from a4e4788 to d7f7714 Compare March 14, 2025 01:50
@renovate renovate bot merged commit e4beb5f into main Mar 14, 2025
2 checks passed
@renovate renovate bot deleted the renovate/astro-monorepo branch March 14, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants