Releases: withastro/astro
@astrojs/[email protected]
[email protected]
Patch Changes
- #8028
8292c4131
Thanks @natemoo-re! - Improve yarn berry support
[email protected]
[email protected]
Patch Changes
-
#8027
1b8d30209
Thanks @natemoo-re! - Ensure dev server restarts respect whenbase
is removed -
#8033
405913cdf
Thanks @matthewp! - Prevent script re-evaluation on page transition -
#8036
87d4b1843
Thanks @ematipico! - Fix a bug where the middleware entry point was passed to integrations even though the configurationbuild.excludeMiddleware
was set tofalse
. -
#8022
c23377caa
Thanks @bluwy! - Always return a new array instance fromgetCollection
in prod -
#8013
86bee2812
Thanks @martrapp! - Links with hash marks now trigger view transitions if they lead to a different page. Links to the same page do not trigger view transitions.
@astrojs/[email protected]
@astrojs/[email protected]
@astrojs/[email protected]
Minor Changes
-
#7975
f974c95a2
Thanks @lilnasy! - If you are using Netlify's On-demand Builders, you can now specify how long your pages should remain cached. By default, all pages will be rendered on first visit and reused on every subsequent visit until a redeploy. To set a custom revalidation time, call theruntime.setBuildersTtl()
local in either your frontmatter or middleware.--- import Layout from '../components/Layout.astro'; if (import.meta.env.PROD) { // revalidates every 45 seconds Astro.locals.runtime.setBuildersTtl(45); } --- <Layout title="Astro on Netlify"> {new Date(Date.now())} </Layout>
Patch Changes
@astrojs/[email protected]
Minor Changes
-
#7541
ffcfcddb7
Thanks @alexanderniebuhr! - ThegetRuntime
utility has been deprecated and should be updated to the newAstro.locals
API.- import { getRuntime } from '@astrojs/cloudflare/runtime'; - getRuntime(Astro.request); + const runtime = Astro.locals.runtime;
Patch Changes
[email protected]
Major Changes
-
#7952
3c3100851
Thanks @astrobot-houston! - Remove support forAstro.__renderMarkdown
which is used by@astrojs/markdown-component
.The
<Markdown />
component was deprecated in Astro v1 and is completely removed in v3. This integration must now be removed from your project.As an alternative, you can use community packages that provide a similar component like https://github.com/natemoo-re/astro-remote instead.
-
#8019
34cb20021
Thanks @bluwy! - Remove backwards-compatible kebab-case transform for camelCase CSS variable names passed to thestyle
attribute. If you were relying on the kebab-case transform in your styles, make sure to use the camelCase version to prevent missing styles. For example:--- const myValue = 'red'; --- <!-- input --> <div style={{ '--myValue': myValue }}></div> <!-- output (before) --> <div style="--my-value:var(--myValue);--myValue:red"></div> <!-- output (after) --> <div style="--myValue:red"></div>
<style> div { - color: var(--my-value); + color: var(--myValue); } </style>
-
#7893
7bd1b86f8
Thanks @ematipico! - Implements a new scope style strategy called"attribute"
. When enabled, styles are applied usingdata-*
attributes.The default value of
scopedStyleStrategy
is"attribute"
.If you want to use the previous behaviour, you have to use the
"where"
option:import { defineConfig } from 'astro/config'; export default defineConfig({ + scopedStyleStrategy: 'where', });
-
#7924
519a1c4e8
Thanks @matthewp! - Astro's JSX handling has been refactored with better support for each framework.Previously, Astro automatically scanned your components to determine which framework-specific transformations should be used. In practice, supporting advanced features like Fast Refresh with this approach proved difficult.
Now, Astro determines which framework to use with
include
andexclude
config options where you can specify files and folders on a per-framework basis. When using multiple JSX frameworks in the same project, users should manually control which files belong to each framework using theinclude
andexclude
options.export default defineConfig({ // The `include` config is only needed in projects that use multiple JSX frameworks; // if only using one no extra config is needed. integrations: [ preact({ include: ['**/preact/*'], }), react({ include: ['**/react/*'], }), solid({ include: ['**/solid/*'], }), ], });
-
#7878
0f637c71e
Thanks @bluwy! - The value ofimport.meta.env.BASE_URL
, which is derived from thebase
option, will no longer have a trailing slash added by default or whentrailingSlash: "ignore"
is set. The existing behavior ofbase
in combination withtrailingSlash: "always"
ortrailingSlash: "never"
is unchanged.If your
base
already has a trailing slash, no change is needed.If your
base
does not have a trailing slash, add one to preserve the previous behaviour:// astro.config.mjs - base: 'my-base', + base: 'my-base/',
Minor Changes
- #8012
866ed4098
Thanks @ematipico! - Add a newastro/errors
module. Developers can importAstroUserError
, and provide amessage
and an optionalhint
Patch Changes
-
#7998
65c354969
Thanks @bluwy! - Callastro sync
once before callingastro check
-
#7952
70f34f5a3
Thanks @astrobot-houston! - Remove StreamingCompatibleResponse polyfill -
#8011
5b1e39ef6
Thanks @bluwy! - Move hoisted script analysis optimization behind theexperimental.optimizeHoistedScript
option -
Updated dependencies [
b675acb2a
]:- @astrojs/[email protected]
@astrojs/[email protected]
Major Changes
-
#8015
9cc4e48e6
Thanks @matthewp! - Remove the Vercel Edge adapter@astrojs/vercel/serverless
now supports Edge middleware, so a separate adapter for Edge itself (deploying your entire app to the edge) is no longer necessary. Please update your Astro config to reflect this change:// astro.config.mjs import { defineConfig } from 'astro/config'; - import vercel from '@astrojs/vercel/edge'; + import vercel from '@astrojs/vercel/serverless'; export default defineConfig({ output: 'server', adapter: vercel({ + edgeMiddleware: true }), });
This adapter had several known limitations and compatibility issues that prevented many people from using it in production. To reduce maintenance costs and because we have a better story with Serveless + Edge Middleware, we are removing the Edge adapter.