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

[ci] release #11524

Merged
merged 1 commit into from
Jul 30, 2024
Merged

[ci] release #11524

merged 1 commit into from
Jul 30, 2024

Conversation

astrobot-houston
Copy link
Contributor

@astrobot-houston astrobot-houston commented Jul 22, 2024

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

[email protected]

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();

    Migration

    To migrate your existing action calls:

    • Remove .safe from existing safe action calls
    • Add .orThrow to existing unsafe action calls
  • #11546 7f26de9 Thanks @ArmandPhilippot! - Remove "SSR Only" mention in Astro.redirect inline documentation and update reference link.

  • #11525 8068131 Thanks @ematipico! - Fixes a case where the build was failing when experimental.actions was enabled, an adapter was in use, and there were not actions inside the user code base.

  • #11574 e3f29d4 Thanks @Princesseuh! - Fixes line with the error not being properly highlighted in the error overlay

  • #11570 84189b6 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.

    Updates the Astro Actions fallback to support action={actions.name} instead of using getActionProps(). This will submit a form to the server in zero-JS scenarios using a search parameter:

    ---
    import { actions } from 'astro:actions';
    ---
    
    <form action={actions.logOut}>
      <!--output: action="?_astroAction=logOut"-->
      <button>Log Out</button>
    </form>

    You may also construct form action URLs using string concatenation, or by using the URL() constructor, with the an action's .queryString property:

    ---
    import { actions } from 'astro:actions';
    
    const confirmationUrl = new URL('/confirmation', Astro.url);
    confirmationUrl.search = actions.queryString;
    ---
    
    <form method="POST" action={confirmationUrl.pathname}>
      <button>Submit</button>
    </form>

    Migration

    getActionProps() is now deprecated. To use the new fallback pattern, remove the getActionProps() input from your form and pass your action function to the form action attribute:

    ---
    import {
      actions,
    - getActionProps,
    } from 'astro:actions';
    ---
    
    + <form method="POST" action={actions.logOut}>
    - <form method="POST">
    - <input {...getActionProps(actions.logOut)} />
      <button>Log Out</button>
    </form>
  • #11559 1953dbb Thanks @bryanwood! - Allows actions to return falsy values without an error

  • #11553 02c85b5 Thanks @ematipico! - Fixes an issue in content collection caching, where two documents with the same contents were generating an error during the build.

  • #11548 602c5bf Thanks @TheOtterlord! - Fixes astro add for packages with only prerelease versions

  • #11566 0dcef3a Thanks @Princesseuh! - Fixes DomException errors not being handled properly

  • #11529 504c383 Thanks @matthewp! - Fix server islands with trailingSlash: always

[email protected]

Patch Changes

@astrojs/[email protected]

Patch Changes

  • #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();

    Migration

    To migrate your existing action calls:

    • Remove .safe from existing safe action calls
    • Add .orThrow to existing unsafe action calls
  • #11570 84189b6 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.

    Updates the Astro Actions fallback to support action={actions.name} instead of using getActionProps(). This will submit a form to the server in zero-JS scenarios using a search parameter:

    ---
    import { actions } from 'astro:actions';
    ---
    
    <form action={actions.logOut}>
      <!--output: action="?_astroAction=logOut"-->
      <button>Log Out</button>
    </form>

    You may also construct form action URLs using string concatenation, or by using the URL() constructor, with the an action's .queryString property:

    ---
    import { actions } from 'astro:actions';
    
    const confirmationUrl = new URL('/confirmation', Astro.url);
    confirmationUrl.search = actions.queryString;
    ---
    
    <form method="POST" action={confirmationUrl.pathname}>
      <button>Submit</button>
    </form>

    Migration

    getActionProps() is now deprecated. To use the new fallback pattern, remove the getActionProps() input from your form and pass your action function to the form action attribute:

    ---
    import {
      actions,
    - getActionProps,
    } from 'astro:actions';
    ---
    
    + <form method="POST" action={actions.logOut}>
    - <form method="POST">
    - <input {...getActionProps(actions.logOut)} />
      <button>Log Out</button>
    </form>

@github-actions github-actions bot added pkg: example Related to an example package (scope) pkg: astro Related to the core `astro` package (scope) labels Jul 22, 2024
@github-actions github-actions bot force-pushed the changeset-release/main branch 9 times, most recently from ff0da9b to 4294dff Compare July 26, 2024 17:55
@github-actions github-actions bot force-pushed the changeset-release/main branch 7 times, most recently from 2178639 to 1ed3760 Compare July 30, 2024 15:44
@github-actions github-actions bot force-pushed the changeset-release/main branch from 1ed3760 to 178d888 Compare July 30, 2024 15:45
@bholmesdev bholmesdev merged commit 49db004 into main Jul 30, 2024
@bholmesdev bholmesdev deleted the changeset-release/main branch July 30, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pkg: example Related to an example package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants