fix(deps): update astro monorepo #7

Merged
konrad merged 1 commits from renovate/astro-monorepo into main 2024-09-22 18:21:56 +00:00
Member

This PR contains the following updates:

Package Type Update Change
@astrojs/markdoc (source) dependencies patch 0.11.0 -> 0.11.4
@astrojs/tailwind (source) dependencies patch 5.1.0 -> 5.1.1
astro (source) dependencies minor 4.10.3 -> 4.15.8

Release Notes

withastro/astro (@​astrojs/markdoc)

v0.11.4

Compare Source

Patch Changes
  • #​11846 ed7bbd9 Thanks @​HiDeoo! - Fixes an issue preventing to use Astro components as Markdoc tags and nodes when configured using the extends property.

v0.11.3

Compare Source

Patch Changes

v0.11.2

Compare Source

Patch Changes

v0.11.1

Compare Source

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

v5.1.1

Compare Source

Patch Changes
withastro/astro (astro)

v4.15.8

Compare Source

Patch Changes

v4.15.7

Compare Source

Patch Changes

v4.15.6

Compare Source

Patch Changes

v4.15.5

Compare Source

Patch Changes
  • #​11939 7b09c62 Thanks @​bholmesdev! - Adds support for Zod discriminated unions on Action form inputs. This allows forms with different inputs to be submitted to the same action, using a given input to decide which object should be used for validation.

    This example accepts either a create or update form submission, and uses the type field to determine which object to validate against.

    import { defineAction } from 'astro:actions';
    import { z } from 'astro:schema';
    
    export const server = {
      changeUser: defineAction({
        accept: 'form',
        input: z.discriminatedUnion('type', [
          z.object({
            type: z.literal('create'),
            name: z.string(),
            email: z.string().email(),
          }),
          z.object({
            type: z.literal('update'),
            id: z.number(),
            name: z.string(),
            email: z.string().email(),
          }),
        ]),
        async handler(input) {
          if (input.type === 'create') {
            // input is { type: 'create', name: string, email: string }
          } else {
            // input is { type: 'update', id: number, name: string, email: string }
          }
        },
      }),
    };
    

    The corresponding create and update forms may look like this:

v4.15.4

Compare Source

Patch Changes
  • #​11879 bd1d4aa Thanks @​matthewp! - Allow passing a cryptography key via ASTRO_KEY

    For Server islands Astro creates a cryptography key in order to hash props for the islands, preventing accidental leakage of secrets.

    If you deploy to an environment with rolling updates then there could be multiple instances of your app with different keys, causing potential key mismatches.

    To fix this you can now pass the ASTRO_KEY environment variable to your build in order to reuse the same key.

    To generate a key use:

    astro create-key
    

    This will print out an environment variable to set like:

    ASTRO_KEY=PIAuyPNn2aKU/bviapEuc/nVzdzZPizKNo3OqF/5PmQ=
    
  • #​11935 c58193a Thanks @​Princesseuh! - Fixes astro add not using the proper export point when adding certain adapters

v4.15.3

Compare Source

Patch Changes

v4.15.2

Compare Source

Patch Changes

v4.15.1

Compare Source

Patch Changes

v4.15.0

Compare Source

Minor Changes
  • #​11729 1c54e63 Thanks @​ematipico! - Adds a new variant sync for the astro:config:setup hook's command property. This value is set when calling the command astro sync.

    If your integration previously relied on knowing how many variants existed for the command property, you must update your logic to account for this new option.

  • #​11743 cce0894 Thanks @​ph1p! - Adds a new, optional property timeout for the client:idle directive.

    This value allows you to specify a maximum time to wait, in milliseconds, before hydrating a UI framework component, even if the page is not yet done with its initial load. This means you can delay hydration for lower-priority UI elements with more control to ensure your element is interactive within a specified time frame.

    <ShowHideButton client:idle={{ timeout: 500 }} />
    
  • #​11677 cb356a5 Thanks @​ematipico! - Adds a new option fallbackType to i18n.routing configuration that allows you to control how fallback pages are handled.

    When i18n.fallback is configured, this new routing option controls whether to redirect to the fallback page, or to rewrite the fallback page's content in place.

    The "redirect" option is the default value and matches the current behavior of the existing fallback system.

    The option "rewrite" uses the new rewriting system to create fallback pages that render content on the original, requested URL without a browser refresh.

    For example, the following configuration will generate a page /fr/index.html that will contain the same HTML rendered by the page /en/index.html when src/pages/fr/index.astro does not exist.

    // astro.config.mjs
    export default defineConfig({
      i18n: {
        locals: ['en', 'fr'],
        defaultLocale: 'en',
        routing: {
          prefixDefaultLocale: true,
          fallbackType: 'rewrite',
        },
        fallback: {
          fr: 'en',
        },
      },
    });
    
  • #​11708 62b0d20 Thanks @​martrapp! - Adds a new object swapFunctions to expose the necessary utility functions on astro:transitions/client that allow you to build custom swap functions to be used with view transitions.

    The example below uses these functions to replace Astro's built-in default swap function with one that only swaps the <main> part of the page:

    <script>
      import { swapFunctions } from 'astro:transitions/client';
    
      document.addEventListener('astro:before-swap', (e) => { e.swap = () => swapMainOnly(e.newDocument) });
    
      function swapMainOnly(doc: Document) {
        swapFunctions.deselectScripts(doc);
        swapFunctions.swapRootAttributes(doc);
        swapFunctions.swapHeadElements(doc);
        const restoreFocusFunction = swapFunctions.saveFocus();
        const newMain = doc.querySelector('main');
        const oldMain = document.querySelector('main');
        if (newMain && oldMain) {
          swapFunctions.swapBodyElement(newMain, oldMain);
        } else {
          swapFunctions.swapBodyElement(doc.body, document.body);
        }
        restoreFocusFunction();
      };
    </script>
    

    See the view transitions guide for more information about hooking into the astro:before-swap lifecycle event and adding a custom swap implementation.

  • #​11843 5b4070e Thanks @​bholmesdev! - Exposes z from the new astro:schema module. This is the new recommended import source for all Zod utilities when using Astro Actions.

v4.14.6

Compare Source

Patch Changes

v4.14.5

Compare Source

Patch Changes

v4.14.4

Compare Source

Patch Changes
  • #​11794 3691a62 Thanks @​bholmesdev! - Fixes unexpected warning log when using Actions on "hybrid" rendered projects.

  • #​11801 9f943c1 Thanks @​delucis! - Fixes a bug where the filePath property was not available on content collection entries when using the content layer file() loader with a JSON file that contained an object instead of an array. This was breaking use of the image() schema utility among other things.

v4.14.3

Compare Source

Patch Changes

v4.14.2

Compare Source

Patch Changes

v4.14.1

Compare Source

Patch Changes
  • #​11725 6c1560f Thanks @​ascorbic! - Prevents content layer importing node builtins in runtime

  • #​11692 35af73a Thanks @​matthewp! - Prevent errant HTML from crashing server islands

    When an HTML minifier strips away the server island comment, the script can't correctly know where the end of the fallback content is. This makes it so that it simply doesn't remove any DOM in that scenario. This means the fallback isn't removed, but it also doesn't crash the browser.

  • #​11727 3c2f93b Thanks @​florian-lefebvre! - Fixes a type issue when using the Content Layer in dev

v4.14.0

Compare Source

Minor Changes
  • #​11657 a23c69d Thanks @​bluwy! - Deprecates the option for route-generating files to export a dynamic value for prerender. Only static values are now supported (e.g. export const prerender = true or = false). This allows for better treeshaking and bundling configuration in the future.

    Adds a new "astro:route:setup" hook to the Integrations API to allow you to dynamically set options for a route at build or request time through an integration, such as enabling on-demand server rendering.

    To migrate from a dynamic export to the new hook, update or remove any dynamic prerender exports from individual routing files:

    // src/pages/blog/[slug].astro
    - export const prerender = import.meta.env.PRERENDER
    

    Instead, create an integration with the "astro:route:setup" hook and update the route's prerender option:

    // astro.config.mjs
    import { defineConfig } from 'astro/config';
    import { loadEnv } from 'vite';
    
    export default defineConfig({
      integrations: [setPrerender()],
    });
    
    function setPrerender() {
      const { PRERENDER } = loadEnv(process.env.NODE_ENV, process.cwd(), '');
    
      return {
        name: 'set-prerender',
        hooks: {
          'astro:route:setup': ({ route }) => {
            if (route.component.endsWith('/blog/[slug].astro')) {
              route.prerender = PRERENDER;
            }
          },
        },
      };
    }
    
  • #​11360 a79a8b0 Thanks @​ascorbic! - Adds a new injectTypes() utility to the Integration API and refactors how type generation works

    Use injectTypes() in the astro:config:done hook to inject types into your user's project by adding a new a *.d.ts file.

    The filename property will be used to generate a file at /.astro/integrations/<normalized_integration_name>/<normalized_filename>.d.ts and must end with ".d.ts".

    The content property will create the body of the file, and must be valid TypeScript.

    Additionally, injectTypes() returns a URL to the normalized path so you can overwrite its content later on, or manipulate it in any way you want.

    // my-integration/index.js
    export default {
      name: 'my-integration',
      'astro:config:done': ({ injectTypes }) => {
        injectTypes({
          filename: 'types.d.ts',
          content: "declare module 'virtual:my-integration' {}",
        });
      },
    };
    

    Codegen has been refactored. Although src/env.d.ts will continue to work as is, we recommend you update it:

    - /// <reference types="astro/client" />
    + /// <reference path="../.astro/types.d.ts" />
    - /// <reference path="../.astro/env.d.ts" />
    - /// <reference path="../.astro/actions.d.ts" />
    
  • #​11605 d3d99fb Thanks @​jcayzac! - Adds a new property meta to Astro's built-in <Code /> component.

    This allows you to provide a value for Shiki's meta attribute to pass options to transformers.

    The following example passes an option to highlight lines 1 and 3 to Shiki's tranformerMetaHighlight:

