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

fix(deps): update astro monorepo (major) #587

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 13, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@astrojs/cloudflare (source) ^11.0.5 -> ^12.0.0 age adoption passing confidence
@astrojs/tailwind (source) 5.1.5 -> 6.0.2 age adoption passing confidence
astro (source) 4.16.18 -> 5.6.1 age adoption passing confidence

Release Notes

withastro/astro (@​astrojs/cloudflare)

v12.4.0

Compare Source

Minor Changes
  • #​13514 a9aafec Thanks @​ascorbic! - Automatically configures Cloudflare KV storage when experimental sessions are enabled

    If the experimental.session flag is enabled when using the Cloudflare adapter, Astro will automatically configure the session storage using the Cloudflare KV driver. You can still manually configure the session storage if you need to use a different driver or want to customize the session storage configuration. If you want to use sessions, you will need to create the KV namespace and declare it in your wrangler config. You can do this using the Wrangler CLI:

    npx wrangler kv namespace create SESSION

    This will log the id of the created namespace. You can then add it to your wrangler.json/wrangler.toml file like this:

    // wrangler.json
    {
      "kv_namespaces": [
        {
          "binding": "SESSION",
          "id": "<your kv namespace id here>",
        },
      ],
    }

    By default it uses the binding name SESSION, but if you want to use a different binding name you can do so by passing the sessionKVBindingName option to the adapter. For example:

    import { defineConfig } from 'astro/config';
    import cloudflare from '@&#8203;astrojs/cloudflare';
    export default defineConfig({
      output: 'server',
      site: `http://example.com`,
      adapter: cloudflare({
        platformProxy: {
          enabled: true,
        },
        sessionKVBindingName: 'MY_SESSION',
      }),
      experimental: {
        session: true,
      },
    });

    See the Cloudflare KV docs for more details on setting up KV namespaces.

    See the experimental session docs for more information on configuring session storage.

Patch Changes

v12.3.1

Compare Source

Patch Changes

v12.3.0

Compare Source

Minor Changes
Patch Changes

v12.2.4

Compare Source

Patch Changes

v12.2.3

Compare Source

Patch Changes

v12.2.2

Patch Changes

v12.2.1

Patch Changes

v12.2.0

Minor Changes
Patch Changes

v12.1.0

Minor Changes
  • #​455 1d4e6fc Thanks @​meyer! - Adds wrangler.jsonc to the default watched config files. If a config file is specified in platformProxy.configPath, that file location is watched instead of the defaults.
Patch Changes

v12.0.1

Patch Changes
  • #​465 70e0054 Thanks @​bluwy! - Fixes setting custom workerd and worker conditions for the ssr environment only

v12.0.0

Major Changes
  • #​367 e02b54a Thanks @​alexanderniebuhr! - Removed support for the Squoosh image service. As the underlying library libsquoosh is no longer maintained, and the image service sees very little usage we have decided to remove it from Astro.

    Our recommendation is to use the base Sharp image service, which is more powerful, faster, and more actively maintained.

    - import { squooshImageService } from "astro/config";
    import { defineConfig } from "astro/config";
    
    export default defineConfig({
    -  image: {
    -    service: squooshImageService()
    -  }
    });

    If you are using this service, and cannot migrate to the base Sharp image service, a third-party extraction of the previous service is available here: https://github.com/Princesseuh/astro-image-service-squoosh

  • #​367 e02b54a Thanks @​alexanderniebuhr! - Deprecates the functionPerRoute option

    This option is now deprecated, and will be removed entirely in Astro v5.0. We suggest removing this option from your configuration as soon as you are able to:

    import { defineConfig } from 'astro/config';
    import vercel from '@&#8203;astrojs/vercel/serverless';
    
    export default defineConfig({
      // ...
      output: 'server',
      adapter: vercel({
    -     functionPerRoute: true,
      }),
    });
  • #​375 e7881f7 Thanks @​Princesseuh! - Updates internal code to works with Astro 5 changes to hybrid rendering. No changes are necessary to your project, apart from using Astro 5

  • #​397 776a266 Thanks @​Princesseuh! - Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release.

    Starting from this release, no breaking changes will be introduced unless absolutely necessary.

    To learn how to upgrade, check out the Astro v5.0 upgrade guide in our beta docs site.

  • #​451 f248546 Thanks @​ematipico! - Updates esbuild dependency to v0.24.0

  • #​392 3a49eb7 Thanks @​Princesseuh! - Updates internal code for Astro 5 changes. No changes is required to your project, apart from using Astro 5

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

