Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore(deps): update astro #1038

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

chore(deps): update astro #1038

wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 30, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@astrojs/check (source) ^0.5.0 -> ^0.7.0 age adoption passing confidence
@astrojs/starlight (source) ^0.21.0 -> ^0.24.0 age adoption passing confidence
astro (source) 4.7.0 -> 4.10.1 age adoption passing confidence

Release Notes

withastro/language-tools (@​astrojs/check)

v0.7.0

Compare Source

Minor Changes
  • c8af6db: Upgrades the language server to use the latest version of Volar. This changes should have no negative impacts on the experience.
Patch Changes

v0.6.0

Compare Source

Minor Changes
  • 65d3425: Upgrades the language server to use Volar 2.2. This changes should have no negative impacts on the experience.
Patch Changes
withastro/starlight (@​astrojs/starlight)

v0.24.0

Compare Source

Minor Changes
  • #​1841 ee0cd38a Thanks @​HiDeoo! - Adds support for Astro.currentLocale and Astro’s i18n routing.

    ⚠️ Potentially breaking change: Starlight now configures Astro’s i18n option for you based on its locales config.

    If you are currently using Astro’s i18n option as well as Starlight’s locales option, you will need to remove one of these.
    In general we recommend using Starlight’s locales, but if you have a more advanced configuration you may choose to keep Astro’s i18n config instead.

  • #​1958 081d1a96 Thanks @​delucis! - Allows users to opt into displaying a “Built with Starlight” link in the site footer

  • #​1530 dd64836a Thanks @​kevinzunigacuellar! - Adds a new <Badge> component

v0.23.4

Compare Source

Patch Changes

v0.23.3

Compare Source

Patch Changes

v0.23.2

Compare Source

Patch Changes

v0.23.1

Compare Source

Patch Changes

v0.23.0

Compare Source

Minor Changes
  • #​1846 2de67039 Thanks @​delucis! - Updates @astrojs/mdx to v3 and enables MDX optimization by default

    ⚠️ Potentially breaking change: MDX optimization speeds up builds (Starlight’s docs are building ~40% faster for example), but restricts some advanced MDX features. See full details in the MDX optimization documentation.

    Most Starlight users should be unaffected, but if you are using MDX files outside of Starlight pages with the components prop, you may see issues. You can disable optimization by adding MDX manually to your integrations array in astro.config.mjs:

    import { defineConfig } from 'astro/config';
    + import mdx from '@&#8203;astrojs/mdx';
    import starlight from '@&#8203;astrojs/starlight';
    
    // https://astro.build/config
    export default defineConfig({
    	integrations: [
    		starlight({
    			title: 'My docs',
    			// ...
    		}),
    +		mdx(),
    	],
    });
  • #​1735 1a9ab50d Thanks @​HiDeoo! - Adds custom styles for <details> and <summary> elements in Markdown content.

  • #​1846 2de67039 Thanks @​delucis! - ⚠️ BREAKING CHANGE: The minimum supported version of Astro is now 4.8.6

    Please update Astro and Starlight together:

    npx @&#8203;astrojs/upgrade

v0.22.4

Compare Source

Patch Changes

v0.22.3

Compare Source

Patch Changes

v0.22.2

Compare Source

Patch Changes

v0.22.1

Compare Source

Patch Changes
  • 1c0fc384 Thanks @​HiDeoo! - Fixes an issue where the siteTitle property would not be set when using the <StarlightPage /> component.

v0.22.0

Compare Source

Minor Changes
  • #​640 7dc503ea Thanks @​HiDeoo! - Adds support for syncing multiple sets of tabs on the same page.

  • #​1620 ca0678ca Thanks @​emjio! - Adds support for translating the site title

    ⚠️ Potentially breaking change: The shape of the title field on Starlight’s internal config object has changed. This used to be a string, but is now an object.

    If you are relying on config.title (for example in a custom <SiteTitle> or <Head> component), you will need to update your code. We recommend using the new siteTitle prop available to component overrides:

withastro/astro (astro)

v4.10.1

Compare Source

Patch Changes

v4.10.0

Compare Source

Minor Changes
  • #​10974 2668ef9 Thanks @​florian-lefebvre! - Adds experimental support for the astro:env API.

    The astro:env API lets you configure a type-safe schema for your environment variables, and indicate whether they should be available on the server or the client. Import and use your defined variables from the appropriate /client or /server module:

v4.9.3

Compare Source