v4.13.4

Compare Source

Patch Changes

v4.13.3

Compare Source

Patch Changes
  • #​11653 32be549 Thanks @​florian-lefebvre! - Updates astro:env docs to reflect current developments and usage guidance

  • #​11658 13b912a Thanks @​bholmesdev! - Fixes orThrow() type when calling an Action without an input validator.

  • #​11603 f31d466 Thanks @​bholmesdev! - Improves user experience when render an Action result from a form POST request:

    • Removes "Confirm post resubmission?" dialog when refreshing a result.
    • Removes the ?_astroAction=NAME flag when a result is rendered.

    Also improves the DX of directing to a new route on success. Actions will now redirect to the route specified in your action string on success, and redirect back to the previous page on error. This follows the routing convention of established backend frameworks like Laravel.

    For example, say you want to redirect to a /success route when actions.signup succeeds. You can add /success to your action string like so:

    <form method="POST" action={'/success' + actions.signup}></form>
    
    • On success, Astro will redirect to /success.
    • On error, Astro will redirect back to the current page.

    You can retrieve the action result from either page using the Astro.getActionResult() function.

Note on security

This uses a temporary cookie to forward the action result to the next page. The cookie will be deleted when that page is rendered.

The action result is not encrypted. In general, we recommend returning minimal data from an action handler to a) avoid leaking sensitive information, and b) avoid unexpected render issues once the temporary cookie is deleted. For example, a login function may return a user's session id to retrieve from your Astro frontmatter, rather than the entire user object.

v4.13.2

Compare Source

Patch Changes

v4.13.1

Compare Source

Patch Changes
  • #​11584 a65ffe3 Thanks @​bholmesdev! - Removes async local storage dependency from Astro Actions. This allows Actions to run in Cloudflare and Stackblitz without opt-in flags or other configuration.

    This also introduces a new convention for calling actions from server code. Instead of calling actions directly, you must wrap function calls with the new Astro.callAction() utility.

    callAction() is meant to trigger an action from server code. getActionResult() usage with form submissions remains unchanged.

v4.13.0

Compare Source

Minor Changes
  • #​11507 a62345f Thanks @​ematipico! - Adds color-coding to the console output during the build to highlight slow pages.

    Pages that take more than 500 milliseconds to render will have their build time logged in red. This change can help you discover pages of your site that are not performant and may need attention.

  • #​11379 e5e2d3e Thanks @​alexanderniebuhr! - The experimental.contentCollectionJsonSchema feature introduced behind a flag in v4.5.0 is no longer experimental and is available for general use.

    If you are working with collections of type data, Astro will now auto-generate JSON schema files for your editor to get IntelliSense and type-checking. A separate file will be created for each data collection in your project based on your collections defined in src/content/config.ts using a library called zod-to-json-schema.

    This feature requires you to manually set your schema's file path as the value for $schema in each data entry file of the collection:

    {
      "$schema": "../../../.astro/collections/authors.schema.json",
      "name": "Armand",
      "skills": ["Astro", "Starlight"]
    }
    

    Alternatively, you can set this value in your editor settings. For example, to set this value in VSCode's json.schemas setting, provide the path of files to match and the location of your JSON schema:

    {
      "json.schemas": [
        {
          "fileMatch": ["/src/content/authors/**"],
          "url": "./.astro/collections/authors.schema.json"
        }
      ]
    }
    

    If you were previously using this feature, please remove the experimental flag from your Astro config:

    import { defineConfig } from 'astro'
    
    export default defineConfig({
    -  experimental: {
    -    contentCollectionJsonSchema: true
    -  }
    })
    

    If you have been waiting for stabilization before using JSON Schema generation for content collections, you can now do so.

    Please see the content collections guide for more about this feature.

  • #​11542 45ad326 Thanks @​ematipico! - The experimental.rewriting feature introduced behind a flag in v4.8.0 is no longer experimental and is available for general use.

    Astro.rewrite() and context.rewrite() allow you to render a different page without changing the URL in the browser. Unlike using a redirect, your visitor is kept on the original page they visited.

    Rewrites can be useful for showing the same content at multiple paths (e.g. /products/shoes/men/ and /products/men/shoes/) without needing to maintain two identical source files.

    Rewrites are supported in Astro pages, endpoints, and middleware.

    Return Astro.rewrite() in the frontmatter of a .astro page component to display a different page's content, such as fallback localized content:

v4.12.3

Compare Source

Patch Changes
  • #​11509 dfbca06 Thanks @​bluwy! - Excludes hoisted scripts and styles from Astro components imported with ?url or ?raw

  • #​11561 904f1e5 Thanks @​ArmandPhilippot! - Uses the correct pageSize default in page.size JSDoc comment

  • #​11571 1c3265a Thanks @​bholmesdev! - BREAKING CHANGE to the experimental Actions API only. Install the latest @astrojs/react integration as well if you're using React 19 features.

    Make .safe() the default return value for actions. This means { data, error } will be returned when calling an action directly. If you prefer to get the data while allowing errors to throw, chain the .orThrow() modifier.

    import { actions } from 'astro:actions';
    
    // Before
    const { data, error } = await actions.like.safe();
    // After
    const { data, error } = await actions.like();
    
    // Before
    const newLikes = await actions.like();
    // After
    const newLikes = await actions.like.orThrow();
    

v4.12.2

Compare Source

Patch Changes
  • #​11505 8ff7658 Thanks @​ematipico! - Enhances the dev server logging when rewrites occur during the lifecycle or rendering.

    The dev server will log the status code before and after a rewrite:

    08:16:48 [404] (rewrite) /foo/about 200ms
    08:22:13 [200] (rewrite) /about 23ms
    
  • #​11506 026e8ba Thanks @​sarah11918! - Fixes typo in documenting the slot="fallback" attribute for Server Islands experimental feature.

  • #​11508 ca335e1 Thanks @​cramforce! - Escapes HTML in serialized props

  • #​11501 4db78ae Thanks @​martrapp! - Adds the missing export for accessing the getFallback() function of the client site router.

v4.12.1

Compare Source

Patch Changes
  • #​11486 9c0c849 Thanks @​ematipico! - Adds a new function called addClientRenderer to the Container API.

    This function should be used when rendering components using the client:* directives. The addClientRenderer API must be used
    after the use of the addServerRenderer:

    const container = await experimental_AstroContainer.create();
    container.addServerRenderer({ renderer });
    container.addClientRenderer({ name: '@&#8203;astrojs/react', entrypoint: '@&#8203;astrojs/react/client.js' });
    const response = await container.renderToResponse(Component);
    
  • #​11500 4e142d3 Thanks @​Princesseuh! - Fixes inferRemoteSize type not working

  • #​11496 53ccd20 Thanks @​alfawal! - Hide the dev toolbar on window.print() (CTRL + P)

v4.12.0

Compare Source

Minor Changes
  • #​11341 49b5145 Thanks @​madcampos! - Adds support for Shiki's defaultColor option.

    This option allows you to override the values of a theme's inline style, adding only CSS variables to give you more flexibility in applying multiple color themes.

    Configure defaultColor: false in your Shiki config to apply throughout your site, or pass to Astro's built-in <Code> component to style an individual code block.

    import { defineConfig } from 'astro/config';
    export default defineConfig({
      markdown: {
        shikiConfig: {
          themes: {
            light: 'github-light',
            dark: 'github-dark',
          },
          defaultColor: false,
        },
      },
    });
    

v4.11.6

Compare Source

Patch Changes
  • #​11459 bc2e74d Thanks @​mingjunlu! - Fixes false positive audit warnings on elements with the role "tabpanel".

  • #​11472 cb4e6d0 Thanks @​delucis! - Avoids targeting all files in the src/ directory for eager optimization by Vite. After this change, only JSX, Vue, Svelte, and Astro components get scanned for early optimization.

  • #​11387 b498461 Thanks @​bluwy! - Fixes prerendering not removing unused dynamic imported chunks

  • #​11437 6ccb30e Thanks @​NuroDev! - Fixes a case where Astro's config experimental.env.schema keys did not allow numbers. Numbers are still not allowed as the first character to be able to generate valid JavaScript identifiers

  • #​11439 08baf56 Thanks @​bholmesdev! - Expands the isInputError() utility from astro:actions to accept errors of any type. This should now allow type narrowing from a try / catch block.

    // example.ts
    import { actions, isInputError } from 'astro:actions';
    
    try {
      await actions.like(new FormData());
    } catch (error) {
      if (isInputError(error)) {
        console.log(error.fields);
      }
    }
    
  • #​11452 0e66849 Thanks @​FugiTech! - Fixes an issue where using .nullish() in a formdata Astro action would always parse as a string

  • #​11438 619f07d Thanks @​bholmesdev! - Exposes utility types from astro:actions for the defineAction handler (ActionHandler) and the ActionError code (ActionErrorCode).

  • #​11456 17e048d Thanks @​RickyC0626! - Fixes astro dev --open unexpected behavior that spawns a new tab every time a config file is saved

  • #​11337 0a4b31f Thanks @​florian-lefebvre! - Adds a new property experimental.env.validateSecrets to allow validating private variables on the server.

    By default, this is set to false and only public variables are checked on start. If enabled, secrets will also be checked on start (dev/build modes). This is useful for example in some CIs to make sure all your secrets are correctly set before deploying.

    // astro.config.mjs
    import { defineConfig, envField } from 'astro/config';
    
    export default defineConfig({
      experimental: {
        env: {
          schema: {
            // ...
          },
          validateSecrets: true,
        },
      },
    });
    
  • #​11443 ea4bc04 Thanks @​bholmesdev! - Expose new ActionReturnType utility from astro:actions. This infers the return type of an action by passing typeof actions.name as a type argument. This example defines a like action that returns likes as an object:

    // actions/index.ts
    import { defineAction } from 'astro:actions';
    
    export const server = {
      like: defineAction({
        handler: () => {
          /* ... */
          return { likes: 42 };
        },
      }),
    };
    

    In your client code, you can infer this handler return value with ActionReturnType:

    // client.ts
    import { actions, ActionReturnType } from 'astro:actions';
    
    type LikesResult = ActionReturnType<typeof actions.like>;
    // -> { likes: number }
    
  • #​11436 7dca68f Thanks @​bholmesdev! - Fixes astro:actions autocompletion for the defineAction accept property

  • #​11455 645e128 Thanks @​florian-lefebvre! - Improves astro:env invalid variables errors