v6.0.2

Compare Source

Patch Changes

v6.0.1

Compare Source

Patch Changes

v6.0.0

Compare Source

Major Changes
  • #​13049 2ed4bd9 Thanks @​florian-lefebvre! - Deprecates the integration

    Tailwind CSS now offers a Vite plugin which is the preferred way to use Tailwind 4 in Astro. Please uninstall @astrojs/tailwind and follow the Tailwind documentation for manual installation.

    This updated major version is only provided as a convenience for existing projects until they are able to migrate to the new plugin. It offers no additional functionality and is no longer recommended, but may continue to be used in your projects until it is removed entirely.

withastro/astro (astro)

v5.6.1

Compare Source

Patch Changes

v5.6.0

Compare Source

Minor Changes
  • #​13403 dcb9526 Thanks @​yurynix! - Adds a new optional prerenderedErrorPageFetch option in the Adapter API to allow adapters to provide custom implementations for fetching prerendered error pages.

    Now, adapters can override the default fetch() behavior, for example when fetch() is unavailable or when you cannot call the server from itself.

    The following example provides a custom fetch for 500.html and 404.html, reading them from disk instead of performing an HTTP call:

    return app.render(request, {
      prerenderedErrorPageFetch: async (url: string): Promise<Response> => {
        if (url.includes("/500")) {
            const content = await fs.promises.readFile("500.html", "utf-8");
            return new Response(content, {
              status: 500,
              headers: { "Content-Type": "text/html" },
            });
        }
        const content = await fs.promises.readFile("404.html", "utf-8");
          return new Response(content, {
            status: 404,
            headers: { "Content-Type": "text/html" },
          });
    });

    If no value is provided, Astro will fallback to its default behavior for fetching error pages.

    Read more about this feature in the Adapter API reference.

  • #​13482 ff257df Thanks @​florian-lefebvre! - Updates Astro config validation to also run for the Integration API. An error log will specify which integration is failing the validation.

    Now, Astro will first validate the user configuration, then validate the updated configuration after each integration astro:config:setup hook has run. This means updateConfig() calls will no longer accept invalid configuration.

    This fixes a situation where integrations could potentially update a project with a malformed configuration. These issues should now be caught and logged so that you can update your integration to only set valid configurations.

  • #​13405 21e7e80 Thanks @​Marocco2! - Adds a new eagerness option for prefetch() when using experimental.clientPrerender

    With the experimental clientPrerender flag enabled, you can use the eagerness option on prefetch() to suggest to the browser how eagerly it should prefetch/prerender link targets.

    This follows the same API described in the Speculation Rules API and allows you to balance the benefit of reduced wait times against bandwidth, memory, and CPU costs for your site visitors.

    For example, you can now use prefetch() programmatically with large sets of links and avoid browser limits in place to guard against over-speculating (prerendering/prefetching too many links). Set eagerness: 'moderate' to take advantage of First In, First Out (FIFO) strategies and browser heuristics to let the browser decide when to prerender/prefetch them and in what order:

    <a class="link-moderate" href="/nice-link-1">A Nice Link 1</a>
    <a class="link-moderate" href="/nice-link-2">A Nice Link 2</a>
    <a class="link-moderate" href="/nice-link-3">A Nice Link 3</a>
    <a class="link-moderate" href="/nice-link-4">A Nice Link 4</a>
    ...
    <a class="link-moderate" href="/nice-link-20">A Nice Link 20</a>
    <script>
      import { prefetch } from 'astro:prefetch';
      const linkModerate = document.getElementsByClassName('link-moderate');
      linkModerate.forEach((link) => prefetch(link.getAttribute('href'), { eagerness: 'moderate' }));
    </script>
  • #​13482 ff257df Thanks @​florian-lefebvre! - Improves integrations error handling

    If an error is thrown from an integration hook, an error log will now provide information about the concerned integration and hook

Patch Changes
  • #​13539 c43bf8c Thanks @​ascorbic! - Adds a new session.load() method to the experimental session API that allows you to load a session by ID.

    When using the experimental sessions API, you don't normally need to worry about managing the session ID and cookies: Astro automatically reads the user's cookies and loads the correct session when needed. However, sometimes you need more control over which session to load.

    The new load() method allows you to manually load a session by ID. This is useful if you are handling the session ID yourself, or if you want to keep track of a session without using cookies. For example, you might want to restore a session from a logged-in user on another device, or work with an API endpoint that doesn't use cookies.

    // src/pages/api/cart.ts
    import type { APIRoute } from 'astro';
    
    export const GET: APIRoute = async ({ session, request }) => {
      // Load the session from a header instead of cookies
      const sessionId = request.headers.get('x-session-id');
      await session.load(sessionId);
      const cart = await session.get('cart');
      return Response.json({ cart });
    };

    If a session with that ID doesn't exist, a new one will be created. This allows you to generate a session ID in the client if needed.

    For more information, see the experimental sessions docs.

  • #​13488 d777420 Thanks @​stramel! - BREAKING CHANGE to the experimental SVG Component API only

    Removes some previously available prop, attribute, and configuration options from the experimental SVG API. These items are no longer available and must be removed from your code:

    • The title prop has been removed until we can settle on the correct balance between developer experience and accessibility. Please replace any title props on your components with aria-label:

      - <Logo title="My Company Logo" />
      + <Logo aria-label="My Company Logo" />
    • Sprite mode has been temporarily removed while we consider a new implementation that addresses how this feature was being used in practice. This means that there are no longer multiple mode options, and all SVGs will be inline. All instances of mode must be removed from your project as you can no longer control a mode:

      - <Logo mode="inline" />
      + <Logo />
      import { defineConfig } from 'astro'
      
      export default defineConfig({
        experimental: {
      -    svg: {
      -      mode: 'sprite'
      -    },
      +   svg: true
        }
      });
    • The default role is no longer applied due to developer feedback. Please add the appropriate role on each component individually as needed:

      - <Logo />
      + <Logo role="img" /> // To keep the role that was previously applied by default
    • The size prop has been removed to better work in combination with viewBox and additional styles/attributes. Please replace size with explicit width and height attributes:

      - <Logo size={64} />
      + <Logo width={64} height={64} />

v5.5.6

Compare Source

Patch Changes
  • #​13429 06de673 Thanks @​ematipico! - The ActionAPIContext.rewrite method is deprecated and will be removed in a future major version of Astro

  • #​13524 82cd583 Thanks @​ematipico! - Fixes a bug where the functions Astro.preferredLocale and Astro.preferredLocaleList would return the incorrect locales
    when the Astro configuration specifies a list of codes. Before, the functions would return the path, instead now the functions
    return a list built from codes.

  • #​13526 ff9d69e Thanks @​jsparkdev! - update vite to the latest version

v5.5.5

Compare Source

Patch Changes

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](https://redirect.github.com/wi


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 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.

Copy link

cloudflare-workers-and-pages bot commented Feb 13, 2025

Deploying contribute with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3991a54
Status:🚫  Build failed.

View logs

@renovate renovate bot added the renovate label Feb 13, 2025
@renovate renovate bot force-pushed the renovate/major-astro-monorepo branch 2 times, most recently from 4e5ad2b to 42a2662 Compare February 13, 2025 18:36
Copy link

socket-security bot commented Feb 13, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub ↗.

Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@astrojs/[email protected] ⏵ 6.0.2100 +11007794 +7100
Updated@astrojs/[email protected] ⏵ 12.4.09910081 +198 +2100
Updated[email protected] ⏵ 5.6.1971008798 +1100

View full report ↗

@renovate renovate bot force-pushed the renovate/major-astro-monorepo branch 7 times, most recently from 216b20e to 86dc822 Compare February 18, 2025 23:38
@renovate renovate bot force-pushed the renovate/major-astro-monorepo branch 14 times, most recently from dc2f6e6 to 5aed67b Compare March 1, 2025 02:48
@renovate renovate bot force-pushed the renovate/major-astro-monorepo branch 4 times, most recently from 15bc41a to 1a8eee8 Compare March 4, 2025 08:53
@renovate renovate bot force-pushed the renovate/major-astro-monorepo branch 9 times, most recently from 3a62bb3 to aab0b54 Compare March 24, 2025 20:00
@renovate renovate bot force-pushed the renovate/major-astro-monorepo branch 10 times, most recently from 2d18698 to 7bbac19 Compare April 1, 2025 16:56
@renovate renovate bot force-pushed the renovate/major-astro-monorepo branch 9 times, most recently from fdb5f4d to 6f415ce Compare April 7, 2025 21:42
@renovate renovate bot force-pushed the renovate/major-astro-monorepo branch from 6f415ce to 3991a54 Compare April 9, 2025 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants