Astro: astro@1.0.0-beta.55 Release

Release date:
June 24, 2022
Previous version:
astro@1.0.0-beta.54 (released June 24, 2022)
Magnitude:
0 Diff Delta
Contributors:
0 total committers
Data confidence:
Commits:

Top Contributors in astro@1.0.0-beta.55

Could not determine top contributors for this release.

Directory Browser for astro@1.0.0-beta.55

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

Patch Changes

  • #3696 3daaf510 Thanks @matthewp! - Support for streaming responses

    Astro supports streaming in its templates. Any time Astro encounters an async boundary it will stream out HTML that occurs before it. For example:

    ---
    import LoadTodos from '../components/LoadTodos.astro';
    ---
    <html>
    <head>
    <title>App</title>
    </head>
    <body>
      <LoadTodos />
    </body>
    </html>
    

    In this arbtrary example Astro will streaming out the <head> section and everything else until it encounters <LoadTodos /> and then stop. LoadTodos, which is also an Astro component will stream its contents as well; stopping and waiting at any other asynchronous components.

    As part of this Astro also now supports async iterables within its templates. This means you can do this:

    <ul>
      {(async function * () {
        for(const number of numbers) {
          await wait(1000);
    
          yield <li>Number: {number}</li>
          yield '\n'
        }
      })()}
    </ul>
    

    Which will stream out <li>s one at a time, waiting a second between each.

  • #3700 47c81eff Thanks @matthewp! - Make Astro.redirect use a 302 status code