diff --git a/.changeset/afraid-dots-whisper.md b/.changeset/afraid-dots-whisper.md new file mode 100644 index 000000000..272a1e212 --- /dev/null +++ b/.changeset/afraid-dots-whisper.md @@ -0,0 +1,29 @@ +--- +'@astrojs/cloudflare': major +'@astrojs/partytown': major +'@astrojs/tailwind': major +'@astrojs/netlify': major +'@astrojs/sitemap': major +'@astrojs/preact': major +'@astrojs/svelte': major +'@astrojs/vercel': major +'@astrojs/react': major +'@astrojs/solid-js': major +'@astrojs/deno': major +'@astrojs/node': major +'@astrojs/lit': major +'@astrojs/vue': major +'create-astro': major +'@astrojs/prism': major +'@astrojs/rss': major +'@astrojs/telemetry': major +'astro': major +'@astrojs/alpinejs': minor +'@astrojs/prefetch': minor +'@astrojs/markdoc': minor +'@astrojs/underscore-redirects': minor +'@astrojs/mdx': minor +'@astrojs/internal-helpers': minor +--- + +Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023. diff --git a/.changeset/angry-dogs-shake.md b/.changeset/angry-dogs-shake.md new file mode 100644 index 000000000..979fcf0f4 --- /dev/null +++ b/.changeset/angry-dogs-shake.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Use `undici` for File changeset for Node 16 compatibility diff --git a/.changeset/big-tips-whisper.md b/.changeset/big-tips-whisper.md new file mode 100644 index 000000000..ad532760f --- /dev/null +++ b/.changeset/big-tips-whisper.md @@ -0,0 +1,5 @@ +--- +'@astrojs/internal-helpers': patch +--- + +Trigger re-release to fix `collapseDuplicateSlashes` export diff --git a/.changeset/brave-cheetahs-float.md b/.changeset/brave-cheetahs-float.md new file mode 100644 index 000000000..84825ce0f --- /dev/null +++ b/.changeset/brave-cheetahs-float.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Do not throw Error when users pass an object with a "type" property diff --git a/.changeset/breezy-frogs-learn.md b/.changeset/breezy-frogs-learn.md deleted file mode 100644 index b3f2f86b9..000000000 --- a/.changeset/breezy-frogs-learn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/cloudflare': minor ---- - -More efficient \_routes.json diff --git a/.changeset/chatty-ways-hunt.md b/.changeset/chatty-ways-hunt.md new file mode 100644 index 000000000..d6a9584a1 --- /dev/null +++ b/.changeset/chatty-ways-hunt.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Adds a link to the error reference in the CLI when an error occurs diff --git a/.changeset/chilled-ducks-grin.md b/.changeset/chilled-ducks-grin.md new file mode 100644 index 000000000..b63b1f29c --- /dev/null +++ b/.changeset/chilled-ducks-grin.md @@ -0,0 +1,5 @@ +--- +'astro': major +--- + +Removed automatic flattening of `getStaticPaths` result. `.flatMap` and `.flat` should now be used to ensure that you're returning a flat array. diff --git a/.changeset/clever-bats-breathe.md b/.changeset/clever-bats-breathe.md new file mode 100644 index 000000000..2c1a6dc39 --- /dev/null +++ b/.changeset/clever-bats-breathe.md @@ -0,0 +1,13 @@ +--- +'astro': major +--- + +This import alias is no longer included by default with astro:assets. If you were using this alias with experimental assets, you must convert them to relative file paths, or create your own [import aliases](https://docs.astro.build/en/guides/aliases/). + +```diff +--- +// src/pages/posts/post-1.astro +- import rocket from '~/assets/rocket.png' ++ import rocket from '../../assets/rocket.png'; +--- +``` diff --git a/.changeset/cool-feet-rest.md b/.changeset/cool-feet-rest.md new file mode 100644 index 000000000..c2e724d80 --- /dev/null +++ b/.changeset/cool-feet-rest.md @@ -0,0 +1,7 @@ +--- +'@astrojs/solid-js': major +--- + +New `include` and `exclude` config options + +The Solid integration now has new `include` and `exclude` config options. Use these if you want to use Solid alongside another JSX framework; include specifies files to be compiled for Solid and `exclude` does the opposite. diff --git a/.changeset/cool-jokes-clap.md b/.changeset/cool-jokes-clap.md new file mode 100644 index 000000000..74176b259 --- /dev/null +++ b/.changeset/cool-jokes-clap.md @@ -0,0 +1,11 @@ +--- +'astro': major +--- + +Fixes for the `class:list` directive + +- Previously, `class:list` would ocassionally not be merged the `class` prop when passed to Astro components. Now, `class:list` is always converted to a `class` prop (as a string value). +- Previously, `class:list` diverged from [`clsx`](https://github.com/lukeed/clsx) in a few edge cases. Now, `class:list` uses [`clsx`](https://github.com/lukeed/clsx) directly. + - `class:list` used to deduplicate matching values, but it no longer does + - `class:list` used to sort individual values, but it no longer does + - `class:list` used to support `Set` and other iterables, but it no longer does diff --git a/.changeset/curvy-experts-jog.md b/.changeset/curvy-experts-jog.md new file mode 100644 index 000000000..156f7eabc --- /dev/null +++ b/.changeset/curvy-experts-jog.md @@ -0,0 +1,30 @@ +--- +'@astrojs/cloudflare': major +'@astrojs/partytown': major +'@astrojs/tailwind': major +'@astrojs/netlify': major +'@astrojs/sitemap': major +'@astrojs/preact': major +'@astrojs/svelte': major +'@astrojs/vercel': major +'@astrojs/react': major +'@astrojs/solid-js': major +'@astrojs/deno': major +'@astrojs/node': major +'@astrojs/lit': major +'@astrojs/mdx': major +'@astrojs/vue': major +'@astrojs/markdown-remark': major +'create-astro': major +'@astrojs/prism': major +'@astrojs/rss': major +'@astrojs/telemetry': major +'astro': major +'@astrojs/alpinejs': minor +'@astrojs/prefetch': minor +'@astrojs/markdoc': minor +'@astrojs/underscore-redirects': minor +'@astrojs/internal-helpers': minor +--- + +Astro 3.0 Release Candidate diff --git a/.changeset/cyan-carrots-stare.md b/.changeset/cyan-carrots-stare.md new file mode 100644 index 000000000..f7bcd4870 --- /dev/null +++ b/.changeset/cyan-carrots-stare.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Update error message when Sharp couldn't be found (tends to happen on pnpm notably) diff --git a/.changeset/dirty-lies-cover.md b/.changeset/dirty-lies-cover.md new file mode 100644 index 000000000..ae74e348e --- /dev/null +++ b/.changeset/dirty-lies-cover.md @@ -0,0 +1,32 @@ +--- +'@astrojs/cloudflare': minor +'@astrojs/netlify': minor +'@astrojs/vercel': minor +'@astrojs/deno': minor +'@astrojs/node': minor +'astro': minor +--- + +Introduced the concept of feature map. A feature map is a list of features that are built-in in Astro, and an Adapter +can tell Astro if it can support it. + +```ts +import {AstroIntegration} from "./astro"; + +function myIntegration(): AstroIntegration { + return { + name: 'astro-awesome-list', + // new feature map + supportedAstroFeatures: { + hybridOutput: 'experimental', + staticOutput: 'stable', + serverOutput: 'stable', + assets: { + supportKind: 'stable', + isSharpCompatible: false, + isSquooshCompatible: false, + }, + } + } +} +``` diff --git a/.changeset/fair-emus-divide.md b/.changeset/fair-emus-divide.md new file mode 100644 index 000000000..529760241 --- /dev/null +++ b/.changeset/fair-emus-divide.md @@ -0,0 +1,39 @@ +--- +'astro': major +'@astrojs/netlify': minor +--- + +The `build.split` and `build.excludeMiddleware` configuration options are deprecated and have been replaced by options in the adapter config. + +If your config includes the `build.excludeMiddleware` option, replace it with `edgeMiddleware` in your adapter options: + +```diff +import { defineConfig } from "astro/config"; +import netlify from "@astrojs/netlify/functions"; + +export default defineConfig({ + build: { +- excludeMiddleware: true + }, + adapter: netlify({ ++ edgeMiddleware: true + }), +}); +``` + +If your config includes the `build.split` option, replace it with `functionPerRoute` in your adapter options: + +```diff +import { defineConfig } from "astro/config"; +import netlify from "@astrojs/netlify/functions"; + +export default defineConfig({ + build: { +- split: true + }, + adapter: netlify({ ++ functionPerRoute: true + }), +}); +``` + diff --git a/.changeset/fair-eyes-promise.md b/.changeset/fair-eyes-promise.md new file mode 100644 index 000000000..c66a42d17 --- /dev/null +++ b/.changeset/fair-eyes-promise.md @@ -0,0 +1,7 @@ +--- +'@astrojs/mdx': major +--- + +Support Astro 3 JSX format + +This upgrades the MDX plugin to correctly work with the new JSX render API in Astro 3. diff --git a/.changeset/famous-queens-itch.md b/.changeset/famous-queens-itch.md new file mode 100644 index 000000000..e3538cdd6 --- /dev/null +++ b/.changeset/famous-queens-itch.md @@ -0,0 +1,5 @@ +--- +'@astrojs/mdx': patch +--- + +Re-orders the MDX plugin to run before Astro's JSX plugin diff --git a/.changeset/five-geese-crash.md b/.changeset/five-geese-crash.md new file mode 100644 index 000000000..832d3daca --- /dev/null +++ b/.changeset/five-geese-crash.md @@ -0,0 +1,11 @@ +--- +'astro': major +--- + +Change the [View Transition built-in animation](https://docs.astro.build/en/guides/view-transitions/#built-in-animation-directives) options. + +The `transition:animate` value `morph` has been renamed to `initial`. Also, this is no longer the default animation. + +If no `transition:animate` directive is specified, your animations will now default to `fade`. + +Astro also supports a new `transition:animate` value, `none`. This value can be used on a page's `` element to disable animated full-page transitions on an entire page. diff --git a/.changeset/four-houses-compete.md b/.changeset/four-houses-compete.md new file mode 100644 index 000000000..641bb1035 --- /dev/null +++ b/.changeset/four-houses-compete.md @@ -0,0 +1,18 @@ +--- +'astro': major +--- + +Sharp is now the default image service used for `astro:assets`. If you would prefer to still use Squoosh, you can update your config with the following: + +```ts +import { defineConfig, squooshImageService } from "astro/config"; + +// https://astro.build/config +export default defineConfig({ + image: { + service: squooshImageService(), + } +}) +``` + +However, not only do we recommend using Sharp as it is faster and more reliable, it is also highly likely that the Squoosh service will be removed in a future release. diff --git a/.changeset/fresh-shrimps-happen.md b/.changeset/fresh-shrimps-happen.md new file mode 100644 index 000000000..deb4f5c94 --- /dev/null +++ b/.changeset/fresh-shrimps-happen.md @@ -0,0 +1,5 @@ +--- +"@astrojs/react": patch +--- + +Publish missing `vnode-children.js` file diff --git a/.changeset/gentle-deers-yawn.md b/.changeset/gentle-deers-yawn.md new file mode 100644 index 000000000..30e577c69 --- /dev/null +++ b/.changeset/gentle-deers-yawn.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Call `astro sync` once before calling `astro check` diff --git a/.changeset/gentle-meals-crash.md b/.changeset/gentle-meals-crash.md new file mode 100644 index 000000000..5314442ea --- /dev/null +++ b/.changeset/gentle-meals-crash.md @@ -0,0 +1,9 @@ +--- +'astro': major +--- + +Remove support for `Astro.__renderMarkdown` which is used by `@astrojs/markdown-component`. + +The `` 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. diff --git a/.changeset/giant-plants-sip.md b/.changeset/giant-plants-sip.md new file mode 100644 index 000000000..884021b8e --- /dev/null +++ b/.changeset/giant-plants-sip.md @@ -0,0 +1,29 @@ +--- +'astro': major +--- + +Remove backwards-compatible kebab-case transform for camelCase CSS variable names passed to the `style` 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: + +```astro +--- +const myValue = "red" +--- + + +
+ + +
+ + +
+``` + +```diff + +``` \ No newline at end of file diff --git a/.changeset/gorgeous-kiwis-stare.md b/.changeset/gorgeous-kiwis-stare.md new file mode 100644 index 000000000..d7129ed88 --- /dev/null +++ b/.changeset/gorgeous-kiwis-stare.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Use .js to import logger diff --git a/.changeset/grumpy-pens-melt.md b/.changeset/grumpy-pens-melt.md new file mode 100644 index 000000000..14faf0676 --- /dev/null +++ b/.changeset/grumpy-pens-melt.md @@ -0,0 +1,21 @@ +--- +'astro': minor +--- + +View Transitions unflagged + +View Transition support in Astro is now unflagged. For those who have used the experimental feature you can remove the flag in your Astro config: + +```diff +import { defineConfig } from 'astro' + +export default defineConfig({ +- experimental: { +- viewTransitions: true, +- } +}) +``` + +After removing this flag, please also consult the specific [upgrade to v3.0 advice](https://docs.astro.build/en/guides/view-transitions/#upgrade-to-v30-from-v2x) as some API features have changed and you may have breaking changes with your existing view transitions. + +See the [View Transitions guide](https://docs.astro.build/en/guides/view-transitions/) to learn how to use the API. diff --git a/.changeset/happy-penguins-hug.md b/.changeset/happy-penguins-hug.md new file mode 100644 index 000000000..215031769 --- /dev/null +++ b/.changeset/happy-penguins-hug.md @@ -0,0 +1,5 @@ +--- +'astro': major +--- + +Remove deprecated config option types, deprecated script/style attributes, and deprecated `image` export from `astro:content` diff --git a/.changeset/heavy-walls-arrive.md b/.changeset/heavy-walls-arrive.md new file mode 100644 index 000000000..68f64dacb --- /dev/null +++ b/.changeset/heavy-walls-arrive.md @@ -0,0 +1,8 @@ +--- +'@astrojs/cloudflare': major +'@astrojs/netlify': major +'@astrojs/vercel': major +'astro': major +--- + +When using an adapter that supports neither Squoosh or Sharp, Astro will now automatically use an image service that does not support processing, but still provides the other benefits of `astro:assets` such as enforcing `alt`, no CLS etc to users diff --git a/.changeset/honest-houses-deny.md b/.changeset/honest-houses-deny.md new file mode 100644 index 000000000..962e04423 --- /dev/null +++ b/.changeset/honest-houses-deny.md @@ -0,0 +1,25 @@ +--- +'@astrojs/rss': major +--- + +Update the `rss()` default export to return a `Response` instead of a simple object, which is deprecated in Astro 3.0. If you were directly returning the `rss()` result from an endpoint before, this breaking change should not affect you. + +You can also import `getRssString()` to get the RSS string directly and use it to return your own Response: + +```ts +// src/pages/rss.xml.js +import { getRssString } from '@astrojs/rss'; + +export async function get(context) { + const rssString = await getRssString({ + title: 'Buzz’s Blog', + ... + }); + + return new Response(rssString, { + headers: { + 'Content-Type': 'application/xml', + }, + }); +} +``` diff --git a/.changeset/large-countries-share.md b/.changeset/large-countries-share.md new file mode 100644 index 000000000..b3101d2f2 --- /dev/null +++ b/.changeset/large-countries-share.md @@ -0,0 +1,7 @@ +--- +'@astrojs/preact': major +--- + +New `include` and `exclude` config options + +The Preact integration now has new `include` and `exclude` config options. Use these if you want to use Preact alongside another JSX framework; include specifies files to be compiled for Preact and `exclude` does the opposite. diff --git a/.changeset/light-badgers-mate.md b/.changeset/light-badgers-mate.md new file mode 100644 index 000000000..ea0451bec --- /dev/null +++ b/.changeset/light-badgers-mate.md @@ -0,0 +1,8 @@ +--- +'astro': patch +--- + +Specify `data-astro-reload` (no value) on an anchor element to force the browser to ignore view transitions and fall back to default loading. + +This is helpful when navigating to documents that have different content-types, e.g. application/pdf, where you want to use the build in viewer of the browser. +Example: `...` diff --git a/.changeset/long-chefs-jump.md b/.changeset/long-chefs-jump.md new file mode 100644 index 000000000..ed8f47614 --- /dev/null +++ b/.changeset/long-chefs-jump.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +The scrollend mechanism is a better way to record the scroll position compared to throttling, so we now use it whenever a browser supports it. \ No newline at end of file diff --git a/.changeset/loud-candles-admire.md b/.changeset/loud-candles-admire.md new file mode 100644 index 000000000..3fe1f12e7 --- /dev/null +++ b/.changeset/loud-candles-admire.md @@ -0,0 +1,5 @@ +--- +'@astrojs/mdx': patch +--- + +Handle `components` exports handling itself diff --git a/.changeset/lovely-walls-call.md b/.changeset/lovely-walls-call.md new file mode 100644 index 000000000..408fa00c5 --- /dev/null +++ b/.changeset/lovely-walls-call.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Improve fidelity of time stats when running `astro build` diff --git a/.changeset/many-pears-explode.md b/.changeset/many-pears-explode.md new file mode 100644 index 000000000..1e2a30edc --- /dev/null +++ b/.changeset/many-pears-explode.md @@ -0,0 +1,35 @@ +--- +'astro': major +--- + +Export experimental `dev`, `build`, `preview`, and `sync` APIs from `astro`. These APIs allow you to run Astro's commands programmatically, and replaces the previous entry point that runs the Astro CLI. + +While these APIs are experimental, the inline config parameter is relatively stable without foreseeable changes. However, the returned results of these APIs are more likely to change in the future. + +```ts +import { dev, build, preview, sync, type AstroInlineConfig } from 'astro'; + +// Inline Astro config object. +// Provide a path to a configuration file to load or set options directly inline. +const inlineConfig: AstroInlineConfig = { + // Inline-specific options... + configFile: './astro.config.mjs', + logLevel: 'info', + // Standard Astro config options... + site: 'https://example.com', +}; + +// Start the Astro dev server +const devServer = await dev(inlineConfig); +await devServer.stop(); + +// Build your Astro project +await build(inlineConfig); + +// Preview your built project +const previewServer = await preview(inlineConfig); +await previewServer.stop(); + +// Generate types for your Astro project +await sync(inlineConfig); +``` diff --git a/.changeset/mighty-dancers-lay.md b/.changeset/mighty-dancers-lay.md new file mode 100644 index 000000000..873c4edd1 --- /dev/null +++ b/.changeset/mighty-dancers-lay.md @@ -0,0 +1,5 @@ +--- +'astro': major +--- + +Removed support for old syntax of the API routes. diff --git a/.changeset/nasty-garlics-listen.md b/.changeset/nasty-garlics-listen.md new file mode 100644 index 000000000..e1b19b96b --- /dev/null +++ b/.changeset/nasty-garlics-listen.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Reimplement https://github.com/withastro/astro/pull/7509 to correctly emit pre-rendered pages now that `build.split` is deprecated and this configuration has been moved to `functionPerRoute` inside the adapter. diff --git a/.changeset/neat-mugs-end.md b/.changeset/neat-mugs-end.md new file mode 100644 index 000000000..dd65708a7 --- /dev/null +++ b/.changeset/neat-mugs-end.md @@ -0,0 +1,8 @@ +--- +'astro': minor +--- + + +`astro:`namespace aliases for middleware and components + +This adds aliases of `astro:middleware` and `astro:components` for the middleware and components modules. This is to make our documentation consistent between are various modules, where some are virtual modules and others are not. Going forward new built-in modules will use this namespace. diff --git a/.changeset/neat-owls-run.md b/.changeset/neat-owls-run.md new file mode 100644 index 000000000..501b5319f --- /dev/null +++ b/.changeset/neat-owls-run.md @@ -0,0 +1,25 @@ +--- +'astro': major +--- + +Remove exports for `astro/internal/*` and `astro/runtime/server/*` in favour of `astro/runtime/*`. Add new `astro/compiler-runtime` export for compiler-specific runtime code. + +These are exports for Astro's internal API and should not affect your project, but if you do use these entrypoints, you can migrate like below: + +```diff +- import 'astro/internal/index.js'; ++ import 'astro/runtime/server/index.js'; + +- import 'astro/server/index.js'; ++ import 'astro/runtime/server/index.js'; +``` + +```diff +import { transform } from '@astrojs/compiler'; + +const result = await transform(source, { +- internalURL: 'astro/runtime/server/index.js', ++ internalURL: 'astro/compiler-runtime', + // ... +}); +``` diff --git a/.changeset/neat-suns-search.md b/.changeset/neat-suns-search.md new file mode 100644 index 000000000..da743c9c7 --- /dev/null +++ b/.changeset/neat-suns-search.md @@ -0,0 +1,17 @@ +--- +'astro': major +--- + +Implements a new scope style strategy called `"attribute"`. When enabled, styles are applied using `data-*` attributes. + +The **default** value of `scopedStyleStrategy` is `"attribute"`. + +If you want to use the previous behaviour, you have to use the `"where"` option: + +```diff +import { defineConfig } from 'astro/config'; + +export default defineConfig({ ++ scopedStyleStrategy: 'where', +}); +``` diff --git a/.changeset/odd-books-live.md b/.changeset/odd-books-live.md new file mode 100644 index 000000000..40f0d7c17 --- /dev/null +++ b/.changeset/odd-books-live.md @@ -0,0 +1,23 @@ +--- +'astro': minor +--- + +Integrations can now log messages using Astro’s built-in logger. + +The logger is available to all hooks as an additional parameter: + +```ts +import {AstroIntegration} from "./astro"; + +// integration.js +export function myIntegration(): AstroIntegration { + return { + name: "my-integration", + hooks: { + "astro:config:done": ({ logger }) => { + logger.info("Configure integration..."); + } + } + } +} +``` diff --git a/.changeset/olive-moles-tan.md b/.changeset/olive-moles-tan.md new file mode 100644 index 000000000..9840fd4e3 --- /dev/null +++ b/.changeset/olive-moles-tan.md @@ -0,0 +1,5 @@ +--- +'@astrojs/deno': patch +--- + +TypeScript users now get better suggestions when configuring the Deno adapter. diff --git a/.changeset/perfect-horses-tell.md b/.changeset/perfect-horses-tell.md new file mode 100644 index 000000000..7723c665f --- /dev/null +++ b/.changeset/perfect-horses-tell.md @@ -0,0 +1,27 @@ +--- +'astro': major +--- + +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` and `exclude` 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 the `include` and `exclude` options. + +```js +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/*'], + }), + ] +}); +``` diff --git a/.changeset/plenty-keys-add.md b/.changeset/plenty-keys-add.md new file mode 100644 index 000000000..73a78ba3b --- /dev/null +++ b/.changeset/plenty-keys-add.md @@ -0,0 +1,23 @@ +--- +'@astrojs/vercel': major +--- + +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: + + ```diff + // 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. diff --git a/.changeset/popular-carrots-sneeze.md b/.changeset/popular-carrots-sneeze.md new file mode 100644 index 000000000..0f914891d --- /dev/null +++ b/.changeset/popular-carrots-sneeze.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Open to configured `base` when `astro dev --open` runs diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 000000000..37137cbc3 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,107 @@ +{ + "mode": "pre", + "tag": "rc", + "initialVersions": { + "astro": "2.9.6", + "@astrojs/prism": "2.1.2", + "@astrojs/rss": "2.4.3", + "create-astro": "3.1.10", + "@astrojs/alpinejs": "0.2.2", + "@astrojs/cloudflare": "6.6.2", + "@astrojs/deno": "4.3.0", + "@astrojs/lit": "2.1.0", + "@astrojs/markdoc": "0.4.4", + "@astrojs/mdx": "0.19.7", + "@astrojs/netlify": "2.5.1", + "@astrojs/node": "5.3.0", + "@astrojs/partytown": "1.2.3", + "@astrojs/preact": "2.2.1", + "@astrojs/prefetch": "0.3.0", + "@astrojs/react": "2.2.1", + "@astrojs/sitemap": "2.0.1", + "@astrojs/solid-js": "2.2.0", + "@astrojs/svelte": "3.1.0", + "@astrojs/tailwind": "4.0.0", + "@astrojs/vercel": "3.7.4", + "@astrojs/vue": "2.2.1", + "@astrojs/internal-helpers": "0.1.1", + "@astrojs/markdown-remark": "2.2.1", + "@astrojs/telemetry": "2.1.1", + "@astrojs/underscore-redirects": "0.2.0" + }, + "changesets": [ + "afraid-dots-whisper", + "angry-dogs-shake", + "big-tips-whisper", + "brave-cheetahs-float", + "chilled-ducks-grin", + "clever-bats-breathe", + "cool-feet-rest", + "cool-jokes-clap", + "curvy-experts-jog", + "cyan-carrots-stare", + "dirty-lies-cover", + "fair-emus-divide", + "fair-eyes-promise", + "famous-queens-itch", + "five-geese-crash", + "four-houses-compete", + "fresh-shrimps-happen", + "gentle-deers-yawn", + "gentle-meals-crash", + "giant-plants-sip", + "gorgeous-kiwis-stare", + "grumpy-pens-melt", + "happy-penguins-hug", + "heavy-walls-arrive", + "honest-houses-deny", + "large-countries-share", + "light-badgers-mate", + "long-chefs-jump", + "loud-candles-admire", + "lovely-walls-call", + "many-pears-explode", + "mighty-dancers-lay", + "nasty-garlics-listen", + "neat-mugs-end", + "neat-owls-run", + "neat-suns-search", + "odd-books-live", + "perfect-horses-tell", + "plenty-keys-add", + "popular-carrots-sneeze", + "proud-fans-type", + "purple-buses-prove", + "quick-boats-bow", + "rude-ears-play", + "serious-waves-fry", + "silent-bikes-crash", + "six-grapes-look", + "slimy-carrots-sell", + "small-nails-try", + "smart-numbers-shout", + "spicy-eels-rush", + "spicy-icons-live", + "spicy-stingrays-cheer", + "strong-papayas-chew", + "tame-files-glow", + "tasty-camels-speak", + "tasty-dragons-smash", + "thin-ants-repeat", + "three-adults-exist", + "three-onions-repeat", + "tricky-candles-suffer", + "twelve-coats-rush", + "twenty-cheetahs-deny", + "unlucky-hotels-try", + "unlucky-ravens-type", + "unlucky-sheep-build", + "violet-peaches-invent", + "warm-weeks-yell", + "wet-foxes-sleep", + "wild-bobcats-carry", + "wise-cameras-agree", + "yellow-tips-cover", + "young-roses-teach" + ] +} diff --git a/.changeset/proud-fans-type.md b/.changeset/proud-fans-type.md new file mode 100644 index 000000000..8b58da136 --- /dev/null +++ b/.changeset/proud-fans-type.md @@ -0,0 +1,5 @@ +--- +'astro': minor +--- + +Finalize View Transition event names diff --git a/.changeset/purple-buses-prove.md b/.changeset/purple-buses-prove.md new file mode 100644 index 000000000..c1e4876c9 --- /dev/null +++ b/.changeset/purple-buses-prove.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Remove StreamingCompatibleResponse polyfill diff --git a/.changeset/quick-boats-bow.md b/.changeset/quick-boats-bow.md new file mode 100644 index 000000000..1ab83ed5a --- /dev/null +++ b/.changeset/quick-boats-bow.md @@ -0,0 +1,5 @@ +--- +'astro': major +--- + +Removed duplicate `astro/dist/jsx` export. Please use the `astro/jsx` export instead diff --git a/.changeset/rude-ears-play.md b/.changeset/rude-ears-play.md new file mode 100644 index 000000000..660cfcb34 --- /dev/null +++ b/.changeset/rude-ears-play.md @@ -0,0 +1,5 @@ +--- +'astro': major +--- + +Remove MDX plugin re-ordering hack diff --git a/.changeset/serious-waves-fry.md b/.changeset/serious-waves-fry.md new file mode 100644 index 000000000..a8b8d77c1 --- /dev/null +++ b/.changeset/serious-waves-fry.md @@ -0,0 +1,5 @@ +--- +'astro': major +--- + +The scoped hash created by the Astro compiler is now **lowercase**. diff --git a/.changeset/silent-bikes-crash.md b/.changeset/silent-bikes-crash.md new file mode 100644 index 000000000..66f066943 --- /dev/null +++ b/.changeset/silent-bikes-crash.md @@ -0,0 +1,8 @@ +--- +'@astrojs/rss': patch +'astro': patch +--- + +Deprecate the `markdown.drafts` configuration option. + +If you'd like to create draft pages that are visible in dev but not in production, you can [migrate to content collections](https://docs.astro.build/en/guides/content-collections/#migrating-from-file-based-routing) and [manually filter out pages](https://docs.astro.build/en/guides/content-collections/#filtering-collection-queries) with the `draft: true` frontmatter property instead. diff --git a/.changeset/six-grapes-look.md b/.changeset/six-grapes-look.md new file mode 100644 index 000000000..edf10e01a --- /dev/null +++ b/.changeset/six-grapes-look.md @@ -0,0 +1,15 @@ +--- +'astro': major +--- + +The value of `import.meta.env.BASE_URL`, which is derived from the `base` option, will no longer have a trailing slash added by default or when `trailingSlash: "ignore"` is set. The existing behavior of `base` in combination with `trailingSlash: "always"` or `trailingSlash: "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: + +```diff +// astro.config.mjs +- base: 'my-base', ++ base: 'my-base/', +``` diff --git a/.changeset/slimy-carrots-sell.md b/.changeset/slimy-carrots-sell.md new file mode 100644 index 000000000..c1c9e694f --- /dev/null +++ b/.changeset/slimy-carrots-sell.md @@ -0,0 +1,9 @@ +--- +'@astrojs/react': major +--- + +Support for React Refresh + +The React integration now fully supports React Refresh and is backed by `@vitejs/plugin-react`. + +Also included in this change are new `include` and `exclude` config options. Use these if you want to use React alongside another JSX framework; include specifies files to be compiled for React and `exclude` does the opposite. diff --git a/.changeset/small-nails-try.md b/.changeset/small-nails-try.md new file mode 100644 index 000000000..3f6f591f1 --- /dev/null +++ b/.changeset/small-nails-try.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +On back navigation only animate view transitions that were animated going forward. diff --git a/.changeset/smart-numbers-shout.md b/.changeset/smart-numbers-shout.md new file mode 100644 index 000000000..29d9c97e6 --- /dev/null +++ b/.changeset/smart-numbers-shout.md @@ -0,0 +1,19 @@ +--- +'astro': major +--- + +Astro is smarter about CSS! Small stylesheets are now inlined by default, and no longer incur the cost of additional requests to your server. Your visitors will have to wait less before they see your pages, especially those in remote locations or in a subway. + +This may not be news to you if you had opted-in via the `build.inlineStylesheets` configuration. Stabilized in Astro 2.6 and set to "auto" by default for Starlight, this configuration allows you to reduce the number of requests for stylesheets by inlining them into + ``` + +- [#7893](https://github.com/withastro/astro/pull/7893) [`7bd1b86f8`](https://github.com/withastro/astro/commit/7bd1b86f85c06fdde0a1ed9146d01bac69990671) Thanks [@ematipico](https://github.com/ematipico)! - Implements a new scope style strategy called `"attribute"`. When enabled, styles are applied using `data-*` attributes. + + The **default** value of `scopedStyleStrategy` is `"attribute"`. + + If you want to use the previous behaviour, you have to use the `"where"` option: + + ```diff + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + + scopedStyleStrategy: 'where', + }); + ``` + +- [#7924](https://github.com/withastro/astro/pull/7924) [`519a1c4e8`](https://github.com/withastro/astro/commit/519a1c4e8407c7abcb8d879b67a9f4b960652cae) Thanks [@matthewp](https://github.com/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` and `exclude` 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 the `include` and `exclude` options. + + ```js + 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](https://github.com/withastro/astro/pull/7878) [`0f637c71e`](https://github.com/withastro/astro/commit/0f637c71e511cb4c51712128d217a26c8eee4d40) Thanks [@bluwy](https://github.com/bluwy)! - The value of `import.meta.env.BASE_URL`, which is derived from the `base` option, will no longer have a trailing slash added by default or when `trailingSlash: "ignore"` is set. The existing behavior of `base` in combination with `trailingSlash: "always"` or `trailingSlash: "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: + + ```diff + // astro.config.mjs + - base: 'my-base', + + base: 'my-base/', + ``` + +### Minor Changes + +- [#8012](https://github.com/withastro/astro/pull/8012) [`866ed4098`](https://github.com/withastro/astro/commit/866ed4098edffb052239cdb26e076cf8db61b1d9) Thanks [@ematipico](https://github.com/ematipico)! - Add a new `astro/errors` module. Developers can import `AstroUserError`, and provide a `message` and an optional `hint` + +### Patch Changes + +- [#7998](https://github.com/withastro/astro/pull/7998) [`65c354969`](https://github.com/withastro/astro/commit/65c354969e6fe0ef6d622e8f4c545e2f717ce8c6) Thanks [@bluwy](https://github.com/bluwy)! - Call `astro sync` once before calling `astro check` + +- [#7952](https://github.com/withastro/astro/pull/7952) [`70f34f5a3`](https://github.com/withastro/astro/commit/70f34f5a355f42526ee9e5355f3de8e510002ea2) Thanks [@astrobot-houston](https://github.com/astrobot-houston)! - Remove StreamingCompatibleResponse polyfill + +- [#8011](https://github.com/withastro/astro/pull/8011) [`5b1e39ef6`](https://github.com/withastro/astro/commit/5b1e39ef6ec6dcebea96584f95d9530bd9aa715d) Thanks [@bluwy](https://github.com/bluwy)! - Move hoisted script analysis optimization behind the `experimental.optimizeHoistedScript` option + +- Updated dependencies [[`b675acb2a`](https://github.com/withastro/astro/commit/b675acb2aa820448e9c0d363339a37fbac873215)]: + - @astrojs/telemetry@3.0.0-beta.1 + +## 3.0.0-beta.0 + +### Major Changes + +- [`1eae2e3f7`](https://github.com/withastro/astro/commit/1eae2e3f7d693c9dfe91c8ccfbe606d32bf2fb81) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023. + +- [`76ddef19c`](https://github.com/withastro/astro/commit/76ddef19ccab6e5f7d3a5740cd41acf10e334b38) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Removed automatic flattening of `getStaticPaths` result. `.flatMap` and `.flat` should now be used to ensure that you're returning a flat array. + +- [`3fdf509b2`](https://github.com/withastro/astro/commit/3fdf509b2731a9b2f972d89291e57cf78d62c769) Thanks [@ematipico](https://github.com/ematipico)! - The `build.split` and `build.excludeMiddleware` configuration options are deprecated and have been replaced by options in the adapter config. + + If your config includes the `build.excludeMiddleware` option, replace it with `edgeMiddleware` in your adapter options: + + ```diff + import { defineConfig } from "astro/config"; + import netlify from "@astrojs/netlify/functions"; + + export default defineConfig({ + build: { + - excludeMiddleware: true + }, + adapter: netlify({ + + edgeMiddleware: true + }), + }); + ``` + + If your config includes the `build.split` option, replace it with `functionPerRoute` in your adapter options: + + ```diff + import { defineConfig } from "astro/config"; + import netlify from "@astrojs/netlify/functions"; + + export default defineConfig({ + build: { + - split: true + }, + adapter: netlify({ + + functionPerRoute: true + }), + }); + ``` + +- [`2f951cd40`](https://github.com/withastro/astro/commit/2f951cd403dfcc2c3ca6aae618ae3e1409516e32) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Sharp is now the default image service used for `astro:assets`. If you would prefer to still use Squoosh, you can update your config with the following: + + ```ts + import { defineConfig, squooshImageService } from 'astro/config'; + + // https://astro.build/config + export default defineConfig({ + image: { + service: squooshImageService(), + }, + }); + ``` + + However, not only do we recommend using Sharp as it is faster and more reliable, it is also highly likely that the Squoosh service will be removed in a future release. + +- [`c022a4217`](https://github.com/withastro/astro/commit/c022a4217a805d223c1494e9eda4e48bbf810388) Thanks [@Princesseuh](https://github.com/Princesseuh)! - When using an adapter that supports neither Squoosh or Sharp, Astro will now automatically use an image service that does not support processing, but still provides the other benefits of `astro:assets` such as enforcing `alt`, no CLS etc to users + +- [`67becaa58`](https://github.com/withastro/astro/commit/67becaa580b8f787df58de66b7008b7098f1209c) Thanks [@ematipico](https://github.com/ematipico)! - Removed support for old syntax of the API routes. + +- [`dfc2d93e3`](https://github.com/withastro/astro/commit/dfc2d93e3c645995379358fabbdfa9aab99f43d8) Thanks [@bluwy](https://github.com/bluwy)! - Remove MDX plugin re-ordering hack + +- [`3dc1ca2fa`](https://github.com/withastro/astro/commit/3dc1ca2fac8d9965cc5085a5d09e72ed87b4281a) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Reduced the amount of polyfills provided by Astro. Astro will no longer provide (no-op) polyfills for several web apis such as HTMLElement, Image or Document. If you need access to those APIs on the server, we recommend using more proper polyfills available on npm. + +- [`1be84dfee`](https://github.com/withastro/astro/commit/1be84dfee3ce8e6f5cc624f99aec4e980f6fde37) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Update `tsconfig.json` presets with `moduleResolution: 'bundler'` and other new options from TypeScript 5.0. Astro now assumes that you use TypeScript 5.0 (March 2023), or that your editor includes it, ex: VS Code 1.77 + +- [`35f01df79`](https://github.com/withastro/astro/commit/35f01df797d23315f2bee2fc3fd795adb0559c58) Thanks [@Princesseuh](https://github.com/Princesseuh)! - The `astro check` command now requires an external package `@astrojs/check` and an install of `typescript` in your project. This was done in order to make the main `astro` package smaller and give more flexibility to users in regard to the version of TypeScript they use. + +- [`3fdf509b2`](https://github.com/withastro/astro/commit/3fdf509b2731a9b2f972d89291e57cf78d62c769) Thanks [@ematipico](https://github.com/ematipico)! - The `build.split` and `build.excludeMiddleware` configuration options are deprecated and have been replaced by options in the adapter config. + + If your config includes the `build.excludeMiddleware` option, replace it with `edgeMiddleware` in your adapter options: + + ```diff + import { defineConfig } from "astro/config"; + import vercel from "@astrojs/vercel/serverless"; + + export default defineConfig({ + build: { + - excludeMiddleware: true + }, + adapter: vercel({ + + edgeMiddleware: true + }), + }); + ``` + + If your config includes the `build.split` option, replace it with `functionPerRoute` in your adapter options: + + ```diff + import { defineConfig } from "astro/config"; + import vercel from "@astrojs/vercel/serverless"; + + export default defineConfig({ + build: { + - split: true + }, + adapter: vercel({ + + functionPerRoute: true + }), + }); + ``` + +- [`78de801f2`](https://github.com/withastro/astro/commit/78de801f21fd4ca1653950027d953bf08614566b) Thanks [@ematipico](https://github.com/ematipico)! - Lowercase names for endpoint functions are now deprecated. + + Rename functions to their uppercase equivalent: + + ```diff + - export function get() { + + export function GET() { + return new Response(JSON.stringify({ "title": "Bob's blog" })); + } + + - export function post() { + + export function POST() { + return new Response(JSON.stringify({ "title": "Bob's blog" })); + } + + - export function put() { + + export function PUT() { + return new Response(JSON.stringify({ "title": "Bob's blog" })); + } + + - export function all() { + + export function ALL() { + return new Response(JSON.stringify({ "title": "Bob's blog" })); + } + + // you can use the whole word "DELETE" + - export function del() { + + export function DELETE() { + return new Response(JSON.stringify({ "title": "Bob's blog" })); + } + ``` + +- [`59d6e569f`](https://github.com/withastro/astro/commit/59d6e569f63e175c97e82e94aa7974febfb76f7c) Thanks [@matthewp](https://github.com/matthewp)! - Astro.cookies.get(key) returns undefined if cookie doesn't exist + + With this change, Astro.cookies.get(key) no longer always returns a `AstroCookie` object. Instead it now returns `undefined` if the cookie does not exist. + + You should update your code if you assume that all calls to `get()` return a value. When using with `has()` you still need to assert the value, like so: + + ```astro + --- + if (Astro.cookies.has(id)) { + const id = Astro.cookies.get(id)!; + } + --- + ``` + +- [`7723c4cc9`](https://github.com/withastro/astro/commit/7723c4cc93298c2e6530e55da7afda048f22cf81) Thanks [@ematipico](https://github.com/ematipico)! - The property `compressHTML` is now `true` by default. Setting this value to `true` is no longer required. + + If you do not want to minify your HTML output, you must set this value to `false` in `astro.config.mjs`. + + ```diff + import {defineConfig} from "astro/config"; + export default defineConfig({ + + compressHTML: false + }) + ``` + +- [`fb5cd6b56`](https://github.com/withastro/astro/commit/fb5cd6b56dc27a71366ed5e1ab8bfe9b8f96bac5) Thanks [@ematipico](https://github.com/ematipico)! - Astro's default port when running the dev or preview server is now `4321`. + + This will reduce conflicts with ports used by other tools. + +- [`631b9c410`](https://github.com/withastro/astro/commit/631b9c410d5d66fa384674027ba95d69ebb5063f) Thanks [@bluwy](https://github.com/bluwy)! - Remove MDX special `components` export handling + +### Minor Changes + +- [`9b4f70a62`](https://github.com/withastro/astro/commit/9b4f70a629f55e461759ba46f68af7097a2e9215) Thanks [@ematipico](https://github.com/ematipico)! - Introduced the concept of feature map. A feature map is a list of features that are built-in in Astro, and an Adapter + can tell Astro if it can support it. + + ```ts + import { AstroIntegration } from './astro'; + + function myIntegration(): AstroIntegration { + return { + name: 'astro-awesome-list', + // new feature map + supportedAstroFeatures: { + hybridOutput: 'experimental', + staticOutput: 'stable', + serverOutput: 'stable', + assets: { + supportKind: 'stable', + isSharpCompatible: false, + isSquooshCompatible: false, + }, + }, + }; + } + ``` + +- [`bc37331d8`](https://github.com/withastro/astro/commit/bc37331d8154e3e95a8df9131e4e014e78a7a9e7) Thanks [@ematipico](https://github.com/ematipico)! - Integrations can now log messages using Astro’s built-in logger. + + The logger is available to all hooks as an additional parameter: + + ```ts + import { AstroIntegration } from './astro'; + + // integration.js + export function myIntegration(): AstroIntegration { + return { + name: 'my-integration', + hooks: { + 'astro:config:done': ({ logger }) => { + logger.info('Configure integration...'); + }, + }, + }; + } + ``` + +### Patch Changes + +- Updated dependencies [[`1eae2e3f7`](https://github.com/withastro/astro/commit/1eae2e3f7d693c9dfe91c8ccfbe606d32bf2fb81)]: + - @astrojs/telemetry@3.0.0-beta.0 + - @astrojs/internal-helpers@0.2.0-beta.0 + - @astrojs/markdown-remark@3.0.0-beta.0 + +## 2.10.14 + +### Patch Changes + +- [#8206](https://github.com/withastro/astro/pull/8206) [`52606a390`](https://github.com/withastro/astro/commit/52606a3909f9de5ced9b9ba3ba25832f73a8689e) Thanks [@martrapp](https://github.com/martrapp)! - fix: View Transition: swap attributes of document's root element + +## 2.10.13 + +### Patch Changes + +- [#8152](https://github.com/withastro/astro/pull/8152) [`582132328`](https://github.com/withastro/astro/commit/5821323285646aee7ff9194a505f708028e4db57) Thanks [@andremralves](https://github.com/andremralves)! - Displays a new config error if `outDir` is placed within `publicDir`. + +- [#8166](https://github.com/withastro/astro/pull/8166) [`fddd4dc71`](https://github.com/withastro/astro/commit/fddd4dc71af321bd6b4d01bb4b1b955284846e60) Thanks [@martrapp](https://github.com/martrapp)! - ViewTransitions: Fixes in the client-side router + +- [#8182](https://github.com/withastro/astro/pull/8182) [`cfc465dde`](https://github.com/withastro/astro/commit/cfc465ddebcc58d20f29ecffaa857a77525435a9) Thanks [@martrapp](https://github.com/martrapp)! - View Transitions: self link (`href=""`) does not trigger page reload + +- [#8171](https://github.com/withastro/astro/pull/8171) [`95120efbe`](https://github.com/withastro/astro/commit/95120efbe817163663492181cbeb225849354493) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fix missing type for `imageConfig` export from `astro:assets` + +- [#8187](https://github.com/withastro/astro/pull/8187) [`273335cb0`](https://github.com/withastro/astro/commit/273335cb01615c3c06d46c02464f4496a81f8d0b) Thanks [@bluwy](https://github.com/bluwy)! - Fix Astro components parent-child render order + +- [#8184](https://github.com/withastro/astro/pull/8184) [`9142178b1`](https://github.com/withastro/astro/commit/9142178b113443749b87c1d259859b42a3d7a9c4) Thanks [@martrapp](https://github.com/martrapp)! - Fix: The scrolling behavior of ViewTransitions is now more similar to the expected browser behavior + +- [#8163](https://github.com/withastro/astro/pull/8163) [`179796405`](https://github.com/withastro/astro/commit/179796405e053b559d83f84507e5a465861a029a) Thanks [@delucis](https://github.com/delucis)! - Make typing of `defineCollection` more permissive to support advanced union and intersection types + +## 2.10.12 + +### Patch Changes + +- [#8144](https://github.com/withastro/astro/pull/8144) [`04caa99c4`](https://github.com/withastro/astro/commit/04caa99c48ce604ca3b90302ff0df8dcdbeee650) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixed an issue where data entries' id included backslashes instead of forward slashes on Windows. + +## 2.10.11 + +### Patch Changes + +- [#8136](https://github.com/withastro/astro/pull/8136) [`97c8760d7`](https://github.com/withastro/astro/commit/97c8760d78ffd172149f7776442725861576fba7) Thanks [@andremralves](https://github.com/andremralves)! - Fix 404 response leading to an infinite loop when there is no 404 page. + +## 2.10.10 + +### Patch Changes + +- [#8127](https://github.com/withastro/astro/pull/8127) [`b12c8471f`](https://github.com/withastro/astro/commit/b12c8471f413c0291de4a9c444bfe3079a192034) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Do not throw Error when users pass an object with a "type" property + +- [#8092](https://github.com/withastro/astro/pull/8092) [`7177f7579`](https://github.com/withastro/astro/commit/7177f7579b6e866f0fd895b3fd079d8ba330b1a9) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Ensure dotfiles are cleaned during static builds + +- [#8122](https://github.com/withastro/astro/pull/8122) [`fa6b68a77`](https://github.com/withastro/astro/commit/fa6b68a776c5b3cc8167fc042b7d305234ebcff9) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Improve fidelity of time stats when running `astro build` + +- [#8070](https://github.com/withastro/astro/pull/8070) [`097a8e4e9`](https://github.com/withastro/astro/commit/097a8e4e916c7df18eafdaa6c8d6ce2991c17ab6) Thanks [@lilnasy](https://github.com/lilnasy)! - Fix a handful of edge cases with prerendered 404/500 pages + +- [#8123](https://github.com/withastro/astro/pull/8123) [`1f6497c33`](https://github.com/withastro/astro/commit/1f6497c3341231ee76fc4538cfe7624cf4721d56) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Open to configured `base` when `astro dev --open` runs + +- [#8105](https://github.com/withastro/astro/pull/8105) [`0e0fa605d`](https://github.com/withastro/astro/commit/0e0fa605d109cc91e08a1ae1cc560ea240fe631b) Thanks [@martrapp](https://github.com/martrapp)! - ViewTransition: bug fix for lost scroll position in browser history + +- [#8116](https://github.com/withastro/astro/pull/8116) [`b290f0a99`](https://github.com/withastro/astro/commit/b290f0a99778a9b9c1045f3cd06b6aee934d7c03) Thanks [@martrapp](https://github.com/martrapp)! - On back navigation only animate view transitions that were animated going forward. + +- [#7778](https://github.com/withastro/astro/pull/7778) [`d6b494376`](https://github.com/withastro/astro/commit/d6b4943764989c0e89df2d6875cd19691566dfb3) Thanks [@y-nk](https://github.com/y-nk)! - Added support for optimizing remote images from authorized sources when using `astro:assets`. This comes with two new parameters to specify which domains (`image.domains`) and host patterns (`image.remotePatterns`) are authorized for remote images. + + For example, the following configuration will only allow remote images from `astro.build` to be optimized: + + ```ts + // astro.config.mjs + export default defineConfig({ + image: { + domains: ['astro.build'], + }, + }); + ``` + + The following configuration will only allow remote images from HTTPS hosts: + + ```ts + // astro.config.mjs + export default defineConfig({ + image: { + remotePatterns: [{ protocol: 'https' }], + }, + }); + ``` + +- [#8109](https://github.com/withastro/astro/pull/8109) [`da6e3da1c`](https://github.com/withastro/astro/commit/da6e3da1ce00bed625fc568cfe4693713448e93f) Thanks [@martrapp](https://github.com/martrapp)! - fix: reinsert attribute to specify direction of ViewTransition (forward / back) + +## 2.10.9 + +### Patch Changes + +- [#8091](https://github.com/withastro/astro/pull/8091) [`56e7c5177`](https://github.com/withastro/astro/commit/56e7c5177bd61b404978dc9b82e2d34d76a4b2f9) Thanks [@martrapp](https://github.com/martrapp)! - Handle `