v4.11.5

Compare Source

Patch Changes

v4.11.4

Compare Source

Patch Changes

v4.11.3

Compare Source

Patch Changes

v4.11.2

Compare Source

Patch Changes
  • #​11335 4c4741b Thanks @​ematipico! - Reverts #​11292, which caused a regression to the input type

  • #​11326 41121fb Thanks @​florian-lefebvre! - Fixes a case where running astro sync when using the experimental astro:env feature would fail if environment variables were missing

  • #​11338 9752a0b Thanks @​zaaakher! - Fixes svg icon margin in devtool tooltip title to look coherent in rtl and ltr layouts

  • #​11331 f1b78a4 Thanks @​bluwy! - Removes resolve package and simplify internal resolve check

  • #​11339 8fdbf0e Thanks @​matthewp! - Remove non-fatal errors from telemetry

    Previously we tracked non-fatal errors in telemetry to get a good idea of the types of errors that occur in astro dev. However this has become noisy over time and results in a lot of data that isn't particularly useful. This removes those non-fatal errors from being tracked.

v4.11.1

Compare Source

Patch Changes

v4.11.0

Compare Source

Minor Changes
  • #​11197 4b46bd9 Thanks @​braebo! - Adds ShikiTransformer support to the <Code /> component with a new transformers prop.

    Note that transformers only applies classes and you must provide your own CSS rules to target the elements of your code block.


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.

