Releases: withastro/astro
[email protected]
Patch Changes
-
#12311
bf2723e
Thanks @dinesh-58! - Addschecked
to the list of boolean attributes. -
#12363
222f718
Thanks @Fryuni! - Fixes code generated byastro add
command when adding a version of an integration other than the defaultlatest
. -
#12368
493fe43
Thanks @bluwy! - Improves error logs when executing commands -
#12355
c4726d7
Thanks @apatel369! - Improves error reporting for invalid frontmatter in MDX files during theastro build
command. The error message now includes the file path where the frontmatter parsing failed.
@astrojs/[email protected]
[email protected]
Minor Changes
-
#12083
9263e96
Thanks @Princesseuh! - Reworks the experience of creating a new Astro project using thecreate astro
CLI command.- Updates the list of templates to include Starlight and combines the "minimal" and "basics" templates into a new, refreshed "Basics" template to serve as the single, minimal Astro project starter.
- Removes the TypeScript question. Astro is TypeScript-only, so this question was often misleading. The "Strict" preset is now the default, but it can still be changed manually in
tsconfig.json
. astro check
is no longer automatically added to the build script.- Added a new
--add
flag to install additional integrations after creating a project. For example,pnpm create astro --add react
will create a new Astro project and install the React integration.
[email protected]
@astrojs/[email protected]
[email protected]
Patch Changes
-
#12333
836cd91
Thanks @imattacus! - Destroy the server response stream if async error is thrown -
#12358
7680349
Thanks @spacedawwwg! - HonorsinlineAstroConfig
parameter ingetViteConfig
when creating a logger -
#12353
35795a1
Thanks @hippotastic! - Fixes an issue in dev server watch file handling that could cause multiple restarts for a single file change. -
#12351
5751488
Thanks @florian-lefebvre! - Reverts a change made in4.16.6
that prevented usage ofastro:env
secrets inside middleware in SSR -
#12346
20e5a84
Thanks @bluwy! - Fixes sourcemap generation when prefetch is enabled -
#12349
1fc83d3
Thanks @norskeld! - Fixes thegetImage
options type so it properly extendsImageTransform
[email protected]
Patch Changes
-
#12338
9ca89b3
Thanks @situ2001! - ResetsNODE_ENV
to ensure install command run in dev mode -
#12286
9d6bcdb
Thanks @florian-lefebvre! - Fixes a case where a warning for experimentalastro:env
support would be shown when using an adapter but not actually usingastro:env
-
#12342
ffc836b
Thanks @liruifengv! - Fixes a typo in the command name of the CLI -
#12301
0cfc69d
Thanks @apatel369! - Fixes an issue with action handler context by passing the correct context (ActionAPIContext
). -
#12312
5642ef9
Thanks @koyopro! - Fixes an issue where usinggetViteConfig()
returns incorrect and duplicate configuration -
#12245
1d4f6a4
Thanks @bmenant! - Addcomponents
property to MDXInstance type definition (RenderResult and module import) -
#12340
94eaeea
Thanks @ematipico! - Fixes an issue where Astro actions didn't work whenbase
was different from/
@astrojs/[email protected]
[email protected]
Major Changes
-
#12268
4e9a3ac
Thanks @ematipico! - The commandastro add vercel
now updates the configuration file differently, and adds@astrojs/vercel
as module to import.This is a breaking change because it requires the version
8.*
of@astrojs/vercel
. -
#12231
90ae100
Thanks @bluwy! - Updates the automaticcharset=utf-8
behavior for Markdown pages, where instead of responding withcharset=utf-8
in theContent-Type
header, Astro will now automatically add the<meta charset="utf-8">
tag instead.This behaviour only applies to Markdown pages (
.md
or similar Markdown files located withinsrc/pages/
) that do not use Astro's speciallayout
frontmatter property. It matches the rendering behaviour of other non-content pages, and retains the minimal boilerplate needed to write with non-ASCII characters when adding individual Markdown pages to your site.If your Markdown pages use the
layout
frontmatter property, then HTML encoding will be handled by the designated layout component instead, and the<meta charset="utf-8">
tag will not be added to your page by default.If you require
charset=utf-8
to render your page correctly, make sure that your layout components contain the<meta charset="utf-8">
tag. You may need to add this if you have not already done so.
Minor Changes
-
#12243
eb41d13
Thanks @florian-lefebvre! - ImprovesdefineConfig
type safety. TypeScript will now error if a group of related configuration options do not have consistent types. For example, you will now see an error if your language set fori18n.defaultLocale
is not one of the supported locales specified ini18n.locales
. -
#12150
93351bc
Thanks @bluwy! - Adds support for passing values other than"production"
or"development"
to the--mode
flag (e.g."staging"
,"testing"
, or any custom value) to change the value ofimport.meta.env.MODE
or the loaded.env
file. This allows you take advantage of Vite's mode feature.Also adds a new
--devOutput
flag forastro build
that will output a development-based build.Note that changing the
mode
does not change the kind of code transform handled by Vite and Astro:- In
astro dev
, Astro will transform code with debug information. - In
astro build
, Astro will transform code with the most optimized output and removes debug information. - In
astro build --devOutput
(new flag), Astro will transform code with debug information like inastro dev
.
This enables various usecases like:
# Run the dev server connected to a "staging" API astro dev --mode staging # Build a site that connects to a "staging" API astro build --mode staging # Build a site that connects to a "production" API with additional debug information astro build --devOutput # Build a site that connects to a "testing" API astro build --mode testing
The different modes can be used to load different
.env
files, e.g..env.staging
or.env.production
, which can be customized for each environment, for example with differentAPI_URL
environment variable values. - In
Patch Changes
-
#12302
7196c24
Thanks @ematipico! - Fixes an issue where the origin check middleware run for prendered pages -
#12341
c1786d6
Thanks @ematipico! - Fixes and issue whereAstro.currentLocale
always returned the default locale when consumed inside a server island. -
#12270
25192a0
Thanks @ematipico! - Fixes a bug where the params weren't correctly computed when rendering URLs with non-English characters