Astro 4.7 is now available! This release includes major improvements to the API for making toolbar apps, more ways to keep your Astro project up to date, and more.
Full release highlights include:
- Major improvements to the Dev Toolbar API
- Update checker
allowJs: truefor strictest TypeScript preset
To upgrade an existing project, use the automated @astrojs/upgrade CLI tool. Alternatively, upgrade manually by running the upgrade command for your package manager:
# Recommended:npx @astrojs/upgrade
# Manual:npm install astro@latestpnpm upgrade astro --latestyarn upgrade astro --latestDev Toolbar API improvements
Astro 4.7 includes major improvements to the API for making toolbar apps. One of our main goal this release was to make it easier to build and maintain toolbar apps, and we’re excited to share these improvements with you!
defineToolbarApphelper that makes it easier to define toolbar apps, this is similar to thedefineConfighelper for defining Astro config, ordefineMiddlewarefor defining middleware.appandserverhelpers to make it easier to interact with the toolbar and the server.- New starter project for building toolbar apps, to help you get started building your own toolbar apps in no time. Run
npm create astro@latest -- --template toolbar-appand start building your toolbar app. - Revamped documentation for building toolbar apps.
- All new recipe guiding you through building a toolbar app from scratch, including how to use JSX frameworks like React or Preact in your app.
We hope you’ll enjoy these improvements and we can’t wait to see what you build with them!
Update checker
Starting from this release, Astro will now check for updates when you run the dev server. If a new version is available, you’ll see a message in the terminal with instructions on how to update and in the dev toolbar.
In order to avoid spamming you with update messages, Astro will only check for updates once per 10 days and only if you’re multiple versions behind. You can also disable this feature by running astro preferences disable checkUpdates or setting the ASTRO_DISABLE_UPDATE_CHECK environment variable to false.
allowJs: true for strictest TypeScript preset
Our strictest TypeScript preset previously included allowJs: false, to disable the usage of .js files completely. This proved to be a bit too strict for the average user and often caused confusion. We’ve now changed this to allowJs: true, which allows you to use .js files in your project.
This should not be a breaking change, but if you’re using the strictest preset and would like to still disable .js files, you can set allowJs: false manually in your tsconfig.json.
Bug Fixes
As it is known, Astro 4.7 includes more bug fixes and smaller improvements that couldn’t make it into this post! Check out the full release notes to learn more.