Patch Changes
  • #​11171 ff8004f Thanks @​Princesseuh! - Guard globalThis.astroAsset usage in proxy code to avoid errors in wonky situations

  • #​11178 1734c49 Thanks @​theoephraim! - Improves isPromise utility to check the presence of then on an object before trying to access it - which can cause undesired side-effects on Proxy objects

  • #​11183 3cfa2ac Thanks @​66Leo66! - Suggest pnpm dlx instead of pnpx in update check.

  • #​11147 2d93902 Thanks @​kitschpatrol! - Fixes invalid MIME types in Picture source elements for jpg and svg extensions, which was preventing otherwise valid source variations from being shown by the browser

  • #​11141 19df89f Thanks @​ematipico! - Fixes an internal error that prevented the AstroContainer to render the Content component.

    You can now write code similar to the following to render content collections:

    const entry = await getEntry(collection, slug);
    const { Content } = await entry.render();
    const content = await container.renderToString(Content);
  • #​11170 ba20c71 Thanks @​matthewp! - Retain client scripts in content cache

v4.9.2

Compare Source

Patch Changes
  • #​11138 98e0372 Thanks @​ematipico! - You can now pass props when rendering a component using the Container APIs:

    import { experimental_AstroContainer as AstroContainer } from 'astro/container';
    import Card from '../src/components/Card.astro';
    
    const container = await AstroContainer.create();
    const result = await container.renderToString(Card, {
      props: {
        someState: true,
      },
    });

v4.9.1

Compare Source

Patch Changes

v4.9.0

Compare Source

Minor Changes
  • #​11051 12a1bcc Thanks @​ematipico! - Introduces an experimental Container API to render .astro components in isolation.

    This API introduces three new functions to allow you to create a new container and render an Astro component returning either a string or a Response:

    • create(): creates a new instance of the container.
    • renderToString(): renders a component and return a string.
    • renderToResponse(): renders a component and returns the Response emitted by the rendering phase.

    The first supported use of this new API is to enable unit testing. For example, with vitest, you can create a container to render your component with test data and check the result:

    import { experimental_AstroContainer as AstroContainer } from 'astro/container';
    import { expect, test } from 'vitest';
    import Card from '../src/components/Card.astro';
    
    test('Card with slots', async () => {
      const container = await AstroContainer.create();
      const result = await container.renderToString(Card, {
        slots: {
          default: 'Card content',
        },
      });
    
      expect(result).toContain('This is a card');
      expect(result).toContain('Card content');
    });

    For a complete reference, see the Container API docs.

    For a feature overview, and to give feedback on this experimental API, see the Container API roadmap discussion.

  • #​11021 2d4c8fa Thanks @​ematipico! - The CSRF protection feature that was introduced behind a flag in v4.6.0 is no longer experimental and is available for general use.

    To enable the stable version, add the new top-level security option in astro.config.mjs. If you were previously using the experimental version of this feature, also delete the experimental flag:

    export default defineConfig({
    -  experimental: {
    -    security: {
    -      csrfProtection: {
    -        origin: true
    -      }
    -    }
    -  },
    +  security: {
    +    checkOrigin: true
    +  }
    })

    Enabling this setting performs a check that the "origin" header, automatically passed by all modern browsers, matches the URL sent by each Request.

    This check is executed only for pages rendered on demand, and only for the requests POST, PATCH, DELETE and PUT with one of the following "content-type" headers: 'application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'.

    If the "origin" header doesn't match the pathname of the request, Astro will return a 403 status code and won't render the page.

    For more information, see the security configuration docs.

  • #​11022 be68ab4 Thanks @​ematipico! - The i18nDomains routing feature introduced behind a flag in v3.4.0 is no longer experimental and is available for general use.

    This routing option allows you to configure different domains for individual locales in entirely server-rendered projects using the @​astrojs/node or @​astrojs/vercel adapter with a site configured.

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

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

    If you have been waiting for stabilization before using this routing option, you can now do so.

    Please see the internationalization docs for more about this feature.

  • #​11071 8ca7c73 Thanks @​bholmesdev! - Adds two new functions experimental_getActionState() and experimental_withState() to support the React 19 useActionState() hook when using Astro Actions. This introduces progressive enhancement when calling an Action with the withState() utility.

    This example calls a like action that accepts a postId and returns the number of likes. Pass this action to the experimental_withState() function to apply progressive enhancement info, and apply to useActionState() to track the result:

    import { actions } from 'astro:actions';
    import { experimental_withState } from '@&#8203;astrojs/react/actions';
    
    export function Like({ postId }: { postId: string }) {
      const [state, action, pending] = useActionState(
        experimental_withState(actions.like),
        0 // initial likes
      );
    
      return (
        <form action={action}>
          <input type="hidden" name="postId" value={postId} />
          <button disabled={pending}>{state} ❤️</button>
        </form>
      );
    }

    You can also access the state stored by useActionState() from your action handler. Call experimental_getActionState() with the API context, and optionally apply a type to the result:

    import { defineAction, z } from 'astro:actions';
    import { experimental_getActionState } from '@&#8203;astrojs/react/actions';
    
    export const server = {
      like: defineAction({
        input: z.object({
          postId: z.string(),
        }),
        handler: async ({ postId }, ctx) => {
          const currentLikes = experimental_getActionState<number>(ctx);
          // write to database
          return currentLikes + 1;
        },
      }),
    };
  • #​11101 a6916e4 Thanks @​linguofeng! - Updates Astro's code for adapters to use the header x-forwarded-for to initialize the clientAddress.

    To take advantage of the new change, integration authors must upgrade the version of Astro in their adapter peerDependencies to 4.9.0.

  • #​11071 8ca7c73 Thanks @​bholmesdev! - Adds compatibility for Astro Actions in the React 19 beta. Actions can be passed to a form action prop directly, and Astro will automatically add metadata for progressive enhancement.

    import { actions } from 'astro:actions';
    
    function Like() {
      return (
        <form action={actions.like}>
          {/* auto-inserts hidden input for progressive enhancement */}
          <button type="submit">Like</button>
        </form>
      );
    }