👻 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 has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@astrojs/markdoc](https://docs.astro.build/en/guides/integrations-guide/markdoc/) ([source](https://github.com/withastro/astro/tree/HEAD/packages/integrations/markdoc)) | dependencies | patch | [`0.11.0` -> `0.11.4`](https://renovatebot.com/diffs/npm/@astrojs%2fmarkdoc/0.11.0/0.11.4) | | [@astrojs/tailwind](https://docs.astro.build/en/guides/integrations-guide/tailwind/) ([source](https://github.com/withastro/astro/tree/HEAD/packages/integrations/tailwind)) | dependencies | patch | [`5.1.0` -> `5.1.1`](https://renovatebot.com/diffs/npm/@astrojs%2ftailwind/5.1.0/5.1.1) | | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | dependencies | minor | [`4.10.3` -> `4.15.8`](https://renovatebot.com/diffs/npm/astro/4.10.3/4.15.8) | --- ### Release Notes <details> <summary>withastro/astro (@&#8203;astrojs/markdoc)</summary> ### [`v0.11.4`](https://github.com/withastro/astro/blob/HEAD/packages/integrations/markdoc/CHANGELOG.md#0114) [Compare Source](https://github.com/withastro/astro/compare/@astrojs/markdoc@0.11.3...@astrojs/markdoc@0.11.4) ##### Patch Changes - [#&#8203;11846](https://github.com/withastro/astro/pull/11846) [`ed7bbd9`](https://github.com/withastro/astro/commit/ed7bbd990f80cacf9c5ec2a70ad7501631b92d3f) Thanks [@&#8203;HiDeoo](https://github.com/HiDeoo)! - Fixes an issue preventing to use Astro components as Markdoc tags and nodes when configured using the `extends` property. ### [`v0.11.3`](https://github.com/withastro/astro/blob/HEAD/packages/integrations/markdoc/CHANGELOG.md#0113) [Compare Source](https://github.com/withastro/astro/compare/@astrojs/markdoc@0.11.2...@astrojs/markdoc@0.11.3) ##### Patch Changes - Updated dependencies \[[`49b5145`](https://github.com/withastro/astro/commit/49b5145158a603b9bb951bf914a6a9780c218704)]: - [@&#8203;astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)[@&#8203;5](https://github.com/5).2.0 ### [`v0.11.2`](https://github.com/withastro/astro/blob/HEAD/packages/integrations/markdoc/CHANGELOG.md#0112) [Compare Source](https://github.com/withastro/astro/compare/@astrojs/markdoc@0.11.1...@astrojs/markdoc@0.11.2) ##### Patch Changes - [#&#8203;11450](https://github.com/withastro/astro/pull/11450) [`eb303e1`](https://github.com/withastro/astro/commit/eb303e1ad5dade7787c0d9bbb520c21292cf3950) Thanks [@&#8203;schpet](https://github.com/schpet)! - Adds support for markdown-it's typographer option ### [`v0.11.1`](https://github.com/withastro/astro/blob/HEAD/packages/integrations/markdoc/CHANGELOG.md#0111) [Compare Source](https://github.com/withastro/astro/compare/@astrojs/markdoc@0.11.0...@astrojs/markdoc@0.11.1) ##### Patch Changes - Updated dependencies \[[`b6afe6a`](https://github.com/withastro/astro/commit/b6afe6a782f68f4a279463a144baaf99cb96b6dc), [`41064ce`](https://github.com/withastro/astro/commit/41064cee78c1cccd428f710a24c483aeb275fd95)]: - [@&#8203;astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)[@&#8203;5](https://github.com/5).1.1 - [@&#8203;astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)[@&#8203;0](https://github.com/0).4.1 </details> <details> <summary>withastro/astro (@&#8203;astrojs/tailwind)</summary> ### [`v5.1.1`](https://github.com/withastro/astro/blob/HEAD/packages/integrations/tailwind/CHANGELOG.md#511) [Compare Source](https://github.com/withastro/astro/compare/@astrojs/tailwind@5.1.0...@astrojs/tailwind@5.1.1) ##### Patch Changes - [#&#8203;12018](https://github.com/withastro/astro/pull/12018) [`dcd1158`](https://github.com/withastro/astro/commit/dcd115892a23b17309347c13ce4d82af73d204b2) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Make [@&#8203;astrojs/tailwind](https://github.com/astrojs/tailwind) compat with Astro 5 </details> <details> <summary>withastro/astro (astro)</summary> ### [`v4.15.8`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4158) [Compare Source](https://github.com/withastro/astro/compare/astro@4.15.7...astro@4.15.8) ##### Patch Changes - [#&#8203;12014](https://github.com/withastro/astro/pull/12014) [`53cb41e`](https://github.com/withastro/astro/commit/53cb41e30ea5768bf33d9f6be608fb57d31b7b9e) Thanks [@&#8203;ascorbic](https://github.com/ascorbic)! - Fixes an issue where component styles were not correctly included in rendered MDX - [#&#8203;12031](https://github.com/withastro/astro/pull/12031) [`8c0cae6`](https://github.com/withastro/astro/commit/8c0cae6d1bd70b332286d83d0f01cfce5272fbbe) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixes a bug where the rewrite via `next(/*..*/)` inside a middleware didn't compute the new `APIContext.params` - [#&#8203;12026](https://github.com/withastro/astro/pull/12026) [`40e7a1b`](https://github.com/withastro/astro/commit/40e7a1b05d9e5ea3fcda176c9663bbcff86edb63) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Initializes the Markdown processor only when there's `.md` files - [#&#8203;12028](https://github.com/withastro/astro/pull/12028) [`d3bd673`](https://github.com/withastro/astro/commit/d3bd673392e63720e241d6a002a131a3564c169c) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Handles route collision detection only if it matches `getStaticPaths` - [#&#8203;12027](https://github.com/withastro/astro/pull/12027) [`dd3b753`](https://github.com/withastro/astro/commit/dd3b753aba6400558671d85214e27b8e4fb1654b) Thanks [@&#8203;fviolette](https://github.com/fviolette)! - Add `selected` to the list of boolean attributes - [#&#8203;12001](https://github.com/withastro/astro/pull/12001) [`9be3e1b`](https://github.com/withastro/astro/commit/9be3e1bba789af96d8b21d9c8eca8542cfb4ff77) Thanks [@&#8203;uwej711](https://github.com/uwej711)! - Remove dependency on path-to-regexp ### [`v4.15.7`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4157) [Compare Source](https://github.com/withastro/astro/compare/astro@4.15.6...astro@4.15.7) ##### Patch Changes - [#&#8203;12000](https://github.com/withastro/astro/pull/12000) [`a2f8c5d`](https://github.com/withastro/astro/commit/a2f8c5d85ff15803f5cedf9148cd70ffc138ddef) Thanks [@&#8203;ArmandPhilippot](https://github.com/ArmandPhilippot)! - Fixes an outdated link used to document Content Layer API - [#&#8203;11915](https://github.com/withastro/astro/pull/11915) [`0b59fe7`](https://github.com/withastro/astro/commit/0b59fe74d5922c572007572ddca8d11482e2fb5c) Thanks [@&#8203;azhirov](https://github.com/azhirov)! - Fix: prevent island from re-rendering when using transition:persist ([#&#8203;11854](https://github.com/withastro/astro/issues/11854)) ### [`v4.15.6`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4156) [Compare Source](https://github.com/withastro/astro/compare/astro@4.15.5...astro@4.15.6) ##### Patch Changes - [#&#8203;11993](https://github.com/withastro/astro/pull/11993) [`ffba5d7`](https://github.com/withastro/astro/commit/ffba5d716edcdfc42899afaa4188b7a4cd0c91eb) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Fix getStaticPaths regression This reverts a previous change meant to remove a dependency, to fix a regression with multiple nested spread routes. - [#&#8203;11964](https://github.com/withastro/astro/pull/11964) [`06eff60`](https://github.com/withastro/astro/commit/06eff60cabb55d91fe4075421b1693b1ab33225c) Thanks [@&#8203;TheOtterlord](https://github.com/TheOtterlord)! - Add wayland (wl-copy) support to `astro info` ### [`v4.15.5`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4155) [Compare Source](https://github.com/withastro/astro/compare/astro@4.15.4...astro@4.15.5) ##### Patch Changes - [#&#8203;11939](https://github.com/withastro/astro/pull/11939) [`7b09c62`](https://github.com/withastro/astro/commit/7b09c62b565cd7b50c35fb68d390729f936a43fb) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Adds support for Zod discriminated unions on Action form inputs. This allows forms with different inputs to be submitted to the same action, using a given input to decide which object should be used for validation. This example accepts either a `create` or `update` form submission, and uses the `type` field to determine which object to validate against. ```ts import { defineAction } from 'astro:actions'; import { z } from 'astro:schema'; export const server = { changeUser: defineAction({ accept: 'form', input: z.discriminatedUnion('type', [ z.object({ type: z.literal('create'), name: z.string(), email: z.string().email(), }), z.object({ type: z.literal('update'), id: z.number(), name: z.string(), email: z.string().email(), }), ]), async handler(input) { if (input.type === 'create') { // input is { type: 'create', name: string, email: string } } else { // input is { type: 'update', id: number, name: string, email: string } } }, }), }; ``` The corresponding `create` and `update` forms may look like this: ### [`v4.15.4`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4154) [Compare Source](https://github.com/withastro/astro/compare/astro@4.15.3...astro@4.15.4) ##### Patch Changes - [#&#8203;11879](https://github.com/withastro/astro/pull/11879) [`bd1d4aa`](https://github.com/withastro/astro/commit/bd1d4aaf8262187b4f132d7fe0365902131ddf1a) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Allow passing a cryptography key via ASTRO_KEY For Server islands Astro creates a cryptography key in order to hash props for the islands, preventing accidental leakage of secrets. If you deploy to an environment with rolling updates then there could be multiple instances of your app with different keys, causing potential key mismatches. To fix this you can now pass the `ASTRO_KEY` environment variable to your build in order to reuse the same key. To generate a key use: astro create-key This will print out an environment variable to set like: ASTRO_KEY=PIAuyPNn2aKU/bviapEuc/nVzdzZPizKNo3OqF/5PmQ= - [#&#8203;11935](https://github.com/withastro/astro/pull/11935) [`c58193a`](https://github.com/withastro/astro/commit/c58193a691775af5c568e461c63040a42e2471f7) Thanks [@&#8203;Princesseuh](https://github.com/Princesseuh)! - Fixes `astro add` not using the proper export point when adding certain adapters ### [`v4.15.3`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4153) [Compare Source](https://github.com/withastro/astro/compare/astro@4.15.2...astro@4.15.3) ##### Patch Changes - [#&#8203;11902](https://github.com/withastro/astro/pull/11902) [`d63bc50`](https://github.com/withastro/astro/commit/d63bc50d9940c1107e0fee7687e5c332549a0eff) Thanks [@&#8203;ascorbic](https://github.com/ascorbic)! - Fixes case where content layer did not update during clean dev builds on Linux and Windows - [#&#8203;11886](https://github.com/withastro/astro/pull/11886) [`7ff7134`](https://github.com/withastro/astro/commit/7ff7134b8038a3b798293b2218bbf6dd02d2ac32) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Fixes a missing error message when actions throws during `astro sync` - [#&#8203;11904](https://github.com/withastro/astro/pull/11904) [`ca54e3f`](https://github.com/withastro/astro/commit/ca54e3f819fad009ac3c3c8b57a26014a2652a73) Thanks [@&#8203;wtchnm](https://github.com/wtchnm)! - perf(assets): avoid downloading original image when using cache ### [`v4.15.2`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4152) [Compare Source](https://github.com/withastro/astro/compare/astro@4.15.1...astro@4.15.2) ##### Patch Changes - [#&#8203;11870](https://github.com/withastro/astro/pull/11870) [`8e5257a`](https://github.com/withastro/astro/commit/8e5257addaeff809ed6f0c47ac0ed4ded755320e) Thanks [@&#8203;ArmandPhilippot](https://github.com/ArmandPhilippot)! - Fixes typo in documenting the `fallbackType` property in i18n routing - [#&#8203;11884](https://github.com/withastro/astro/pull/11884) [`e450704`](https://github.com/withastro/astro/commit/e45070459f18976400fc8939812e172781eba351) Thanks [@&#8203;ascorbic](https://github.com/ascorbic)! - Correctly handles content layer data where the transformed value does not match the input schema - [#&#8203;11900](https://github.com/withastro/astro/pull/11900) [`80b4a18`](https://github.com/withastro/astro/commit/80b4a181a077266c44065a737e61cc7cff6bc6d7) Thanks [@&#8203;delucis](https://github.com/delucis)! - Fixes the user-facing type of the new `i18n.routing.fallbackType` option to be optional ### [`v4.15.1`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4151) [Compare Source](https://github.com/withastro/astro/compare/astro@4.15.0...astro@4.15.1) ##### Patch Changes - [#&#8203;11872](https://github.com/withastro/astro/pull/11872) [`9327d56`](https://github.com/withastro/astro/commit/9327d56755404b481993b058bbfc4aa7880b2304) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Fixes `astro add` importing adapters and integrations - [#&#8203;11767](https://github.com/withastro/astro/pull/11767) [`d1bd1a1`](https://github.com/withastro/astro/commit/d1bd1a11f7aca4d2141d1c4665f2db0440393d03) Thanks [@&#8203;ascorbic](https://github.com/ascorbic)! - Refactors content layer sync to use a queue ### [`v4.15.0`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4150) [Compare Source](https://github.com/withastro/astro/compare/astro@4.14.6...astro@4.15.0) ##### Minor Changes - [#&#8203;11729](https://github.com/withastro/astro/pull/11729) [`1c54e63`](https://github.com/withastro/astro/commit/1c54e633274ad47f6c83c9a16f375f0caa983fbe) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Adds a new variant `sync` for the `astro:config:setup` hook's `command` property. This value is set when calling the command `astro sync`. If your integration previously relied on knowing how many variants existed for the `command` property, you must update your logic to account for this new option. - [#&#8203;11743](https://github.com/withastro/astro/pull/11743) [`cce0894`](https://github.com/withastro/astro/commit/cce08945340312776a0480fc9ffe43929257639a) Thanks [@&#8203;ph1p](https://github.com/ph1p)! - Adds a new, optional property `timeout` for the `client:idle` directive. This value allows you to specify a maximum time to wait, in milliseconds, before hydrating a UI framework component, even if the page is not yet done with its initial load. This means you can delay hydration for lower-priority UI elements with more control to ensure your element is interactive within a specified time frame. ```astro <ShowHideButton client:idle={{ timeout: 500 }} /> ``` - [#&#8203;11677](https://github.com/withastro/astro/pull/11677) [`cb356a5`](https://github.com/withastro/astro/commit/cb356a5db6b1ec2799790a603f931a961883ab31) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Adds a new option `fallbackType` to `i18n.routing` configuration that allows you to control how fallback pages are handled. When `i18n.fallback` is configured, this new routing option controls whether to [redirect](https://docs.astro.build/en/guides/routing/#redirects) to the fallback page, or to [rewrite](https://docs.astro.build/en/guides/routing/#rewrites) the fallback page's content in place. The `"redirect"` option is the default value and matches the current behavior of the existing fallback system. The option `"rewrite"` uses the new [rewriting system](https://docs.astro.build/en/guides/routing/#rewrites) to create fallback pages that render content on the original, requested URL without a browser refresh. For example, the following configuration will generate a page `/fr/index.html` that will contain the same HTML rendered by the page `/en/index.html` when `src/pages/fr/index.astro` does not exist. ```js // astro.config.mjs export default defineConfig({ i18n: { locals: ['en', 'fr'], defaultLocale: 'en', routing: { prefixDefaultLocale: true, fallbackType: 'rewrite', }, fallback: { fr: 'en', }, }, }); ``` - [#&#8203;11708](https://github.com/withastro/astro/pull/11708) [`62b0d20`](https://github.com/withastro/astro/commit/62b0d20b974dc932769221d210b751627fb4bbc6) Thanks [@&#8203;martrapp](https://github.com/martrapp)! - Adds a new object `swapFunctions` to expose the necessary utility functions on `astro:transitions/client` that allow you to build custom swap functions to be used with view transitions. The example below uses these functions to replace Astro's built-in default `swap` function with one that only swaps the `<main>` part of the page: ```html <script> import { swapFunctions } from 'astro:transitions/client'; document.addEventListener('astro:before-swap', (e) => { e.swap = () => swapMainOnly(e.newDocument) }); function swapMainOnly(doc: Document) { swapFunctions.deselectScripts(doc); swapFunctions.swapRootAttributes(doc); swapFunctions.swapHeadElements(doc); const restoreFocusFunction = swapFunctions.saveFocus(); const newMain = doc.querySelector('main'); const oldMain = document.querySelector('main'); if (newMain && oldMain) { swapFunctions.swapBodyElement(newMain, oldMain); } else { swapFunctions.swapBodyElement(doc.body, document.body); } restoreFocusFunction(); }; </script> ``` See the [view transitions guide](https://docs.astro.build/en/guides/view-transitions/#astrobefore-swap) for more information about hooking into the `astro:before-swap` lifecycle event and adding a custom swap implementation. - [#&#8203;11843](https://github.com/withastro/astro/pull/11843) [`5b4070e`](https://github.com/withastro/astro/commit/5b4070efef877a77247bb05a4806b75f22e557c8) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Exposes `z` from the new `astro:schema` module. This is the new recommended import source for all Zod utilities when using Astro Actions. ### [`v4.14.6`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4146) [Compare Source](https://github.com/withastro/astro/compare/astro@4.14.5...astro@4.14.6) ##### Patch Changes - [#&#8203;11847](https://github.com/withastro/astro/pull/11847) [`45b599c`](https://github.com/withastro/astro/commit/45b599c4d40ded6a3e03881181b441ae494cbfcf) Thanks [@&#8203;ascorbic](https://github.com/ascorbic)! - Fixes a case where Vite would be imported by the SSR runtime, causing bundling errors and bloat. - [#&#8203;11822](https://github.com/withastro/astro/pull/11822) [`6fcaab8`](https://github.com/withastro/astro/commit/6fcaab84de1044ff4d186b2dfa5831964460062d) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Marks internal `vite-plugin-fileurl` plugin with `enforce: 'pre'` - [#&#8203;11713](https://github.com/withastro/astro/pull/11713) [`497324c`](https://github.com/withastro/astro/commit/497324c4e87538dc1dc13aea3ced9bd3642d9ba6) Thanks [@&#8203;voidfill](https://github.com/voidfill)! - Prevents prefetching of the same urls with different hashes. - [#&#8203;11814](https://github.com/withastro/astro/pull/11814) [`2bb72c6`](https://github.com/withastro/astro/commit/2bb72c63969f8f21dd279fa927c32f192ff79a3f) Thanks [@&#8203;eduardocereto](https://github.com/eduardocereto)! - Updates the documentation for experimental Content Layer API with a corrected code example - [#&#8203;11842](https://github.com/withastro/astro/pull/11842) [`1ffaae0`](https://github.com/withastro/astro/commit/1ffaae04cf790390f730bf900b9722b99642adc1) Thanks [@&#8203;stephan281094](https://github.com/stephan281094)! - Fixes a typo in the `MissingImageDimension` error message - [#&#8203;11828](https://github.com/withastro/astro/pull/11828) [`20d47aa`](https://github.com/withastro/astro/commit/20d47aa85a3a0d7ac3390f749715d92de830cf3e) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Improves error message when invalid data is returned by an Action. ### [`v4.14.5`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4145) [Compare Source](https://github.com/withastro/astro/compare/astro@4.14.4...astro@4.14.5) ##### Patch Changes - [#&#8203;11809](https://github.com/withastro/astro/pull/11809) [`62e97a2`](https://github.com/withastro/astro/commit/62e97a20f72bacb017c633ddcb776abc89167660) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Fixes usage of `.transform()`, `.refine()`, `.passthrough()`, and other effects on Action form inputs. - [#&#8203;11812](https://github.com/withastro/astro/pull/11812) [`260c4be`](https://github.com/withastro/astro/commit/260c4be050f91353bc5ba6af073e7bc17429d552) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Exposes `ActionAPIContext` type from the `astro:actions` module. - [#&#8203;11813](https://github.com/withastro/astro/pull/11813) [`3f7630a`](https://github.com/withastro/astro/commit/3f7630afd697809b1d4fbac6edd18153983c70ac) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Fixes unexpected `undefined` value when calling an action from the client without a return value. ### [`v4.14.4`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4144) [Compare Source](https://github.com/withastro/astro/compare/astro@4.14.3...astro@4.14.4) ##### Patch Changes - [#&#8203;11794](https://github.com/withastro/astro/pull/11794) [`3691a62`](https://github.com/withastro/astro/commit/3691a626fb67d617e5f8bd057443cd2ff6caa054) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Fixes unexpected warning log when using Actions on "hybrid" rendered projects. - [#&#8203;11801](https://github.com/withastro/astro/pull/11801) [`9f943c1`](https://github.com/withastro/astro/commit/9f943c1344671b569a0d1ddba683b3cca0068adc) Thanks [@&#8203;delucis](https://github.com/delucis)! - Fixes a bug where the `filePath` property was not available on content collection entries when using the content layer `file()` loader with a JSON file that contained an object instead of an array. This was breaking use of the `image()` schema utility among other things. ### [`v4.14.3`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4143) [Compare Source](https://github.com/withastro/astro/compare/astro@4.14.2...astro@4.14.3) ##### Patch Changes - [#&#8203;11780](https://github.com/withastro/astro/pull/11780) [`c6622ad`](https://github.com/withastro/astro/commit/c6622adaeb405e961b12c91f0e5d02c7333d01cf) Thanks [@&#8203;Princesseuh](https://github.com/Princesseuh)! - Deprecates the Squoosh image service, to be removed in Astro 5.0. We recommend migrating to the default Sharp service. - [#&#8203;11790](https://github.com/withastro/astro/pull/11790) [`41c3fcb`](https://github.com/withastro/astro/commit/41c3fcb6189709450a67ea8f726071d5f3cdc80e) Thanks [@&#8203;sarah11918](https://github.com/sarah11918)! - Updates the documentation for experimental `astro:env` with a corrected link to the RFC proposal - [#&#8203;11773](https://github.com/withastro/astro/pull/11773) [`86a3391`](https://github.com/withastro/astro/commit/86a33915ff41b23ff6b35bcfb1805fefc0760ca7) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Changes messages logged when using unsupported, deprecated, or experimental adapter features for clarity - [#&#8203;11745](https://github.com/withastro/astro/pull/11745) [`89bab1e`](https://github.com/withastro/astro/commit/89bab1e70786123fbe933a9d7a1b80c9334dcc5f) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Prints prerender dynamic value usage warning only if it's used - [#&#8203;11774](https://github.com/withastro/astro/pull/11774) [`c6400ab`](https://github.com/withastro/astro/commit/c6400ab99c5e5f4477bc6ef7e801b7869b0aa9ab) Thanks [@&#8203;florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes the path returned by `injectTypes` - [#&#8203;11730](https://github.com/withastro/astro/pull/11730) [`2df49a6`](https://github.com/withastro/astro/commit/2df49a6fb4f6d92fe45f7429430abe63defeacd6) Thanks [@&#8203;florian-lefebvre](https://github.com/florian-lefebvre)! - Simplifies path operations of `astro sync` - [#&#8203;11771](https://github.com/withastro/astro/pull/11771) [`49650a4`](https://github.com/withastro/astro/commit/49650a45550af46c70c6cf3f848b7b529103a649) Thanks [@&#8203;florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes an error thrown by `astro sync` when an `astro:env` virtual module is imported inside the Content Collections config - [#&#8203;11744](https://github.com/withastro/astro/pull/11744) [`b677429`](https://github.com/withastro/astro/commit/b67742961a384c10e5cd04cf5b02d0f014ea7362) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Disables the WebSocket server when creating a Vite server for loading config files ### [`v4.14.2`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4142) [Compare Source](https://github.com/withastro/astro/compare/astro@4.14.1...astro@4.14.2) ##### Patch Changes - [#&#8203;11733](https://github.com/withastro/astro/pull/11733) [`391324d`](https://github.com/withastro/astro/commit/391324df969db71d1c7ca25c2ed14c9eb6eea5ee) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Reverts back to `yargs-parser` package for CLI argument parsing ### [`v4.14.1`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4141) [Compare Source](https://github.com/withastro/astro/compare/astro@4.14.0...astro@4.14.1) ##### Patch Changes - [#&#8203;11725](https://github.com/withastro/astro/pull/11725) [`6c1560f`](https://github.com/withastro/astro/commit/6c1560fb0d19ce659bc9f9090f8050254d5c03f3) Thanks [@&#8203;ascorbic](https://github.com/ascorbic)! - Prevents content layer importing node builtins in runtime - [#&#8203;11692](https://github.com/withastro/astro/pull/11692) [`35af73a`](https://github.com/withastro/astro/commit/35af73aace97a7cc898b9aa5040db8bc2ac62687) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Prevent errant HTML from crashing server islands When an HTML minifier strips away the server island comment, the script can't correctly know where the end of the fallback content is. This makes it so that it simply doesn't remove any DOM in that scenario. This means the fallback isn't removed, but it also doesn't crash the browser. - [#&#8203;11727](https://github.com/withastro/astro/pull/11727) [`3c2f93b`](https://github.com/withastro/astro/commit/3c2f93b66c6b8e9d2ab58e2cbe941c14ffab89b5) Thanks [@&#8203;florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a type issue when using the Content Layer in dev ### [`v4.14.0`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4140) [Compare Source](https://github.com/withastro/astro/compare/astro@4.13.4...astro@4.14.0) ##### Minor Changes - [#&#8203;11657](https://github.com/withastro/astro/pull/11657) [`a23c69d`](https://github.com/withastro/astro/commit/a23c69d0d0bed229bee52a32e61f135f9ebf9122) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Deprecates the option for route-generating files to export a dynamic value for `prerender`. Only static values are now supported (e.g. `export const prerender = true` or `= false`). This allows for better treeshaking and bundling configuration in the future. Adds a new [`"astro:route:setup"` hook](https://docs.astro.build/en/reference/integrations-reference/#astroroutesetup) to the Integrations API to allow you to dynamically set options for a route at build or request time through an integration, such as enabling [on-demand server rendering](https://docs.astro.build/en/guides/server-side-rendering/#opting-in-to-pre-rendering-in-server-mode). To migrate from a dynamic export to the new hook, update or remove any dynamic `prerender` exports from individual routing files: ```diff // src/pages/blog/[slug].astro - export const prerender = import.meta.env.PRERENDER ``` Instead, create an integration with the `"astro:route:setup"` hook and update the route's `prerender` option: ```js // astro.config.mjs import { defineConfig } from 'astro/config'; import { loadEnv } from 'vite'; export default defineConfig({ integrations: [setPrerender()], }); function setPrerender() { const { PRERENDER } = loadEnv(process.env.NODE_ENV, process.cwd(), ''); return { name: 'set-prerender', hooks: { 'astro:route:setup': ({ route }) => { if (route.component.endsWith('/blog/[slug].astro')) { route.prerender = PRERENDER; } }, }, }; } ``` - [#&#8203;11360](https://github.com/withastro/astro/pull/11360) [`a79a8b0`](https://github.com/withastro/astro/commit/a79a8b0230b06ed32ce1802f2a5f84a6cf92dbe7) Thanks [@&#8203;ascorbic](https://github.com/ascorbic)! - Adds a new [`injectTypes()` utility](https://docs.astro.build/en/reference/integrations-reference/#injecttypes-options) to the Integration API and refactors how type generation works Use `injectTypes()` in the `astro:config:done` hook to inject types into your user's project by adding a new a `*.d.ts` file. The `filename` property will be used to generate a file at `/.astro/integrations/<normalized_integration_name>/<normalized_filename>.d.ts` and must end with `".d.ts"`. The `content` property will create the body of the file, and must be valid TypeScript. Additionally, `injectTypes()` returns a URL to the normalized path so you can overwrite its content later on, or manipulate it in any way you want. ```js // my-integration/index.js export default { name: 'my-integration', 'astro:config:done': ({ injectTypes }) => { injectTypes({ filename: 'types.d.ts', content: "declare module 'virtual:my-integration' {}", }); }, }; ``` Codegen has been refactored. Although `src/env.d.ts` will continue to work as is, we recommend you update it: ```diff - /// <reference types="astro/client" /> + /// <reference path="../.astro/types.d.ts" /> - /// <reference path="../.astro/env.d.ts" /> - /// <reference path="../.astro/actions.d.ts" /> ``` - [#&#8203;11605](https://github.com/withastro/astro/pull/11605) [`d3d99fb`](https://github.com/withastro/astro/commit/d3d99fba269da9e812e748539a11dfed785ef8a4) Thanks [@&#8203;jcayzac](https://github.com/jcayzac)! - Adds a new property `meta` to Astro's [built-in `<Code />` component](https://docs.astro.build/en/reference/api-reference/#code-). This allows you to provide a value for [Shiki's `meta` attribute](https://shiki.style/guide/transformers#meta) to pass options to transformers. The following example passes an option to highlight lines 1 and 3 to Shiki's `tranformerMetaHighlight`: ### [`v4.13.4`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4134) [Compare Source](https://github.com/withastro/astro/compare/astro@4.13.3...astro@4.13.4) ##### Patch Changes - [#&#8203;11678](https://github.com/withastro/astro/pull/11678) [`34da907`](https://github.com/withastro/astro/commit/34da907f3b4fb411024e6d28fdb291fa78116950) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixes a case where omitting a semicolon and line ending with carriage return - CRLF - in the `prerender` option could throw an error. - [#&#8203;11535](https://github.com/withastro/astro/pull/11535) [`932bd2e`](https://github.com/withastro/astro/commit/932bd2eb07f1d7cb2c91e7e7d31fe84c919e302b) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Encrypt server island props Server island props are now encrypted with a key generated at build-time. This is intended to prevent accidentally leaking secrets caused by exposing secrets through prop-passing. This is not intended to allow a server island to be trusted to skip authentication, or to protect against any other vulnerabilities other than secret leakage. See the RFC for an explanation: https://github.com/withastro/roadmap/blob/server-islands/proposals/server-islands.md#props-serialization - [#&#8203;11655](https://github.com/withastro/astro/pull/11655) [`dc0a297`](https://github.com/withastro/astro/commit/dc0a297e2a4bea3db8310cc98c51b2f94ede5fde) Thanks [@&#8203;billy-le](https://github.com/billy-le)! - Fixes Astro Actions `input` validation when using `default` values with a form input. - [#&#8203;11689](https://github.com/withastro/astro/pull/11689) [`c7bda4c`](https://github.com/withastro/astro/commit/c7bda4cd672864babc3cebd19a2dd2e1af85c087) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixes an issue in the Astro actions, where the size of the generated cookie was exceeding the size permitted by the `Set-Cookie` header. ### [`v4.13.3`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4133) [Compare Source](https://github.com/withastro/astro/compare/astro@4.13.2...astro@4.13.3) ##### Patch Changes - [#&#8203;11653](https://github.com/withastro/astro/pull/11653) [`32be549`](https://github.com/withastro/astro/commit/32be5494f6d33dbe32208704405162c95a64f0bc) Thanks [@&#8203;florian-lefebvre](https://github.com/florian-lefebvre)! - Updates `astro:env` docs to reflect current developments and usage guidance - [#&#8203;11658](https://github.com/withastro/astro/pull/11658) [`13b912a`](https://github.com/withastro/astro/commit/13b912a8702afb96e2d0bc20dcc1b4135ae58147) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Fixes `orThrow()` type when calling an Action without an `input` validator. - [#&#8203;11603](https://github.com/withastro/astro/pull/11603) [`f31d466`](https://github.com/withastro/astro/commit/f31d4665c1cbb0918b9e00ba1431fb6f264025f7) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Improves user experience when render an Action result from a form POST request: - Removes "Confirm post resubmission?" dialog when refreshing a result. - Removes the `?_astroAction=NAME` flag when a result is rendered. Also improves the DX of directing to a new route on success. Actions will now redirect to the route specified in your `action` string on success, and redirect back to the previous page on error. This follows the routing convention of established backend frameworks like Laravel. For example, say you want to redirect to a `/success` route when `actions.signup` succeeds. You can add `/success` to your `action` string like so: ```astro <form method="POST" action={'/success' + actions.signup}></form> ``` - On success, Astro will redirect to `/success`. - On error, Astro will redirect back to the current page. You can retrieve the action result from either page using the `Astro.getActionResult()` function. ##### Note on security This uses a temporary cookie to forward the action result to the next page. The cookie will be deleted when that page is rendered. ⚠ **The action result is not encrypted.** In general, we recommend returning minimal data from an action handler to a) avoid leaking sensitive information, and b) avoid unexpected render issues once the temporary cookie is deleted. For example, a `login` function may return a user's session id to retrieve from your Astro frontmatter, rather than the entire user object. ### [`v4.13.2`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4132) [Compare Source](https://github.com/withastro/astro/compare/astro@4.13.1...astro@4.13.2) ##### Patch Changes - [#&#8203;11648](https://github.com/withastro/astro/pull/11648) [`589d351`](https://github.com/withastro/astro/commit/589d35158da1a2136387d0ad76609f5c8535c03a) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Fixes unexpected error when refreshing a POST request from a form using Actions. - [#&#8203;11600](https://github.com/withastro/astro/pull/11600) [`09ec2ca`](https://github.com/withastro/astro/commit/09ec2cadce01a9a1f9c54ac433f137348907aa56) Thanks [@&#8203;ArmandPhilippot](https://github.com/ArmandPhilippot)! - Deprecates `getEntryBySlug` and `getDataEntryById` functions exported by `astro:content` in favor of `getEntry`. - [#&#8203;11593](https://github.com/withastro/astro/pull/11593) [`81d7150`](https://github.com/withastro/astro/commit/81d7150e02472430eab555dfc4f053738bf99bb6) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Adds support for `Date()`, `Map()`, and `Set()` from action results. See [devalue](https://github.com/Rich-Harris/devalue) for a complete list of supported values. Also fixes serialization exceptions when deploying Actions with edge middleware on Netlify and Vercel. - [#&#8203;11617](https://github.com/withastro/astro/pull/11617) [`196092a`](https://github.com/withastro/astro/commit/196092ae69eb1249206846ddfc162049b03f42b4) Thanks [@&#8203;abubakriz](https://github.com/abubakriz)! - Fix toolbar audit incorrectly flagging images as above the fold. - [#&#8203;11634](https://github.com/withastro/astro/pull/11634) [`2716f52`](https://github.com/withastro/astro/commit/2716f52aae7194439ebb2336849ddd9e8226658a) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Fixes internal server error when calling an Astro Action without arguments on Vercel. - [#&#8203;11628](https://github.com/withastro/astro/pull/11628) [`9aaf58c`](https://github.com/withastro/astro/commit/9aaf58c1339b54f2c1394e718a0f6f609f0b6342) Thanks [@&#8203;madbook](https://github.com/madbook)! - Ensures consistent CSS chunk hashes across different environments ### [`v4.13.1`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4131) [Compare Source](https://github.com/withastro/astro/compare/astro@4.13.0...astro@4.13.1) ##### Patch Changes - [#&#8203;11584](https://github.com/withastro/astro/pull/11584) [`a65ffe3`](https://github.com/withastro/astro/commit/a65ffe314b112213421def26c7cc5b7e7b93558c) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Removes async local storage dependency from Astro Actions. This allows Actions to run in Cloudflare and Stackblitz without opt-in flags or other configuration. This also introduces a new convention for calling actions from server code. Instead of calling actions directly, you must wrap function calls with the new `Astro.callAction()` utility. > `callAction()` is meant to *trigger* an action from server code. `getActionResult()` usage with form submissions remains unchanged. ### [`v4.13.0`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4130) [Compare Source](https://github.com/withastro/astro/compare/astro@4.12.3...astro@4.13.0) ##### Minor Changes - [#&#8203;11507](https://github.com/withastro/astro/pull/11507) [`a62345f`](https://github.com/withastro/astro/commit/a62345fd182ae4886d586c8406ed8f3e5f942730) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Adds color-coding to the console output during the build to highlight slow pages. Pages that take more than 500 milliseconds to render will have their build time logged in red. This change can help you discover pages of your site that are not performant and may need attention. - [#&#8203;11379](https://github.com/withastro/astro/pull/11379) [`e5e2d3e`](https://github.com/withastro/astro/commit/e5e2d3ed3076f10b4645f011b13888d5fa16e92e) Thanks [@&#8203;alexanderniebuhr](https://github.com/alexanderniebuhr)! - The `experimental.contentCollectionJsonSchema` feature introduced behind a flag in [v4.5.0](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md#450) is no longer experimental and is available for general use. If you are working with collections of type `data`, Astro will now auto-generate JSON schema files for your editor to get IntelliSense and type-checking. A separate file will be created for each data collection in your project based on your collections defined in `src/content/config.ts` using a library called [`zod-to-json-schema`](https://github.com/StefanTerdell/zod-to-json-schema). This feature requires you to manually set your schema's file path as the value for `$schema` in each data entry file of the collection: ```json title="src/content/authors/armand.json" ins={2} { "$schema": "../../../.astro/collections/authors.schema.json", "name": "Armand", "skills": ["Astro", "Starlight"] } ``` Alternatively, you can set this value in your editor settings. For example, to set this value in [VSCode's `json.schemas` setting](https://code.visualstudio.com/docs/languages/json#\_json-schemas-and-settings), provide the path of files to match and the location of your JSON schema: ```json { "json.schemas": [ { "fileMatch": ["/src/content/authors/**"], "url": "./.astro/collections/authors.schema.json" } ] } ``` If you were previously using this feature, please remove the experimental flag from your Astro config: ```diff import { defineConfig } from 'astro' export default defineConfig({ - experimental: { - contentCollectionJsonSchema: true - } }) ``` If you have been waiting for stabilization before using JSON Schema generation for content collections, you can now do so. Please see [the content collections guide](https://docs.astro.build/en/guides/content-collections/#enabling-json-schema-generation) for more about this feature. - [#&#8203;11542](https://github.com/withastro/astro/pull/11542) [`45ad326`](https://github.com/withastro/astro/commit/45ad326932971b44630a32d9092c9505f24f42f8) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - The `experimental.rewriting` feature introduced behind a flag in [v4.8.0](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md#480) is no longer experimental and is available for general use. `Astro.rewrite()` and `context.rewrite()` allow you to render a different page without changing the URL in the browser. Unlike using a redirect, your visitor is kept on the original page they visited. Rewrites can be useful for showing the same content at multiple paths (e.g. /products/shoes/men/ and /products/men/shoes/) without needing to maintain two identical source files. Rewrites are supported in Astro pages, endpoints, and middleware. Return `Astro.rewrite()` in the frontmatter of a `.astro` page component to display a different page's content, such as fallback localized content: ### [`v4.12.3`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4123) [Compare Source](https://github.com/withastro/astro/compare/astro@4.12.2...astro@4.12.3) ##### Patch Changes - [#&#8203;11509](https://github.com/withastro/astro/pull/11509) [`dfbca06`](https://github.com/withastro/astro/commit/dfbca06dda674c64c7010db2f4de951496a1e631) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Excludes hoisted scripts and styles from Astro components imported with `?url` or `?raw` - [#&#8203;11561](https://github.com/withastro/astro/pull/11561) [`904f1e5`](https://github.com/withastro/astro/commit/904f1e535aeb7a14ba7ce07c3130e25f3e708266) Thanks [@&#8203;ArmandPhilippot](https://github.com/ArmandPhilippot)! - Uses the correct pageSize default in `page.size` JSDoc comment - [#&#8203;11571](https://github.com/withastro/astro/pull/11571) [`1c3265a`](https://github.com/withastro/astro/commit/1c3265a8c9c0b1b1bd597f756b63463146bacc3a) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - **BREAKING CHANGE to the experimental Actions API only.** Install the latest `@astrojs/react` integration as well if you're using React 19 features. Make `.safe()` the default return value for actions. This means `{ data, error }` will be returned when calling an action directly. If you prefer to get the data while allowing errors to throw, chain the `.orThrow()` modifier. ```ts import { actions } from 'astro:actions'; // Before const { data, error } = await actions.like.safe(); // After const { data, error } = await actions.like(); // Before const newLikes = await actions.like(); // After const newLikes = await actions.like.orThrow(); ``` ### [`v4.12.2`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4122) [Compare Source](https://github.com/withastro/astro/compare/astro@4.12.1...astro@4.12.2) ##### Patch Changes - [#&#8203;11505](https://github.com/withastro/astro/pull/11505) [`8ff7658`](https://github.com/withastro/astro/commit/8ff7658001c2c7bedf6adcddf7a9341196f2d376) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Enhances the dev server logging when rewrites occur during the lifecycle or rendering. The dev server will log the status code **before** and **after** a rewrite: ```shell 08:16:48 [404] (rewrite) /foo/about 200ms 08:22:13 [200] (rewrite) /about 23ms ``` - [#&#8203;11506](https://github.com/withastro/astro/pull/11506) [`026e8ba`](https://github.com/withastro/astro/commit/026e8baf3323e99f96530999fd32a0a9b305854d) Thanks [@&#8203;sarah11918](https://github.com/sarah11918)! - Fixes typo in documenting the `slot="fallback"` attribute for Server Islands experimental feature. - [#&#8203;11508](https://github.com/withastro/astro/pull/11508) [`ca335e1`](https://github.com/withastro/astro/commit/ca335e1dc09bc83d3f8f5b9dd54f116bcb4881e4) Thanks [@&#8203;cramforce](https://github.com/cramforce)! - Escapes HTML in serialized props - [#&#8203;11501](https://github.com/withastro/astro/pull/11501) [`4db78ae`](https://github.com/withastro/astro/commit/4db78ae046a39628dfe8d68e776706559d4f8ba7) Thanks [@&#8203;martrapp](https://github.com/martrapp)! - Adds the missing export for accessing the `getFallback()` function of the client site router. ### [`v4.12.1`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4121) [Compare Source](https://github.com/withastro/astro/compare/astro@4.12.0...astro@4.12.1) ##### Patch Changes - [#&#8203;11486](https://github.com/withastro/astro/pull/11486) [`9c0c849`](https://github.com/withastro/astro/commit/9c0c8492d987cd9214ed53e71fb29599c206966a) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Adds a new function called `addClientRenderer` to the Container API. This function should be used when rendering components using the `client:*` directives. The `addClientRenderer` API must be used *after* the use of the `addServerRenderer`: ```js const container = await experimental_AstroContainer.create(); container.addServerRenderer({ renderer }); container.addClientRenderer({ name: '@&#8203;astrojs/react', entrypoint: '@&#8203;astrojs/react/client.js' }); const response = await container.renderToResponse(Component); ``` - [#&#8203;11500](https://github.com/withastro/astro/pull/11500) [`4e142d3`](https://github.com/withastro/astro/commit/4e142d38cbaf0938be7077c88e32b38a6b60eaed) Thanks [@&#8203;Princesseuh](https://github.com/Princesseuh)! - Fixes inferRemoteSize type not working - [#&#8203;11496](https://github.com/withastro/astro/pull/11496) [`53ccd20`](https://github.com/withastro/astro/commit/53ccd206f9bfe5f6a0d888d199776b4043f63f58) Thanks [@&#8203;alfawal](https://github.com/alfawal)! - Hide the dev toolbar on `window.print()` (CTRL + P) ### [`v4.12.0`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4120) [Compare Source](https://github.com/withastro/astro/compare/astro@4.11.6...astro@4.12.0) ##### Minor Changes - [#&#8203;11341](https://github.com/withastro/astro/pull/11341) [`49b5145`](https://github.com/withastro/astro/commit/49b5145158a603b9bb951bf914a6a9780c218704) Thanks [@&#8203;madcampos](https://github.com/madcampos)! - Adds support for [Shiki's `defaultColor` option](https://shiki.style/guide/dual-themes#without-default-color). This option allows you to override the values of a theme's inline style, adding only CSS variables to give you more flexibility in applying multiple color themes. Configure `defaultColor: false` in your Shiki config to apply throughout your site, or pass to Astro's built-in `<Code>` component to style an individual code block. ```js title="astro.config.mjs" import { defineConfig } from 'astro/config'; export default defineConfig({ markdown: { shikiConfig: { themes: { light: 'github-light', dark: 'github-dark', }, defaultColor: false, }, }, }); ``` ### [`v4.11.6`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4116) [Compare Source](https://github.com/withastro/astro/compare/astro@4.11.5...astro@4.11.6) ##### Patch Changes - [#&#8203;11459](https://github.com/withastro/astro/pull/11459) [`bc2e74d`](https://github.com/withastro/astro/commit/bc2e74de384776caa252fd47dbeda895c0488c11) Thanks [@&#8203;mingjunlu](https://github.com/mingjunlu)! - Fixes false positive audit warnings on elements with the role "tabpanel". - [#&#8203;11472](https://github.com/withastro/astro/pull/11472) [`cb4e6d0`](https://github.com/withastro/astro/commit/cb4e6d09deb7507058115a3fd2a567019a501e4d) Thanks [@&#8203;delucis](https://github.com/delucis)! - Avoids targeting all files in the `src/` directory for eager optimization by Vite. After this change, only JSX, Vue, Svelte, and Astro components get scanned for early optimization. - [#&#8203;11387](https://github.com/withastro/astro/pull/11387) [`b498461`](https://github.com/withastro/astro/commit/b498461e277bffb0abe21b59a94b1e56a8c69d47) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Fixes prerendering not removing unused dynamic imported chunks - [#&#8203;11437](https://github.com/withastro/astro/pull/11437) [`6ccb30e`](https://github.com/withastro/astro/commit/6ccb30e610eed34c2cc2c275485a8ac45c9b6b9e) Thanks [@&#8203;NuroDev](https://github.com/NuroDev)! - Fixes a case where Astro's config `experimental.env.schema` keys did not allow numbers. Numbers are still not allowed as the first character to be able to generate valid JavaScript identifiers - [#&#8203;11439](https://github.com/withastro/astro/pull/11439) [`08baf56`](https://github.com/withastro/astro/commit/08baf56f328ce4b6814a7f90089c0b3398d8bbfe) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Expands the `isInputError()` utility from `astro:actions` to accept errors of any type. This should now allow type narrowing from a try / catch block. ```ts // example.ts import { actions, isInputError } from 'astro:actions'; try { await actions.like(new FormData()); } catch (error) { if (isInputError(error)) { console.log(error.fields); } } ``` - [#&#8203;11452](https://github.com/withastro/astro/pull/11452) [`0e66849`](https://github.com/withastro/astro/commit/0e6684983b9b24660a8fef83fe401ec1d567378a) Thanks [@&#8203;FugiTech](https://github.com/FugiTech)! - Fixes an issue where using .nullish() in a formdata Astro action would always parse as a string - [#&#8203;11438](https://github.com/withastro/astro/pull/11438) [`619f07d`](https://github.com/withastro/astro/commit/619f07db701ebab2d2f2598dd2dcf93ba1e5719c) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Exposes utility types from `astro:actions` for the `defineAction` handler (`ActionHandler`) and the `ActionError` code (`ActionErrorCode`). - [#&#8203;11456](https://github.com/withastro/astro/pull/11456) [`17e048d`](https://github.com/withastro/astro/commit/17e048de0e79d76b933d128676be2388954b419e) Thanks [@&#8203;RickyC0626](https://github.com/RickyC0626)! - Fixes `astro dev --open` unexpected behavior that spawns a new tab every time a config file is saved - [#&#8203;11337](https://github.com/withastro/astro/pull/11337) [`0a4b31f`](https://github.com/withastro/astro/commit/0a4b31ffeb41ad1dfb3141384e22787763fcae3d) Thanks [@&#8203;florian-lefebvre](https://github.com/florian-lefebvre)! - Adds a new property `experimental.env.validateSecrets` to allow validating private variables on the server. By default, this is set to `false` and only public variables are checked on start. If enabled, secrets will also be checked on start (dev/build modes). This is useful for example in some CIs to make sure all your secrets are correctly set before deploying. ```js // astro.config.mjs import { defineConfig, envField } from 'astro/config'; export default defineConfig({ experimental: { env: { schema: { // ... }, validateSecrets: true, }, }, }); ``` - [#&#8203;11443](https://github.com/withastro/astro/pull/11443) [`ea4bc04`](https://github.com/withastro/astro/commit/ea4bc04e9489c456e2b4b5dbd67d5e4cf3f89f97) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Expose new `ActionReturnType` utility from `astro:actions`. This infers the return type of an action by passing `typeof actions.name` as a type argument. This example defines a `like` action that returns `likes` as an object: ```ts // actions/index.ts import { defineAction } from 'astro:actions'; export const server = { like: defineAction({ handler: () => { /* ... */ return { likes: 42 }; }, }), }; ``` In your client code, you can infer this handler return value with `ActionReturnType`: ```ts // client.ts import { actions, ActionReturnType } from 'astro:actions'; type LikesResult = ActionReturnType<typeof actions.like>; // -> { likes: number } ``` - [#&#8203;11436](https://github.com/withastro/astro/pull/11436) [`7dca68f`](https://github.com/withastro/astro/commit/7dca68ff2e0f089a3fd090650ee05b1942792fed) Thanks [@&#8203;bholmesdev](https://github.com/bholmesdev)! - Fixes `astro:actions` autocompletion for the `defineAction` `accept` property - [#&#8203;11455](https://github.com/withastro/astro/pull/11455) [`645e128`](https://github.com/withastro/astro/commit/645e128537f1f20da6703afc115d06371d7da5dd) Thanks [@&#8203;florian-lefebvre](https://github.com/florian-lefebvre)! - Improves `astro:env` invalid variables errors ### [`v4.11.5`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4115) [Compare Source](https://github.com/withastro/astro/compare/astro@4.11.4...astro@4.11.5) ##### Patch Changes - [#&#8203;11408](https://github.com/withastro/astro/pull/11408) [`b9e906f`](https://github.com/withastro/astro/commit/b9e906f8e75444739aa259b62489d9f5749260b9) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Revert change to how boolean attributes work ### [`v4.11.4`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4114) [Compare Source](https://github.com/withastro/astro/compare/astro@4.11.3...astro@4.11.4) ##### Patch Changes - [#&#8203;11362](https://github.com/withastro/astro/pull/11362) [`93993b7`](https://github.com/withastro/astro/commit/93993b77cf4915b4c0d245df9ecbf2265f5893e7) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixes an issue where creating manually the i18n middleware could break the logic of the functions of the virtual module `astro:i18n` - [#&#8203;11349](https://github.com/withastro/astro/pull/11349) [`98d9ce4`](https://github.com/withastro/astro/commit/98d9ce41f20c8bf024c937e8bde80d3c3dbbed99) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixes an issue where Astro didn't throw an error when `Astro.rewrite` was used without providing the experimental flag - [#&#8203;11352](https://github.com/withastro/astro/pull/11352) [`a55ee02`](https://github.com/withastro/astro/commit/a55ee0268e1ca22597e9b5e6d1f24b4f28ad978b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixes an issue where the rewrites didn't update the status code when using manual i18n routing. - [#&#8203;11388](https://github.com/withastro/astro/pull/11388) [`3a223b4`](https://github.com/withastro/astro/commit/3a223b4811708cc93ebb27706118c1723e1fc013) Thanks [@&#8203;mingjunlu](https://github.com/mingjunlu)! - Adjusts the color of punctuations in error overlay. - [#&#8203;11369](https://github.com/withastro/astro/pull/11369) [`e6de11f`](https://github.com/withastro/astro/commit/e6de11f4a941e29123da3714e5b8f17d25744f0f) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Fixes attribute rendering for non-boolean attributes with boolean values ### [`v4.11.3`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4113) [Compare Source](https://github.com/withastro/astro/compare/astro@4.11.2...astro@4.11.3) ##### Patch Changes - [#&#8203;11347](https://github.com/withastro/astro/pull/11347) [`33bdc54`](https://github.com/withastro/astro/commit/33bdc5472929f72fa8e39624598bf929c48e60c0) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Fixes installed packages detection when running `astro check` - [#&#8203;11327](https://github.com/withastro/astro/pull/11327) [`0df8142`](https://github.com/withastro/astro/commit/0df81422a81c8f8900684d100e9b8f26365fa0b1) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixes an issue with the container APIs where a runtime error was thrown during the build, when using `pnpm` as package manager. ### [`v4.11.2`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4112) [Compare Source](https://github.com/withastro/astro/compare/astro@4.11.1...astro@4.11.2) ##### Patch Changes - [#&#8203;11335](https://github.com/withastro/astro/pull/11335) [`4c4741b`](https://github.com/withastro/astro/commit/4c4741b42dc531403f7b9647bd51951d0cdb8f5b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Reverts [#&#8203;11292](https://github.com/withastro/astro/pull/11292), which caused a regression to the input type - [#&#8203;11326](https://github.com/withastro/astro/pull/11326) [`41121fb`](https://github.com/withastro/astro/commit/41121fbe00e144d4d93835811e1c4349664d9003) Thanks [@&#8203;florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a case where running `astro sync` when using the experimental `astro:env` feature would fail if environment variables were missing - [#&#8203;11338](https://github.com/withastro/astro/pull/11338) [`9752a0b`](https://github.com/withastro/astro/commit/9752a0b27526270fd0066f3db7049e9ae6af1ef8) Thanks [@&#8203;zaaakher](https://github.com/zaaakher)! - Fixes svg icon margin in devtool tooltip title to look coherent in `rtl` and `ltr` layouts - [#&#8203;11331](https://github.com/withastro/astro/pull/11331) [`f1b78a4`](https://github.com/withastro/astro/commit/f1b78a496034d53b0e9dfc276a4a1b1d691772c4) Thanks [@&#8203;bluwy](https://github.com/bluwy)! - Removes `resolve` package and simplify internal resolve check - [#&#8203;11339](https://github.com/withastro/astro/pull/11339) [`8fdbf0e`](https://github.com/withastro/astro/commit/8fdbf0e45beffdae3da1e7f36797575c92f8a0ba) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Remove non-fatal errors from telemetry Previously we tracked non-fatal errors in telemetry to get a good idea of the types of errors that occur in `astro dev`. However this has become noisy over time and results in a lot of data that isn't particularly useful. This removes those non-fatal errors from being tracked. ### [`v4.11.1`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4111) [Compare Source](https://github.com/withastro/astro/compare/astro@4.11.0...astro@4.11.1) ##### Patch Changes - [#&#8203;11308](https://github.com/withastro/astro/pull/11308) [`44c61dd`](https://github.com/withastro/astro/commit/44c61ddfd85f1c23f8cec8caeaa5e25897121996) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixes an issue where custom `404.astro` and `500.astro` were not returning the correct status code when rendered inside a rewriting cycle. - [#&#8203;11302](https://github.com/withastro/astro/pull/11302) [`0622567`](https://github.com/withastro/astro/commit/06225673269201044358788f2a81dbe13912adce) Thanks [@&#8203;martrapp](https://github.com/martrapp)! - Fixes an issue with the view transition router when redirecting to an URL with different origin. - Updated dependencies \[[`b6afe6a`](https://github.com/withastro/astro/commit/b6afe6a782f68f4a279463a144baaf99cb96b6dc), [`41064ce`](https://github.com/withastro/astro/commit/41064cee78c1cccd428f710a24c483aeb275fd95)]: - [@&#8203;astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)[@&#8203;5](https://github.com/5).1.1 - [@&#8203;astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)[@&#8203;0](https://github.com/0).4.1 ### [`v4.11.0`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4110) [Compare Source](https://github.com/withastro/astro/compare/astro@4.10.3...astro@4.11.0) ##### Minor Changes - [#&#8203;11197](https://github.com/withastro/astro/pull/11197) [`4b46bd9`](https://github.com/withastro/astro/commit/4b46bd9bdcbb302f294aa27b8aa07099e104fa17) Thanks [@&#8203;braebo](https://github.com/braebo)! - Adds [`ShikiTransformer`](https://shiki.style/packages/transformers#shikijs-transformers) support to the [`<Code />`](https://docs.astro.build/en/reference/api-reference/#code-) component with a new `transformers` prop. Note that `transformers` only applies classes and you must provide your own CSS rules to target the elements of your code block. </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. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzOC42Ni4xIiwidXBkYXRlZEluVmVyIjoiMzguNjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
renovate force-pushed renovate/astro-monorepo from e00e18cb52 to fda4d887fa 2024-09-22 18:19:00 +00:00 Compare
konrad merged commit fda4d887fa into main 2024-09-22 18:21:56 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vikunja/website#7
No description provided.