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

Update astro monorepo #1638

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update astro monorepo #1638

wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 14, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@astrojs/svelte (source) 7.0.4 -> 7.0.7 age adoption passing confidence
@astrojs/vue (source) 5.0.6 -> 5.0.7 age adoption passing confidence
astro (source) 5.3.0 -> 5.5.4 age adoption passing confidence

Release Notes

withastro/astro (@​astrojs/svelte)

v7.0.7

Compare Source

Patch Changes

v7.0.6

Compare Source

Patch Changes

v7.0.5

Compare Source

Patch Changes
withastro/astro (@​astrojs/vue)

v5.0.7

Compare Source

Patch Changes
withastro/astro (astro)

v5.5.4

Compare Source

Patch Changes

v5.5.3

Compare Source

Patch Changes
  • #​13437 013fa87 Thanks @​Vardhaman619! - Handle server.allowedHosts when the value is true without attempting to push it into an array.

  • #​13324 ea74336 Thanks @​ematipico! - Upgrade to shiki v3

  • #​13372 7783dbf Thanks @​ascorbic! - Fixes a bug that caused some very large data stores to save incomplete data.

  • #​13358 8c21663 Thanks @​ematipico! - Adds a new function called insertPageRoute to the Astro Container API.

    The new function is useful when testing routes that, for some business logic, use Astro.rewrite.

    For example, if you have a route /blog/post and for some business decision there's a rewrite to /generic-error, the container API implementation will look like this:

    import Post from '../src/pages/Post.astro';
    import GenericError from '../src/pages/GenericError.astro';
    import { experimental_AstroContainer as AstroContainer } from 'astro/container';
    
    const container = await AstroContainer.create();
    container.insertPageRoute('/generic-error', GenericError);
    const result = await container.renderToString(Post);
    console.log(result); // this should print the response from GenericError.astro

    This new method only works for page routes, which means that endpoints aren't supported.

  • #​13426 565583b Thanks @​ascorbic! - Fixes a bug that caused the astro add command to ignore the --yes flag for third-party integrations

  • #​13428 9cac9f3 Thanks @​matthewp! - Prevent bad value in x-forwarded-host from crashing request

  • #​13432 defad33 Thanks @​P4tt4te! - Fix an issue in the Container API, where the renderToString function doesn't render adequately nested slots when they are components.

  • Updated dependencies [ea74336]:

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

v5.4.3

Compare Source

Patch Changes

v5.4.2

Compare Source

Patch Changes

v5.4.1

Compare Source

Patch Changes
  • #​13336 8f632ef Thanks @​ematipico! - Fixes a regression where some asset utilities were move across monorepo, and not re-exported anymore.

  • #​13320 b5dabe9 Thanks @​{! - Adds support for typing experimental session data

    You can add optional types to your session data by creating a src/env.d.ts file in your project that extends the global App.SessionData interface. For example:

    declare namespace App {
      interface SessionData {
    
          id: string;
          email: string;
        };
        lastLogin: Date;
      }
    }

    Any keys not defined in this interface will be treated as any.

    Then when you access Astro.session in your components, any defined keys will be typed correctly:

v5.4.0

Compare Source

Minor Changes
Config helpers

Two new helper functions exported from astro/config:

  • mergeConfig() allows users to merge partially defined Astro configurations on top of a base config while following the merge rules of updateConfig() available for integrations.
  • validateConfig() allows users to validate that a given value is a valid Astro configuration and fills in default values as necessary.

These helpers are particularly useful for integration authors and for developers writing scripts that need to manipulate Astro configurations programmatically.

Programmatic build

The build API now receives a second optional BuildOptions argument where users can specify:

  • devOutput (default false): output a development-based build similar to code transformed in astro dev.
  • teardownCompiler (default true): teardown the compiler WASM instance after build.

