Skip to content

Releases: withastro/astro

astro@4.7.0

25 Apr 09:30
9876163
Compare
Choose a tag to compare

Minor Changes

  • #10665 7b4f284 Thanks @Princesseuh! - Adds new utilities to ease the creation of toolbar apps including defineToolbarApp to make it easier to define your toolbar app and app and server helpers for easier communication between the toolbar and the server. These new utilities abstract away some of the boilerplate code that is common in toolbar apps, and lower the barrier of entry for app authors.

    For example, instead of creating an event listener for the app-toggled event and manually typing the value in the callback, you can now use the onAppToggled method. Additionally, communicating with the server does not require knowing any of the Vite APIs anymore, as a new server object is passed to the init function that contains easy to use methods for communicating with the server.

    import { defineToolbarApp } from "astro/toolbar";
    
    export default defineToolbarApp({
      init(canvas, app, server) {
    
    -    app.addEventListener("app-toggled", (e) => {
    -      console.log(`App is now ${state ? "enabled" : "disabled"}`);.
    -    });
    
    +    app.onToggled(({ state }) => {
    +        console.log(`App is now ${state ? "enabled" : "disabled"}`);
    +    });
    
    -    if (import.meta.hot) {
    -      import.meta.hot.send("my-app:my-client-event", { message: "world" });
    -    }
    
    +    server.send("my-app:my-client-event", { message: "world" })
    
    -    if (import.meta.hot) {
    -      import.meta.hot.on("my-server-event", (data: {message: string}) => {
    -        console.log(data.message);
    -      });
    -    }
    
    +    server.on<{ message: string }>("my-server-event", (data) => {
    +      console.log(data.message); // data is typed using the type parameter
    +    });
      },
    })

    Server helpers are also available on the server side, for use in your integrations, through the new toolbar object:

    "astro:server:setup": ({ toolbar }) => {
      toolbar.on<{ message: string }>("my-app:my-client-event", (data) => {
        console.log(data.message);
        toolbar.send("my-server-event", { message: "hello" });
      });
    }

    This is a backwards compatible change and your your existing dev toolbar apps will continue to function. However, we encourage you to build your apps with the new helpers, following the updated Dev Toolbar API documentation.

  • #10734 6fc4c0e Thanks @Princesseuh! - Astro will now automatically check for updates when you run the dev server. If a new version is available, a message will appear in the terminal with instructions on how to update. Updates will be checked once per 10 days, and the message will only appear if the project is multiple versions behind the latest release.

    This behavior can be disabled by running astro preferences disable checkUpdates or setting the ASTRO_DISABLE_UPDATE_CHECK environment variable to false.

  • #10762 43ead8f Thanks @bholmesdev! - Enables type checking for JavaScript files when using the strictest TS config. This ensures consistency with Astro's other TS configs, and fixes type checking for integrations like Astro DB when using an astro.config.mjs.

    If you are currently using the strictest preset and would like to still disable .js files, set allowJS: false in your tsconfig.json.

Patch Changes

  • #10861 b673bc8 Thanks @mingjunlu! - Fixes an issue where astro build writes type declaration files to outDir when it's outside of root directory.

  • #10684 8b59d5d Thanks @PeterDraex! - Update sharp to 0.33 to fix issue with Alpine Linux

astro@4.6.4

23 Apr 23:35
a940465
Compare
Choose a tag to compare

Patch Changes

  • #10846 3294f7a Thanks @matthewp! - Prevent getCollection breaking in vitest

  • #10856 30cf82a Thanks @robertvanhoesel! - Prevents inputs with a name attribute of action or method to break ViewTransitions' form submission

  • #10833 8d5f3e8 Thanks @renovate! - Updates esbuild dependency to v0.20. This should not affect projects in most cases.

  • #10801 204b782 Thanks @rishi-raj-jain! - Fixes an issue where images in MD required a relative specifier (e.g. ./)

    Now, you can use the standard ![](relative/img.png) syntax in MD files for images colocated in the same folder: no relative specifier required!

    There is no need to update your project; your existing images will still continue to work. However, you may wish to remove any relative specifiers from these MD images as they are no longer necessary:

    - ![A cute dog](./dog.jpg)
    + ![A cute dog](dog.jpg)
    <!-- This dog lives in the same folder as my article! -->
  • #10841 a2df344 Thanks @martrapp! - Due to regression on mobile WebKit browsers, reverts a change made for JavaScript animations during view transitions.

@astrojs/vercel@7.5.4

23 Apr 23:35
a940465
Compare
Choose a tag to compare

Patch Changes

  • #10833 8d5f3e8 Thanks @renovate! - Updates esbuild dependency to v0.20. This should not affect projects in most cases.

@astrojs/react@3.3.1

23 Apr 23:34
a940465
Compare
Choose a tag to compare

Patch Changes

@astrojs/partytown@2.1.0

23 Apr 23:34
a940465
Compare
Choose a tag to compare

Minor Changes

  • #10833 8d5f3e8 Thanks @renovate! - Updates the @builder.io/partytown dependency to v0.10. This should not affect projects in most cases.

@astrojs/markdoc@0.11.0

23 Apr 23:34
a940465
Compare
Choose a tag to compare

Minor Changes

Patch Changes

  • #10833 8d5f3e8 Thanks @renovate! - Updates esbuild dependency to v0.20. This should not affect projects in most cases.

@astrojs/db@0.10.6

23 Apr 23:34
a940465
Compare
Choose a tag to compare

Patch Changes

  • #10816 8e6eb62 Thanks @bholmesdev! - Add astro login support from online editors like Stackblitz and GitHub Codespaces

astro@4.6.3

18 Apr 15:38
7fda037
Compare
Choose a tag to compare

Patch Changes

@astrojs/sitemap@3.1.4

18 Apr 15:38
7fda037
Compare
Choose a tag to compare

Patch Changes

@astrojs/db@0.10.5

18 Apr 15:37
7fda037
Compare
Choose a tag to compare

Patch Changes