fix(deps): update dependency astro to v4 - autoclosed
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
astro (source) | dependencies | major | ^3.0.7 -> ^4.0.0 |
Release Notes
withastro/astro (astro)
v4.4.1
Patch Changes
-
#9795
5acc3135ba5309a566def466fbcbabd23f70cd68
Thanks @lilnasy! - Refactors internals relating to middleware, endpoints, and page rendering. -
#10105
1f598b372410066c6fcd41cba9915f6aaf7befa8
Thanks @negativems! - Fixes an issue where some astro commands failed if the astro config file or an integration used the globalcrypto
object. -
#10165
d50dddb71d87ce5b7928920f10eb4946a5339f86
Thanks @ematipico! - Fixes an issue where thei18n.routing
object had all its fields defined as mandatory. Now they all are optionals and shouldn't break when usingastro.config.mts
. -
#10132
1da9c5f2f3fe70b0206d1b3e0c01744fa40d511c
Thanks @bluwy! - Simplifies internal Vite preview server teardown -
#10163
b92d35f1026f3e99abb888d1a845bdda4efdc327
Thanks @mingjunlu! - Fixes an issue where audit fails to initialize when encountered<a>
inside<svg>
-
#10079
80f8996514e6d0546e94bd927650cd4ab2f1fa2f
Thanks @ktym4a! - Fix integrationData fetch to always be called even if View Transition is enabled. -
#10139
3c73441eb2eaba767d6dad1b30c0353195d28791
Thanks @bluwy! - Fixes style-only change detection for Astro files if both the markup and styles are updated
v4.4.0
Minor Changes
-
#9614
d469bebd7b45b060dc41d82ab1cf18ee6de7e051
Thanks @matthewp! - Improves Node.js streaming performance.This uses an
AsyncIterable
instead of aReadableStream
to do streaming in Node.js. This is a non-standard enhancement by Node, which is done only in that environment. -
#10001
748b2e87cd44d8bcc1ab9d7e504703057e2000cd
Thanks @bholmesdev! - Removes content collection warning when a configured collection does not have a matching directory name. This should resolvei18n
collection warnings for Starlight users.This also ensures configured collection names are always included in
getCollection()
andgetEntry()
types even when a matching directory is absent. We hope this allows users to discover typos during development by surfacing type information. -
#10074
7443929381b47db0639c49a4d32aec4177bd9102
Thanks @Princesseuh! - Add a UI showing the list of found problems when using the audit app in the dev toolbar -
#10099
b340f8fe3aaa81e38c4f1aa41498b159dc733d86
Thanks @martrapp! - Fixes a regression where view transition names containing special characters such as spaces or punctuation stopped working.Regular use naming your transitions with
transition: name
is unaffected.However, this fix may result in breaking changes if your project relies on the particular character encoding strategy Astro uses to translate
transition:name
directives into values of the underlying CSSview-transition-name
property. For example,Welcome to Astro
is now encoded asWelcome_20to_20Astro_2e
.This mainly affects spaces and punctuation marks but no Unicode characters with codes >= 128.
-
#9976
91f75afbc642b6e73dd4ec18a1fe2c3128c68132
Thanks @OliverSpeir! - Adds a new optionalastro:assets
image attributeinferSize
for use with remote images.Remote images can now have their dimensions inferred just like local images. Setting
inferSize
totrue
allows you to usegetImage()
and the<Image />
and<Picture />
components without setting thewidth
andheight
properties.
v4.3.7
Patch Changes
-
#9857
73bd900754365b006ee730df9f379ba924e5b3fa
Thanks @iamyunsin! - Fixes false positives in the dev overlay audit when multiplerole
values exist. -
#10075
71273edbb429b5afdba6f8ee14681b66e4c09ecc
Thanks @lilnasy! - Improves error messages for island hydration. -
#10072
8106178043050d142bf385bed2990730518f28e2
Thanks @lilnasy! - Clarifies error messages in endpoint routing. -
#9971
d9266c4467ca0faa1213c1a5995164e5655ab375
Thanks @mingjunlu! - Fixes an issue where ReadableStream wasn't canceled in dev mode
v4.3.6
Patch Changes
-
#10063
dac759798c111494e76affd2c2504d63944871fe
Thanks @marwan-mohamed12! - Movesshikiji-core
fromdevDependencies
todependencies
to prevent type errors -
#10067
989ea63bb2a5a670021541198aa70b8dc7c4bd2f
Thanks @ematipico! - Fixes a regression in theastro:i18n
module, where the functionsgetAbsoluteLocaleUrl
andgetAbsoluteLocaleUrlList
returned a URL with double slash with a certain combination of options. -
#10060
1810309e65c596266355c3b7bb36cdac70f3305e
Thanks @lilnasy! - Fixes an issue where custom client directives added by integrations broke builds with a custom root. -
#9991
8fb67c81bb84530b39df4a1449c0862def0854af
Thanks @ktym4a! - Increases compatibility with standard browser behavior by changing where view transitions occur on browser back navigation.
v4.3.5
Patch Changes
-
#10022
3fc76efb2a8faa47edf67562a1f0c84a19be1b33
Thanks @lilnasy! - Fixes a regression where types for theastro:content
module did not include required exports, leading to typescript errors. -
#10016
037e4f12dd2f460d66f72c9f2d992b95e74d2da9
Thanks @ematipico! - Fixes a bug where routes with a name that start with the name of thei18n.defaultLocale
were incorrectly returning a 404 response.
v4.3.4
Patch Changes
-
#10013
e6b5306a7de779ce495d0ff076d302de0aa57eaf
Thanks @delucis! - Fixes a regression in content collection types -
#10003
ce4283331f18c6178654dd705e3cf02efeef004a
Thanks @bholmesdev! - Adds support for.strict()
on content collection schemas when a customslug
is present.
v4.3.3
Patch Changes
-
#9998
18ac0940ea1b49b6b0ddd9be1f96aef416e2d7ee
Thanks @ematipico! - Fixes a bug inAstro.currentLocale
that wasn't returning the correct locale when a locale is configured viapath
-
#9998
18ac0940ea1b49b6b0ddd9be1f96aef416e2d7ee
Thanks @ematipico! - Fixes a regression inAstro.currentLocale
where it stopped working properly with dynamic routes -
#9956
81acac24a3cac5a9143155c1d9f838ea84a70421
Thanks @matthewp! - Fixes HMR for MDX dependencies in Content Collections -
#9999
c53a31321a935e4be04809046d7e0ba3cc41b272
Thanks @MoustaphaDev! - Rollbacks the feature which allowed to dynamically generate slots with variable slot names due to unexpected regressions. -
#9906
3c0876cbed5033e6b5b42cc2b9d8b393d7e5a55e
Thanks @florian-lefebvre! - Improves the types for theastro:content
module by making low fidelity types available before runningastro sync
v4.3.2
Patch Changes
-
#9932
9f0d89fa7e9e7c08c8600b0c49c2cce7489a7582
Thanks @ematipico! - Fixes a case where a warning was logged even when the featurei18nDomains
wasn't enabled -
#9907
6c894af5ab79f290f4ff7feb68617a66e91febc1
Thanks @ktym4a! - Load 404.html on all non-existent paths on astro preview.
v4.3.1
Patch Changes
-
#9841
27ea080e24e2c5cdc59b63b1dfe0a83a0c696597
Thanks @kristianbinau! - Makes the warning clearer when having a custombase
and requesting a public URL without it -
#9888
9d2fdb293d6a7323e10126cebad18ef9a2ea2800
Thanks @natemoo-re! - Improves error handling logic for theastro sync
command. -
#9918
d52529e09450c84933dd15d6481edb32269f537b
Thanks @LarryIVC! - Adds thename
attribute to the<details>
tag type -
#9938
1568afb78a163db63a4cde146dec87785a83db1d
Thanks @lilnasy! - Fixes a regression where middleware did not run for prerendered pages and endpoints. -
#9931
44674418965d658733d3602668a9354e18f8ef89
Thanks @lilnasy! - Fixes a regression where a response created withResponse.redirect
or containingnull
as the body never completed in node-based adapters.
v4.3.0
Minor Changes
-
#9839
58f9e393a188702eef5329e41deff3dcb65a3230
Thanks @Princesseuh! - Adds a newComponentProps
type export fromastro/types
to get the props type of an Astro component.
v4.2.8
Patch Changes
-
#9884
37369550ab57ca529fd6c796e5b0e96e897ca6e5
Thanks @lilnasy! - Fixes an issue where multiple cookies were sent in a single Set-Cookie header in the dev mode. -
#9876
e9027f194b939ac5a4d795ee1a2c24e4a6fbefc0
Thanks @friedemannsommer! - Fixes an issue where usingResponse.redirect
in an endpoint led to an error. -
#9882
13c3b712c7ba45d0081f459fc06f142216a4ec59
Thanks @natemoo-re! - Improves handling of YAML parsing errors -
#9878
a40a0ff5883c7915dd55881dcebd052b9f94a0eb
Thanks @lilnasy! - Fixes an issue where setting trailingSlash to "never" had no effect onAstro.url
.
v4.2.7
Patch Changes
-
#9840
70fdf1a5c660057152c1ca111dcc89ceda5c8840
Thanks @delucis! - ExposeContentConfig
type fromastro:content
-
#9865
00ba9f1947ca9016cd0ee4d8f6048027fab2ab9a
Thanks @ematipico! - Fixes a bug inAstro.currentLocale
where the value was incorrectly computed during the build. -
#9838
0a06d87a1e2b94be00a954f350c184222fa0594d
Thanks @lilnasy! - Fixes an issue whereastro:i18n
could not be used in framework components. -
Updated dependencies [
44c957f893c6bf5f5b7c78301de7b21c5975584d
]:
v4.2.6
Patch Changes
-
#9825
e4370e9e9dd862425eced25823c82e77d9516927
Thanks @tugrulates! - Fixes false positive aria role errors on interactive elements -
#9828
a3df9d83ca92abb5f08f576631019c1604204bd9
Thanks @ematipico! - Fixes a case where shared modules among pages and middleware were transformed to a no-op after the build. -
#9834
1885cea308a62b173a50967cf5a0b174b3c3f3f1
Thanks @Princesseuh! - Fixes third-party dev toolbar apps not loading correctly when using absolute paths on Windows
v4.2.5
Patch Changes
-
#9818
d688954c5adba75b0d676694fbf5fb0da1c0af13
Thanks @Princesseuh! - Improves the wording of a few confusing error messages -
#9680
5d7db1dbb0ff06db98e08b0ca241ff09d0b8b44d
Thanks @loucyx! - Fixes types generation from Content Collections config file -
#9822
bd880e8437ea2df16f322f604865c1148a9fd4cf
Thanks @liruifengv! - Applies the correct escaping to identifiers used withtransition:name
. -
#9830
f3d22136e53fd902310024519fc4de83f0a58039
Thanks @lilnasy! - Fixes an issue where 404 responses from endpoints were replaced with contents of 404.astro in dev mode. -
#9816
2a44c8f93201958fba2d1e83046eabcaef186b7c
Thanks @Princesseuh! - Adds telemetry for when apps are toggled in the dev toolbar. This data is completely anonymous and only the names of built-in apps are shared with us. This data will help us monitor how much the dev toolbar is used and which apps are used more. For more information on how Astro collects telemetry, visit the following page: https://astro.build/telemetry/ -
#9807
b3f313138bb314e2b416c29cda507383c2a9f816
Thanks @bluwy! - Fixes environment variables replacement forexport const prerender
-
#9790
267c5aa2c7706f0ea3447f20a09d85aa560866ad
Thanks @lilnasy! - Refactors internals of theastro:i18n
module to be more maintainable. -
#9776
dc75180aa698b298264362bab7f00391af427798
Thanks @lilnasy! - Simplifies internals that handle middleware.
v4.2.4
Patch Changes
-
#9792
e22cb8b10c0ca9f6d88cab53cd2713f57875ab4b
Thanks @tugrulates! - Accept aria roleswitch
on toolbar audit. -
#9606
e6945bcf23b6ad29388bbadaf5bb3cc31dd4a114
Thanks @eryue0220! - Fixes escaping behavior for.html
files and components -
#9786
5b29550996a7f5459a0d611feea6e51d44e1d8ed
Thanks @Fryuni! - Fixes a regression in routing priority for index pages in rest parameter folders and dynamic sibling trees.Considering the following tree:
src/pages/ ├── index.astro ├── static.astro ├── [dynamic_file].astro ├── [...rest_file].astro ├── blog/ │ └── index.astro ├── [dynamic_folder]/ │ ├── index.astro │ ├── static.astro │ └── [...rest].astro └── [...rest_folder]/ ├── index.astro └── static.astro
The routes are sorted in this order:
/src/pages/index.astro /src/pages/blog/index.astro /src/pages/static.astro /src/pages/[dynamic_folder]/index.astro /src/pages/[dynamic_file].astro /src/pages/[dynamic_folder]/static.astro /src/pages/[dynamic_folder]/[...rest].astro /src/pages/[...rest_folder]/static.astro /src/pages/[...rest_folder]/index.astro /src/pages/[...rest_file]/index.astro
This allows for index files to be used as overrides to rest parameter routes on SSR when the rest parameter matching
undefined
is not desired. -
#9775
075706f26d2e11e66ef8b52288d07e3c0fa97eb1
Thanks @lilnasy! - Simplifies internals that handle endpoints. -
#9773
9aa7a5368c502ae488d3a173e732d81f3d000e98
Thanks @LunaticMuch! - Raises the required vite version to address a vulnerability invite.server.fs.deny
that affected the dev mode. -
#9781
ccc05d54014e24c492ca5fddd4862f318aac8172
Thanks @stevenbenner! - Fix build failure when image file name includes special characters
v4.2.3
Patch Changes
-
#9768
eed0e8757c35dde549707e71c45862438a043fb0
Thanks @Princesseuh! - Fix apps being able to crash the dev toolbar in certain cases
v4.2.2
Patch Changes
-
#9712
ea6cbd06a2580527786707ec735079ff9abd0ec0
Thanks @bluwy! - Improves HMR behavior for style-only changes in.astro
files -
#9739
3ecb3ef64326a8f77aa170df1e3c89cb5c12cc93
Thanks @ematipico! - Makes i18n redirects take thebuild.format
configuration into account -
#9762
1fba85681e86aa83d24336d4209cafbc76b37607
Thanks @ematipico! - Addspopovertarget" to the attribute that can be passed to the
button` element -
#9605
8ce40a417c854d9e6a4fa7d5a85d50a6436b4a3c
Thanks @MoustaphaDev! - Adds support for dynamic slot names -
#9381
9e01f9cc1efcfb938355829676d51b24818ab2bb
Thanks @martrapp! - Improves the CLI output ofastro preferences list
to include additional relevant information -
#9741
73d74402007896204ee965f6553dc83b3dec8d2f
Thanks @taktran! - Fixes an issue where dot files were not copied over from the public folder to the output folder, when build command was run in a folder other than the root of the project. -
#9730
8d2e5db096f1e7b098511b4fe9357434a6ff0703
Thanks @Blede2000! - Allow i18n routing utilities like getRelativeLocaleUrl to also get the default local path when redirectToDefaultLocale is false -
Updated dependencies [
53c69dcc82cdf4000aff13a6c11fffe19096cf45
,2f81cffa9da9db0e2802d303f94feaee8d2f54ec
,a505190933365268d48139a5f197a3cfb5570870
]:
v4.2.1
Patch Changes
-
#9726
a4b696def3a7eb18c1ae48b10fd3758a1874b6fe
Thanks @Fryuni! - Fixes a regression in routing priority betweenindex.astro
and dynamic routes with rest parameters
v4.2.0
Minor Changes
-
#9566
165cfc154be477337037185c32b308616d1ed6fa
Thanks @OliverSpeir! - Allows remark plugins to pass options specifying how images in.md
files will be optimized -
#9661
d6edc7540864cf5d294d7b881eb886a3804f6d05
Thanks @ematipico! - Adds new helper functions for adapter developers.-
Astro.clientAddress
can now be passed directly to theapp.render()
method.
const response = await app.render(request, { clientAddress: '012.123.23.3' });
- Helper functions for converting Node.js HTTP request and response objects to web-compatible
Request
andResponse
objects are now provided as static methods on theNodeApp
class.
http.createServer((nodeReq, nodeRes) => { const request: Request = NodeApp.createRequest(nodeReq); const response = await app.render(request); await NodeApp.writeResponse(response, nodeRes); });
- Cookies added via
Astro.cookies.set()
can now be automatically added to theResponse
object by passing theaddCookieHeader
option toapp.render()
.
-const response = await app.render(request) -const setCookieHeaders: Array<string> = Array.from(app.setCookieHeaders(webResponse)); -if (setCookieHeaders.length) { - for (const setCookieHeader of setCookieHeaders) { - headers.append('set-cookie', setCookieHeader); - } -} +const response = await app.render(request, { addCookieHeader: true })
-
-
#9638
f1a61268061b8834f39a9b38bca043ae41caed04
Thanks @ematipico! - Adds a newi18n.routing
config optionredirectToDefaultLocale
to disable automatic redirects of the root URL (/
) to the default locale whenprefixDefaultLocale: true
is set.In projects where every route, including the default locale, is prefixed with
/[locale]/
path, this property allows you to control whether or notsrc/pages/index.astro
should automatically redirect your site visitors from/
to/[defaultLocale]
.You can now opt out of this automatic redirection by setting
redirectToDefaultLocale: false
:// astro.config.mjs export default defineConfig({ i18n: { defaultLocale: 'en', locales: ['en', 'fr'], routing: { prefixDefaultLocale: true, redirectToDefaultLocale: false, }, }, });
-
#9671
8521ff77fbf7e867701cc30d18253856914dbd1b
Thanks @bholmesdev! - Removes the requirement for non-content files and assets inside content collections to be prefixed with an underscore. For files with extensions like.astro
or.css
, you can now remove underscores without seeing a warning in the terminal.src/content/blog/ post.mdx - _styles.css - _Component.astro + styles.css + Component.astro
Continue to use underscores in your content collections to exclude individual content files, such as drafts, from the build output.
-
#9567
3a4d5ec8001ebf95c917fdc0d186d29650533d93
Thanks @OliverSpeir! - Improves the a11y-missing-content rule and error message for audit feature of dev-overlay. This also fixes an error where this check was falsely reporting accessibility errors. -
#9643
e9a72d9a91a3741566866bcaab11172cb0dc7d31
Thanks @blackmann! - Adds a newmarkdown.shikiConfig.transformers
config option. You can use this option to transform the Shikiji hast (AST format of the generated HTML) to customize the final HTML. Also updates Shikiji to the latest stable version.See Shikiji's documentation for more details about creating your own custom transformers, and a list of common transformers you can add directly to your project.
-
#9644
a5f1682347e602330246129d4666a9227374c832
Thanks @rossrobino! - Adds an experimental flagclientPrerender
to prerender your prefetched pages on the client with the Speculation Rules API.// astro.config.mjs { prefetch: { prefetchAll: true, defaultStrategy: 'viewport', }, experimental: { clientPrerender: true, }, }
Enabling this feature overrides the default
prefetch
behavior globally to prerender links on the client according to yourprefetch
configuration. Instead of appending a<link>
tag to the head of the document or fetching the page with JavaScript, a<script>
tag will be appended with the corresponding speculation rules.Client side prerendering requires browser support. If the Speculation Rules API is not supported,
prefetch
will fallback to the supported strategy.See the Prefetch Guide for more
prefetch
options and usage. -
#9439
fd17f4a40b83d14350dce691aeb79d87e8fcaf40
Thanks @Fryuni! - Adds an experimental flagglobalRoutePriority
to prioritize redirects and injected routes equally alongside file-based project routes, following the same route priority order rules for all routes.// astro.config.mjs export default defineConfig({ experimental: { globalRoutePriority: true, }, });
Enabling this feature ensures that all routes in your project follow the same, predictable route priority order rules. In particular, this avoids an issue where redirects or injected routes (e.g. from an integration) would always take precedence over local route definitions, making it impossible to override some routes locally.
The following table shows which route builds certain page URLs when file-based routes, injected routes, and redirects are combined as shown below:
- File-based route:
/blog/post/[pid]
- File-based route:
/[page]
- Injected route:
/blog/[...slug]
- Redirect:
/blog/tags/[tag]
->/[tag]
- Redirect:
/posts
->/blog
URLs are handled by the following routes:
Page Current Behavior Global Routing Priority Behavior /blog/tags/astro
Injected route /blog/[...slug]
Redirect to /tags/[tag]
/blog/post/0
Injected route /blog/[...slug]
File-based route /blog/post/[pid]
/posts
File-based route /[page]
Redirect to /blog
In the event of route collisions, where two routes of equal route priority attempt to build the same URL, Astro will log a warning identifying the conflicting routes.
- File-based route:
Patch Changes
-
#9719
7e1db8b4ce2da9e044ea0393e533c6db2561ac90
Thanks @bluwy! - Refactors Vite config to avoid Vite 5.1 warnings -
#9439
fd17f4a40b83d14350dce691aeb79d87e8fcaf40
Thanks @Fryuni! - Updates Astro's routing priority rules to prioritize the most specifically-defined routes.Now, routes with more defined path segments will take precedence over less specific routes.
For example,
/blog/posts/[pid].astro
(3 path segments) takes precedence over/blog/[...slug].astro
(2 path segments). This means that:-
/pages/blog/posts/[id].astro
will build routes of the form/blog/posts/1
and/blog/posts/a
-
/pages/blog/[...slug].astro
will build routes of a variety of forms, includingblog/1
and/blog/posts/1/a
, but will not build either of the previous routes.
For a complete list of Astro's routing priority rules, please see the routing guide. This should not be a breaking change, but you may wish to inspect your built routes to ensure that your project is unaffected.
-
-
#9706
1539e04a8e5865027b3a8718c6f142885e7c8d88
Thanks @bluwy! - Simplifies HMR handling, improves circular dependency invalidation, and fixes Astro styles invalidation -
Updated dependencies [
165cfc154be477337037185c32b308616d1ed6fa
,e9a72d9a91a3741566866bcaab11172cb0dc7d31
]:
v4.1.3
Patch Changes
-
#9665
d02a3c48a3ce204649d22e17b1e26fb5a6a60bcf
Thanks @bluwy! - Disables internal file watcher for one-off Vite servers to improve start-up performance -
#9664
1bf0ddd2777ae5f9fde3fd854a9e75aa56c080f2
Thanks @bluwy! - Improves HMR for Astro style and script modules -
#9668
74008cc23853ed507b144efab02300202c5386ed
Thanks @Princesseuh! - Fix the passthrough image service not generatingsrcset
values properly -
#9693
d38b2a4fe827e956662fcf457d1f1f84832c2f15
Thanks @kidylee! - Disables View Transition form handling when theaction
property points to an external URL -
#9678
091097e60ef38dadb87d7c8c1fc9cb939a248921
Thanks @ematipico! - Adds an error during the build phase in casei18n.routing.prefixDefaultLocale
is set totrue
and the index page is missing. -
#9659
39050c6e1f77dc21e87716d95e627a654828ee74
Thanks @Princesseuh! - Fix Astro wrongfully deleting certain images imported with?url
when used in tandem withastro:assets
-
#9685
35d54b3ddb3310ab4c505d49bd4937b2d25e4078
Thanks @lilnasy! - Fixes an issue where anchor elements within a custom component could not trigger a view transition.
v4.1.2
Patch Changes
-
#9642
cdb7bfa66260afc79b829b617492a01a709a86ef
Thanks @martrapp! - Fixes an issue where View Transitions did not work when navigating to the 404 page -
#9637
5cba637c4ec39c06794146b0c7fd3225d26dcabb
Thanks @bluwy! - Improves environment variables replacement in SSR -
#9658
a3b5695176cd0280438938c1d6caef478a571415
Thanks @martrapp! - Fixes an issue caused by trying to load text/partytown scripts during view transitions -
#9657
a4f90d95ff97abe59f2a1ef0956cab257ae36838
Thanks @ematipico! - Fixes a bug where the custom status code wasn't correctly computed in the dev server -
#9627
a700a20291e19cde23705e8e661e833aec7d3095
Thanks @lilnasy! - Adds a warning when setting cookies will have no effect -
#9652
e72efd6a9a1e2a70488fd225529617ffd8418534
Thanks @bluwy! - Improves environment variables handling by using esbuild to perform replacements -
#9560
8b9c4844f7b302380835154fab1c3489979fc07d
Thanks @bluwy! - Fixes tsconfig alias with import.meta.glob -
#9653
50f39183cfec4a4522c1f935d710e5d9b724993b
Thanks @Princesseuh! - Pin Sharp to 0.32.6 until we can raise our semver requirements. To use the latest version of Sharp, you can add it to your project's dependencies.
v4.1.1
Patch Changes
-
#9618
401fd3e8c8957a3bed6469a622cd67b157ca303f
Thanks @ldh3907! - Adds a second generic parameter toAPIRoute
to type theparams
-
#9600
47b951b3888a5a8a708d2f9b974f12fba7ec9ed3
Thanks @jacobdalamb! - Improves tailwind config file detection when adding the tailwind integration usingastro add tailwind
Tailwind config file ending in
.ts
,.mts
or.cts
will now be used instead of creating a newtailwind.config.mjs
when the tailwind integration is added usingastro add tailwind
. -
#9622
5156c740506cbf6ec85c95e1663c14cbd438d75b
Thanks @bluwy! - Fixes the Sharp image servicelimitInputPixels
option type
v4.1.0
Minor Changes
-
#9513
e44f6acf99195a3f29b8390fd9b2c06410551b74
Thanks @wtto00! - Adds a'load'
prefetch strategy to prefetch links on page load -
#9377
fe719e27a84c09e46b515252690678c174a25759
Thanks @bluwy! - Adds "Missing ARIA roles check" and "Unsupported ARIA roles check" audit rules for the dev toolbar -
#9573
2a8b9c56b9c6918531c57ec38b89474571331aee
Thanks @bluwy! - Allows passing a string to--open
andserver.open
to open a specific URL on startup in development -
#9544
b8a6fa8917ff7babd35dafb3d3dcd9a58cee836d
Thanks @bluwy! - Adds a helpful error for static sites when you use theastro preview
command if you have not previously runastro build
. -
#9546
08402ad5846c73b6887e74ed4575fd71a3e3c73d
Thanks @bluwy! - Adds an option for the Sharp image service to allow large images to be processed. SetlimitInputPixels: false
to bypass the default image size limit:// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ image: { service: { entrypoint: 'astro/assets/services/sharp', config: { limitInputPixels: false, }, }, }, });
-
#9596
fbc26976533bbcf2de9d6dba1aa3ea3dc6ce0853
Thanks @Princesseuh! - Adds the ability to set arootMargin
setting when using theclient:visible
directive. This allows a component to be hydrated when it is near the viewport, rather than hydrated when it has entered the viewport.<!-- Load component when it's within 200px away from entering the viewport --> <Component client:visible={{ rootMargin: '200px' }} />
-
#9063
f33fe3190b482a42ebc68cc5275fd7f2c49102e6
Thanks @alex-sherwin! - Cookie encoding / decoding can now be customizedAdds new
encode
anddecode
functions to allow customizing how cookies are encoded and decoded. For example, you can bypass the default encoding viaencodeURIComponent
when adding a URL as part of a cookie:
v4.0.9
Patch Changes
-
#9571
ec71f03cfd9b8195fb21c92dfda0eff63b6ebeed
Thanks @bluwy! - Removes telemetry for unhandled errors in the dev server -
#9548
8049f0cd91b239c52e37d571e3ba3e703cf0e4cf
Thanks @bluwy! - Fixes error overlay display on URI malformed error -
#9504
8cc3d6aa46f438d668516539c34b48ad748ade39
Thanks @matiboux! - Implement i18n'sgetLocaleByPath
function -
#9547
22f42d11a4fd2e154a0c5873c4f516584e383b70
Thanks @bluwy! - Prevents ANSI codes from rendering in the error overlay -
#9446
ede3f7fef6b43a08c9371f7a2531e2eef858b94d
Thanks @alexnguyennz! - Toggle dev toolbar hitbox height when toolbar is visible -
#9572
9f6453cf4972ac28eec4f07a1373feaa295c8864
Thanks @bluwy! - Documents supported--host
and--port
flags inastro preview --help
-
#9540
7f212f0831d8cd899a86fb94899a7cad8ec280db
Thanks @matthewp! - Fixes remote images with encoded characters -
#9559
8b873bf1f343efc1f486d8ef53c38380e2373c08
Thanks @sygint! - Adds 'starlight' to the displayed options forastro add
-
#9537
16e61fcacb98e6bd948ac240bc082659d70193a4
Thanks @walter9388! -<Image />
srcset now parses encoded paths correctly
v4.0.8
Patch Changes
-
#9522
bb1438d20d325acd15f3755c6e306e45a7c64bcd
Thanks @Zegnat! - Add support for autocomplete attribute to the HTML button type. -
#9531
662f06fd9fae377bed1aaa49adbba3542cced087
Thanks @bluwy! - Fixes duplicated CSS modules content when it's imported by both Astro files and framework components -
#9501
eb36e95596fcdb3db4a31744e910495e22e3af84
Thanks @Princesseuh! - Export JSX namespace fromastro/jsx-runtime
for language tooling to consume -
#9492
89a2a07c2e411cda32244b7b05d3c79e93f7dd84
Thanks @lilnasy! - Improves error message for the case where two similarly named files result in the same content entry. -
#9532
7224809b73d2c3ec8e8aee2fa07463dc3b57a7a2
Thanks @bluwy! - Prevents unnecessary URI decoding when rendering a route -
#9478
dfef925e1fd07f3efb9fde6f4f23548f2af7dc75
Thanks @lilnasy! - Improves errors in certain places to also report their causes. -
#9463
3b0eaed3b544ef8c4ec1f7b0d5a8f475bcfeb25e
Thanks @Princesseuh! - Update Sharp version to ^0.33.1 -
#9512
1469e0e5a915e6b42b9953dbb48fe57a74518056
Thanks @mingjunlu! - Prevents dev toolbar tooltip from overflowing outside of the screen -
#9497
7f7a7f1aeaec6b327ae0e5e7470a4f46174bf8ae
Thanks @lilnasy! - Adds a helpful warning message for when an exported API Route is not uppercase.
v4.0.7
Patch Changes
-
#9452
e83b5095f
Thanks @florian-lefebvre! - Upgrades vite to latest -
#9352
f515b1421
Thanks @tmcw! - Add a more descriptive error message when image conversion fails -
#9486
f6714f677
Thanks @martrapp! - Fixes View Transition's form submission prevention, allowingpreventDefault
to be used. -
#9461
429be8cc3
Thanks @Skn0tt! - update import created forastro create netlify
-
#9464
faf6c7e11
Thanks @Fryuni! - Fixes an edge case with view transitions where some spec-compliantContent-Type
headers would cause a valid HTML response to be ignored. -
#9400
1e984389b
Thanks @bluwy! - Fixes importing dev toolbar apps from integrations on Windows -
#9487
19169db1f
Thanks @ematipico! - Improves logging of the generated pages during the build -
#9460
047d285be
Thanks @Princesseuh! - Fix Astro failing to build on certain exotic platform that reports their CPU count incorrectly -
#9466
5062d27a1
Thanks @knpwrs! - Updates view transitionsform
handling with logic for theenctype
attribute -
#9458
fa3078ce9
Thanks @ematipico! - Correctly handle the error in case the middleware throws a runtime error -
#9089
5ae657882
Thanks @lilnasy! - Fixes an issue where redirects did not replace slugs when the target of the redirect rule was not a verbatim route in the project. -
#9483
c384f6924
Thanks @Princesseuh! - Fix some false positive in the audit logic of the dev toolbar -
#9437
354a62c86
Thanks @dkobierski! - Fixes incorrect hoisted script paths when custom rollup output file names are configured -
#9475
7ae4928f3
Thanks @ematipico! - Remove the manifest from the generated files in thedist/
folder.
v4.0.6
Patch Changes
-
#9419
151bd429b
Thanks @matthewp! - Prevent Partytown from hijacking history APIs -
#9426
c01cc4e34
Thanks @alexnguyennz! - Fixes warning for external URL redirects -
#9445
f963d07f2
Thanks @natemoo-re! - Upgrades Astro's compiler to a crash when sourcemaps try to map multibyte characters -
#9126
6d2d0e279
Thanks @lilnasy! - Fixes an issue where error pages were not shown when trailingSlash was set to "always". -
#9434
c01580a2c
Thanks @ematipico! - Improves the error message when a middleware doesn't return aResponse
-
#9433
fcc2fd5b0
Thanks @ematipico! - Correctly merge headers from the original response when an error page is rendered
v4.0.5
Patch Changes
-
#9423
bda1d294f
Thanks @matthewp! - Error when getImage is passed an undefined src -
#9424
e1a5a2d36
Thanks @matthewp! - Prevents dev server from crashing on unhandled rejections, and adds a helpful error message -
#9404
8aa17a64b
Thanks @Princesseuh! - Fixed some newer HTML attributes not being included in our type definitions -
#9414
bebf38c0c
Thanks @Skn0tt! - Adds the feature name to logs about feature deprecation / experimental status. -
#9418
2c168af67
Thanks @alexnguyennz! - Fix broken link in CI instructions -
#9407
546d92c86
Thanks @matthewp! - Allows file URLs as import specifiers
v4.0.4
Patch Changes
-
#9380
ea0918259
Thanks @ematipico! - Correctly handle the rendering of i18n routes whenoutput: "hybrid"
is set -
#9374
65ddb0271
Thanks @bluwy! - Fixes an issue where prerendered route paths that end with.mjs
were removed from the final build -
#9375
26f7023d6
Thanks @bluwy! - Prettifies generated route names injected by integrations -
#9387
a7c75b333
Thanks @natemoo-re! - Fixes an edge case withastro add
that could install a prerelease instead of a stable release version.Prior to this change
astro add svelte
installssvelte@5.0.0-next.22
After this change
astro add svelte
installssvelte@4.2.8
-
Updated dependencies [
270c6cc27
]:
v4.0.3
Patch Changes
-
#9342
eb942942d
Thanks @Princesseuh! - Fix missingis:inline
type for the<slot />
element -
#9343
ab0281aee
Thanks @martrapp! - Adds source file properties to HTML elements only if devToolbar is enabled -
#9336
c76901065
Thanks @FredKSchott! - dev: fix issue where 404 and 500 responses were logged as 200 -
#9339
0bb3d5322
Thanks @morinokami! - Fixed the log message to correctly display 'enabled' and 'disabled' when toggling 'Disable notifications' in the Toolbar.
v4.0.2
Patch Changes
-
#9331
cfb20550d
Thanks @natemoo-re! - Updates an internal dependency (vitefu
) to avoid a commonpeerDependency
warning -
#9327
3878a91be
Thanks @doseofted! - Fixes an edge case for<form method="dialog">
when using View Transitions. Forms withmethod="dialog"
no longer require an additionaldata-astro-reload
attribute.
v4.0.1
Patch Changes
-
#9315
631e5d01b
Thanks @ematipico! - Fixes an issue where logs that weren't grouped together by route when building the app.
v4.0.0
Major Changes
-
#9138
abf601233
Thanks @bluwy! - Updates the unified, remark, and rehype dependencies to latest. Make sure to update your custom remark and rehype plugins as well to be compatible with the latest versions.Potentially breaking change: The default value of
markdown.remarkRehype.footnoteBackLabel
is changed from"Back to content"
to"Back to reference 1"
. See themdast-util-to-hast
commit for more information. -
#9181
cdabf6ef0
Thanks @bluwy! - Removes support for returning simple objects from endpoints (deprecated since Astro 3.0). You should return aResponse
instead.ResponseWithEncoding
is also removed. You can refactor the code to return a response with an array buffer instead, which is encoding agnostic.The types for middlewares have also been revised. To type a middleware function, you should now use
MiddlewareHandler
instead ofMiddlewareResponseHandler
. If you useddefineMiddleware()
to type the function, no changes are needed. -
#9263
3cbd8ea75
Thanks @bluwy! - Removes additional deprecated APIs:- The Astro preview server now returns a 404 status instead of a 301 redirect when requesting assets from the public directory without a base.
- Removes special handling when referencing the
astro/client-image
type. You should use theastro/client
type instead. - Removes deprecated built-in
rss
support ingetStaticPaths
. You should use@astrojs/rss
instead. - Removes deprecated
Astro.request.params
support. You should useAstro.params
instead.
-
#9271
47604bd5b
Thanks @matthewp! - Renames Dev Overlay to Dev ToolbarThe previously named experimental Dev Overlay is now known as the Astro Dev Toolbar. Overlay plugins have been renamed as Toolbar Apps. All APIs have been updated to reflect this name change.
To not break existing APIs, aliases for the Toolbar-based names have been created. The previous API names will continue to function but will be deprecated in the future. All documentation has been updated to reflect Toolbar-based names.
-
#9122
1c48ed286
Thanks @bluwy! - Adds Vite 5 support. There are no breaking changes from Astro. Check the Vite migration guide for details of the breaking changes from Vite instead. -
#9225
c421a3d17
Thanks @natemoo-re! - Removes the opt-inhandleForms
property for<ViewTransitions />
. Form submissions are now handled by default and this property is no longer necessary. This default behavior can be disabled by settingdata-astro-reload
on relevant<form />
elements. -
#9196
37697a2c5
Thanks @bluwy! - Removes support for Shiki custom language'spath
property. The language JSON file should be imported and passed to the option instead.// astro.config.js + import customLang from './custom.tmLanguage.json' export default defineConfig({ markdown: { shikiConfig: { langs: [ - { path: './custom.tmLanguage.json' }, + customLang, ], }, }, })
-
#9199
49aa215a0
Thanks @lilnasy! - This change only affects maintainers of third-party adapters. In the Integration API, theapp.render()
method of theApp
class has been simplified.Instead of two optional arguments, it now takes a single optional argument that is an object with two optional properties:
routeData
andlocals
.app.render(request) - app.render(request, routeData) + app.render(request, { routeData }) - app.render(request, routeData, locals) + app.render(request, { routeData, locals }) - app.render(request, undefined, locals) + app.render(request, { locals })
The current signature is deprecated but will continue to function until next major version.
-
#9212
c0383ea0c
Thanks @alexanderniebuhr! - Removes deprecatedapp.match()
option,matchNotFound
-
#9168
153a5abb9
Thanks @bluwy! - Removes deprecated features from Astro 3.0- Adapters are now required to pass
supportedAstroFeatures
to specify a list of features they support. - The
build.split
andbuild.excludeMiddleware
options are removed. UsefunctionPerRoute
andedgeMiddleware
from adapters instead. - The
markdown.drafts
option and draft feature is removed. Use content collections instead. - Lowercase endpoint names are no longer supported. Use uppercase endpoint names instead.
-
getHeaders()
exported from markdown files is removed. UsegetHeadings()
instead.
- Adapters are now required to pass
Minor Changes
-
#9105
6201bbe96
Thanks @FredKSchott! - Update CLI logging experience -
#9200
b4b851f5a
Thanks @ematipico! - Adds a new way to configure thei18n.locales
array.Developers can now assign a custom URL path prefix that can span multiple language codes:
// astro.config.mjs export default defineConfig({ experimental: { i18n: { defaultLocale: 'english', locales: ['de', { path: 'english', codes: ['en', 'en-US'] }, 'fr'], }, }, });
With the above configuration, the URL prefix of the default locale will be
/english/
. When computingAstro.preferredLocale
, Astro will use thecodes
. -
#9115
3b77889b4
Thanks @natemoo-re! - Adds theastro preferences
command to manage user preferences. User preferences are specific to individual Astro users, unlike theastro.config.mjs
file which changes behavior for everyone working on a project.User preferences are scoped to the current project by default, stored in a local
.astro/settings.json
file. Using the--global
flag, user preferences can also be applied to every Astro project on the current machine. Global user preferences are stored in an operating system-specific location.
v3.6.4
Patch Changes
-
#9226
8f8a40e93
Thanks @outofambit! - Fix i18n fallback routing with routing strategy of always-prefix -
#9179
3f28336d9
Thanks @lilnasy! - Fixes an issue where the presence of a slot in a page led to an error. -
#9219
067a65f5b
Thanks @natemoo-re! - Fix edge case where<style>
updates inside of.astro
files would ocassionally fail to update without reloading the page. -
#9236
27d3e86e4
Thanks @ematipico! - The configurationi18n.routingStrategy
has been replaced with an object calledrouting
.export default defineConfig({ experimental: { i18n: { - routingStrategy: "prefix-always", + routing: { + prefixDefaultLocale: true, + } } } })
export default defineConfig({ experimental: { i18n: { - routingStrategy: "prefix-other-locales", + routing: { + prefixDefaultLocale: false, + } } } })
v3.6.3
Patch Changes
-
#9193
0dc99c9a2
Thanks @florian-lefebvre! - Prevents the Code component from crashing if the lang isn't supported by falling back toplaintext
.
v3.6.2
Patch Changes
-
#9189
d90714fc3
Thanks @SpencerWhitehead7! - Fixes an issue where links with the same pathname as the current page, but different search params, were not prefetched.
v3.6.1
Patch Changes
-
#9173
04fdc1c61
Thanks @lilnasy! - Fixes an issue where having a middleware prevented the SSR app from being deployed on Netlify. -
#9186
607542c7c
Thanks @martrapp! - Fixes a view transition issue on webKit browsers that prevented scrolling to #fragments
v3.6.0
Minor Changes
-
#9090
c87223c21
Thanks @martrapp! - Take full control over the behavior of view transitions!Three new events now complement the existing
astro:after-swap
andastro:page-load
events:'astro:before-preparation'; // Control how the DOM and other resources of the target page are loaded 'astro:after-preparation'; // Last changes before taking off? Remove that loading indicator? Here you go! 'astro:before-swap'; // Control how the DOM is updated to match the new page
The
astro:before-*
events allow you to change properties and strategies of the view transition implementation. Theastro:after-*
events are notifications that a phase is complete. Head over to docs to see the full view transitions lifecycle including these new events! -
#9092
0ea4bd47e
Thanks @smitbarmase! - Changes the fallback prefetch behavior on slow connections and when data saver mode is enabled. Instead of disabling prefetch entirely, thetap
strategy will be used. -
#9166
cba6cf32d
Thanks @matthewp! - The Picture component is no longer experimentalThe
<Picture />
component, part ofastro:assets
, has exited experimental status and is now recommended for use. There are no code changes to the component, and no upgrade to your project is necessary.This is only a change in documentation/recommendation. If you were waiting to use the
<Picture />
component until it had exited the experimental stage, wait no more! -
#9092
0ea4bd47e
Thanks @smitbarmase! - Adds aignoreSlowConnection
option to theprefetch()
API to prefetch even on data saver mode or slow connection.
v3.5.7
Patch Changes
-
#9157
7ff8d62bf
Thanks @ematipico! - Revert fix around fallback system, which broken injected styles
v3.5.6
Patch Changes
-
#9121
f4efd1c80
Thanks @peng! - Adds a warning ifastro add
fetches a package but returns a non-404 status -
#9142
7d55cf68d
Thanks @ematipico! - Consistely emit fallback routes in the correct folders. -
#9119
306781795
Thanks @ematipico! - Fix a flaw in the i18n fallback logic, where the routes didn't preserve their metadata, such as hoisted scripts -
#9140
7742fd7dc
Thanks @martrapp! - View Transitions: handle clicks on SVGAElements and image maps" -
#9101
e3dce215a
Thanks @ematipico! - Add a new propertyAstro.currentLocale
, available wheni18n
is enabled.
v3.5.5
Patch Changes
-
#9091
536c6c9fd
Thanks @ematipico! - TheroutingStrategy
prefix-always
should not force its logic to endpoints. This fixes some regression withastro:assets
and@astrojs/rss
. -
#9102
60e8210b0
Thanks @Princesseuh! - In the dev overlay, when there's too many plugins enabled at once, some of the plugins will now be hidden in a separate sub menu to avoid the bar becoming too long
v3.5.4
Patch Changes
-
#9085
fc66ecff1
Thanks @ematipico! - When redirecting to the default root locale, Astro middleare should take into consideration the value oftrailingSlash
-
#9067
c6e449c5b
Thanks @danielhajduk! - Fixes display of debug messages when using the--verbose
flag -
#9075
c5dc8f2ec
Thanks @Princesseuh! - Fix Passthrough image service generating multiple images with the same content in certain cases -
#9083
4537ecf0d
Thanks @bluwy! - Uses newcreateShikiHighlighter
API from@astrojs/markdown-remark
to avoid code duplication -
#9084
045e5ec97
Thanks @matthewp! - Supportsformmethod
andformaction
for form overrides -
#9087
b895113a0
Thanks @alexanderniebuhr! - Fixes the regression which broke bundling of image service for pre-rendered pages, which was introduced by #8854 -
#9058
5ef89ef33
Thanks @Princesseuh! - Add a new settings panel to the dev overlay -
#9045
84312f24f
Thanks @rishi-raj-jain! - Fixes preview servertrailingSlash
handling for request URLs with query strings -
Updated dependencies [
4537ecf0d
]:
v3.5.3
Patch Changes
-
#9069
50164f5e3
Thanks @natemoo-re! - Fix a regression introduced in 3.5.0 related to content collection styles
v3.5.2
Patch Changes
-
#9057
1bc331968
Thanks @ematipico! - Correctly infer the presence of an user middleware
v3.5.1
Patch Changes
-
#9037
ea71975ec
Thanks @sarah11918! - Updates i18n configuration reference -
#9051
15b84ccb9
Thanks @ematipico! - Fix a regression where endpoints were incorrectly processed during SSG build whentrailingSlash: "always"
-
#9042
7dedd17fc
Thanks @rishi-raj-jain! - Safely bail when thexclip
command does not exist on Linux when trying to copy to clipboard withastro info
-
#9050
bf0286e50
Thanks @Princesseuh! - Fix --verbose flag not working -
#9049
49b82edb2
Thanks @Princesseuh! - Fix image errors when images were used on the client
v3.5.0
Minor Changes
-
#8869
f5bdfa272
Thanks @matthewp! - ## Integration Hooks to add MiddlewareIt's now possible in Astro for an integration to add middleware on behalf of the user. Previously when a third party wanted to provide middleware, the user would need to create a
src/middleware.ts
file themselves. Now, adding third-party middleware is as easy as adding a new integration.For integration authors, there is a new
addMiddleware
function in theastro:config:setup
hook. This function allows you to specify a middleware module and the order in which it should be applied:// my-package/middleware.js import { defineMiddleware } from 'astro:middleware'; export const onRequest = defineMiddleware(async (context, next) => { const response = await next(); if (response.headers.get('content-type') === 'text/html') { let html = await response.text(); html = minify(html); return new Response(html, { status: response.status, headers: response.headers, }); } return response; });
You can now add your integration's middleware and specify that it runs either before or after the application's own defined middleware (defined in
src/middleware.{js,ts}
)// my-package/integration.js export function myIntegration() { return { name: 'my-integration', hooks: { 'astro:config:setup': ({ addMiddleware }) => { addMiddleware({ entrypoint: 'my-package/middleware', order: 'pre', }); }, }, }; }
-
#8854
3e1239e42
Thanks @natemoo-re! - Provides a new, experimental build cache for Content Collections as part of the Incremental Build RFC. This includes multiple refactors to Astro's build process to optimize how Content Collections are handled, which should provide significant performance improvements for users with many collections.Users building a
static
site can opt-in to preview the new build cache by adding the following flag to your Astro config:// astro.config.mjs export default { experimental: { contentCollectionCache: true, }, };
When this experimental feature is enabled, the files generated from your content collections will be stored in the
cacheDir
(by default,node_modules/.astro
) and reused between builds. Most CI environments automatically restore files innode_modules/
by default.In our internal testing on the real world Astro Docs project, this feature reduces the bundling step of
astro build
from 133.20s to 10.46s, about 92% faster. The end-to-endastro build
process used to take 4min 58s and now takes just over1min
for a total reduction of 80%.If you run into any issues with this experimental feature, please let us know!
You can always bypass the cache for a single build by passing the
--force
flag toastro build
.astro build --force
-
#8963
fda3a0213
Thanks @matthewp! - Form support in View Transitions routerThe
<ViewTransitions />
router can now handle form submissions, allowing the same animated transitions and stateful UI retention on form posts that are already available on<a>
links. With this addition, your Astro project can have animations in all of these scenarios:- Clicking links between pages.
- Making stateful changes in forms (e.g. updating site preferences).
- Manually triggering navigation via the
navigate()
API.
This feature is opt-in for semver reasons and can be enabled by adding the
handleForms
prop to the ` component:
v3.4.4
Patch Changes
-
#9000
35739d01e
Thanks @martrapp! - Fixes an error in dev mode on Safari where view transitions prevented navigating to pages withclient:only
components -
#9014
d979b8f0a
Thanks @Princesseuh! - Add animations, shadows and general styling tweaks to the Dev Overlay to better match the intended design. -
#8996
3988bbcc9
Thanks @bluwy! - Adds compatibility for shiki languages with thepath
property -
#8986
910eb00fe
Thanks @Princesseuh! - Fixsizes
attribute not being present onsource
elements when using it on the Picture component
v3.4.3
Patch Changes
-
#8981
ab7e745cc
Thanks @matthewp! - Increase the scroll restoration throttle time -
#8940
937522fb7
Thanks @MarvinXu! - Omit nullish and falsy (non-zero) values when stringifying object-formstyle
attributes in Astro files
v3.4.2
Patch Changes
-
#8977
40a061679
Thanks @matthewp! - Prevent route announcer from being visible -
#8929
2da33b7a1
Thanks @lilnasy! - Fixes an issue where rendering the same slot multiple times invoked it only once. -
#8978
cc3278bb6
Thanks @Princesseuh! - In the dev overlay, add a tooltip showing the currently hovered / focused plugin's name
v3.4.1
Patch Changes
-
#8966
262cef248
Thanks @Princesseuh! - Fix Dev Overlay not working properly when view transitions are enabled -
#8932
5fed432b0
Thanks @Princesseuh! - Fixed window component appearing over the dev overlay on small windows. Added a maximum length to sections of the tooltip component -
#8965
430c470ac
Thanks @matthewp! - Move VT route announcer styles to a classDoing so allows stricter CSP policies.
-
#8762
35cd810f0
Thanks @evadecker! - Upgrades Zod to 3.22.4 -
#8928
ca90b47cf
Thanks @HiDeoo! - Renames dev overlay UI Toolkit component names for consistency.
v3.4.0
Minor Changes
-
#8755
fe4079f05
Thanks @matthewp! - Page PartialsA page component can now be identified as a partial page, which will render its HTML content without including a
<! DOCTYPE html>
declaration nor any<head>
content.A rendering library, like htmx or Stimulus or even just jQuery can access partial content on the client to dynamically update only parts of a page.
Pages marked as partials do not have a
doctype
or any head content included in the rendered result. You can mark any page as a partial by setting this option:
v3.3.4
Patch Changes
-
#8877
26b77b8fe
Thanks @bluwy! - Fixes CSS modules ordering by rendering styles before links -
Updated dependencies [
341ef6578
]:
v3.3.3
Patch Changes
-
#8870
5ea6ee0ed
Thanks @xstevenyung! - prevent production install on astro add cmd -
#8840
5c888c10b
Thanks @martrapp! - Fixes styles ofclient:only
components not persisting during view transitions in dev mode -
#8814
ad2bb9155
Thanks @lilnasy! - Fix an issue where500.astro
did not render when the middleware threw an error. -
#8863
326e17893
Thanks @florian-lefebvre! - Fixes an issue where the dev server logged the full file path on updates.
v3.3.2
Patch Changes
-
#8852
2c18e2d12
Thanks @rayriffy! - Only use Vite config from astro.config.mjs as source of truth -
#8828
11f45b9a3
Thanks @rishi-raj-jain! - fix file system path references -
#8779
2b8a459a6
Thanks @ematipico! - Enriches the explanation of thebase
configuration with examples.
v3.3.1
Patch Changes
-
#8823
8946f2a25
Thanks @Princesseuh! - Fix duplicate images being created in some cases when using densities and/or widths -
#8842
b405b039a
Thanks @Princesseuh! - Fixes Picture component not taking into account the fallback format specified -
#8827
ce3025cfa
Thanks @rishi-raj-jain! - better error handling there whenever we don't get a normal 200 response -
#8817
f8de1983b
Thanks @bluwy! - Fix error overlay syntax highlighting -
#8838
2f9e2083d
Thanks @dominikg! - deps: unpin and update tsconfck from3.0.0-next.9
to^3.0.0
-
#8823
8946f2a25
Thanks @Princesseuh! - fix remote srcset images not being resized
v3.3.0
Minor Changes
-
#8808
2993055be
Thanks @delucis! - Adds support for an--outDir
CLI flag toastro build
-
#8502
c4270e476
Thanks @bluwy! - Updates the internalshiki
syntax highlighter toshikiji
, an ESM-focused alternative that simplifies bundling and maintenance.There are no new options and no changes to how you author code blocks and syntax highlighting.
Potentially breaking change: While this refactor should be transparent for most projects, the transition to
shikiji
now produces a smaller HTML markup by attaching a fallbackcolor
style to thepre
orcode
element, instead of to the linespan
directly. For example:Before:
<code class="astro-code" style="background-color: #​24292e"> <pre> <span class="line" style="color: #e1e4e8">my code</span> </pre> </code>
After:
<code class="astro-code" style="background-color: #​24292e; color: #e1e4e8"> <pre> <span class="line">my code<span> </pre> </code>
This does not affect the colors as the
span
will inherit thecolor
from the parent, but if you're relying on a specific HTML markup, please check your site carefully after upgrading to verify the styles. -
#8798
f369fa250
Thanks @Princesseuh! - Fixedtsconfig.json
's new array format forextends
not working. This was done by migrating Astro to usetsconfck
instead oftsconfig-resolver
to find and parsetsconfig.json
files. -
#8620
b2ae9ee0c
Thanks @Princesseuh! - Adds experimental support for generatingsrcset
attributes and a new<Picture />
component.
v3.2.4
Patch Changes
-
#8638
160d1cd75
Thanks @florian-lefebvre! - The@astrojs/tailwind
integration now creates atailwind.config.mjs
file by default -
#8767
30de32436
Thanks @martrapp! - Revert fix #8472#8472 caused some style files from previous pages to not be cleanly deleted on view transitions. For a discussion of a future fix for the original issue #8144 see #8745.
-
#8741
c4a7ec425
Thanks @lilnasy! - Fixed an issue on Windows where lowercase drive letters in current working directory led to missing scripts and styles. -
#8772
c24f70d91
Thanks @martrapp! - Fix flickering during view transitions -
#8754
93b092266
Thanks @bluwy! - Make CSS chunk names less confusing -
#8776
29cdfa024
Thanks @martrapp! - Fix transition attributes on islands -
#8773
eaed844ea
Thanks @sumimakito! - Fix an issue where HTML attributes do not render if getHTMLAttributes in an image service returns a Promise
v3.2.3
Patch Changes
-
#8737
6f60da805
Thanks @ematipico! - Add provenance statement when publishing the library from CI -
#8747
d78806dfe
Thanks @natemoo-re! - Improve error message when user attempts to render a dynamic component reference -
#8736
d1c75fe15
Thanks @bluwy! - Fixtsconfig.json
update causing the server to crash -
#8743
aa265d730
Thanks @bluwy! - Remove unused CSS output files when inlined -
#8700
78adbc443
Thanks @jacobthesheep! - Update link for Netlify SSR -
#8729
21e0757ea
Thanks @lilnasy! - Node-based adapters now create less server-side javascript -
#8730
357270f2a
Thanks @natemoo-re! - Improveastro info
copy to clipboard compatability
v3.2.2
Patch Changes
-
#8724
455af3235
Thanks @bluwy! - Fix CSS styles on Windows -
#8710
4c2bec681
Thanks @matthewp! - Fixes View transition styles being missing when component used multiple times
v3.2.1
Patch Changes
-
#8680
31c59ad8b
Thanks @bluwy! - Fix hydration on slow connection -
#8698
47ea310f0
Thanks @Princesseuh! - Use a Node-specific image endpoint to resolve images in dev and Node SSR. This should fix many issues related to getting 404 from the _image endpoint under certain configurations -
#8706
345808170
Thanks @bluwy! - Fix duplicated Astro and Vite injected styles
v3.2.0
Minor Changes
-
#8696
2167ffd72
Thanks @matthewp! - Support adding integrations dynamicallyAstro integrations can now themselves dynamically add and configure additional integrations during set-up. This makes it possible for integration authors to bundle integrations more intelligently for their users.
In the following example, a custom integration checks whether
@astrojs/sitemap
is already configured. If not, the integration adds Astro’s sitemap integration, passing any desired configuration options:import sitemap from '@​astrojs/sitemap'; import type { AstroIntegration } from 'astro'; const MyIntegration = (): AstroIntegration => { return { name: 'my-integration', 'astro:config:setup': ({ config, updateConfig }) => { // Look for sitemap in user-configured integrations. const userSitemap = config.integrations.find( ({ name }) => name === '@​astrojs/sitemap' ); if (!userSitemap) { // If sitemap wasn’t found, add it. updateConfig({ integrations: [sitemap({ /* opts */ }], }); } }, }; };
-
#8696
2167ffd72
Thanks @matthewp! - View transitions can now be triggered from JavaScript!Import the client-side router from "astro:transitions/client" and enjoy your new remote control for navigation:
import { navigate } from 'astro:transitions/client'; // Navigate to the selected option automatically. document.querySelector('select').onchange = (ev) => { let href = ev.target.value; navigate(href); };
-
#8696
2167ffd72
Thanks @matthewp! - Route Announcer in<ViewTransitions />
The View Transitions router now does route announcement. When transitioning between pages with a traditional MPA approach, assistive technologies will announce the page title when the page finishes loading. This does not automatically happen during client-side routing, so visitors relying on these technologies to announce routes are not aware when a page has changed.
The view transitions route announcer runs after the
astro:page-load
event, looking for the page<title>
to announce. If one cannot be found, the announcer falls back to the first<h1>
it finds, or otherwise announces the pathname. We recommend you always include a<title>
in each page for accessibility.See the View Transitions docs for more on how accessibility is handled.
Patch Changes
-
#8647
408b50c5e
Thanks @lilnasy! - Fixed an issue where configured redirects with dynamic routes did not work in dev mode. -
#8696
2167ffd72
Thanks @matthewp! - Fix logLevel passed to Vite build -
#8696
2167ffd72
Thanks @matthewp! - Fix NoImageMetadata image path error message -
#8670
e797b6816
Thanks @MichailiK! - Fix asset optimization failing when outDir is outside the project directory -
#8684
824dd4670
Thanks @matthewp! - Support content collections with % in filename -
#8648
cfd895d87
Thanks @lilnasy! - Fixed an issue where a response with status code 404 led to an endless loop of implicit rerouting in dev mode.
v3.1.4
Patch Changes
-
#8646
69fbf95b2
Thanks @matthewp! - Fix cases of head propagation not occuring in dev server
v3.1.3
Patch Changes
-
#8591
863f5171e
Thanks @rishi-raj-jain! - add site url to the location of redirect -
#8633
63141f3f3
Thanks @Princesseuh! - Fix build not working when having multiple images in the same Markdown file -
#8636
974d5117a
Thanks @martrapp! - fix: no deletion of scripts during view transition -
#8645
cb838b84b
Thanks @matthewp! - Fix getDataEntryById to lookup by basename -
#8640
f36c4295b
Thanks @matthewp! - Warn on empty content collections -
#8615
4c4ad9d16
Thanks @alexanderniebuhr! - Improve the logging of assets for adapters that do not support image optimization
v3.1.2
Patch Changes
-
#8612
bcad715ce
Thanks @matthewp! - Ensure cookies are attached when middleware changes the Response -
#8598
bdd267d08
Thanks @Princesseuh! - Fix relative images in Markdown breaking the build process in certain circumstances -
#8382
e522a5eb4
Thanks @DerTimonius! - Do not throw an error for an empty collection directory. -
#8600
ed54d4644
Thanks @FredKSchott! - Improve config info telemetry -
#8592
70f2a8003
Thanks @bluwy! - Fix alias plugin causing CSS ordering issue -
#8614
4398e9298
Thanks @lilnasy! - Fixed an issue where spaces and unicode characters in project path prevented middleware from running. -
#8603
8f8b9069d
Thanks @matthewp! - Prevent body scripts from re-executing on navigation -
#8609
5a988eaf6
Thanks @bluwy! - Fix Astro HMR from a CSS dependency -
Updated dependencies [
ed54d4644
]:
v3.1.1
Patch Changes
-
#8580
8d361169b
Thanks @rishi-raj-jain! - add hide to style & script generated for island -
#8568
95b5f6280
Thanks @Princesseuh! - Fix small types issues related toastro:assets
's AVIF support andgetImage
-
#8579
0586e20e8
Thanks @rishi-raj-jain! - show redirect symbol as of the page
v3.1.0
Minor Changes
-
#8467
ecc65abbf
Thanks @Princesseuh! - Add a newimage.endpoint
setting to allow using a custom endpoint in dev and SSR -
#8518
2c4fc878b
Thanks @Princesseuh! - Adds support for using AVIF (.avif
) files with the Image component. Importing an AVIF file will now correctly return the same object shape as other image file types. See the Image docs for more information on the different properties available on the returned object. -
#8464
c92e0acd7
Thanks @Princesseuh! - Add types for the object syntax forstyle
(ex:style={{color: 'red'}}
)
Patch Changes
-
#8532
7522bb491
Thanks @bluwy! - Improve markdown rendering performance by sharing processor instance -
#8537
f95febf96
Thanks @martrapp! - bugfix checking media-type in client-side router -
#8536
b85c8a78a
Thanks @Princesseuh! - Improved error messages aroundastro:assets
-
#7607
45364c345
Thanks @FineWolf! - AddCollectionKey
,ContentCollectionKey
, andDataCollectionKey
exports toastro:content
v3.0.13
Patch Changes
-
#8484
78b82bb39
Thanks @bb010g! - fix(astro): add support forsrc/content/config.mts
files -
#8504
5e1099f68
Thanks @ematipico! - Minify the HTML of the redicts emitted during the build. -
#8480
644825845
Thanks @yamanoku! - Do not add type="text/css" to inline style tag -
#8472
fa77fa63d
Thanks @matthewp! - Prevent client:only styles from being removed in dev (View Transitions) -
#8506
23f9536de
Thanks @mascii! - chore: correct description ofattribute
option inscopedStyleStrategy
-
#8505
2db9762eb
Thanks @martrapp! - Restore horizontal scroll position on history navigation (view transitions) -
#8461
435b10549
Thanks @rdwz! - Fix lang unspecified code blocks (markdownlint MD040) -
#8492
a6a516d94
Thanks @xiBread! - fix(types): makeimage.service
optional -
#8522
43bc5f2a5
Thanks @martrapp! - let view transitions handle same origin redirects -
#8491
0ca332ba4
Thanks @martrapp! - Bugfixes for back navigation in the view transition client-side router
v3.0.12
Patch Changes
-
#8449
7eea37a07
Thanks @matthewp! - Fix multi-layout head injection
v3.0.11
Patch Changes
-
#8441
f66053a1e
Thanks @martrapp! - Only transition between pages where both have ViewTransitions enabled -
#8443
0fa483283
Thanks @the-dijkstra! - Fix "Cannot read properties of null" error in CLI code -
Updated dependencies [
f3f62a5a2
]:
v3.0.10
Patch Changes
-
#8437
b3cf1b327
Thanks @Princesseuh! - Fix imports of images with uppercased file extensions not working -
#8440
b92d066b7
Thanks @natemoo-re! - Fix issue whererenderToFinalDestination
would throw in internal Astro code
v3.0.9
Patch Changes
-
#8351
7d95bd9ba
Thanks @lilnasy! - Fixed a case where dynamic imports tried to preload inlined stylesheets. -
#8353
1947ef7a9
Thanks @elevatebart! - Astro will now skip asset optimization when there is a query in the import. Instead, it will let vite deal with it using plugins.<script> // This will not return an optimized asset import Component from './Component.vue?component'; </script>
-
#8424
61ad70fdc
Thanks @itsmatteomanf! - Fixes remote assets caching logic to not use expired assets -
#8306
d2f2a11cd
Thanks @jacobthesheep! - Support detecting Bun when logging messages with package manager information. -
#8414
5126c6a40
Thanks @Princesseuh! - Fix missing type forimageConfig
export fromastro:assets
-
#8416
48ff7855b
Thanks @Princesseuh! - Installing will no longer fail when Sharp can't be installed -
#8332
8935b3b46
Thanks @martrapp! - Fix scroll position when navigating back from page w/o ViewTransitions
v3.0.8
Patch Changes
-
#8388
362491b8d
Thanks @natemoo-re! - Properly handleBEFORE_HYDRATION_SCRIPT
generation, fixing MIME type error on hydration. -
#8370
06e7256b5
Thanks @itsmatteomanf! - Removed extra curly brace.
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot. The local configuration can be found in the local Renovate Bot repository.