These options provide more control when running Astro builds programmatically, especially for testing scenarios or custom build pipelines.

  • #​13278 4a43c4b Thanks @​ematipico! - Adds a new configuration option server.allowedHosts and CLI option --allowed-hosts.

    Now you can specify the hostnames that the dev and preview servers are allowed to respond to. This is useful for allowing additional subdomains, or running the dev server in a web container.

    allowedHosts checks the Host header on HTTP requests from browsers and if it doesn't match, it will reject the request to prevent CSRF and XSS attacks.

    astro dev --allowed-hosts=foo.bar.example.com,bar.example.com
    astro preview --allowed-hosts=foo.bar.example.com,bar.example.com
    // astro.config.mjs
    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
      server: {
        allowedHosts: ['foo.bar.example.com', 'bar.example.com'],
      },
    });

    This feature is the same as Vite's server.allowHosts configuration.

  • #​13254 1e11f5e Thanks @​p0lyw0lf! - Adds the ability to process and optimize remote images in Markdown files

    Previously, Astro only allowed local images to be optimized when included using ![]() syntax in plain Markdown files. Astro's image service could only display remote images without any processing.

    Now, Astro's image service can also optimize remote images written in standard Markdown syntax. This allows you to enjoy the benefits of Astro's image processing when your images are stored externally, for example in a CMS or digital asset manager.

    No additional configuration is required to use this feature! Any existing remote images written in Markdown will now automatically be optimized. To opt-out of this processing, write your images in Markdown using the HTML <img> tag instead. Note that images located in your public/ folder are still never processed.

Patch Changes
  • #​13256 509fa67 Thanks @​p0lyw0lf! - Adds experimental responsive image support in Markdown

    Previously, the experimental.responsiveImages feature could only provide responsive images when using the <Image /> and <Picture /> components.

    Now, images written with the ![]() Markdown syntax in Markdown and MDX files will generate responsive images by default when using this experimental feature.

    To try this experimental feature, set experimental.responsiveImages to true in your astro.config.mjs file:

    {
       experimental: {
          responsiveImages: true,
       },
    }

    Learn more about using this feature in the experimental responsive images feature reference.

    For a complete overview, and to give feedback on this experimental API, see the Responsive Images RFC.

  • #​13323 80926fa Thanks @​ematipico! - Updates esbuild and vite to the latest to avoid false positives audits warnings caused by esbuild.

  • #​13313 9e7c71d Thanks @​martrapp! - Fixes an issue where a form field named "attributes" shadows the form.attributes property.

  • #​12052 5be12b2 Thanks @​Fryuni! - Fixes incorrect config update when calling updateConfig from astro:build:setup hook.

    The function previously called a custom update config function made for merging an Astro config. Now it calls the appropriate mergeConfig() utility exported by Vite that updates functional options correctly.

  • #​13303 5f72a58 Thanks @​ematipico! - Fixes an issue where the dev server was applying second decoding of the URL of the incoming request, causing issues for certain URLs.

  • Updated dependencies [1e11f5e, 1e11f5e]:

v5.3.1

Compare Source

Patch Changes
  • #​13233 32fafeb Thanks @​joshmkennedy! - Ensures consistent behaviour of Astro.rewrite/ctx.rewrite when using base and trailingSlash options.

  • #​13003 ea79054 Thanks @​chaegumi! - Fixes a bug that caused the vite.base value to be ignored when running astro dev

  • #​13299 2e1321e Thanks @​bluwy! - Uses tinyglobby for globbing files

  • #​13233 32fafeb Thanks @​joshmkennedy! - Ensures that Astro.url/ctx.url is correctly updated with the base path after rewrites.

    This change fixes an issue where Astro.url/ctx.url did not include the configured base path after Astro.rewrite was called. Now, the base path is correctly reflected in Astro.url.

    Previously, any rewrites performed through Astro.rewrite/ctx.rewrite failed to append the base path to Astro.url/ctx.rewrite, which could lead to incorrect URL handling in downstream logic. By fixing this, we ensure that all routes remain consistent and predictable after a rewrite.

    If you were relying on the work around of including the base path in astro.rewrite you can now remove it from the path.


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.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • 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 force-pushed the renovate/astro-monorepo branch 25 times, most recently from 7830c97 to 7ad96b5 Compare March 21, 2025 01:09
@renovate renovate bot force-pushed the renovate/astro-monorepo branch 4 times, most recently from 374fbe6 to d4448c4 Compare March 22, 2025 00:54
@renovate renovate bot force-pushed the renovate/astro-monorepo branch from d4448c4 to 51e0818 Compare March 22, 2025 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants