Skip to content
verdict:

Astro 5.16.0

notable

note: no summary for this older release

We summarize recent releases. The original release notes for this version are below.

release-notesgithub.com/withastro/astro · 94 lines
  1. ### Minor Changes
  2. - [#13880](https://github.com/withastro/astro/pull/13880) [`1a2ed01`](https://github.com/withastro/astro/commit/1a2ed01c92fe93843046396a2c854514747f4df8) Thanks [@azat-io](https://github.com/azat-io)! - Adds experimental SVGO optimization support for SVG assets
  3. Astro now supports automatic SVG optimization using SVGO during build time. This experimental feature helps reduce SVG file sizes while maintaining visual quality, improving your site's performance.
  4. To enable SVG optimization with default settings, add the following to your `astro.config.mjs`:
  5. ```js
  6. import { defineConfig } from 'astro/config';
  7. export default defineConfig({
  8. experimental: {
  9. svgo: true,
  10. },
  11. });
  12. ```
  13. To customize optimization, pass a [SVGO configuration object](https://svgo.dev/docs/plugins/):
  14. ```js
  15. export default defineConfig({
  16. experimental: {
  17. svgo: {
  18. plugins: [
  19. 'preset-default',
  20. {
  21. name: 'removeViewBox',
  22. active: false,
  23. },
  24. ],
  25. },
  26. },
  27. });
  28. ```
  29. For more information on enabling and using this feature in your project, see the [experimental SVG optimization docs](https://docs.astro.build/en/reference/experimental-flags/svg-optimization/).
  30. - [#14810](https://github.com/withastro/astro/pull/14810) [`2e845fe`](https://github.com/withastro/astro/commit/2e845fe56de45c710d282ed36f92978612810b79) Thanks [@ascorbic](https://github.com/ascorbic)! - Adds a hint for code agents to use the `--yes` flag to skip prompts when running `astro add`
  31. - [#14698](https://github.com/withastro/astro/pull/14698) [`f42ff9b`](https://github.com/withastro/astro/commit/f42ff9bd5b4c8d3e67247ee6e21f14cd2062c037) Thanks [@mauriciabad](https://github.com/mauriciabad)! - Adds the `ActionInputSchema` utility type to automatically infer the TypeScript type of an action's input based on its Zod schema
  32. For example, this type can be used to retrieve the input type of a form action:
  33. ```ts
  34. import { type ActionInputSchema, defineAction } from 'astro:actions';
  35. import { z } from 'astro/zod';
  36. const action = defineAction({
  37. accept: 'form',
  38. input: z.object({ name: z.string() }),
  39. handler: ({ name }) => ({ message: `Welcome, ${name}!` }),
  40. });
  41. type Schema = ActionInputSchema<typeof action>;
  42. // typeof z.object({ name: z.string() })
  43. type Input = z.input<Schema>;
  44. // { name: string }
  45. ```
  46. - [#14574](https://github.com/withastro/astro/pull/14574) [`4356485`](https://github.com/withastro/astro/commit/4356485b0f708c7abf93207105ddcb890a466729) Thanks [@jacobdalamb](https://github.com/jacobdalamb)! - Adds new CLI shortcuts available when running `astro preview`:
  47. - `o` + `enter`: open the site in your browser
  48. - `q` + `enter`: quit the preview
  49. - `h` + `enter`: print all available shortcuts
  50. ### Patch Changes
  51. - [#14813](https://github.com/withastro/astro/pull/14813) [`e1dd377`](https://github.com/withastro/astro/commit/e1dd377398a3dcf6ba0697dc8d4bde6d77a45700) Thanks [@ematipico](https://github.com/ematipico)! - Removes `picocolors` as dependency in favor of the fork `piccolore`.
  52. - [#14609](https://github.com/withastro/astro/pull/14609) [`d774306`](https://github.com/withastro/astro/commit/d774306c517c33276adf48f2c2ea6a0a2a4a7aa6) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Improves `astro info`
  53. - [#14796](https://github.com/withastro/astro/pull/14796) [`c29a785`](https://github.com/withastro/astro/commit/c29a785d57f08c5526828379d748f788797d9c39) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - **BREAKING CHANGE to the experimental Fonts API only**
  54. Updates the default `subsets` to `["latin"]`
  55. Subsets have been a common source of confusion: they caused a lot of files to be downloaded by default. You now have to manually pick extra subsets.
  56. Review your Astro config and update subsets if you need, for example if you need greek characters:
  57. ```diff
  58. import { defineConfig, fontProviders } from "astro/config"
  59. export default defineConfig({
  60. experimental: {
  61. fonts: [{
  62. name: "Roboto",
  63. cssVariable: "--font-roboto",
  64. provider: fontProviders.google(),
  65. + subsets: ["latin", "greek"]
  66. }]
  67. }
  68. })
  69. ```

view on githubimported 2026-09-28 via npm