Patch Changes
  • #​11088 9566fa0 Thanks @​bholmesdev! - Allow actions to be called on the server. This allows you to call actions as utility functions in your Astro frontmatter, endpoints, and server-side UI components.

    Import and call directly from astro:actions as you would for client actions:

v4.8.7

Compare Source

Patch Changes
  • #​11073 f5c8fee Thanks @​matthewp! - Prevent cache content from being left in dist folder

    When contentCollectionsCache is enabled temporary cached content is copied into the outDir for processing. This fixes it so that this content is cleaned out, along with the rest of the temporary build JS.

  • #​11054 f6b171e Thanks @​bholmesdev! - Respect error status when handling Actions with a progressive fallback.

  • #​11092 bfe9c73 Thanks @​duckycoding-dev! - Change slot attribute of IntrinsicAttributes to match the definition of HTMLAttributes's own slot attribute of type string | undefined | null

  • #​10875 b5f95b2 Thanks @​W1M0R! - Fixes a typo in a JSDoc annotation

  • #​11111 a5d79dd Thanks @​bholmesdev! - Fix unexpected headers warning on prerendered routes when using Astro Actions.

  • #​11081 af42e05 Thanks @​V3RON! - Correctly position inspection tooltip in RTL mode

    When RTL mode is turned on, the inspection tooltip tend to overflow the window on the left side.
    Additional check has been added to prevent that.

v4.8.6

Compare Source

Patch Changes

v4.8.5

Compare Source

Patch Changes

v4.8.4

Compare Source

Patch Changes
  • #​11026 8dfb1a2 Thanks @​bluwy! - Skips rendering script tags if it's inlined and empty when experimental.directRenderScript is enabled

  • #​11043 d0d1710 Thanks @​bholmesdev! - Fixes minor type issues in actions component example

  • #​10999 5f353e3 Thanks @​bluwy! - The prefetch feature is updated to better support different browsers and different cache headers setup, including:

    1. All prefetch strategies will now always try to use <link rel="prefetch"> if supported, or will fall back to fetch().
    2. The prefetch() programmatic API's with option is deprecated in favour of an automatic approach that will also try to use <link rel="prefetch> if supported, or will fall back to fetch().

    This change shouldn't affect most sites and should instead make prefetching more effective.

  • #​11041 6cc3fb9 Thanks @​bholmesdev! - Fixes 500 errors when sending empty params or returning an empty response from an action.

  • #​11028 771d1f7 Thanks @​bholmesdev! - Throw on missing server output when using Astro Actions.

  • #​11029 bd34452 Thanks @​bholmesdev! - Actions: include validation error in thrown error message for debugging.

  • #​11046 086694a Thanks @​HiDeoo! - Fixes getViteConfig() type definition to allow passing an inline Astro configuration as second argument

  • #​11026 8dfb1a2 Thanks @​bluwy! - Fixes CSS handling if imported in a script tag in an Astro file when experimental.directRenderScript is enabled

  • #​11020 2e2d6b7 Thanks @​xsynaptic! - Add type declarations for import.meta.env.ASSETS_PREFIX when defined as an object for handling different file types.

  • #​11030 18e7f33 Thanks @​bholmesdev! - Actions: Fix missing message for custom Action errors.

  • #​10981 ad9227c Thanks @​mo! - Adds deprecated HTML attribute "name" to the list of valid attributes. This attribute has been replaced by the global id attribute in recent versions of HTML.

  • #​11013 4ea38e7 Thanks @​QingXia-Ela! - Prevents unhandledrejection error when checking for latest Astro version

  • #​11034 5f2dd45 Thanks @​arganaphang! - Add popovertargetaction to the attribute that can be passed to the button and input element

