Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/node@8.0.0
Major Changes
#9661
d6edc7540864cf5d294d7b881eb886a3804f6d05
Thanks @ematipico! - If host is unset in standalone mode, the server host will now fallback tolocalhost
instead of127.0.0.1
. Whenlocalhost
is used, the operating system can decide to use either::1
(ipv6) or127.0.0.1
(ipv4) itself. This aligns with how the Astro dev and preview server works by default.If you relied on
127.0.0.1
(ipv4) before, you can set theHOST
environment variable to127.0.0.1
to explicitly use ipv4. For example,HOST=127.0.0.1 node ./dist/server/entry.mjs
.#9661
d6edc7540864cf5d294d7b881eb886a3804f6d05
Thanks @ematipico! - Breaking: Minimum required Astro version is now 4.2.0.Reorganizes internals to be more maintainable.
Patch Changes
d6edc7540864cf5d294d7b881eb886a3804f6d05
Thanks @ematipico! - Fixes an issue where the preview server appeared to be ready to serve requests before binding to a port.@astrojs/vercel@7.0.0
Major Changes
d6edc7540864cf5d294d7b881eb886a3804f6d05
Thanks @ematipico! - Breaking: Minimum required Astro version is now 4.2.0.Reorganizes internals to be more maintainable.
astro@4.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.Request
andResponse
objects are now provided as static methods on theNodeApp
class.Astro.cookies.set()
can now be automatically added to theResponse
object by passing theaddCookieHeader
option toapp.render()
.#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
:#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.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.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.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:
/blog/post/[pid]
/[page]
/blog/[...slug]
/blog/tags/[tag]
->/[tag]
/posts
->/blog
URLs are handled by the following routes:
/blog/tags/astro
/blog/[...slug]
/tags/[tag]
/blog/post/0
/blog/[...slug]
/blog/post/[pid]
/posts
/[page]
/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.
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 invalidationUpdated dependencies [
165cfc154be477337037185c32b308616d1ed6fa
,e9a72d9a91a3741566866bcaab11172cb0dc7d31
]:@astrojs/markdown-remark@4.1.0
Minor Changes
#9566
165cfc154be477337037185c32b308616d1ed6fa
Thanks @OliverSpeir! - Allows remark plugins to pass options specifying how images in.md
files will be optimized#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.
@astrojs/markdoc@0.8.3
Patch Changes
e9a72d9a91a3741566866bcaab11172cb0dc7d31
Thanks @blackmann! - Removes unnecessaryshikiji
dependency@astrojs/mdx@2.0.5
Patch Changes
#9706
1539e04a8e5865027b3a8718c6f142885e7c8d88
Thanks @bluwy! - Removes redundant HMR handling codeUpdated dependencies [
165cfc154be477337037185c32b308616d1ed6fa
,e9a72d9a91a3741566866bcaab11172cb0dc7d31
]:@astrojs/sitemap@3.0.5
Patch Changes
b325fada567892b63ecae87c1ff845c8514457ba
Thanks @andremralves! - Fixes generated URLs when using abase
with a SSR adapter