Astro: [email protected] Release

Release date:
September 22, 2022
Previous version:
[email protected] (released September 20, 2022)
Magnitude:
0 Diff Delta
Contributors:
0 total committers
Data confidence:
Commits:

Top Contributors in [email protected]

Could not determine top contributors for this release.

Directory Browser for [email protected]

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

Release Notes Published

Minor Changes

  • #4775 b0cc93996 Thanks @tony-sull! - Adds a new "astro:build:generated" hook that runs after SSG builds finish but before build artifacts are cleaned up. This is a very specific use case, "astro:build:done" is probably what you're looking for.

  • #4669 a961aa3c2 Thanks @aggre! - astro-island now correctly passes Uint8Array/Uint16Array/Uint32Array

  • #4832 73f215df7 Thanks @matthewp! - Allows Responses to be passed to set:html

    This expands the abilities of set:html to ultimate service this use-case:

    <div set:html={fetch('/legacy-post.html')}></div>
    

    This means you can take a legacy app that has been statically generated to HTML and directly consume that HTML within your templates. As is always the case with set:html, this should only be used on trusted content.

    To make this possible, you can also pass several other types into set:html now:

    • Response objects, since that is what fetch() returns: astro <div set:html={new Response('<span>Hello world</span>', { headers: { 'content-type': 'text/html' }, })} > </div>
    • ReadableStreams: astro <div set:html={new ReadableStream({ start(controller) { controller.enqueue(`<span>read me</span>`); controller.close(); }, })} > </div>
    • AsyncIterables: astro <div set:html={(async function* () { for await (const num of [1, 2, 3, 4, 5]) { yield `<li>${num}</li>`; } })()} > </div>
    • Iterables (non-async): astro <div set:html={(function* () { for (const num of [1, 2, 3, 4, 5]) { yield `<li>${num}</li>`; } })()} > </div>

Patch Changes