v4.8.3

Compare Source

Patch Changes

v4.8.2

Compare Source

Patch Changes

v4.8.1

Compare Source

Patch Changes
  • #​10987 05db5f7 Thanks @​ematipico! - Fix a regression where the flag experimental.rewriting was marked mandatory. Is is now optional.

  • #​10975 6b640b3 Thanks @​bluwy! - Passes the scoped style attribute or class to the <picture> element in the <Picture /> component so scoped styling can be applied to the <picture> element

v4.8.0

Compare Source

Minor Changes
  • #​10935 ddd8e49 Thanks @​bluwy! - Exports astro/jsx/rehype.js with utilities to generate an Astro metadata object

  • #​10625 698c2d9 Thanks @​goulvenclech! - Adds the ability for multiple pages to use the same component as an entrypoint when building an Astro integration. This change is purely internal, and aligns the build process with the behaviour in the development server.

  • #​10906 7bbd664 Thanks @​Princesseuh! - Adds a new radio checkbox component to the dev toolbar UI library (astro-dev-toolbar-radio-checkbox)

  • #​10963 61f47a6 Thanks @​delucis! - Adds support for passing an inline Astro configuration object to getViteConfig()

    If you are using getViteConfig() to configure the Vitest test runner, you can now pass a second argument to control how Astro is configured. This makes it possible to configure unit tests with different Astro options when using Vitest’s workspaces feature.

    // vitest.config.ts
    import { getViteConfig } from 'astro/config';
    
    export default getViteConfig(
      /* Vite configuration */
      { test: {} },
      /* Astro configuration */
      {
        site: 'https://example.com',
        trailingSlash: 'never',
      }
    );
  • #​10867 47877a7 Thanks @​ematipico! - Adds experimental rewriting in Astro with a new rewrite() function and the middleware next() function.

    The feature is available via an experimental flag in astro.config.mjs:

    export default defineConfig({
      experimental: {
        rewriting: true,
      },
    });

    When enabled, you can use rewrite() to render another page without changing the URL of the browser in Astro pages and endpoints.

v4.7.1

Compare Source

Patch Changes

Configuration

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

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

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

👻 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 Mend Renovate. View repository job log here.

Copy link

netlify bot commented Apr 30, 2024

Deploy Preview for knope ready!

Name Link
🔨 Latest commit 3c2fd45
🔍 Latest deploy log https://app.netlify.com/sites/knope/deploys/666602f938aa7d000840c295
😎 Deploy Preview https://deploy-preview-1038--knope.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@renovate renovate bot force-pushed the renovate/astro branch 2 times, most recently from 18d7749 to 0fcc189 Compare May 1, 2024 17:03
@renovate renovate bot changed the title chore(deps): update dependency @astrojs/starlight to ^0.22.0 chore(deps): update astro May 2, 2024
@renovate renovate bot force-pushed the renovate/astro branch 9 times, most recently from 4a43f05 to 250c109 Compare May 9, 2024 12:06
@renovate renovate bot force-pushed the renovate/astro branch 6 times, most recently from e09976d to e3b6056 Compare May 16, 2024 00:14
@renovate renovate bot force-pushed the renovate/astro branch 11 times, most recently from b10d45c to 2dceb90 Compare May 23, 2024 11:19
@renovate renovate bot force-pushed the renovate/astro branch 5 times, most recently from 7b0d5e5 to 166d427 Compare May 28, 2024 14:56
@renovate renovate bot force-pushed the renovate/astro branch 9 times, most recently from 1309376 to a38a28b Compare June 8, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants