diff options
author | 2024-12-03 02:56:34 -0800 | |
---|---|---|
committer | 2024-12-03 10:56:34 +0000 | |
commit | fcdd37f684833eeb00dcecad21d9f4308cd6caa4 (patch) | |
tree | 7ade673147d453de5617cea5b2811ac58b2e05e8 | |
parent | bc18c3cfe220022e152fd0a8f617f6b4fc3ad8b4 (diff) | |
download | astro-@astrojs/studio@0.1.2.tar.gz astro-@astrojs/studio@0.1.2.tar.zst astro-@astrojs/studio@0.1.2.zip |
[ci] release (#12567)create-astro@4.11.0astro@5.0.0@astrojs/vue@5.0.0@astrojs/upgrade@0.4.0@astrojs/underscore-redirects@0.4.0@astrojs/telemetry@3.2.0@astrojs/svelte@7.0.0@astrojs/studio@0.1.2@astrojs/solid-js@5.0.0@astrojs/react@4.0.0@astrojs/prism@3.2.0@astrojs/preact@4.0.0@astrojs/mdx@4.0.0@astrojs/markdown-remark@6.0.0@astrojs/markdoc@0.12.0@astrojs/internal-helpers@0.4.2
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
184 files changed, 1702 insertions, 1949 deletions
diff --git a/.changeset/afraid-apricots-buy.md b/.changeset/afraid-apricots-buy.md deleted file mode 100644 index 8be7e9db8..000000000 --- a/.changeset/afraid-apricots-buy.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -'astro': minor ---- - -Adapters can now specify the build output type they're intended for using the `adapterFeatures.buildOutput` property. This property can be used to always generate a server output, even if the project doesn't have any server-rendered pages. - -```ts -{ - 'astro:config:done': ({ setAdapter, config }) => { - setAdapter({ - name: 'my-adapter', - adapterFeatures: { - buildOutput: 'server', - }, - }); - }, -} -``` - -If your adapter specifies `buildOutput: 'static'`, and the user's project contains server-rendered pages, Astro will warn in development and error at build time. Note that a hybrid output, containing both static and server-rendered pages, is considered to be a `server` output, as a server is required to serve the server-rendered pages. diff --git a/.changeset/blue-boats-relax.md b/.changeset/blue-boats-relax.md deleted file mode 100644 index 93d9b51ca..000000000 --- a/.changeset/blue-boats-relax.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'astro': major ---- - -Unflag globalRoutePriority - -The previously experimental feature `globalRoutePriority` is now the default in Astro 5. - -This was a refactoring of route prioritization in Astro, making it so that injected routes, file-based routes, and redirects are all prioritized using the same logic. This feature has been enabled for all Starlight projects since it was added and should not affect most users. diff --git a/.changeset/blue-gorillas-accept.md b/.changeset/blue-gorillas-accept.md deleted file mode 100644 index b122a9558..000000000 --- a/.changeset/blue-gorillas-accept.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a bug where content types were not generated when first running astro dev unless src/content exists diff --git a/.changeset/blue-sloths-stare.md b/.changeset/blue-sloths-stare.md deleted file mode 100644 index 53ab43b2e..000000000 --- a/.changeset/blue-sloths-stare.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'astro': patch ---- - -`render()` signature now takes `renderOptions` as 2nd argument - -The signature for `app.render()` has changed, and the second argument is now an options object called `renderOptions` with more options for customizing rendering. - -The `renderOptions` are: - -- `addCookieHeader`: Determines whether Astro will set the `Set-Cookie` header, otherwise the adapter is expected to do so itself. -- `clientAddress`: The client IP address used to set `Astro.clientAddress`. -- `locals`: An object of locals that's set to `Astro.locals`. -- `routeData`: An object specifying the route to use. diff --git a/.changeset/blue-socks-doubt.md b/.changeset/blue-socks-doubt.md deleted file mode 100644 index 638e22e08..000000000 --- a/.changeset/blue-socks-doubt.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -'astro': minor ---- - -Adds experimental support for built-in SVG components. - - -This feature allows you to import SVG files directly into your Astro project as components. By default, Astro will inline the SVG content into your HTML output. - -To enable this feature, set `experimental.svg` to `true` in your Astro config: - -```js -{ - experimental: { - svg: true, - }, -} -``` - -To use this feature, import an SVG file in your Astro project, passing any common SVG attributes to the imported component. Astro also provides a `size` attribute to set equal `height` and `width` properties: - -```astro ---- -import Logo from './path/to/svg/file.svg'; ---- - -<Logo size={24} /> -``` - -For a complete overview, and to give feedback on this experimental API, see the [Feature RFC](https://github.com/withastro/roadmap/pull/1035). diff --git a/.changeset/brave-elephants-fly.md b/.changeset/brave-elephants-fly.md deleted file mode 100644 index 0c7673027..000000000 --- a/.changeset/brave-elephants-fly.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'astro': major ---- - -### [changed]: `entryPoint` type inside the hook `astro:build:ssr` -In Astro v4.x, the `entryPoint` type was `RouteData`. - -Astro v5.0 the `entryPoint` type is `IntegrationRouteData`, which contains a subset of the `RouteData` type. The fields `isIndex` and `fallbackRoutes` were removed. - -#### What should I do? -Update your adapter to change the type of `entryPoint` from `RouteData` to `IntegrationRouteData`. - -```diff --import type {RouteData} from 'astro'; -+import type {IntegrationRouteData} from "astro" - --function useRoute(route: RouteData) { -+function useRoute(route: IntegrationRouteData) { - -} -``` diff --git a/.changeset/breezy-brooms-count.md b/.changeset/breezy-brooms-count.md deleted file mode 100644 index bb64e983a..000000000 --- a/.changeset/breezy-brooms-count.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Bumps Vite to ^6.0.1 and handles its breaking changes diff --git a/.changeset/breezy-colts-promise.md b/.changeset/breezy-colts-promise.md deleted file mode 100644 index b552cb7f5..000000000 --- a/.changeset/breezy-colts-promise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/markdoc': patch ---- - -Uses latest version of `@astrojs/markdown-remark` with updated Shiki APIs diff --git a/.changeset/bright-keys-sell.md b/.changeset/bright-keys-sell.md deleted file mode 100644 index 0222aaf51..000000000 --- a/.changeset/bright-keys-sell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a bug where content config was ignored if it was outside of content dir and has a parent dir with an underscore diff --git a/.changeset/brown-bulldogs-share.md b/.changeset/brown-bulldogs-share.md deleted file mode 100644 index c8cadb11b..000000000 --- a/.changeset/brown-bulldogs-share.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes an issue where an incorrect usage of Astro actions was lost when porting the fix from v4 to v5 diff --git a/.changeset/chatty-teachers-sit.md b/.changeset/chatty-teachers-sit.md deleted file mode 100644 index 9e4fd89b4..000000000 --- a/.changeset/chatty-teachers-sit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": major ---- - -The lowest version of Node supported by Astro is now Node v18.17.1 and higher. diff --git a/.changeset/chilly-terms-know.md b/.changeset/chilly-terms-know.md deleted file mode 100644 index ea5de6602..000000000 --- a/.changeset/chilly-terms-know.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'astro': major ---- - -Updates how the `build.client` and `build.server` option values get resolved to match existing documentation. With this fix, the option values will now correctly resolve relative to the `outDir` option. So if `outDir` is set to `./dist/nested/`, then by default: - -- `build.client` will resolve to `<root>/dist/nested/client/` -- `build.server` will resolve to `<root>/dist/nested/server/` - -Previously the values were incorrectly resolved: - -- `build.client` was resolved to `<root>/dist/nested/dist/client/` -- `build.server` was resolved to `<root>/dist/nested/dist/server/` - -If you were relying on the previous build paths, make sure that your project code is updated to the new build paths. diff --git a/.changeset/clean-camels-drive.md b/.changeset/clean-camels-drive.md deleted file mode 100644 index 4e908a28b..000000000 --- a/.changeset/clean-camels-drive.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': major ---- - -Adds a default exclude and include value to the tsconfig presets. `{projectDir}/dist` is now excluded by default, and `{projectDir}/.astro/types.d.ts` and `{projectDir}/**/*` are included by default. - -Both of these options can be overridden by setting your own values to the corresponding settings in your `tsconfig.json` file. diff --git a/.changeset/clean-donuts-walk.md b/.changeset/clean-donuts-walk.md deleted file mode 100644 index 1af111a4b..000000000 --- a/.changeset/clean-donuts-walk.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@astrojs/markdown-remark': major -'astro': major ---- - -Cleans up Astro-specfic metadata attached to `vfile.data` in Remark and Rehype plugins. Previously, the metadata was attached in different locations with inconsistent names. The metadata is now renamed as below: - -- `vfile.data.__astroHeadings` -> `vfile.data.astro.headings` -- `vfile.data.imagePaths` -> `vfile.data.astro.imagePaths` - -The types of `imagePaths` has also been updated from `Set<string>` to `string[]`. The `vfile.data.astro.frontmatter` metadata is left unchanged. - -While we don't consider these APIs public, they can be accessed by Remark and Rehype plugins that want to re-use Astro's metadata. If you are using these APIs, make sure to access them in the new locations. diff --git a/.changeset/clean-moles-rest.md b/.changeset/clean-moles-rest.md deleted file mode 100644 index 6925bd90c..000000000 --- a/.changeset/clean-moles-rest.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a bug where legacy content types were generated for content layer collections if they were in the content directory diff --git a/.changeset/cold-bananas-hear.md b/.changeset/cold-bananas-hear.md deleted file mode 100644 index dfa9ade4a..000000000 --- a/.changeset/cold-bananas-hear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Correctly parse values returned from inline loader diff --git a/.changeset/cool-mangos-shop.md b/.changeset/cool-mangos-shop.md deleted file mode 100644 index 893ed22e2..000000000 --- a/.changeset/cool-mangos-shop.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'astro': major ---- - -The `locals` object can no longer be overridden - -Middleware, API endpoints, and pages can no longer override the `locals` object in its entirety. You can still append values onto the object, but you can not replace the entire object and delete its existing values. - -If you were previously overwriting like so: - -```js -ctx.locals = { - one: 1, - two: 2 -} -``` - -This can be changed to an assignment on the existing object instead: - -```js -Object.assign(ctx.locals, { - one: 1, - two: 2 -}) -``` diff --git a/.changeset/cuddly-shoes-press.md b/.changeset/cuddly-shoes-press.md deleted file mode 100644 index 65f9fe7ef..000000000 --- a/.changeset/cuddly-shoes-press.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes an issue where the refresh context data was not passed correctly to content layer loaders diff --git a/.changeset/curvy-walls-kneel.md b/.changeset/curvy-walls-kneel.md deleted file mode 100644 index dc04cb0af..000000000 --- a/.changeset/curvy-walls-kneel.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -'astro': patch ---- - -Adds a new function `refreshContent` to the `astro:server:setup` hook that allows integrations to refresh the content layer. This can be used, for example, to register a webhook endpoint during dev, or to open a socket to a CMS to listen for changes. - -By default, `refreshContent` will refresh all collections. You can optionally pass a `loaders` property, which is an array of loader names. If provided, only collections that use those loaders will be refreshed. For example, A CMS integration could use this property to only refresh its own collections. - -You can also pass a `context` object to the loaders. This can be used to pass arbitrary data, such as the webhook body, or an event from the websocket. - -```ts - { - name: 'my-integration', - hooks: { - 'astro:server:setup': async ({ server, refreshContent }) => { - server.middlewares.use('/_refresh', async (req, res) => { - if(req.method !== 'POST') { - res.statusCode = 405 - res.end('Method Not Allowed'); - return - } - let body = ''; - req.on('data', chunk => { - body += chunk.toString(); - }); - req.on('end', async () => { - try { - const webhookBody = JSON.parse(body); - await refreshContent({ - context: { webhookBody }, - loaders: ['my-loader'] - }); - res.writeHead(200, { 'Content-Type': 'application/json' }); - res.end(JSON.stringify({ message: 'Content refreshed successfully' })); - } catch (error) { - res.writeHead(500, { 'Content-Type': 'application/json' }); - res.end(JSON.stringify({ error: 'Failed to refresh content: ' + error.message })); - } - }); - }); - } - } -} -``` - diff --git a/.changeset/dirty-bees-repair.md b/.changeset/dirty-bees-repair.md deleted file mode 100644 index 98fc2f714..000000000 --- a/.changeset/dirty-bees-repair.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/upgrade': patch ---- - -Fixes an issue where `@astrojs/upgrade` announces integration updates for already up to date packages diff --git a/.changeset/dirty-cooks-explode.md b/.changeset/dirty-cooks-explode.md deleted file mode 100644 index 770ef1799..000000000 --- a/.changeset/dirty-cooks-explode.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@astrojs/mdx': major ---- - -Handles the breaking change in Astro where content pages (including `.mdx` pages located within `src/pages/`) no longer respond with `charset=utf-8` in the `Content-Type` header. - -For MDX pages without layouts, `@astrojs/mdx` will automatically add the `<meta charset="utf-8">` tag to the page by default. This reduces the boilerplate needed to write with non-ASCII characters. If your MDX pages have a layout, the layout component should include the `<meta charset="utf-8">` tag. - -If you require `charset=utf-8` to render your page correctly, make sure that your layout components have the `<meta charset="utf-8">` tag added. diff --git a/.changeset/dry-lamps-smile.md b/.changeset/dry-lamps-smile.md deleted file mode 100644 index 95f5172a9..000000000 --- a/.changeset/dry-lamps-smile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Update error link to on-demand rendering guide diff --git a/.changeset/dry-worms-knock.md b/.changeset/dry-worms-knock.md deleted file mode 100644 index e8412e3be..000000000 --- a/.changeset/dry-worms-knock.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'astro': major ---- - -The `image.endpoint` config now allow customizing the route of the image endpoint in addition to the entrypoint. This can be useful in niche situations where the default route `/_image` conflicts with an existing route or your local server setup. - -```js -import { defineConfig } from "astro/config"; - -defineConfig({ - image: { - endpoint: { - route: "/image", - entrypoint: "./src/image_endpoint.ts" - } - }, -}) -``` diff --git a/.changeset/dull-moles-talk.md b/.changeset/dull-moles-talk.md deleted file mode 100644 index 97d3d0eb2..000000000 --- a/.changeset/dull-moles-talk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Prevents Vite emitting an error when restarting itself diff --git a/.changeset/eight-days-sort.md b/.changeset/eight-days-sort.md deleted file mode 100644 index 871f53d32..000000000 --- a/.changeset/eight-days-sort.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'astro': major -'@astrojs/mdx': major -'@astrojs/markdown-remark': major -'@astrojs/db': minor -'@astrojs/web-vitals': major -'@astrojs/underscore-redirects': minor ---- - -Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release. - -Starting from this release, no breaking changes will be introduced unless absolutely necessary. - -To learn how to upgrade, check out the [Astro v5.0 upgrade guide in our beta docs site](https://5-0-0-beta.docs.astro.build/en/guides/upgrade-to/v5/). diff --git a/.changeset/eight-seahorses-attend.md b/.changeset/eight-seahorses-attend.md deleted file mode 100644 index 72ead3c15..000000000 --- a/.changeset/eight-seahorses-attend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Handle multiple root nodes on SVG files diff --git a/.changeset/eighty-bags-cross.md b/.changeset/eighty-bags-cross.md deleted file mode 100644 index 734ef71c1..000000000 --- a/.changeset/eighty-bags-cross.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Exports the `RenderResult` type diff --git a/.changeset/eighty-boxes-applaud.md b/.changeset/eighty-boxes-applaud.md deleted file mode 100644 index a732758cb..000000000 --- a/.changeset/eighty-boxes-applaud.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -'astro': major ---- - -The `astro:env` feature introduced behind a flag in [v4.10.0](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md#x4100) is no longer experimental and is available for general use. If you have been waiting for stabilization before using `astro:env`, you can now do so. - -This feature lets you configure a type-safe schema for your environment variables, and indicate whether they should be available on the server or the client. - -To configure a schema, add the `env` option to your Astro config and define your client and server variables. If you were previously using this feature, please remove the experimental flag from your Astro config and move your entire `env` configuration unchanged to a top-level option. - -```js -import { defineConfig, envField } from 'astro/config' - -export default defineConfig({ - env: { - schema: { - API_URL: envField.string({ context: "client", access: "public", optional: true }), - PORT: envField.number({ context: "server", access: "public", default: 4321 }), - API_SECRET: envField.string({ context: "server", access: "secret" }), - } - } -}) -``` - -You can import and use your defined variables from the appropriate `/client` or `/server` module: - -```astro ---- -import { API_URL } from "astro:env/client" -import { API_SECRET_TOKEN } from "astro:env/server" - -const data = await fetch(`${API_URL}/users`, { - method: "GET", - headers: { - "Content-Type": "application/json", - "Authorization": `Bearer ${API_SECRET_TOKEN}` - }, -}) ---- - -<script> -import { API_URL } from "astro:env/client" - -fetch(`${API_URL}/ping`) -</script> -``` - -Please see our [guide to using environment variables](https://docs.astro.build/en/guides/environment-variables/#astroenv) for more about this feature. diff --git a/.changeset/eighty-crabs-cross.md b/.changeset/eighty-crabs-cross.md deleted file mode 100644 index 57bd3b1f4..000000000 --- a/.changeset/eighty-crabs-cross.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/solid-js': patch ---- - -Updates vite-plugin-solid to handle Vite 6 diff --git a/.changeset/eighty-donkeys-fly.md b/.changeset/eighty-donkeys-fly.md deleted file mode 100644 index 8cec46236..000000000 --- a/.changeset/eighty-donkeys-fly.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'astro': minor ---- - -The following renderer fields and integration fields now accept `URL` as a type: - -**Renderers**: -- `AstroRenderer.clientEntrpoint` -- `AstroRenderer.serverEntrypoint` - -**Integrations**: -- `InjectedRoute.entrypoint` -- `AstroIntegrationMiddleware.entrypoint` -- `DevToolbarAppEntry.entrypoint` diff --git a/.changeset/eighty-ligers-punch.md b/.changeset/eighty-ligers-punch.md deleted file mode 100644 index ee7acbec3..000000000 --- a/.changeset/eighty-ligers-punch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/svelte': patch ---- - -Fixes an Reference Error that occurred during client transitions diff --git a/.changeset/empty-houses-melt.md b/.changeset/empty-houses-melt.md deleted file mode 100644 index 737cf9d3d..000000000 --- a/.changeset/empty-houses-melt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': minor ---- - -Updates to Vite 6.0.0-beta.6 diff --git a/.changeset/empty-jobs-impress.md b/.changeset/empty-jobs-impress.md deleted file mode 100644 index 09a57fe39..000000000 --- a/.changeset/empty-jobs-impress.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Explicitly import index.ts to fix types when moduleResolution is NodeNext diff --git a/.changeset/fair-ears-compare.md b/.changeset/fair-ears-compare.md deleted file mode 100644 index a5c3bd3ff..000000000 --- a/.changeset/fair-ears-compare.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@astrojs/markdoc': minor -'@astrojs/preact': minor -'@astrojs/svelte': minor -'@astrojs/react': minor -'@astrojs/solid-js': minor -'@astrojs/mdx': minor -'@astrojs/vue': minor -'create-astro': minor -'@astrojs/prism': minor -'@astrojs/telemetry': minor -'@astrojs/upgrade': minor -'astro': minor ---- - -Drops node 21 support diff --git a/.changeset/five-jars-hear.md b/.changeset/five-jars-hear.md deleted file mode 100644 index 1385c7f03..000000000 --- a/.changeset/five-jars-hear.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'astro': patch ---- - -Updates Astro's default `<script>` rendering strategy and removes the `experimental.directRenderScript` option as this is now the default behavior: scripts are always rendered directly. This new strategy prevents scripts from being executed in pages where they are not used. - -Scripts will directly render as declared in Astro files (including existing features like TypeScript, importing `node_modules`, and deduplicating scripts). You can also now conditionally render scripts in your Astro file. - -However, this means scripts are no longer hoisted to the `<head>`, multiple scripts on a page are no longer bundled together, and the `<script>` tag may interfere with the CSS styling. - -As this is a potentially breaking change to your script behavior, please review your `<script>` tags and ensure that they behave as expected. diff --git a/.changeset/fluffy-jars-live.md b/.changeset/fluffy-jars-live.md deleted file mode 100644 index 59549a4a2..000000000 --- a/.changeset/fluffy-jars-live.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': major ---- - -Removes the `assets` property on `supportedAstroFeatures` for adapters, as it did not reflect reality properly in many cases. - -Now, relating to assets, only a single `sharpImageService` property is available, determining if the adapter is compatible with the built-in sharp image service. diff --git a/.changeset/forty-trains-notice.md b/.changeset/forty-trains-notice.md deleted file mode 100644 index 29938198d..000000000 --- a/.changeset/forty-trains-notice.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': minor ---- - -Improves `defineConfig` type safety. TypeScript will now error if a group of related configuration options do not have consistent types. For example, you will now see an error if your language set for `i18n.defaultLocale` is not one of the supported locales specified in `i18n.locales`. diff --git a/.changeset/fresh-pandas-drive.md b/.changeset/fresh-pandas-drive.md deleted file mode 100644 index 5240ecb93..000000000 --- a/.changeset/fresh-pandas-drive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a type and an example in documenting the `security.checkOrigin` property of Astro config. diff --git a/.changeset/funny-wolves-dream.md b/.changeset/funny-wolves-dream.md deleted file mode 100644 index 3023efebd..000000000 --- a/.changeset/funny-wolves-dream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Allows "slug" as a field in content layer data diff --git a/.changeset/fuzzy-pugs-live.md b/.changeset/fuzzy-pugs-live.md deleted file mode 100644 index bf1bd39dc..000000000 --- a/.changeset/fuzzy-pugs-live.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'astro': major ---- - -### [changed]: `routes` type inside the hook `astro:build:done` -In Astro v4.x, the `routes` type was `RouteData`. - -Astro v5.0 the `routes` type is `IntegrationRouteData`, which contains a subset of the `RouteData` type. The fields `isIndex` and `fallbackRoutes` were removed. - -#### What should I do? -Update your adapter to change the type of `routes` from `RouteData` to `IntegrationRouteData`. - -```diff --import type {RouteData} from 'astro'; -+import type {IntegrationRouteData} from "astro" - --function useRoute(route: RouteData) { -+function useRoute(route: IntegrationRouteData) { - -} -``` diff --git a/.changeset/gentle-scissors-bow.md b/.changeset/gentle-scissors-bow.md deleted file mode 100644 index 4e9387779..000000000 --- a/.changeset/gentle-scissors-bow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes an issue where the origin check middleware run for prendered pages diff --git a/.changeset/giant-ravens-look.md b/.changeset/giant-ravens-look.md deleted file mode 100644 index dfa5d6d95..000000000 --- a/.changeset/giant-ravens-look.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -'astro': minor ---- - -Adds a new `astro:routes:resolved` hook to the Integration API. Also update the `astro:build:done` hook by deprecating `routes` and adding a new `assets` map. - -When building an integration, you can now get access to routes inside the `astro:routes:resolved` hook: - -```js -const integration = () => { - return { - name: 'my-integration', - hooks: { - 'astro:routes:resolved': ({ routes }) => { - console.log(routes) - } - } - } -} -``` - -This hook runs before `astro:config:done`, and whenever a route changes in development. - -The `routes` array from `astro:build:done` is now deprecated, and exposed properties are now available on `astro:routes:resolved`, except for `distURL`. For this, you can use the newly exposed `assets` map: - -```diff -const integration = () => { -+ let routes - return { - name: 'my-integration', - hooks: { -+ 'astro:routes:resolved': (params) => { -+ routes = params.routes -+ }, - 'astro:build:done': ({ -- routes -+ assets - }) => { -+ for (const route of routes) { -+ const distURL = assets.get(route.pattern) -+ if (distURL) { -+ Object.assign(route, { distURL }) -+ } -+ } - console.log(routes) - } - } - } -} -```
\ No newline at end of file diff --git a/.changeset/giant-rocks-thank.md b/.changeset/giant-rocks-thank.md deleted file mode 100644 index 920933351..000000000 --- a/.changeset/giant-rocks-thank.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'astro': major ---- - -Merges the `output: 'hybrid'` and `output: 'static'` configurations into one single configuration (now called `'static'`) that works the same way as the previous `hybrid` option. - -It is no longer necessary to specify `output: 'hybrid'` in your Astro config to use server-rendered pages. The new `output: 'static'` has this capability included. Astro will now automatically provide the ability to opt out of prerendering in your static site with no change to your `output` configuration required. Any page route or endpoint can include `export const prerender = false` to be server-rendered, while the rest of your site is statically-generated. - -If your project used hybrid rendering, you must now remove the `output: 'hybrid'` option from your Astro config as it no longer exists. However, no other changes to your project are required, and you should have no breaking changes. The previous `'hybrid'` behavior is now the default, under a new name `'static'`. - -If you were using the `output: 'static'` (default) option, you can continue to use it as before. By default, all of your pages will continue to be prerendered and you will have a completely static site. You should have no breaking changes to your project. - -```diff -import { defineConfig } from "astro/config"; - -export default defineConfig({ -- output: 'hybrid', -}); -``` - -An adapter is still required to deploy an Astro project with any server-rendered pages. Failure to include an adapter will result in a warning in development and an error at build time. diff --git a/.changeset/gorgeous-foxes-divide.md b/.changeset/gorgeous-foxes-divide.md deleted file mode 100644 index 2620074bd..000000000 --- a/.changeset/gorgeous-foxes-divide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes and issue where `Astro.currentLocale` always returned the default locale when consumed inside a server island. diff --git a/.changeset/healthy-ads-scream.md b/.changeset/healthy-ads-scream.md deleted file mode 100644 index f78bd6d52..000000000 --- a/.changeset/healthy-ads-scream.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'astro': patch ---- - -Use GET requests with preloading for Server Islands - -Server Island requests include the props used to render the island as well as any slots passed in (excluding the fallback slot). Since browsers have a max 4mb URL length we default to using a POST request to avoid overflowing this length. - -However in reality most usage of Server Islands are fairly isolated and won't exceed this limit, so a GET request is possible by passing this same information via search parameters. - -Using GET means we can also include a `<link rel="preload">` tag to speed up the request. - -This change implements this, with safe fallback to POST. diff --git a/.changeset/heavy-peas-sneeze.md b/.changeset/heavy-peas-sneeze.md deleted file mode 100644 index 8a4f1def6..000000000 --- a/.changeset/heavy-peas-sneeze.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@astrojs/svelte': major -'@astrojs/vue': major ---- - -Updates peer dependency range to support Astro 5 diff --git a/.changeset/heavy-seahorses-poke.md b/.changeset/heavy-seahorses-poke.md deleted file mode 100644 index f6c9111e2..000000000 --- a/.changeset/heavy-seahorses-poke.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -'astro': minor ---- - -The Content Layer API introduced behind a flag in [4.14.0](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md#4140) is now stable and ready for use in Astro v5.0. - -The new Content Layer API builds upon content collections, taking them beyond local files in `src/content/` and allowing you to fetch content from anywhere, including remote APIs. These new collections work alongside your existing content collections, and you can migrate them to the new API at your own pace. There are significant improvements to performance with large collections of local files. For more details, see [the Content Layer RFC](https://github.com/withastro/roadmap/blob/content-layer/proposals/0050-content-layer.md). - -If you previously used this feature, you can now remove the `experimental.contentLayer` flag from your Astro config: - -```diff -// astro.config.mjs -import { defineConfig } from 'astro' - -export default defineConfig({ -- experimental: { -- contentLayer: true -- } -}) -``` - -### Loading your content - -The core of the new Content Layer API is the loader, a function that fetches content from a source and caches it in a local data store. Astro 4.14 ships with built-in `glob()` and `file()` loaders to handle your local Markdown, MDX, Markdoc, and JSON files: - -```ts {3,7} -// src/content/config.ts -import { defineCollection, z } from 'astro:content'; -import { glob } from 'astro/loaders'; - -const blog = defineCollection({ - // The ID is a slug generated from the path of the file relative to `base` - loader: glob({ pattern: "**/*.md", base: "./src/data/blog" }), - schema: z.object({ - title: z.string(), - description: z.string(), - publishDate: z.coerce.date(), - }) -}); - -export const collections = { blog }; -``` - -You can then query using the existing content collections functions, and use a simplified `render()` function to display your content: - -```astro ---- -import { getEntry, render } from 'astro:content'; - -const post = await getEntry('blog', Astro.params.slug); - -const { Content } = await render(entry); ---- - -<Content /> -``` - -### Creating a loader - -You're not restricted to the built-in loaders – we hope you'll try building your own. You can fetch content from anywhere and return an array of entries: - -```ts -// src/content/config.ts -const countries = defineCollection({ - loader: async () => { - const response = await fetch("https://restcountries.com/v3.1/all"); - const data = await response.json(); - // Must return an array of entries with an id property, - // or an object with IDs as keys and entries as values - return data.map((country) => ({ - id: country.cca3, - ...country, - })); - }, - // optionally add a schema to validate the data and make it type-safe for users - // schema: z.object... -}); - -export const collections = { countries }; -``` - -For more advanced loading logic, you can define an object loader. This allows incremental updates and conditional loading, and gives full access to the data store. It also allows a loader to define its own schema, including generating it dynamically based on the source API. See the [the Content Layer API RFC](https://github.com/withastro/roadmap/blob/content-layer/proposals/0050-content-layer.md#loaders) for more details. - -### Sharing your loaders - -Loaders are better when they're shared. You can create a package that exports a loader and publish it to npm, and then anyone can use it on their site. We're excited to see what the community comes up with! To get started, [take a look at some examples](https://github.com/ascorbic/astro-loaders/). Here's how to load content using an RSS/Atom feed loader: - -```ts -// src/content/config.ts -import { defineCollection } from "astro:content"; -import { feedLoader } from "@ascorbic/feed-loader"; - -const podcasts = defineCollection({ - loader: feedLoader({ - url: "https://feeds.99percentinvisible.org/99percentinvisible", - }), -}); - -export const collections = { podcasts }; -``` - -To learn more, see [the Content Layer RFC](https://github.com/withastro/roadmap/blob/content-layer/proposals/0050-content-layer.md). diff --git a/.changeset/hip-wombats-exercise.md b/.changeset/hip-wombats-exercise.md deleted file mode 100644 index d30d37cbb..000000000 --- a/.changeset/hip-wombats-exercise.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'astro': minor ---- - -ViewTransitions component renamed to ClientRouter - -The `<ViewTransitions />` component has been renamed to `<ClientRouter />`. There are no other changes than the name. The old name will continue to work in Astro 5.x, but will be removed in 6.0. - -This change was done to clarify the role of the component within Astro's View Transitions support. Astro supports View Transitions APIs in a few different ways, and renaming the component makes it more clear that the features you get from the ClientRouter component are slightly different from what you get using the native CSS-based MPA router. - -We still intend to maintain the ClientRouter as before, and it's still important for use-cases that the native support doesn't cover, such as persisting state between pages. diff --git a/.changeset/honest-dingos-add.md b/.changeset/honest-dingos-add.md deleted file mode 100644 index c1eb73c9f..000000000 --- a/.changeset/honest-dingos-add.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -'astro': patch ---- - -Adds support for array patterns in the built-in `glob()` content collections loader - -The glob loader can now accept an array of multiple patterns as well as string patterns. This allows you to more easily combine multiple patterns into a single collection, and also means you can use negative matches to exclude files from the collection. - -```ts -const probes = defineCollection({ - // Load all markdown files in the space-probes directory, except for those that start with "voyager-" - loader: glob({ pattern: ['*.md', '!voyager-*'], base: 'src/data/space-probes' }), - schema: z.object({ - name: z.string(), - type: z.enum(['Space Probe', 'Mars Rover', 'Comet Lander']), - launch_date: z.date(), - status: z.enum(['Active', 'Inactive', 'Decommissioned']), - destination: z.string(), - operator: z.string(), - notable_discoveries: z.array(z.string()), - }), -}); -``` diff --git a/.changeset/hot-camels-move.md b/.changeset/hot-camels-move.md deleted file mode 100644 index 2598e7540..000000000 --- a/.changeset/hot-camels-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Properly handle including trailing slash on the image endpoint route based on the trailingSlash config diff --git a/.changeset/hungry-jokes-try.md b/.changeset/hungry-jokes-try.md deleted file mode 100644 index 4d3597cb8..000000000 --- a/.changeset/hungry-jokes-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/markdown-remark': major ---- - -Updates return object of `createShikiHighlighter` as `codeToHast` and `codeToHtml` to allow generating either the hast or html string directly diff --git a/.changeset/itchy-toys-march.md b/.changeset/itchy-toys-march.md deleted file mode 100644 index 972923ecf..000000000 --- a/.changeset/itchy-toys-march.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'astro': major ---- - -Updates the default value of `security.checkOrigin` to `true`, which enables Cross-Site Request Forgery (CSRF) protection by default for pages rendered on demand. - -If you had previously configured `security.checkOrigin: true`, you no longer need this set in your Astro config. This is now the default and it is safe to remove. - -To disable this behavior and opt out of automatically checking that the “origin” header matches the URL sent by each request, you must explicitly set `security.checkOrigin: false`: - -```diff -export default defineConfig({ -+ security: { -+ checkOrigin: false -+ } -}) -``` diff --git a/.changeset/large-zebras-sniff.md b/.changeset/large-zebras-sniff.md deleted file mode 100644 index 97143b521..000000000 --- a/.changeset/large-zebras-sniff.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'astro': major ---- - -Updates internal Shiki rehype plugin to highlight code blocks as hast (using Shiki's `codeToHast()` API). This allows a more direct Markdown and MDX processing, and improves the performance when building the project, but may cause issues with existing Shiki transformers. - -If you are using Shiki transformers passed to `markdown.shikiConfig.transformers`, you must make sure they do not use the `postprocess` hook as it no longer runs on code blocks in `.md` and `.mdx` files. (See [the Shiki documentation on transformer hooks](https://shiki.style/guide/transformers#transformer-hooks) for more information). - -Code blocks in `.mdoc` files and `<Code />` component do not use the internal Shiki rehype plugin and are unaffected. diff --git a/.changeset/lemon-frogs-wait.md b/.changeset/lemon-frogs-wait.md deleted file mode 100644 index 2a7a4680f..000000000 --- a/.changeset/lemon-frogs-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/svelte': major ---- - -Updates `@sveltejs/vite-plugin-svelte` to v5 to handle Vite 6 diff --git a/.changeset/light-pears-accept.md b/.changeset/light-pears-accept.md deleted file mode 100644 index 58db0e33f..000000000 --- a/.changeset/light-pears-accept.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': patch ---- - -Fixes a bug where configured redirects were incorrectly constructed when reading the file system. - -This caused an issue where configuring a redirect in `astro.config.mjs` like `{ /old: /new }`, failed to trigger the correct redirect in the dev server. diff --git a/.changeset/long-lions-do.md b/.changeset/long-lions-do.md deleted file mode 100644 index b9fc3515a..000000000 --- a/.changeset/long-lions-do.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -'astro': minor ---- - -Adds a new property `isPrerendered` to the globals `Astro` and `APIContext` . This boolean value represents whether or not the current page is prerendered: - -```astro ---- -// src/pages/index.astro - -export const prerender = true ---- -``` - -```js -// src/middleware.js - -export const onRequest = (ctx, next) => { - console.log(ctx.isPrerendered) // it will log true - return next() -} -``` diff --git a/.changeset/long-months-rule.md b/.changeset/long-months-rule.md deleted file mode 100644 index 2e44f0793..000000000 --- a/.changeset/long-months-rule.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'astro': major ---- - -Deprecate Astro.glob - -The `Astro.glob` function has been deprecated in favor of Content Collections and `import.meta.glob`. - -- If you want to query for markdown and MDX in your project, use Content Collections. -- If you want to query source files in your project, use `import.meta.glob`(https://vitejs.dev/guide/features.html#glob-import). - -Also consider using glob packages from npm, like [fast-glob](https://www.npmjs.com/package/fast-glob), especially if statically generating your site, as it is faster for most use-cases. - -The easiest path is to migrate to `import.meta.glob` like so: - -```diff -- const posts = Astro.glob('./posts/*.md'); -+ const posts = Object.values(import.meta.glob('./posts/*.md', { eager: true })); -``` diff --git a/.changeset/loud-cougars-grow.md b/.changeset/loud-cougars-grow.md deleted file mode 100644 index 3e51ae4d9..000000000 --- a/.changeset/loud-cougars-grow.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': major ---- - -The command `astro add vercel` now updates the configuration file differently, and adds `@astrojs/vercel` as module to import. - -This is a breaking change because it requires the version `8.*` of `@astrojs/vercel`. diff --git a/.changeset/lovely-pianos-breathe.md b/.changeset/lovely-pianos-breathe.md deleted file mode 100644 index d0d2df792..000000000 --- a/.changeset/lovely-pianos-breathe.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -'astro': minor ---- - -Adds a new optional `parser` property to the built-in `file()` loader for content collections to support additional file types such as `toml` and `csv`. - -The `file()` loader now accepts a second argument that defines a `parser` function. This allows you to specify a custom parser (e.g. `toml.parse` or `csv-parse`) to create a collection from a file's contents. The `file()` loader will automatically detect and parse JSON and YAML files (based on their file extension) with no need for a `parser`. - -This works with any type of custom file formats including `csv` and `toml`. The following example defines a content collection `dogs` using a `.toml` file. -```toml -[[dogs]] -id = "..." -age = "..." - -[[dogs]] -id = "..." -age = "..." -``` -After importing TOML's parser, you can load the `dogs` collection into your project by passing both a file path and `parser` to the `file()` loader. -```typescript -import { defineCollection } from "astro:content" -import { file } from "astro/loaders" -import { parse as parseToml } from "toml" - -const dogs = defineCollection({ - loader: file("src/data/dogs.toml", { parser: (text) => parseToml(text).dogs }), - schema: /* ... */ -}) - -// it also works with CSVs! -import { parse as parseCsv } from "csv-parse/sync"; - -const cats = defineCollection({ - loader: file("src/data/cats.csv", { parser: (text) => parseCsv(text, { columns: true, skipEmptyLines: true })}) -}); -``` - -The `parser` argument also allows you to load a single collection from a nested JSON document. For example, this JSON file contains multiple collections: -```json -{"dogs": [{}], "cats": [{}]} -``` - -You can seperate these collections by passing a custom `parser` to the `file()` loader like so: -```typescript -const dogs = defineCollection({ - loader: file("src/data/pets.json", { parser: (text) => JSON.parse(text).dogs }) -}); -const cats = defineCollection({ - loader: file("src/data/pets.json", { parser: (text) => JSON.parse(text).cats }) -}); -``` - -And it continues to work with maps of `id` to `data` -```yaml -bubbles: - breed: "Goldfish" - age: 2 -finn: - breed: "Betta" - age: 1 -``` - -```typescript -const fish = defineCollection({ - loader: file("src/data/fish.yaml"), - schema: z.object({ breed: z.string(), age: z.number() }) -}); -``` diff --git a/.changeset/many-garlics-lick.md b/.changeset/many-garlics-lick.md deleted file mode 100644 index 12ac2dd7c..000000000 --- a/.changeset/many-garlics-lick.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'astro': major ---- - -Removes internal JSX handling and moves the responsibility to the `@astrojs/mdx` package directly. The following exports are also now removed: - -- `astro/jsx/babel.js` -- `astro/jsx/component.js` -- `astro/jsx/index.js` -- `astro/jsx/renderer.js` -- `astro/jsx/server.js` -- `astro/jsx/transform-options.js` - -If your project includes `.mdx` files, you must upgrade `@astrojs/mdx` to the latest version so that it doesn't rely on these entrypoints to handle your JSX. diff --git a/.changeset/mean-donkeys-switch.md b/.changeset/mean-donkeys-switch.md deleted file mode 100644 index db70086bf..000000000 --- a/.changeset/mean-donkeys-switch.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'astro': patch ---- - -Exports types for all `LoaderContext` properties from `astro/loaders` to make it easier to use them in custom loaders. -The `ScopedDataStore` interface (which was previously internal) is renamed to `DataStore`, to reflect the fact that it's the only public API for the data store. diff --git a/.changeset/metal-birds-admire.md b/.changeset/metal-birds-admire.md deleted file mode 100644 index 56ee190d1..000000000 --- a/.changeset/metal-birds-admire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a bug where the params weren't correctly computed when rendering URLs with non-English characters diff --git a/.changeset/modern-bears-deny.md b/.changeset/modern-bears-deny.md deleted file mode 100644 index 876535a5c..000000000 --- a/.changeset/modern-bears-deny.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'astro': major ---- - -Makes the `compiledContent` property of Markdown content an async function, this change should fix underlying issues where sometimes when using a custom image service and images inside Markdown, Node would exit suddenly without any error message. - -```diff ---- -import * as myPost from "../post.md"; - -- const content = myPost.compiledContent(); -+ const content = await myPost.compiledContent(); ---- - -<Fragment set:html={content} /> -``` diff --git a/.changeset/moody-waves-think.md b/.changeset/moody-waves-think.md deleted file mode 100644 index 9ae99f190..000000000 --- a/.changeset/moody-waves-think.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'astro': major ---- - -Updates the Astro config loading flow to ignore processing locally-linked dependencies with Vite (e.g. `npm link`, in a monorepo, etc). Instead, they will be normally imported by the Node.js runtime the same way as other dependencies from `node_modules`. - -Previously, Astro would process locally-linked dependencies which were able to use Vite features like TypeScript when imported by the Astro config file. - -However, this caused confusion as integration authors may test against a package that worked locally, but not when published. This method also restricts using CJS-only dependencies because Vite requires the code to be ESM. Therefore, Astro's behaviour is now changed to ignore processing any type of dependencies by Vite. - -In most cases, make sure your locally-linked dependencies are built to JS before running the Astro project, and the config loading should work as before. diff --git a/.changeset/nasty-crabs-worry.md b/.changeset/nasty-crabs-worry.md deleted file mode 100644 index f2a935404..000000000 --- a/.changeset/nasty-crabs-worry.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'astro': minor ---- - -Adds a new property to the globals `Astro` and `APIContext` called `routePattern`. The `routePattern` represents the current route (component) -that is being rendered by Astro. It's usually a path pattern will look like this: `blog/[slug]`: - -```astro ---- -// src/pages/blog/[slug].astro -const route = Astro.routePattern; -console.log(route); // it will log "blog/[slug]" ---- -``` - -```js -// src/pages/index.js - -export const GET = (ctx) => { - console.log(ctx.routePattern) // it will log src/pages/index.js - return new Response.json({ loreum: "ipsum" }) -} -``` - - diff --git a/.changeset/neat-dots-hear.md b/.changeset/neat-dots-hear.md deleted file mode 100644 index 567e5c22e..000000000 --- a/.changeset/neat-dots-hear.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'astro': major ---- - -Prevent usage of `astro:content` in the client - -Usage of `astro:content` in the client has always been discouraged because it leads to all of your content winding up in your client bundle, and can possibly leaks secrets. - -This formally makes doing so impossible, adding to the previous warning with errors. - -In the future Astro might add APIs for client-usage based on needs. diff --git a/.changeset/neat-queens-learn.md b/.changeset/neat-queens-learn.md deleted file mode 100644 index f82db2100..000000000 --- a/.changeset/neat-queens-learn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Bumps `vite` dependency to v6.0.0-beta.2. The version is pinned and will be updated as new Vite versions publish to prevent unhandled breaking changes. For the full list of Vite-specific changes, see [its changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md). diff --git a/.changeset/old-actors-learn.md b/.changeset/old-actors-learn.md deleted file mode 100644 index 0691a7a5b..000000000 --- a/.changeset/old-actors-learn.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'create-astro': minor ---- - -Reworks the experience of creating a new Astro project using the `create astro` CLI command. - -- Updates the list of templates to include Starlight and combines the "minimal" and "basics" templates into a new, refreshed "Basics" template to serve as the single, minimal Astro project starter. -- Removes the TypeScript question. Astro is TypeScript-only, so this question was often misleading. The "Strict" preset is now the default, but it can still be changed manually in `tsconfig.json`. -- `astro check` is no longer automatically added to the build script. -- Added a new `--add` flag to install additional integrations after creating a project. For example, `pnpm create astro --add react` will create a new Astro project and install the React integration. diff --git a/.changeset/old-zebras-teach.md b/.changeset/old-zebras-teach.md deleted file mode 100644 index 45963152b..000000000 --- a/.changeset/old-zebras-teach.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'astro': major ---- - -Changes the default `tsconfig.json` with better defaults, and makes `src/env.d.ts` optional - -Astro's default `tsconfig.json` in starter examples has been updated to include generated types and exclude your build output. This means that `src/env.d.ts` is only necessary if you have added custom type declarations or if you're not using a `tsconfig.json` file. - -Additionally, running `astro sync` no longer creates, nor updates, `src/env.d.ts` as it is not required for type-checking standard Astro projects. - -To update your project to Astro's recommended TypeScript settings, please add the following `include` and `exclude` properties to `tsconfig.json`: - -```diff -{ - "extends": "astro/tsconfigs/base", -+ "include": [".astro/types.d.ts", "**/*"], -+ "exclude": ["dist"] -} -```
\ No newline at end of file diff --git a/.changeset/perfect-fans-fly.md b/.changeset/perfect-fans-fly.md deleted file mode 100644 index cdecf6fb1..000000000 --- a/.changeset/perfect-fans-fly.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/mdx': minor ---- - -Updates adapter server entrypoint to use `@astrojs/mdx/server.js` - -This is an internal change. Handling JSX in your `.mdx` files has been moved from Astro internals and is now the responsibility of this integration. You should not notice a change in your project, and no update to your code is required. diff --git a/.changeset/pink-yaks-exercise.md b/.changeset/pink-yaks-exercise.md deleted file mode 100644 index 158f3612e..000000000 --- a/.changeset/pink-yaks-exercise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Updates the `env` configuration reference docs to include a full API reference for `envField`. diff --git a/.changeset/plenty-carrots-nail.md b/.changeset/plenty-carrots-nail.md deleted file mode 100644 index 706366b40..000000000 --- a/.changeset/plenty-carrots-nail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a bug where a catchall route would match an image endpoint request diff --git a/.changeset/polite-roses-fail.md b/.changeset/polite-roses-fail.md deleted file mode 100644 index a7b3b3f70..000000000 --- a/.changeset/polite-roses-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/underscore-redirects': minor ---- - -Updates the type from `RouteData` to `IntegrationRouteData` diff --git a/.changeset/poor-dots-add.md b/.changeset/poor-dots-add.md deleted file mode 100644 index 088498eee..000000000 --- a/.changeset/poor-dots-add.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': minor ---- - -Adds a new `buildOutput` property to the `astro:config:done` hook returning the build output type. - -This can be used to know if the user's project will be built as a static site (HTML files), or a server-rendered site (whose exact output depends on the adapter). diff --git a/.changeset/poor-frogs-dream.md b/.changeset/poor-frogs-dream.md deleted file mode 100644 index fdb3daa85..000000000 --- a/.changeset/poor-frogs-dream.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': major ---- - -Refactor the exported types from the `astro` module. There should normally be no breaking changes, but if you relied on some previously deprecated types, these might now have been fully removed. - -In most cases, updating your code to move away from previously deprecated APIs in previous versions of Astro should be enough to fix any issues. diff --git a/.changeset/poor-seals-clap.md b/.changeset/poor-seals-clap.md deleted file mode 100644 index 91ad9d67f..000000000 --- a/.changeset/poor-seals-clap.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/studio': patch -'astro': patch -'@astrojs/db': patch ---- - -Replaces `ora` with `yocto-spinner` diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index 88b57d43a..000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "mode": "exit", - "tag": "beta", - "initialVersions": { - "astro": "5.0.0-alpha.9", - "@astrojs/prism": "3.1.0", - "@astrojs/rss": "4.0.7", - "create-astro": "4.9.0", - "@astrojs/db": "0.13.2-alpha.1", - "@astrojs/alpinejs": "0.4.0", - "@astrojs/markdoc": "0.11.4", - "@astrojs/mdx": "4.0.0-alpha.2", - "@astrojs/partytown": "2.1.2", - "@astrojs/preact": "3.5.3", - "@astrojs/react": "3.6.2", - "@astrojs/sitemap": "3.1.6", - "@astrojs/solid-js": "4.4.1", - "@astrojs/svelte": "5.7.0", - "@astrojs/tailwind": "5.1.0", - "@astrojs/vue": "4.5.0", - "@astrojs/web-vitals": "2.0.1-alpha.0", - "@astrojs/internal-helpers": "0.4.1", - "@astrojs/markdown-remark": "6.0.0-alpha.1", - "@astrojs/studio": "0.1.1", - "@astrojs/telemetry": "3.1.0", - "@astrojs/underscore-redirects": "0.4.0-alpha.0", - "@astrojs/upgrade": "0.3.3", - "@astrojs/cloudflare": "0.0.0", - "@astrojs/netlify": "0.0.0", - "@astrojs/node": "0.0.0", - "@astrojs/vercel": "0.0.0" - }, - "changesets": [ - "afraid-apricots-buy", - "blue-boats-relax", - "blue-sloths-stare", - "blue-socks-doubt", - "brave-elephants-fly", - "breezy-brooms-count", - "breezy-colts-promise", - "bright-keys-sell", - "brown-bulldogs-share", - "chatty-teachers-sit", - "chilly-terms-know", - "clean-camels-drive", - "clean-donuts-walk", - "clean-moles-rest", - "cold-bananas-hear", - "cool-mangos-shop", - "cuddly-shoes-press", - "curvy-walls-kneel", - "dirty-cooks-explode", - "dry-lamps-smile", - "dry-worms-knock", - "dull-moles-talk", - "eight-days-sort", - "eight-seahorses-attend", - "eighty-bags-cross", - "eighty-boxes-applaud", - "eighty-crabs-cross", - "eighty-donkeys-fly", - "eighty-ligers-punch", - "empty-houses-melt", - "fair-ears-compare", - "five-jars-hear", - "fluffy-jars-live", - "forty-trains-notice", - "fresh-pandas-drive", - "funny-wolves-dream", - "fuzzy-pugs-live", - "gentle-scissors-bow", - "giant-ravens-look", - "giant-rocks-thank", - "gorgeous-foxes-divide", - "healthy-ads-scream", - "heavy-peas-sneeze", - "heavy-seahorses-poke", - "hip-wombats-exercise", - "honest-dingos-add", - "hot-camels-move", - "hungry-jokes-try", - "itchy-toys-march", - "large-zebras-sniff", - "lemon-frogs-wait", - "light-pears-accept", - "long-lions-do", - "long-months-rule", - "loud-cougars-grow", - "lovely-pianos-breathe", - "many-garlics-lick", - "mean-donkeys-switch", - "metal-birds-admire", - "modern-bears-deny", - "moody-waves-think", - "nasty-crabs-worry", - "neat-dots-hear", - "neat-queens-learn", - "old-actors-learn", - "old-zebras-teach", - "perfect-fans-fly", - "pink-yaks-exercise", - "polite-roses-fail", - "poor-dots-add", - "poor-frogs-dream", - "poor-seals-clap", - "pretty-walls-camp", - "proud-games-repair", - "proud-terms-swim", - "quick-ads-exercise", - "quick-onions-leave", - "red-paws-juggle", - "rotten-dodos-judge", - "rotten-phones-scream", - "selfish-cats-crash", - "selfish-impalas-grin", - "sharp-worms-sniff", - "sixty-coins-worry", - "sixty-fishes-flow", - "sixty-oranges-walk", - "slimy-jeans-train", - "slimy-mice-dance", - "slimy-queens-hang", - "small-ties-sort", - "smooth-panthers-heal", - "spotty-garlics-cheat", - "strange-sheep-film", - "strong-months-grab", - "sweet-timers-smash", - "tall-waves-impress", - "tame-pumpkins-swim", - "tame-rats-cross", - "ten-students-repair", - "ten-walls-tap", - "thirty-clocks-jump", - "three-days-cough", - "three-olives-reflect", - "tough-planets-dress", - "twelve-comics-march", - "twenty-cobras-push", - "unlucky-bobcats-sit", - "violet-goats-grab", - "wet-foxes-walk", - "wise-carrots-float", - "young-terms-hammer" - ] -} diff --git a/.changeset/pretty-walls-camp.md b/.changeset/pretty-walls-camp.md deleted file mode 100644 index 8c9636457..000000000 --- a/.changeset/pretty-walls-camp.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/svelte': patch ---- - -New release to include changes from 5.7.3 diff --git a/.changeset/proud-games-repair.md b/.changeset/proud-games-repair.md deleted file mode 100644 index 8c342e2a3..000000000 --- a/.changeset/proud-games-repair.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': patch ---- - -Adds an error when `Astro.rewrite()` is used to rewrite an on-demand route with a static route when using the `"server"` output. - -This is a forbidden rewrite because Astro can't retrieve the emitted static route at runtime. This route is served by the hosting platform, and not Astro itself. diff --git a/.changeset/proud-terms-swim.md b/.changeset/proud-terms-swim.md deleted file mode 100644 index 08824a8ab..000000000 --- a/.changeset/proud-terms-swim.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -'astro': minor ---- - -Adds experimental support for automatic responsive images - -This feature is experimental and may change in future versions. To enable it, set `experimental.responsiveImages` to `true` in your `astro.config.mjs` file. - - ```js title=astro.config.mjs - { - experimental: { - responsiveImages: true, - }, - } - ``` - - When this flag is enabled, you can pass a `layout` prop to any `<Image />` or `<Picture />` component to create a responsive image. When a layout is set, images have automatically generated `srcset` and `sizes` attributes based on the image's dimensions and the layout type. Images with `responsive` and `full-width` layouts will have styles applied to ensure they resize according to their container. - - ```astro - --- - import { Image, Picture } from 'astro:assets'; - import myImage from '../assets/my_image.png'; - --- - <Image src={myImage} alt="A description of my image." layout='responsive' width={800} height={600} /> - <Picture src={myImage} alt="A description of my image." layout='full-width' formats={['avif', 'webp', 'jpeg']} /> - ``` - This `<Image />` component will generate the following HTML output: - ```html title=Output - - <img - src="/_astro/my_image.hash3.webp" - srcset="/_astro/my_image.hash1.webp 640w, - /_astro/my_image.hash2.webp 750w, - /_astro/my_image.hash3.webp 800w, - /_astro/my_image.hash4.webp 828w, - /_astro/my_image.hash5.webp 1080w, - /_astro/my_image.hash6.webp 1280w, - /_astro/my_image.hash7.webp 1600w" - alt="A description of my image" - sizes="(min-width: 800px) 800px, 100vw" - loading="lazy" - decoding="async" - fetchpriority="auto" - width="800" - height="600" - style="--w: 800; --h: 600; --fit: cover; --pos: center;" - data-astro-image="responsive" - > - ``` - - #### Responsive image properties - - These are additional properties available to the `<Image />` and `<Picture />` components when responsive images are enabled: - - - `layout`: The layout type for the image. Can be `responsive`, `fixed`, `full-width` or `none`. Defaults to value of `image.experimentalLayout`. - - `fit`: Defines how the image should be cropped if the aspect ratio is changed. Values match those of CSS `object-fit`. Defaults to `cover`, or the value of `image.experimentalObjectFit` if set. - - `position`: Defines the position of the image crop if the aspect ratio is changed. Values match those of CSS `object-position`. Defaults to `center`, or the value of `image.experimentalObjectPosition` if set. - - `priority`: If set, eagerly loads the image. Otherwise images will be lazy-loaded. Use this for your largest above-the-fold image. Defaults to `false`. - -#### Default responsive image settings - - You can enable responsive images for all `<Image />` and `<Picture />` components by setting `image.experimentalLayout` with a default value. This can be overridden by the `layout` prop on each component. - - **Example:** - ```js title=astro.config.mjs - { - image: { - // Used for all `<Image />` and `<Picture />` components unless overridden - experimentalLayout: 'responsive', - }, - experimental: { - responsiveImages: true, - }, - } - ``` - - ```astro - --- - import { Image } from 'astro:assets'; - import myImage from '../assets/my_image.png'; - --- - - <Image src={myImage} alt="This will use responsive layout" width={800} height={600} /> - - <Image src={myImage} alt="This will use full-width layout" layout="full-width" /> - - <Image src={myImage} alt="This will disable responsive images" layout="none" /> - ``` - -For a complete overview, and to give feedback on this experimental API, see the [Responsive Images RFC](https://github.com/withastro/roadmap/blob/responsive-images/proposals/0053-responsive-images.md). diff --git a/.changeset/quick-ads-exercise.md b/.changeset/quick-ads-exercise.md deleted file mode 100644 index dd4285a4c..000000000 --- a/.changeset/quick-ads-exercise.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@astrojs/markdown-remark': major ---- - -Renames the following CSS variables theme color token names to better align with the Shiki v1 defaults: - -- `--astro-code-color-text` => `--astro-code-foreground` -- `--astro-code-color-background` => `--astro-code-background` - -You can perform a global find and replace in your project to migrate to the new token names. diff --git a/.changeset/quick-onions-leave.md b/.changeset/quick-onions-leave.md deleted file mode 100644 index 7aa194f03..000000000 --- a/.changeset/quick-onions-leave.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -'astro': major ---- - -Refactors legacy `content` and `data` collections to use the Content Layer API `glob()` loader for better performance and to support backwards compatibility. Also introduces the `legacy.collections` flag for projects that are unable to update to the new behavior immediately. - -:warning: **BREAKING CHANGE FOR LEGACY CONTENT COLLECTIONS** :warning: - -By default, collections that use the old types (`content` or `data`) and do not define a `loader` are now implemented under the hood using the Content Layer API's built-in `glob()` loader, with extra backward-compatibility handling. - -In order to achieve backwards compatibility with existing `content` collections, the following have been implemented: - -- a `glob` loader collection is defined, with patterns that match the previous handling (matches `src/content/<collection name>/**/*.md` and other content extensions depending on installed integrations, with underscore-prefixed files and folders ignored) -- When used in the runtime, the entries have an ID based on the filename in the same format as legacy collections -- A `slug` field is added with the same format as before -- A `render()` method is added to the entry, so they can be called using `entry.render()` -- `getEntryBySlug` is supported - -In order to achieve backwards compatibility with existing `data` collections, the following have been implemented: - -- a `glob` loader collection is defined, with patterns that match the previous handling (matches `src/content/<collection name>/**/*{.json,.yaml}` and other data extensions, with underscore-prefixed files and folders ignored) -- Entries have an ID that is not slugified -- `getDataEntryById` is supported - -While this backwards compatibility implementation is able to emulate most of the features of legacy collections, **there are some differences and limitations that may cause breaking changes to existing collections**: - -- In previous versions of Astro, collections would be generated for all folders in `src/content/`, even if they were not defined in `src/content/config.ts`. This behavior is now deprecated, and collections should always be defined in `src/content/config.ts`. For existing collections, these can just be empty declarations (e.g. `const blog = defineCollection({})`) and Astro will implicitly define your legacy collection for you in a way that is compatible with the new loading behavior. -- The special `layout` field is not supported in Markdown collection entries. This property is intended only for standalone page files located in `src/pages/` and not likely to be in your collection entries. However, if you were using this property, you must now create dynamic routes that include your page styling. -- Sort order of generated collections is non-deterministic and platform-dependent. This means that if you are calling `getCollection()`, the order in which entries are returned may be different than before. If you need a specific order, you should sort the collection entries yourself. -- `image().refine()` is not supported. If you need to validate the properties of an image you will need to do this at runtime in your page or component. -- the `key` argument of `getEntry(collection, key)` is typed as `string`, rather than having types for every entry. - -A new legacy configuration flag `legacy.collections` is added for users that want to keep their current legacy (content and data) collections behavior (available in Astro v2 - v4), or who are not yet ready to update their projects: - -```js -// astro.config.mjs -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - legacy: { - collections: true - } -}); -``` - -When set, no changes to your existing collections are necessary, and the restrictions on storing both new and old collections continue to exist: legacy collections (only) must continue to remain in `src/content/`, while new collections using a loader from the Content Layer API are forbidden in that folder. - diff --git a/.changeset/red-paws-juggle.md b/.changeset/red-paws-juggle.md deleted file mode 100644 index 4ab5fb4eb..000000000 --- a/.changeset/red-paws-juggle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fix SVG Component sprite references diff --git a/.changeset/rotten-dodos-judge.md b/.changeset/rotten-dodos-judge.md deleted file mode 100644 index cb1cea275..000000000 --- a/.changeset/rotten-dodos-judge.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Call server island early so it can set headers diff --git a/.changeset/rotten-phones-scream.md b/.changeset/rotten-phones-scream.md deleted file mode 100644 index 8514fc706..000000000 --- a/.changeset/rotten-phones-scream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes actions with large amount of validation errors diff --git a/.changeset/selfish-cats-crash.md b/.changeset/selfish-cats-crash.md deleted file mode 100644 index a1ec38a47..000000000 --- a/.changeset/selfish-cats-crash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/markdown-remark': major ---- - -Removes `InvalidAstroDataError`, `safelyGetAstroData`, and `setVfileFrontmatter` APIs in favour of `isFrontmatterValid` diff --git a/.changeset/selfish-impalas-grin.md b/.changeset/selfish-impalas-grin.md deleted file mode 100644 index d2319c3d8..000000000 --- a/.changeset/selfish-impalas-grin.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@astrojs/vercel': major -'@astrojs/node': major ---- - -Adds stable support for `astro:env` diff --git a/.changeset/sharp-worms-sniff.md b/.changeset/sharp-worms-sniff.md deleted file mode 100644 index 4cd7050b9..000000000 --- a/.changeset/sharp-worms-sniff.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Updates error messages that assume content collections are located in `src/content/` with more generic language diff --git a/.changeset/sixty-coins-worry.md b/.changeset/sixty-coins-worry.md deleted file mode 100644 index ecc052c39..000000000 --- a/.changeset/sixty-coins-worry.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -'astro': minor ---- - -Adds support for passing values other than `"production"` or `"development"` to the `--mode` flag (e.g. `"staging"`, `"testing"`, or any custom value) to change the value of `import.meta.env.MODE` or the loaded `.env` file. This allows you take advantage of Vite's [mode](https://vite.dev/guide/env-and-mode#modes) feature. - -Also adds a new `--devOutput` flag for `astro build` that will output a development-based build. - -Note that changing the `mode` does not change the kind of code transform handled by Vite and Astro: - -- In `astro dev`, Astro will transform code with debug information. -- In `astro build`, Astro will transform code with the most optimized output and removes debug information. -- In `astro build --devOutput` (new flag), Astro will transform code with debug information like in `astro dev`. - -This enables various usecases like: - -```bash -# Run the dev server connected to a "staging" API -astro dev --mode staging - -# Build a site that connects to a "staging" API -astro build --mode staging - -# Build a site that connects to a "production" API with additional debug information -astro build --devOutput - -# Build a site that connects to a "testing" API -astro build --mode testing -``` - -The different modes can be used to load different `.env` files, e.g. `.env.staging` or `.env.production`, which can be customized for each environment, for example with different `API_URL` environment variable values. diff --git a/.changeset/sixty-fishes-flow.md b/.changeset/sixty-fishes-flow.md deleted file mode 100644 index eac560adc..000000000 --- a/.changeset/sixty-fishes-flow.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@astrojs/react': minor -'astro': minor ---- - -Changes the generated URL query param from `_astroAction` to `_action` when submitting a form using Actions. This avoids leaking the framework name into the URL bar, which may be considered a security issue. diff --git a/.changeset/sixty-oranges-walk.md b/.changeset/sixty-oranges-walk.md deleted file mode 100644 index ef3e14a7e..000000000 --- a/.changeset/sixty-oranges-walk.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': patch ---- - -Resolves image paths in content layer with initial slash as project-relative - -When using the `image()` schema helper, previously paths with an initial slash were treated as public URLs. This was to match the behavior of markdown images. However this is a change from before, where paths with an initial slash were treated as project-relative. This change restores the previous behavior, so that paths with an initial slash are treated as project-relative. diff --git a/.changeset/slimy-jeans-train.md b/.changeset/slimy-jeans-train.md deleted file mode 100644 index aafa001ab..000000000 --- a/.changeset/slimy-jeans-train.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@astrojs/preact': major -'@astrojs/svelte': major -'@astrojs/react': major -'@astrojs/solid-js': major -'@astrojs/vue': major ---- - -Updates Vite dependency to v6 to match Astro v5 diff --git a/.changeset/slimy-mice-dance.md b/.changeset/slimy-mice-dance.md deleted file mode 100644 index cfe2aa036..000000000 --- a/.changeset/slimy-mice-dance.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes use of Vitest with Astro 5 diff --git a/.changeset/slimy-queens-hang.md b/.changeset/slimy-queens-hang.md deleted file mode 100644 index 936ed2731..000000000 --- a/.changeset/slimy-queens-hang.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': minor ---- - -The value of the different properties on `supportedAstroFeatures` for adapters can now be objects, with a `support` and `message` properties. The content of the `message` property will be shown in the Astro CLI when the adapter is not compatible with the feature, allowing one to give a better informational message to the user. - -This is notably useful with the new `limited` value, to explain to the user why support is limited. diff --git a/.changeset/small-ties-sort.md b/.changeset/small-ties-sort.md deleted file mode 100644 index e3f3d67eb..000000000 --- a/.changeset/small-ties-sort.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -'astro': major ---- - -Fixes attribute rendering for non-[boolean HTML attributes](https://developer.mozilla.org/en-US/docs/Glossary/Boolean/HTML) with boolean values to match proper attribute handling in browsers. - -Previously, non-boolean attributes may not have included their values when rendered to HTML. In Astro v5.0, the values are now explicitly rendered as `="true"` or `="false"` - -In the following `.astro` examples, only `allowfullscreen` is a boolean attribute: - -```astro -<!-- src/pages/index.astro --> -<!-- `allowfullscreen` is a boolean attribute --> -<p allowfullscreen={true}></p> -<p allowfullscreen={false}></p> - -<!-- `inherit` is *not* a boolean attribute --> -<p inherit={true}></p> -<p inherit={false}></p> - -<!-- `data-*` attributes are not boolean attributes --> -<p data-light={true}></p> -<p data-light={false}></p> -``` - -Astro v5.0 now preserves the full data attribute with its value when rendering the HTML of non-boolean attributes: - -```diff - <p allowfullscreen></p> - <p></p> - - <p inherit="true"></p> -- <p inherit></p> -+ <p inherit="false"></p> - -- <p data-light></p> -+ <p data-light="true"></p> -- <p></p> -+ <p data-light="false"></p> -``` - -If you rely on attribute values, for example to locate elements or to conditionally render, update your code to match the new non-boolean attribute values: - -```diff -- el.getAttribute('inherit') === '' -+ el.getAttribute('inherit') === 'false' - -- el.hasAttribute('data-light') -+ el.dataset.light === 'true' -``` diff --git a/.changeset/smooth-panthers-heal.md b/.changeset/smooth-panthers-heal.md deleted file mode 100644 index 009db7e38..000000000 --- a/.changeset/smooth-panthers-heal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': minor ---- - -`astro add` no longer automatically sets `output: 'server'`. Since the default value of output now allows for server-rendered pages, it no longer makes sense to default to full server builds when you add an adapter diff --git a/.changeset/spotty-garlics-cheat.md b/.changeset/spotty-garlics-cheat.md deleted file mode 100644 index 3d9a3cfc1..000000000 --- a/.changeset/spotty-garlics-cheat.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -'@astrojs/vercel': major -'@astrojs/node': major -'astro': major ---- - -Removed support for the Squoosh image service. As the underlying library `libsquoosh` is no longer maintained, and the image service sees very little usage we have decided to remove it from Astro. - -Our recommendation is to use the base Sharp image service, which is more powerful, faster, and more actively maintained. - -```diff -- import { squooshImageService } from "astro/config"; -import { defineConfig } from "astro/config"; - -export default defineConfig({ -- image: { -- service: squooshImageService() -- } -}); -``` - -If you are using this service, and cannot migrate to the base Sharp image service, a third-party extraction of the previous service is available here: https://github.com/Princesseuh/astro-image-service-squoosh diff --git a/.changeset/strange-sheep-film.md b/.changeset/strange-sheep-film.md deleted file mode 100644 index dc55ad03a..000000000 --- a/.changeset/strange-sheep-film.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -'astro': minor ---- - -[Server Islands](https://astro.build/blog/future-of-astro-server-islands/) introduced behind an experimental flag in [v4.12.0](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md#4120) is no longer experimental and is available for general use. - -Server islands are Astro's solution for highly cacheable pages of mixed static and dynamic content. They allow you to specify components that should run on the server, allowing the rest of the page to be more aggressively cached, or even generated statically. - -Turn any `.astro` component into a server island by adding the `server:defer` directive and optionally, fallback placeholder content. It will be rendered dynamically at runtime outside the context of the rest of the page, allowing you to add longer cache headers for the pages, or even prerender them. - -```astro ---- -import Avatar from '../components/Avatar.astro'; -import GenericUser from '../components/GenericUser.astro'; ---- -<header> - <h1>Page Title</h1> - <div class="header-right"> - <Avatar server:defer> - <GenericUser slot="fallback" /> - </Avatar> - </div> -</header> -``` - -If you were previously using this feature, please remove the experimental flag from your Astro config: - -```diff -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - experimental { -- serverIslands: true, - }, -}); -``` - -If you have been waiting for stabilization before using server islands, you can now do so. - -Please see the [server island documentation](https://docs.astro.build/en/guides/server-islands/) for more about this feature. diff --git a/.changeset/strong-months-grab.md b/.changeset/strong-months-grab.md deleted file mode 100644 index 193031f18..000000000 --- a/.changeset/strong-months-grab.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'astro': major ---- - -Updates the automatic `charset=utf-8` behavior for Markdown pages, where instead of responding with `charset=utf-8` in the `Content-Type` header, Astro will now automatically add the `<meta charset="utf-8">` tag instead. - -This behaviour only applies to Markdown pages (`.md` or similar Markdown files located within `src/pages/`) that do not use Astro's special `layout` frontmatter property. It matches the rendering behaviour of other non-content pages, and retains the minimal boilerplate needed to write with non-ASCII characters when adding individual Markdown pages to your site. - -If your Markdown pages use the `layout` frontmatter property, then HTML encoding will be handled by the designated layout component instead, and the `<meta charset="utf-8">` tag will not be added to your page by default. - -If you require `charset=utf-8` to render your page correctly, make sure that your layout components contain the `<meta charset="utf-8">` tag. You may need to add this if you have not already done so. diff --git a/.changeset/sweet-timers-smash.md b/.changeset/sweet-timers-smash.md deleted file mode 100644 index 5726071a9..000000000 --- a/.changeset/sweet-timers-smash.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@astrojs/markdoc': patch -'@astrojs/mdx': patch -'@astrojs/markdown-remark': patch -'astro': patch ---- - -Parses frontmatter ourselves diff --git a/.changeset/tall-waves-impress.md b/.changeset/tall-waves-impress.md deleted file mode 100644 index aecf307e0..000000000 --- a/.changeset/tall-waves-impress.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -'astro': minor ---- - -Changes the default behavior for Astro Action form requests to a standard POST submission. - -In Astro 4.x, actions called from an HTML form would trigger a redirect with the result forwarded using cookies. This caused issues for large form errors and return values that exceeded the 4 KB limit of cookie-based storage. - -Astro 5.0 now renders the result of an action as a POST result without any forwarding. This will introduce a "confirm form resubmission?" dialog when a user attempts to refresh the page, though it no longer imposes a 4 KB limit on action return value. - -## Customize form submission behavior - -If you prefer to address the "confirm form resubmission?" dialog on refresh, or to preserve action results across sessions, you can now [customize action result handling from middleware](https://5-0-0-beta.docs.astro.build/en/guides/actions/#advanced-persist-action-results-with-a-session). - -We recommend using a session storage provider [as described in our Netlify Blob example](https://5-0-0-beta.docs.astro.build/en/guides/actions/#advanced-persist-action-results-with-a-session). However, if you prefer the cookie forwarding behavior from 4.X and accept the 4 KB size limit, you can implement the pattern as shown in this sample snippet: - -```ts -// src/middleware.ts -import { defineMiddleware } from 'astro:middleware'; -import { getActionContext } from 'astro:actions'; - -export const onRequest = defineMiddleware(async (context, next) => { - // Skip requests for prerendered pages - if (context.isPrerendered) return next(); - - const { action, setActionResult, serializeActionResult } = getActionContext(context); - - // If an action result was forwarded as a cookie, set the result - // to be accessible from `Astro.getActionResult()` - const payload = context.cookies.get('ACTION_PAYLOAD'); - if (payload) { - const { actionName, actionResult } = payload.json(); - setActionResult(actionName, actionResult); - context.cookies.delete('ACTION_PAYLOAD'); - return next(); - } - - // If an action was called from an HTML form action, - // call the action handler and redirect with the result as a cookie. - if (action?.calledFrom === 'form') { - const actionResult = await action.handler(); - - context.cookies.set('ACTION_PAYLOAD', { - actionName: action.name, - actionResult: serializeActionResult(actionResult), - }); - - if (actionResult.error) { - // Redirect back to the previous page on error - const referer = context.request.headers.get('Referer'); - if (!referer) { - throw new Error('Internal: Referer unexpectedly missing from Action POST request.'); - } - return context.redirect(referer); - } - // Redirect to the destination page on success - return context.redirect(context.originPathname); - } - - return next(); -}) -``` diff --git a/.changeset/tame-hats-fold.md b/.changeset/tame-hats-fold.md deleted file mode 100644 index e369aa8d4..000000000 --- a/.changeset/tame-hats-fold.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixed an issue where modifying the `Request.headers` prototype during prerendering caused a build error. Removed conflicting value and writable properties from the `headers` descriptor to prevent `Invalid property descriptor` errors. diff --git a/.changeset/tame-pumpkins-swim.md b/.changeset/tame-pumpkins-swim.md deleted file mode 100644 index 64c51fdec..000000000 --- a/.changeset/tame-pumpkins-swim.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes an issue where the check origin middleware was incorrectly injected when the build output was `"static"` diff --git a/.changeset/tame-rats-cross.md b/.changeset/tame-rats-cross.md deleted file mode 100644 index 154a2492b..000000000 --- a/.changeset/tame-rats-cross.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/vue': patch ---- - -New release to include changes from 4.5.2 diff --git a/.changeset/tasty-snails-protect.md b/.changeset/tasty-snails-protect.md deleted file mode 100644 index cbd945ca0..000000000 --- a/.changeset/tasty-snails-protect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/internal-helpers": patch ---- - -Fixes usage of `fileURLToPath()` to anticipate the changed signature of this method in Node 22.1.0 diff --git a/.changeset/ten-students-repair.md b/.changeset/ten-students-repair.md deleted file mode 100644 index bffa74548..000000000 --- a/.changeset/ten-students-repair.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@astrojs/vercel': major -'astro': major ---- - -Remove support for functionPerRoute - -This change removes support for the `functionPerRoute` option both in Astro and `@astrojs/vercel`. - -This option made it so that each route got built as separate entrypoints so that they could be loaded as separate functions. The hope was that by doing this it would decrease the size of each function. However in practice routes use most of the same code, and increases in function size limitations made the potential upsides less important. - -Additionally there are downsides to functionPerRoute, such as hitting limits on the number of functions per project. The feature also never worked with some Astro features like i18n domains and request rewriting. - -Given this, the feature has been removed from Astro. diff --git a/.changeset/ten-walls-tap.md b/.changeset/ten-walls-tap.md deleted file mode 100644 index afc8c07ed..000000000 --- a/.changeset/ten-walls-tap.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -'astro': major ---- - -### [changed]: `RouteData.distURL` is now an array -In Astro v4.x, `RouteData.distURL` was `undefined` or a `URL` - -Astro v5.0, `RouteData.distURL` is `undefined` or an array of `URL`. This was a bug, because a route can generate multiple files on disk, especially when using dynamic routes such as `[slug]` or `[...slug]`. - -#### What should I do? -Update your code to handle `RouteData.distURL` as an array. - -```diff -if (route.distURL) { -- if (route.distURL.endsWith('index.html')) { -- // do something -- } -+ for (const url of route.distURL) { -+ if (url.endsWith('index.html')) { -+ // do something -+ } -+ } -} -``` diff --git a/.changeset/thirty-clocks-jump.md b/.changeset/thirty-clocks-jump.md deleted file mode 100644 index 39864b2ec..000000000 --- a/.changeset/thirty-clocks-jump.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': minor ---- - -Changes the default content config location from `src/content/config.*` to `src/content.config.*`. - -The previous location is still supported, and is required if the `legacy.collections` flag is enabled. diff --git a/.changeset/three-days-cough.md b/.changeset/three-days-cough.md deleted file mode 100644 index 42b3c288e..000000000 --- a/.changeset/three-days-cough.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': patch ---- - -Fixes a bug where the dev server was not providing a consistent user experience for configured redirects. - -With the fix, when you configure a redirect in `astro.config.mjs` like this `{ /old: "/new" }`, the dev server return an HTML response that matches the one emitted by a static build. diff --git a/.changeset/three-olives-reflect.md b/.changeset/three-olives-reflect.md deleted file mode 100644 index 62fed8f28..000000000 --- a/.changeset/three-olives-reflect.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'astro': minor ---- - -Adds a new `createCodegenDir()` function to the `astro:config:setup` hook in the Integrations API - -In 4.14, we introduced the `injectTypes` utility on the `astro:config:done` hook. It can create `.d.ts` files and make their types available to user's projects automatically. Under the hood, it creates a file in `<root>/.astro/integrations/<normalized_integration_name>`. - -While the `.astro` directory has always been the preferred place to write code generated files, it has also been prone to mistakes. For example, you can write a `.astro/types.d.ts` file, breaking Astro types. Or you can create a file that overrides a file created by another integration. - -In this release, `<root>/.astro/integrations/<normalized_integration_name>` can now be retrieved in the `astro:config:setup` hook by calling `createCodegenDir()`. It allows you to have a dedicated folder, avoiding conflicts with another integration or Astro itself. This directory is created by calling this function so it's safe to write files to it directly: - -```js -import { writeFileSync } from 'node:fs' - -const integration = { - name: 'my-integration', - hooks: { - 'astro:config:setup': ({ createCodegenDir }) => { - const codegenDir = createCodegenDir() - writeFileSync(new URL('cache.json', codegenDir), '{}', 'utf-8') - } - } -} -``` diff --git a/.changeset/tough-planets-dress.md b/.changeset/tough-planets-dress.md deleted file mode 100644 index a276edc3b..000000000 --- a/.changeset/tough-planets-dress.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': minor ---- - -Adds a new components exported from `astro/components`: Welcome, to be used by the new Basics template diff --git a/.changeset/twelve-comics-march.md b/.changeset/twelve-comics-march.md deleted file mode 100644 index 5b455ea09..000000000 --- a/.changeset/twelve-comics-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/mdx': patch ---- - -Updates `@astrojs/markdown-remark` and handle its breaking changes diff --git a/.changeset/twenty-cobras-push.md b/.changeset/twenty-cobras-push.md deleted file mode 100644 index 5555cdc61..000000000 --- a/.changeset/twenty-cobras-push.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -'astro': major ---- - -Changes the data returned for `page.url.current`, `page.url.next`, `page.url.prev`, `page.url.first` and `page.url.last` to include the value set for `base` in your Astro config. - -Previously, you had to manually prepend your configured value for `base` to the URL path. Now, Astro automatically includes your `base` value in `next` and `prev` URLs. - -If you are using the `paginate()` function for "previous" and "next" URLs, remove any existing `base` value as it is now added for you: - -```diff ---- -export async function getStaticPaths({ paginate }) { - const astronautPages = [{ - astronaut: 'Neil Armstrong', - }, { - astronaut: 'Buzz Aldrin', - }, { - astronaut: 'Sally Ride', - }, { - astronaut: 'John Glenn', - }]; - return paginate(astronautPages, { pageSize: 1 }); -} -const { page } = Astro.props; -// `base: /'docs'` configured in `astro.config.mjs` -- const prev = "/docs" + page.url.prev; -+ const prev = page.url.prev; ---- -<a id="prev" href={prev}>Back</a> -``` - diff --git a/.changeset/twenty-lobsters-think.md b/.changeset/twenty-lobsters-think.md deleted file mode 100644 index de52155c1..000000000 --- a/.changeset/twenty-lobsters-think.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/markdoc': patch ---- - -Correctly renders boolean HTML attributes diff --git a/.changeset/unlucky-bobcats-sit.md b/.changeset/unlucky-bobcats-sit.md deleted file mode 100644 index e815c8acd..000000000 --- a/.changeset/unlucky-bobcats-sit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': minor ---- - -Adds a new `limited` value for the different properties of `supportedAstroFeatures` for adapters, which indicates that the adapter is compatible with the feature, but with some limitations. This is useful for adapters that support a feature, but not in all cases or with all options. diff --git a/.changeset/violet-goats-grab.md b/.changeset/violet-goats-grab.md deleted file mode 100644 index ae4bfef83..000000000 --- a/.changeset/violet-goats-grab.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': minor ---- - -Updates `astro/config` import to reference `astro/client` types - -When importing `astro/config`, types from `astro/client` will be made automatically available to your project. If your project `tsconfig.json` changes how references behave, you'll still have access to these types after running `astro sync`. diff --git a/.changeset/wet-foxes-walk.md b/.changeset/wet-foxes-walk.md deleted file mode 100644 index be3eaa6ab..000000000 --- a/.changeset/wet-foxes-walk.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -'astro': major ---- - -`params` passed in `getStaticPaths` are no longer automatically decoded. - -### [changed]: `params` aren't decoded anymore. -In Astro v4.x, `params` in were automatically decoded using `decodeURIComponent`. - -Astro v5.0 doesn't automatically decode `params` in `getStaticPaths` anymore, so you'll need to manually decode them yourself if needed - -#### What should I do? -If you were relying on the automatic decode, you'll need to manually decode it using `decodeURI`. - -Note that the use of [`decodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent)) is discouraged for `getStaticPaths` because it decodes more characters than it should, for example `/`, `?`, `#` and more. - -```diff ---- -export function getStaticPaths() { - return [ -+ { params: { id: decodeURI("%5Bpage%5D") } }, -- { params: { id: "%5Bpage%5D" } }, - ] -} - -const { id } = Astro.params; ---- -``` diff --git a/.changeset/wise-carrots-float.md b/.changeset/wise-carrots-float.md deleted file mode 100644 index a7d43f1f1..000000000 --- a/.changeset/wise-carrots-float.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -'astro': minor ---- - -Removes the experimental `contentCollectionsCache` introduced in `3.5.0`. - -Astro Content Layer API independently solves some of the caching and performance issues with legacy content collections that this strategy attempted to address. This feature has been replaced with continued work on improvements to the content layer. If you were using this experimental feature, you must now remove the flag from your Astro config as it no longer exists: - -```diff -export default defineConfig({ - experimental: { -- contentCollectionsCache: true - } -}) -``` - -The `cacheManifest` boolean argument is no longer passed to the `astro:build:done` integration hook: - -```diff -const integration = { - name: "my-integration", - hooks: { - "astro:build:done": ({ -- cacheManifest, - logger - }) => {} - } -} -``` diff --git a/.changeset/young-terms-hammer.md b/.changeset/young-terms-hammer.md deleted file mode 100644 index 7c47ce148..000000000 --- a/.changeset/young-terms-hammer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/mdx': patch ---- - -Fixes a case where the MDX renderer couldn't be loaded when used as a direct dependency of an Astro integration. diff --git a/examples/basics/package.json b/examples/basics/package.json index 7358c6132..d2d605602 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -10,6 +10,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^5.0.0-beta.12" + "astro": "^5.0.0" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index b62b24f52..81a2e49c8 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -10,9 +10,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^4.0.0-beta.5", + "@astrojs/mdx": "^4.0.0", "@astrojs/rss": "^4.0.9", "@astrojs/sitemap": "^3.2.1", - "astro": "^5.0.0-beta.12" + "astro": "^5.0.0" } } diff --git a/examples/component/package.json b/examples/component/package.json index 5a6600d8f..0e2bd6314 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^5.0.0-beta.12" + "astro": "^5.0.0" }, "peerDependencies": { "astro": "^4.0.0 || ^5.0.0" diff --git a/examples/container-with-vitest/package.json b/examples/container-with-vitest/package.json index 09947cc2b..2ec85c1f9 100644 --- a/examples/container-with-vitest/package.json +++ b/examples/container-with-vitest/package.json @@ -11,8 +11,8 @@ "test": "vitest run" }, "dependencies": { - "@astrojs/react": "^4.0.0-beta.2", - "astro": "^5.0.0-beta.12", + "@astrojs/react": "^4.0.0", + "astro": "^5.0.0", "react": "^18.3.1", "react-dom": "^18.3.1", "vitest": "^2.1.6" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index d9ab81afd..ba3c9a85a 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -13,6 +13,6 @@ "@astrojs/alpinejs": "^0.4.0", "@types/alpinejs": "^3.13.10", "alpinejs": "^3.14.3", - "astro": "^5.0.0-beta.12" + "astro": "^5.0.0" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 3b42d4530..e08e3ac4d 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -10,14 +10,14 @@ "astro": "astro" }, "dependencies": { - "@astrojs/preact": "^4.0.0-beta.1", - "@astrojs/react": "^4.0.0-beta.2", - "@astrojs/solid-js": "^5.0.0-beta.1", - "@astrojs/svelte": "^7.0.0-beta.1", - "@astrojs/vue": "^5.0.0-beta.3", + "@astrojs/preact": "^4.0.0", + "@astrojs/react": "^4.0.0", + "@astrojs/solid-js": "^5.0.0", + "@astrojs/svelte": "^7.0.0", + "@astrojs/vue": "^5.0.0", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", - "astro": "^5.0.0-beta.12", + "astro": "^5.0.0", "preact": "^10.24.3", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 8cf537c20..b5e5decea 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -10,9 +10,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/preact": "^4.0.0-beta.1", + "@astrojs/preact": "^4.0.0", "@preact/signals": "^1.3.0", - "astro": "^5.0.0-beta.12", + "astro": "^5.0.0", "preact": "^10.24.3" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 420f9b53d..234b00ce8 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -10,10 +10,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/react": "^4.0.0-beta.2", + "@astrojs/react": "^4.0.0", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", - "astro": "^5.0.0-beta.12", + "astro": "^5.0.0", "react": "^18.3.1", "react-dom": "^18.3.1" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index e7e655845..b9d885dde 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -10,8 +10,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/solid-js": "^5.0.0-beta.1", - "astro": "^5.0.0-beta.12", + "@astrojs/solid-js": "^5.0.0", + "astro": "^5.0.0", "solid-js": "^1.9.3" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index fb4ea7dce..8a957497d 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -10,8 +10,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/svelte": "^7.0.0-beta.1", - "astro": "^5.0.0-beta.12", + "@astrojs/svelte": "^7.0.0", + "astro": "^5.0.0", "svelte": "^5.1.16" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 7c89c8af2..12690c646 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -10,8 +10,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/vue": "^5.0.0-beta.3", - "astro": "^5.0.0-beta.12", + "@astrojs/vue": "^5.0.0", + "astro": "^5.0.0", "vue": "^3.5.12" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 901e5b032..e57fab4c1 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -11,6 +11,6 @@ }, "dependencies": { "@astrojs/node": "^9.0.0-alpha.1", - "astro": "^5.0.0-beta.12" + "astro": "^5.0.0" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index 1cb8f3173..b556c7590 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^5.0.0-beta.12" + "astro": "^5.0.0" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 3d1a93a21..12064b335 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -10,6 +10,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^5.0.0-beta.12" + "astro": "^5.0.0" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 6f98dd56b..20833e529 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -10,6 +10,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^5.0.0-beta.12" + "astro": "^5.0.0" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index feb2f7584..e80014e16 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -12,8 +12,8 @@ }, "dependencies": { "@astrojs/node": "^9.0.0-alpha.1", - "@astrojs/svelte": "^7.0.0-beta.1", - "astro": "^5.0.0-beta.12", + "@astrojs/svelte": "^7.0.0", + "astro": "^5.0.0", "svelte": "^5.1.16" } } diff --git a/examples/starlog/package.json b/examples/starlog/package.json index 370318d1d..a971d1a7a 100644 --- a/examples/starlog/package.json +++ b/examples/starlog/package.json @@ -9,7 +9,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^5.0.0-beta.12", + "astro": "^5.0.0", "sass": "^1.80.6", "sharp": "^0.33.3" } diff --git a/examples/toolbar-app/package.json b/examples/toolbar-app/package.json index d20a982ee..adf2c6814 100644 --- a/examples/toolbar-app/package.json +++ b/examples/toolbar-app/package.json @@ -15,6 +15,6 @@ "./app": "./dist/app.js" }, "devDependencies": { - "astro": "^5.0.0-beta.12" + "astro": "^5.0.0" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index 8a127bcc0..6aa075496 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/markdoc": "^0.12.0-beta.1", - "astro": "^5.0.0-beta.12" + "@astrojs/markdoc": "^0.12.0", + "astro": "^5.0.0" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 1f39f5517..01e411ed5 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -10,9 +10,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^4.0.0-beta.5", - "@astrojs/preact": "^4.0.0-beta.1", - "astro": "^5.0.0-beta.12", + "@astrojs/mdx": "^4.0.0", + "@astrojs/preact": "^4.0.0", + "astro": "^5.0.0", "preact": "^10.24.3" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 6094c5fd1..4c1666f89 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -10,9 +10,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/preact": "^4.0.0-beta.1", + "@astrojs/preact": "^4.0.0", "@nanostores/preact": "^0.5.2", - "astro": "^5.0.0-beta.12", + "astro": "^5.0.0", "nanostores": "^0.11.3", "preact": "^10.24.3" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 168953fb7..5bb60e697 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -10,10 +10,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^4.0.0-beta.5", + "@astrojs/mdx": "^4.0.0", "@astrojs/tailwind": "^5.1.2", "@types/canvas-confetti": "^1.6.4", - "astro": "^5.0.0-beta.12", + "astro": "^5.0.0", "autoprefixer": "^10.4.20", "canvas-confetti": "^1.9.3", "postcss": "^8.4.49", diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 740839db3..18acf126f 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -11,7 +11,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^5.0.0-beta.12", + "astro": "^5.0.0", "vitest": "^2.1.6" } } diff --git a/packages/astro-prism/CHANGELOG.md b/packages/astro-prism/CHANGELOG.md index 121ddc68e..30896d627 100644 --- a/packages/astro-prism/CHANGELOG.md +++ b/packages/astro-prism/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/prism +## 3.2.0 + +### Minor Changes + +- [#12539](https://github.com/withastro/astro/pull/12539) [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7) Thanks [@bluwy](https://github.com/bluwy)! - Drops node 21 support + ## 3.2.0-beta.0 ### Minor Changes diff --git a/packages/astro-prism/package.json b/packages/astro-prism/package.json index 614058a79..e5ff37379 100644 --- a/packages/astro-prism/package.json +++ b/packages/astro-prism/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/prism", - "version": "3.2.0-beta.0", + "version": "3.2.0", "description": "Add Prism syntax highlighting support to your Astro site", "author": "withastro", "type": "module", diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 44eb3c38d..d97fe0e8e 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,1295 @@ # astro +## 5.0.0 + +### Major Changes + +- [#11798](https://github.com/withastro/astro/pull/11798) [`e9e2139`](https://github.com/withastro/astro/commit/e9e2139bf788893566f5a3fe58daf1d24076f018) Thanks [@matthewp](https://github.com/matthewp)! - Unflag globalRoutePriority + + The previously experimental feature `globalRoutePriority` is now the default in Astro 5. + + This was a refactoring of route prioritization in Astro, making it so that injected routes, file-based routes, and redirects are all prioritized using the same logic. This feature has been enabled for all Starlight projects since it was added and should not affect most users. + +- [#11864](https://github.com/withastro/astro/pull/11864) [`ee38b3a`](https://github.com/withastro/astro/commit/ee38b3a94697fe883ce8300eff9f001470b8adb6) Thanks [@ematipico](https://github.com/ematipico)! - ### [changed]: `entryPoint` type inside the hook `astro:build:ssr` + In Astro v4.x, the `entryPoint` type was `RouteData`. + + Astro v5.0 the `entryPoint` type is `IntegrationRouteData`, which contains a subset of the `RouteData` type. The fields `isIndex` and `fallbackRoutes` were removed. + + #### What should I do? + + Update your adapter to change the type of `entryPoint` from `RouteData` to `IntegrationRouteData`. + + ```diff + -import type {RouteData} from 'astro'; + +import type {IntegrationRouteData} from "astro" + + -function useRoute(route: RouteData) { + +function useRoute(route: IntegrationRouteData) { + + } + ``` + +- [#12524](https://github.com/withastro/astro/pull/12524) [`9f44019`](https://github.com/withastro/astro/commit/9f440196dc39f36fce0198bf4c97131160e5bcc1) Thanks [@bluwy](https://github.com/bluwy)! - Bumps Vite to ^6.0.1 and handles its breaking changes + +- [#10742](https://github.com/withastro/astro/pull/10742) [`b6fbdaa`](https://github.com/withastro/astro/commit/b6fbdaa94a9ecec706a99e1938fbf5cd028c72e0) Thanks [@ematipico](https://github.com/ematipico)! - The lowest version of Node supported by Astro is now Node v18.17.1 and higher. + +- [#11916](https://github.com/withastro/astro/pull/11916) [`46ea29f`](https://github.com/withastro/astro/commit/46ea29f91df83ea638ecbc544ce99375538636d4) Thanks [@bluwy](https://github.com/bluwy)! - Updates how the `build.client` and `build.server` option values get resolved to match existing documentation. With this fix, the option values will now correctly resolve relative to the `outDir` option. So if `outDir` is set to `./dist/nested/`, then by default: + + - `build.client` will resolve to `<root>/dist/nested/client/` + - `build.server` will resolve to `<root>/dist/nested/server/` + + Previously the values were incorrectly resolved: + + - `build.client` was resolved to `<root>/dist/nested/dist/client/` + - `build.server` was resolved to `<root>/dist/nested/dist/server/` + + If you were relying on the previous build paths, make sure that your project code is updated to the new build paths. + +- [#11982](https://github.com/withastro/astro/pull/11982) [`d84e444`](https://github.com/withastro/astro/commit/d84e444fd3496c1f787b3fcee2929c92bc74e0cd) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds a default exclude and include value to the tsconfig presets. `{projectDir}/dist` is now excluded by default, and `{projectDir}/.astro/types.d.ts` and `{projectDir}/**/*` are included by default. + + Both of these options can be overridden by setting your own values to the corresponding settings in your `tsconfig.json` file. + +- [#11861](https://github.com/withastro/astro/pull/11861) [`3ab3b4e`](https://github.com/withastro/astro/commit/3ab3b4efbcdd2aabea5f949deedf51a5acefae59) Thanks [@bluwy](https://github.com/bluwy)! - Cleans up Astro-specfic metadata attached to `vfile.data` in Remark and Rehype plugins. Previously, the metadata was attached in different locations with inconsistent names. The metadata is now renamed as below: + + - `vfile.data.__astroHeadings` -> `vfile.data.astro.headings` + - `vfile.data.imagePaths` -> `vfile.data.astro.imagePaths` + + The types of `imagePaths` has also been updated from `Set<string>` to `string[]`. The `vfile.data.astro.frontmatter` metadata is left unchanged. + + While we don't consider these APIs public, they can be accessed by Remark and Rehype plugins that want to re-use Astro's metadata. If you are using these APIs, make sure to access them in the new locations. + +- [#11987](https://github.com/withastro/astro/pull/11987) [`bf90a53`](https://github.com/withastro/astro/commit/bf90a5343f9cd1bb46f30e4b331e7ae675f5e720) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - The `locals` object can no longer be overridden + + Middleware, API endpoints, and pages can no longer override the `locals` object in its entirety. You can still append values onto the object, but you can not replace the entire object and delete its existing values. + + If you were previously overwriting like so: + + ```js + ctx.locals = { + one: 1, + two: 2, + }; + ``` + + This can be changed to an assignment on the existing object instead: + + ```js + Object.assign(ctx.locals, { + one: 1, + two: 2, + }); + ``` + +- [#11908](https://github.com/withastro/astro/pull/11908) [`518433e`](https://github.com/withastro/astro/commit/518433e433fe69ee3bbbb1f069181cd9eb69ec9a) Thanks [@Princesseuh](https://github.com/Princesseuh)! - The `image.endpoint` config now allow customizing the route of the image endpoint in addition to the entrypoint. This can be useful in niche situations where the default route `/_image` conflicts with an existing route or your local server setup. + + ```js + import { defineConfig } from 'astro/config'; + + defineConfig({ + image: { + endpoint: { + route: '/image', + entrypoint: './src/image_endpoint.ts', + }, + }, + }); + ``` + +- [#12008](https://github.com/withastro/astro/pull/12008) [`5608338`](https://github.com/withastro/astro/commit/560833843c6d3ce2b6c6c473ec4ae70e744bf255) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release. + + Starting from this release, no breaking changes will be introduced unless absolutely necessary. + + To learn how to upgrade, check out the [Astro v5.0 upgrade guide in our beta docs site](https://5-0-0-beta.docs.astro.build/en/guides/upgrade-to/v5/). + +- [#11679](https://github.com/withastro/astro/pull/11679) [`ea71b90`](https://github.com/withastro/astro/commit/ea71b90c9c08ddd1d3397c78e2e273fb799f7dbd) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - The `astro:env` feature introduced behind a flag in [v4.10.0](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md#x4100) is no longer experimental and is available for general use. If you have been waiting for stabilization before using `astro:env`, you can now do so. + + This feature lets you configure a type-safe schema for your environment variables, and indicate whether they should be available on the server or the client. + + To configure a schema, add the `env` option to your Astro config and define your client and server variables. If you were previously using this feature, please remove the experimental flag from your Astro config and move your entire `env` configuration unchanged to a top-level option. + + ```js + import { defineConfig, envField } from 'astro/config'; + + export default defineConfig({ + env: { + schema: { + API_URL: envField.string({ context: 'client', access: 'public', optional: true }), + PORT: envField.number({ context: 'server', access: 'public', default: 4321 }), + API_SECRET: envField.string({ context: 'server', access: 'secret' }), + }, + }, + }); + ``` + + You can import and use your defined variables from the appropriate `/client` or `/server` module: + + ```astro + --- + import { API_URL } from 'astro:env/client'; + import { API_SECRET_TOKEN } from 'astro:env/server'; + + const data = await fetch(`${API_URL}/users`, { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${API_SECRET_TOKEN}`, + }, + }); + --- + + <script> + import { API_URL } from 'astro:env/client'; + + fetch(`${API_URL}/ping`); + </script> + ``` + + Please see our [guide to using environment variables](https://docs.astro.build/en/guides/environment-variables/#astroenv) for more about this feature. + +- [#11806](https://github.com/withastro/astro/pull/11806) [`f7f2338`](https://github.com/withastro/astro/commit/f7f2338c2b96975001b5c782f458710e9cc46d74) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Removes the `assets` property on `supportedAstroFeatures` for adapters, as it did not reflect reality properly in many cases. + + Now, relating to assets, only a single `sharpImageService` property is available, determining if the adapter is compatible with the built-in sharp image service. + +- [#11864](https://github.com/withastro/astro/pull/11864) [`ee38b3a`](https://github.com/withastro/astro/commit/ee38b3a94697fe883ce8300eff9f001470b8adb6) Thanks [@ematipico](https://github.com/ematipico)! - ### [changed]: `routes` type inside the hook `astro:build:done` + In Astro v4.x, the `routes` type was `RouteData`. + + Astro v5.0 the `routes` type is `IntegrationRouteData`, which contains a subset of the `RouteData` type. The fields `isIndex` and `fallbackRoutes` were removed. + + #### What should I do? + + Update your adapter to change the type of `routes` from `RouteData` to `IntegrationRouteData`. + + ```diff + -import type {RouteData} from 'astro'; + +import type {IntegrationRouteData} from "astro" + + -function useRoute(route: RouteData) { + +function useRoute(route: IntegrationRouteData) { + + } + ``` + +- [#11941](https://github.com/withastro/astro/pull/11941) [`b6a5f39`](https://github.com/withastro/astro/commit/b6a5f39846581d0e9cfd7ae6f056c8d1209f71bd) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Merges the `output: 'hybrid'` and `output: 'static'` configurations into one single configuration (now called `'static'`) that works the same way as the previous `hybrid` option. + + It is no longer necessary to specify `output: 'hybrid'` in your Astro config to use server-rendered pages. The new `output: 'static'` has this capability included. Astro will now automatically provide the ability to opt out of prerendering in your static site with no change to your `output` configuration required. Any page route or endpoint can include `export const prerender = false` to be server-rendered, while the rest of your site is statically-generated. + + If your project used hybrid rendering, you must now remove the `output: 'hybrid'` option from your Astro config as it no longer exists. However, no other changes to your project are required, and you should have no breaking changes. The previous `'hybrid'` behavior is now the default, under a new name `'static'`. + + If you were using the `output: 'static'` (default) option, you can continue to use it as before. By default, all of your pages will continue to be prerendered and you will have a completely static site. You should have no breaking changes to your project. + + ```diff + import { defineConfig } from "astro/config"; + + export default defineConfig({ + - output: 'hybrid', + }); + ``` + + An adapter is still required to deploy an Astro project with any server-rendered pages. Failure to include an adapter will result in a warning in development and an error at build time. + +- [#11788](https://github.com/withastro/astro/pull/11788) [`7c0ccfc`](https://github.com/withastro/astro/commit/7c0ccfc26947b178584e3476584bcaa490c6ba86) Thanks [@ematipico](https://github.com/ematipico)! - Updates the default value of `security.checkOrigin` to `true`, which enables Cross-Site Request Forgery (CSRF) protection by default for pages rendered on demand. + + If you had previously configured `security.checkOrigin: true`, you no longer need this set in your Astro config. This is now the default and it is safe to remove. + + To disable this behavior and opt out of automatically checking that the “origin” header matches the URL sent by each request, you must explicitly set `security.checkOrigin: false`: + + ```diff + export default defineConfig({ + + security: { + + checkOrigin: false + + } + }) + ``` + +- [#11825](https://github.com/withastro/astro/pull/11825) [`560ef15`](https://github.com/withastro/astro/commit/560ef15ad23bd137b56ef1048eb2df548b99fdce) Thanks [@bluwy](https://github.com/bluwy)! - Updates internal Shiki rehype plugin to highlight code blocks as hast (using Shiki's `codeToHast()` API). This allows a more direct Markdown and MDX processing, and improves the performance when building the project, but may cause issues with existing Shiki transformers. + + If you are using Shiki transformers passed to `markdown.shikiConfig.transformers`, you must make sure they do not use the `postprocess` hook as it no longer runs on code blocks in `.md` and `.mdx` files. (See [the Shiki documentation on transformer hooks](https://shiki.style/guide/transformers#transformer-hooks) for more information). + + Code blocks in `.mdoc` files and `<Code />` component do not use the internal Shiki rehype plugin and are unaffected. + +- [#11826](https://github.com/withastro/astro/pull/11826) [`7315050`](https://github.com/withastro/astro/commit/7315050fc1192fa72ae92aef92b920f63b46118f) Thanks [@matthewp](https://github.com/matthewp)! - Deprecate Astro.glob + + The `Astro.glob` function has been deprecated in favor of Content Collections and `import.meta.glob`. + + - If you want to query for markdown and MDX in your project, use Content Collections. + - If you want to query source files in your project, use `import.meta.glob`(https://vitejs.dev/guide/features.html#glob-import). + + Also consider using glob packages from npm, like [fast-glob](https://www.npmjs.com/package/fast-glob), especially if statically generating your site, as it is faster for most use-cases. + + The easiest path is to migrate to `import.meta.glob` like so: + + ```diff + - const posts = Astro.glob('./posts/*.md'); + + const posts = Object.values(import.meta.glob('./posts/*.md', { eager: true })); + ``` + +- [#12268](https://github.com/withastro/astro/pull/12268) [`4e9a3ac`](https://github.com/withastro/astro/commit/4e9a3ac0bd30b4013ac0b2caf068552258dfe6d9) Thanks [@ematipico](https://github.com/ematipico)! - The command `astro add vercel` now updates the configuration file differently, and adds `@astrojs/vercel` as module to import. + + This is a breaking change because it requires the version `8.*` of `@astrojs/vercel`. + +- [#11741](https://github.com/withastro/astro/pull/11741) [`6617491`](https://github.com/withastro/astro/commit/6617491c3bc2bde87f7867d7dec2580781852cfc) Thanks [@bluwy](https://github.com/bluwy)! - Removes internal JSX handling and moves the responsibility to the `@astrojs/mdx` package directly. The following exports are also now removed: + + - `astro/jsx/babel.js` + - `astro/jsx/component.js` + - `astro/jsx/index.js` + - `astro/jsx/renderer.js` + - `astro/jsx/server.js` + - `astro/jsx/transform-options.js` + + If your project includes `.mdx` files, you must upgrade `@astrojs/mdx` to the latest version so that it doesn't rely on these entrypoints to handle your JSX. + +- [#11782](https://github.com/withastro/astro/pull/11782) [`9a2aaa0`](https://github.com/withastro/astro/commit/9a2aaa01ea427df3844bce8595207809a8d2cb94) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Makes the `compiledContent` property of Markdown content an async function, this change should fix underlying issues where sometimes when using a custom image service and images inside Markdown, Node would exit suddenly without any error message. + + ```diff + --- + import * as myPost from "../post.md"; + + - const content = myPost.compiledContent(); + + const content = await myPost.compiledContent(); + --- + + <Fragment set:html={content} /> + ``` + +- [#11819](https://github.com/withastro/astro/pull/11819) [`2bdde80`](https://github.com/withastro/astro/commit/2bdde80cd3107d875e2d77e6e9621001e0e8b38a) Thanks [@bluwy](https://github.com/bluwy)! - Updates the Astro config loading flow to ignore processing locally-linked dependencies with Vite (e.g. `npm link`, in a monorepo, etc). Instead, they will be normally imported by the Node.js runtime the same way as other dependencies from `node_modules`. + + Previously, Astro would process locally-linked dependencies which were able to use Vite features like TypeScript when imported by the Astro config file. + + However, this caused confusion as integration authors may test against a package that worked locally, but not when published. This method also restricts using CJS-only dependencies because Vite requires the code to be ESM. Therefore, Astro's behaviour is now changed to ignore processing any type of dependencies by Vite. + + In most cases, make sure your locally-linked dependencies are built to JS before running the Astro project, and the config loading should work as before. + +- [#11827](https://github.com/withastro/astro/pull/11827) [`a83e362`](https://github.com/withastro/astro/commit/a83e362ee41174501a433c210a24696784d7368f) Thanks [@matthewp](https://github.com/matthewp)! - Prevent usage of `astro:content` in the client + + Usage of `astro:content` in the client has always been discouraged because it leads to all of your content winding up in your client bundle, and can possibly leaks secrets. + + This formally makes doing so impossible, adding to the previous warning with errors. + + In the future Astro might add APIs for client-usage based on needs. + +- [#11979](https://github.com/withastro/astro/pull/11979) [`423dfc1`](https://github.com/withastro/astro/commit/423dfc19ad83661b71151f8cec40701c7ced557b) Thanks [@bluwy](https://github.com/bluwy)! - Bumps `vite` dependency to v6.0.0-beta.2. The version is pinned and will be updated as new Vite versions publish to prevent unhandled breaking changes. For the full list of Vite-specific changes, see [its changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md). + +- [#11859](https://github.com/withastro/astro/pull/11859) [`3804711`](https://github.com/withastro/astro/commit/38047119ff454e80cddd115bff53e33b32cd9930) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Changes the default `tsconfig.json` with better defaults, and makes `src/env.d.ts` optional + + Astro's default `tsconfig.json` in starter examples has been updated to include generated types and exclude your build output. This means that `src/env.d.ts` is only necessary if you have added custom type declarations or if you're not using a `tsconfig.json` file. + + Additionally, running `astro sync` no longer creates, nor updates, `src/env.d.ts` as it is not required for type-checking standard Astro projects. + + To update your project to Astro's recommended TypeScript settings, please add the following `include` and `exclude` properties to `tsconfig.json`: + + ```diff + { + "extends": "astro/tsconfigs/base", + + "include": [".astro/types.d.ts", "**/*"], + + "exclude": ["dist"] + } + ``` + +- [#11715](https://github.com/withastro/astro/pull/11715) [`d74617c`](https://github.com/withastro/astro/commit/d74617cbd3278feba05909ec83db2d73d57a153e) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Refactor the exported types from the `astro` module. There should normally be no breaking changes, but if you relied on some previously deprecated types, these might now have been fully removed. + + In most cases, updating your code to move away from previously deprecated APIs in previous versions of Astro should be enough to fix any issues. + +- [#12551](https://github.com/withastro/astro/pull/12551) [`abf9a89`](https://github.com/withastro/astro/commit/abf9a89ac1eaec9a8934a68aeebe3c502a3b47eb) Thanks [@ematipico](https://github.com/ematipico)! - Refactors legacy `content` and `data` collections to use the Content Layer API `glob()` loader for better performance and to support backwards compatibility. Also introduces the `legacy.collections` flag for projects that are unable to update to the new behavior immediately. + + :warning: **BREAKING CHANGE FOR LEGACY CONTENT COLLECTIONS** :warning: + + By default, collections that use the old types (`content` or `data`) and do not define a `loader` are now implemented under the hood using the Content Layer API's built-in `glob()` loader, with extra backward-compatibility handling. + + In order to achieve backwards compatibility with existing `content` collections, the following have been implemented: + + - a `glob` loader collection is defined, with patterns that match the previous handling (matches `src/content/<collection name>/**/*.md` and other content extensions depending on installed integrations, with underscore-prefixed files and folders ignored) + - When used in the runtime, the entries have an ID based on the filename in the same format as legacy collections + - A `slug` field is added with the same format as before + - A `render()` method is added to the entry, so they can be called using `entry.render()` + - `getEntryBySlug` is supported + + In order to achieve backwards compatibility with existing `data` collections, the following have been implemented: + + - a `glob` loader collection is defined, with patterns that match the previous handling (matches `src/content/<collection name>/**/*{.json,.yaml}` and other data extensions, with underscore-prefixed files and folders ignored) + - Entries have an ID that is not slugified + - `getDataEntryById` is supported + + While this backwards compatibility implementation is able to emulate most of the features of legacy collections, **there are some differences and limitations that may cause breaking changes to existing collections**: + + - In previous versions of Astro, collections would be generated for all folders in `src/content/`, even if they were not defined in `src/content/config.ts`. This behavior is now deprecated, and collections should always be defined in `src/content/config.ts`. For existing collections, these can just be empty declarations (e.g. `const blog = defineCollection({})`) and Astro will implicitly define your legacy collection for you in a way that is compatible with the new loading behavior. + - The special `layout` field is not supported in Markdown collection entries. This property is intended only for standalone page files located in `src/pages/` and not likely to be in your collection entries. However, if you were using this property, you must now create dynamic routes that include your page styling. + - Sort order of generated collections is non-deterministic and platform-dependent. This means that if you are calling `getCollection()`, the order in which entries are returned may be different than before. If you need a specific order, you should sort the collection entries yourself. + - `image().refine()` is not supported. If you need to validate the properties of an image you will need to do this at runtime in your page or component. + - the `key` argument of `getEntry(collection, key)` is typed as `string`, rather than having types for every entry. + + A new legacy configuration flag `legacy.collections` is added for users that want to keep their current legacy (content and data) collections behavior (available in Astro v2 - v4), or who are not yet ready to update their projects: + + ```js + // astro.config.mjs + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + legacy: { + collections: true, + }, + }); + ``` + + When set, no changes to your existing collections are necessary, and the restrictions on storing both new and old collections continue to exist: legacy collections (only) must continue to remain in `src/content/`, while new collections using a loader from the Content Layer API are forbidden in that folder. + +- [#11660](https://github.com/withastro/astro/pull/11660) [`e90f559`](https://github.com/withastro/astro/commit/e90f5593d23043579611452a84b9e18ad2407ef9) Thanks [@bluwy](https://github.com/bluwy)! - Fixes attribute rendering for non-[boolean HTML attributes](https://developer.mozilla.org/en-US/docs/Glossary/Boolean/HTML) with boolean values to match proper attribute handling in browsers. + + Previously, non-boolean attributes may not have included their values when rendered to HTML. In Astro v5.0, the values are now explicitly rendered as `="true"` or `="false"` + + In the following `.astro` examples, only `allowfullscreen` is a boolean attribute: + + ```astro + <!-- src/pages/index.astro --><!-- `allowfullscreen` is a boolean attribute --> + <p allowfullscreen={true}></p> + <p allowfullscreen={false}></p> + + <!-- `inherit` is *not* a boolean attribute --> + <p inherit={true}></p> + <p inherit={false}></p> + + <!-- `data-*` attributes are not boolean attributes --> + <p data-light={true}></p> + <p data-light={false}></p> + ``` + + Astro v5.0 now preserves the full data attribute with its value when rendering the HTML of non-boolean attributes: + + ```diff + <p allowfullscreen></p> + <p></p> + + <p inherit="true"></p> + - <p inherit></p> + + <p inherit="false"></p> + + - <p data-light></p> + + <p data-light="true"></p> + - <p></p> + + <p data-light="false"></p> + ``` + + If you rely on attribute values, for example to locate elements or to conditionally render, update your code to match the new non-boolean attribute values: + + ```diff + - el.getAttribute('inherit') === '' + + el.getAttribute('inherit') === 'false' + + - el.hasAttribute('data-light') + + el.dataset.light === 'true' + ``` + +- [#11770](https://github.com/withastro/astro/pull/11770) [`cfa6a47`](https://github.com/withastro/astro/commit/cfa6a47ac7a541f99fdad46a68d0cca6e5816cd5) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Removed support for the Squoosh image service. As the underlying library `libsquoosh` is no longer maintained, and the image service sees very little usage we have decided to remove it from Astro. + + Our recommendation is to use the base Sharp image service, which is more powerful, faster, and more actively maintained. + + ```diff + - import { squooshImageService } from "astro/config"; + import { defineConfig } from "astro/config"; + + export default defineConfig({ + - image: { + - service: squooshImageService() + - } + }); + ``` + + If you are using this service, and cannot migrate to the base Sharp image service, a third-party extraction of the previous service is available here: https://github.com/Princesseuh/astro-image-service-squoosh + +- [#12231](https://github.com/withastro/astro/pull/12231) [`90ae100`](https://github.com/withastro/astro/commit/90ae100cf482529828febed591172433309bc12e) Thanks [@bluwy](https://github.com/bluwy)! - Updates the automatic `charset=utf-8` behavior for Markdown pages, where instead of responding with `charset=utf-8` in the `Content-Type` header, Astro will now automatically add the `<meta charset="utf-8">` tag instead. + + This behaviour only applies to Markdown pages (`.md` or similar Markdown files located within `src/pages/`) that do not use Astro's special `layout` frontmatter property. It matches the rendering behaviour of other non-content pages, and retains the minimal boilerplate needed to write with non-ASCII characters when adding individual Markdown pages to your site. + + If your Markdown pages use the `layout` frontmatter property, then HTML encoding will be handled by the designated layout component instead, and the `<meta charset="utf-8">` tag will not be added to your page by default. + + If you require `charset=utf-8` to render your page correctly, make sure that your layout components contain the `<meta charset="utf-8">` tag. You may need to add this if you have not already done so. + +- [#11714](https://github.com/withastro/astro/pull/11714) [`8a53517`](https://github.com/withastro/astro/commit/8a5351737d6a14fc55f1dafad8f3b04079e81af6) Thanks [@matthewp](https://github.com/matthewp)! - Remove support for functionPerRoute + + This change removes support for the `functionPerRoute` option both in Astro and `@astrojs/vercel`. + + This option made it so that each route got built as separate entrypoints so that they could be loaded as separate functions. The hope was that by doing this it would decrease the size of each function. However in practice routes use most of the same code, and increases in function size limitations made the potential upsides less important. + + Additionally there are downsides to functionPerRoute, such as hitting limits on the number of functions per project. The feature also never worked with some Astro features like i18n domains and request rewriting. + + Given this, the feature has been removed from Astro. + +- [#11864](https://github.com/withastro/astro/pull/11864) [`ee38b3a`](https://github.com/withastro/astro/commit/ee38b3a94697fe883ce8300eff9f001470b8adb6) Thanks [@ematipico](https://github.com/ematipico)! - ### [changed]: `RouteData.distURL` is now an array + In Astro v4.x, `RouteData.distURL` was `undefined` or a `URL` + + Astro v5.0, `RouteData.distURL` is `undefined` or an array of `URL`. This was a bug, because a route can generate multiple files on disk, especially when using dynamic routes such as `[slug]` or `[...slug]`. + + #### What should I do? + + Update your code to handle `RouteData.distURL` as an array. + + ```diff + if (route.distURL) { + - if (route.distURL.endsWith('index.html')) { + - // do something + - } + + for (const url of route.distURL) { + + if (url.endsWith('index.html')) { + + // do something + + } + + } + } + ``` + +- [#11253](https://github.com/withastro/astro/pull/11253) [`4e5cc5a`](https://github.com/withastro/astro/commit/4e5cc5aadd7d864bc5194ee67dc2ea74dbe80473) Thanks [@kevinzunigacuellar](https://github.com/kevinzunigacuellar)! - Changes the data returned for `page.url.current`, `page.url.next`, `page.url.prev`, `page.url.first` and `page.url.last` to include the value set for `base` in your Astro config. + + Previously, you had to manually prepend your configured value for `base` to the URL path. Now, Astro automatically includes your `base` value in `next` and `prev` URLs. + + If you are using the `paginate()` function for "previous" and "next" URLs, remove any existing `base` value as it is now added for you: + + ```diff + --- + export async function getStaticPaths({ paginate }) { + const astronautPages = [{ + astronaut: 'Neil Armstrong', + }, { + astronaut: 'Buzz Aldrin', + }, { + astronaut: 'Sally Ride', + }, { + astronaut: 'John Glenn', + }]; + return paginate(astronautPages, { pageSize: 1 }); + } + const { page } = Astro.props; + // `base: /'docs'` configured in `astro.config.mjs` + - const prev = "/docs" + page.url.prev; + + const prev = page.url.prev; + --- + <a id="prev" href={prev}>Back</a> + ``` + +- [#12079](https://github.com/withastro/astro/pull/12079) [`7febf1f`](https://github.com/withastro/astro/commit/7febf1f6b58f2ed014df617bd7162c854cadd230) Thanks [@ematipico](https://github.com/ematipico)! - `params` passed in `getStaticPaths` are no longer automatically decoded. + + ### [changed]: `params` aren't decoded anymore. + + In Astro v4.x, `params` in were automatically decoded using `decodeURIComponent`. + + Astro v5.0 doesn't automatically decode `params` in `getStaticPaths` anymore, so you'll need to manually decode them yourself if needed + + #### What should I do? + + If you were relying on the automatic decode, you'll need to manually decode it using `decodeURI`. + + Note that the use of [`decodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent)) is discouraged for `getStaticPaths` because it decodes more characters than it should, for example `/`, `?`, `#` and more. + + ```diff + --- + export function getStaticPaths() { + return [ + + { params: { id: decodeURI("%5Bpage%5D") } }, + - { params: { id: "%5Bpage%5D" } }, + ] + } + + const { id } = Astro.params; + --- + ``` + +### Minor Changes + +- [#11941](https://github.com/withastro/astro/pull/11941) [`b6a5f39`](https://github.com/withastro/astro/commit/b6a5f39846581d0e9cfd7ae6f056c8d1209f71bd) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adapters can now specify the build output type they're intended for using the `adapterFeatures.buildOutput` property. This property can be used to always generate a server output, even if the project doesn't have any server-rendered pages. + + ```ts + { + 'astro:config:done': ({ setAdapter, config }) => { + setAdapter({ + name: 'my-adapter', + adapterFeatures: { + buildOutput: 'server', + }, + }); + }, + } + ``` + + If your adapter specifies `buildOutput: 'static'`, and the user's project contains server-rendered pages, Astro will warn in development and error at build time. Note that a hybrid output, containing both static and server-rendered pages, is considered to be a `server` output, as a server is required to serve the server-rendered pages. + +- [#12067](https://github.com/withastro/astro/pull/12067) [`c48916c`](https://github.com/withastro/astro/commit/c48916cc4e6f7c31e3563d04b68a8698d8775b65) Thanks [@stramel](https://github.com/stramel)! - Adds experimental support for built-in SVG components. + + This feature allows you to import SVG files directly into your Astro project as components. By default, Astro will inline the SVG content into your HTML output. + + To enable this feature, set `experimental.svg` to `true` in your Astro config: + + ```js + { + experimental: { + svg: true, + }, + } + ``` + + To use this feature, import an SVG file in your Astro project, passing any common SVG attributes to the imported component. Astro also provides a `size` attribute to set equal `height` and `width` properties: + + ```astro + --- + import Logo from './path/to/svg/file.svg'; + --- + + <Logo size={24} /> + ``` + + For a complete overview, and to give feedback on this experimental API, see the [Feature RFC](https://github.com/withastro/roadmap/pull/1035). + +- [#12226](https://github.com/withastro/astro/pull/12226) [`51d13e2`](https://github.com/withastro/astro/commit/51d13e2f6ce3a9e03c33d80af6716847f6a78061) Thanks [@ematipico](https://github.com/ematipico)! - The following renderer fields and integration fields now accept `URL` as a type: + + **Renderers**: + + - `AstroRenderer.clientEntrpoint` + - `AstroRenderer.serverEntrypoint` + + **Integrations**: + + - `InjectedRoute.entrypoint` + - `AstroIntegrationMiddleware.entrypoint` + - `DevToolbarAppEntry.entrypoint` + +- [#12323](https://github.com/withastro/astro/pull/12323) [`c280655`](https://github.com/withastro/astro/commit/c280655655cc6c22121f32c5f7c76836adf17230) Thanks [@bluwy](https://github.com/bluwy)! - Updates to Vite 6.0.0-beta.6 + +- [#12539](https://github.com/withastro/astro/pull/12539) [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7) Thanks [@bluwy](https://github.com/bluwy)! - Drops node 21 support + +- [#12243](https://github.com/withastro/astro/pull/12243) [`eb41d13`](https://github.com/withastro/astro/commit/eb41d13162c84e9495489403611bc875eb190fed) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Improves `defineConfig` type safety. TypeScript will now error if a group of related configuration options do not have consistent types. For example, you will now see an error if your language set for `i18n.defaultLocale` is not one of the supported locales specified in `i18n.locales`. + +- [#12329](https://github.com/withastro/astro/pull/12329) [`8309c61`](https://github.com/withastro/astro/commit/8309c61f0dfa5991d3f6c5c5fca4403794d6fda2) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Adds a new `astro:routes:resolved` hook to the Integration API. Also update the `astro:build:done` hook by deprecating `routes` and adding a new `assets` map. + + When building an integration, you can now get access to routes inside the `astro:routes:resolved` hook: + + ```js + const integration = () => { + return { + name: 'my-integration', + hooks: { + 'astro:routes:resolved': ({ routes }) => { + console.log(routes); + }, + }, + }; + }; + ``` + + This hook runs before `astro:config:done`, and whenever a route changes in development. + + The `routes` array from `astro:build:done` is now deprecated, and exposed properties are now available on `astro:routes:resolved`, except for `distURL`. For this, you can use the newly exposed `assets` map: + + ```diff + const integration = () => { + + let routes + return { + name: 'my-integration', + hooks: { + + 'astro:routes:resolved': (params) => { + + routes = params.routes + + }, + 'astro:build:done': ({ + - routes + + assets + }) => { + + for (const route of routes) { + + const distURL = assets.get(route.pattern) + + if (distURL) { + + Object.assign(route, { distURL }) + + } + + } + console.log(routes) + } + } + } + } + ``` + +- [#11911](https://github.com/withastro/astro/pull/11911) [`c3dce83`](https://github.com/withastro/astro/commit/c3dce8363be22121a567df22df2ec566a3ebda17) Thanks [@ascorbic](https://github.com/ascorbic)! - The Content Layer API introduced behind a flag in [4.14.0](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md#4140) is now stable and ready for use in Astro v5.0. + + The new Content Layer API builds upon content collections, taking them beyond local files in `src/content/` and allowing you to fetch content from anywhere, including remote APIs. These new collections work alongside your existing content collections, and you can migrate them to the new API at your own pace. There are significant improvements to performance with large collections of local files. For more details, see [the Content Layer RFC](https://github.com/withastro/roadmap/blob/content-layer/proposals/0050-content-layer.md). + + If you previously used this feature, you can now remove the `experimental.contentLayer` flag from your Astro config: + + ```diff + // astro.config.mjs + import { defineConfig } from 'astro' + + export default defineConfig({ + - experimental: { + - contentLayer: true + - } + }) + ``` + + ### Loading your content + + The core of the new Content Layer API is the loader, a function that fetches content from a source and caches it in a local data store. Astro 4.14 ships with built-in `glob()` and `file()` loaders to handle your local Markdown, MDX, Markdoc, and JSON files: + + ```ts {3,7} + // src/content/config.ts + import { defineCollection, z } from 'astro:content'; + import { glob } from 'astro/loaders'; + + const blog = defineCollection({ + // The ID is a slug generated from the path of the file relative to `base` + loader: glob({ pattern: '**/*.md', base: './src/data/blog' }), + schema: z.object({ + title: z.string(), + description: z.string(), + publishDate: z.coerce.date(), + }), + }); + + export const collections = { blog }; + ``` + + You can then query using the existing content collections functions, and use a simplified `render()` function to display your content: + + ```astro + --- + import { getEntry, render } from 'astro:content'; + + const post = await getEntry('blog', Astro.params.slug); + + const { Content } = await render(entry); + --- + + <Content /> + ``` + + ### Creating a loader + + You're not restricted to the built-in loaders – we hope you'll try building your own. You can fetch content from anywhere and return an array of entries: + + ```ts + // src/content/config.ts + const countries = defineCollection({ + loader: async () => { + const response = await fetch('https://restcountries.com/v3.1/all'); + const data = await response.json(); + // Must return an array of entries with an id property, + // or an object with IDs as keys and entries as values + return data.map((country) => ({ + id: country.cca3, + ...country, + })); + }, + // optionally add a schema to validate the data and make it type-safe for users + // schema: z.object... + }); + + export const collections = { countries }; + ``` + + For more advanced loading logic, you can define an object loader. This allows incremental updates and conditional loading, and gives full access to the data store. It also allows a loader to define its own schema, including generating it dynamically based on the source API. See the [the Content Layer API RFC](https://github.com/withastro/roadmap/blob/content-layer/proposals/0050-content-layer.md#loaders) for more details. + + ### Sharing your loaders + + Loaders are better when they're shared. You can create a package that exports a loader and publish it to npm, and then anyone can use it on their site. We're excited to see what the community comes up with! To get started, [take a look at some examples](https://github.com/ascorbic/astro-loaders/). Here's how to load content using an RSS/Atom feed loader: + + ```ts + // src/content/config.ts + import { defineCollection } from 'astro:content'; + import { feedLoader } from '@ascorbic/feed-loader'; + + const podcasts = defineCollection({ + loader: feedLoader({ + url: 'https://feeds.99percentinvisible.org/99percentinvisible', + }), + }); + + export const collections = { podcasts }; + ``` + + To learn more, see [the Content Layer RFC](https://github.com/withastro/roadmap/blob/content-layer/proposals/0050-content-layer.md). + +- [#11980](https://github.com/withastro/astro/pull/11980) [`a604a0c`](https://github.com/withastro/astro/commit/a604a0ca9e0cdead01610b603d3b4c37ab010efc) Thanks [@matthewp](https://github.com/matthewp)! - ViewTransitions component renamed to ClientRouter + + The `<ViewTransitions />` component has been renamed to `<ClientRouter />`. There are no other changes than the name. The old name will continue to work in Astro 5.x, but will be removed in 6.0. + + This change was done to clarify the role of the component within Astro's View Transitions support. Astro supports View Transitions APIs in a few different ways, and renaming the component makes it more clear that the features you get from the ClientRouter component are slightly different from what you get using the native CSS-based MPA router. + + We still intend to maintain the ClientRouter as before, and it's still important for use-cases that the native support doesn't cover, such as persisting state between pages. + +- [#11875](https://github.com/withastro/astro/pull/11875) [`a8a3d2c`](https://github.com/withastro/astro/commit/a8a3d2cde813d891dd9c63f07f91ce4e77d4f93b) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Adds a new property `isPrerendered` to the globals `Astro` and `APIContext` . This boolean value represents whether or not the current page is prerendered: + + ```astro + --- + // src/pages/index.astro + + export const prerender = true; + --- + ``` + + ```js + // src/middleware.js + + export const onRequest = (ctx, next) => { + console.log(ctx.isPrerendered); // it will log true + return next(); + }; + ``` + +- [#12047](https://github.com/withastro/astro/pull/12047) [`21b5e80`](https://github.com/withastro/astro/commit/21b5e806c5df37c6b01da63487568a6ed351ba7d) Thanks [@rgodha24](https://github.com/rgodha24)! - Adds a new optional `parser` property to the built-in `file()` loader for content collections to support additional file types such as `toml` and `csv`. + + The `file()` loader now accepts a second argument that defines a `parser` function. This allows you to specify a custom parser (e.g. `toml.parse` or `csv-parse`) to create a collection from a file's contents. The `file()` loader will automatically detect and parse JSON and YAML files (based on their file extension) with no need for a `parser`. + + This works with any type of custom file formats including `csv` and `toml`. The following example defines a content collection `dogs` using a `.toml` file. + + ```toml + [[dogs]] + id = "..." + age = "..." + + [[dogs]] + id = "..." + age = "..." + ``` + + After importing TOML's parser, you can load the `dogs` collection into your project by passing both a file path and `parser` to the `file()` loader. + + ```typescript + import { defineCollection } from "astro:content" + import { file } from "astro/loaders" + import { parse as parseToml } from "toml" + + const dogs = defineCollection({ + loader: file("src/data/dogs.toml", { parser: (text) => parseToml(text).dogs }), + schema: /* ... */ + }) + + // it also works with CSVs! + import { parse as parseCsv } from "csv-parse/sync"; + + const cats = defineCollection({ + loader: file("src/data/cats.csv", { parser: (text) => parseCsv(text, { columns: true, skipEmptyLines: true })}) + }); + ``` + + The `parser` argument also allows you to load a single collection from a nested JSON document. For example, this JSON file contains multiple collections: + + ```json + { "dogs": [{}], "cats": [{}] } + ``` + + You can seperate these collections by passing a custom `parser` to the `file()` loader like so: + + ```typescript + const dogs = defineCollection({ + loader: file('src/data/pets.json', { parser: (text) => JSON.parse(text).dogs }), + }); + const cats = defineCollection({ + loader: file('src/data/pets.json', { parser: (text) => JSON.parse(text).cats }), + }); + ``` + + And it continues to work with maps of `id` to `data` + + ```yaml + bubbles: + breed: 'Goldfish' + age: 2 + finn: + breed: 'Betta' + age: 1 + ``` + + ```typescript + const fish = defineCollection({ + loader: file('src/data/fish.yaml'), + schema: z.object({ breed: z.string(), age: z.number() }), + }); + ``` + +- [#11698](https://github.com/withastro/astro/pull/11698) [`05139ef`](https://github.com/withastro/astro/commit/05139ef8b46de96539cc1d08148489eaf3cfd837) Thanks [@ematipico](https://github.com/ematipico)! - Adds a new property to the globals `Astro` and `APIContext` called `routePattern`. The `routePattern` represents the current route (component) + that is being rendered by Astro. It's usually a path pattern will look like this: `blog/[slug]`: + + ```astro + --- + // src/pages/blog/[slug].astro + const route = Astro.routePattern; + console.log(route); // it will log "blog/[slug]" + --- + ``` + + ```js + // src/pages/index.js + + export const GET = (ctx) => { + console.log(ctx.routePattern); // it will log src/pages/index.js + return new Response.json({ loreum: 'ipsum' }); + }; + ``` + +- [#11941](https://github.com/withastro/astro/pull/11941) [`b6a5f39`](https://github.com/withastro/astro/commit/b6a5f39846581d0e9cfd7ae6f056c8d1209f71bd) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds a new `buildOutput` property to the `astro:config:done` hook returning the build output type. + + This can be used to know if the user's project will be built as a static site (HTML files), or a server-rendered site (whose exact output depends on the adapter). + +- [#12377](https://github.com/withastro/astro/pull/12377) [`af867f3`](https://github.com/withastro/astro/commit/af867f3910ecd8fc04a5337f591d84f03192e3fa) Thanks [@ascorbic](https://github.com/ascorbic)! - Adds experimental support for automatic responsive images + + This feature is experimental and may change in future versions. To enable it, set `experimental.responsiveImages` to `true` in your `astro.config.mjs` file. + + ```js title=astro.config.mjs + { + experimental: { + responsiveImages: true, + }, + } + ``` + + When this flag is enabled, you can pass a `layout` prop to any `<Image />` or `<Picture />` component to create a responsive image. When a layout is set, images have automatically generated `srcset` and `sizes` attributes based on the image's dimensions and the layout type. Images with `responsive` and `full-width` layouts will have styles applied to ensure they resize according to their container. + + ```astro + --- + import { Image, Picture } from 'astro:assets'; + import myImage from '../assets/my_image.png'; + --- + + <Image + src={myImage} + alt="A description of my image." + layout="responsive" + width={800} + height={600} + /> + <Picture + src={myImage} + alt="A description of my image." + layout="full-width" + formats={['avif', 'webp', 'jpeg']} + /> + ``` + + This `<Image />` component will generate the following HTML output: + + ```html title=Output + <img + src="/_astro/my_image.hash3.webp" + srcset=" + /_astro/my_image.hash1.webp 640w, + /_astro/my_image.hash2.webp 750w, + /_astro/my_image.hash3.webp 800w, + /_astro/my_image.hash4.webp 828w, + /_astro/my_image.hash5.webp 1080w, + /_astro/my_image.hash6.webp 1280w, + /_astro/my_image.hash7.webp 1600w + " + alt="A description of my image" + sizes="(min-width: 800px) 800px, 100vw" + loading="lazy" + decoding="async" + fetchpriority="auto" + width="800" + height="600" + style="--w: 800; --h: 600; --fit: cover; --pos: center;" + data-astro-image="responsive" + /> + ``` + + #### Responsive image properties + + These are additional properties available to the `<Image />` and `<Picture />` components when responsive images are enabled: + + - `layout`: The layout type for the image. Can be `responsive`, `fixed`, `full-width` or `none`. Defaults to value of `image.experimentalLayout`. + - `fit`: Defines how the image should be cropped if the aspect ratio is changed. Values match those of CSS `object-fit`. Defaults to `cover`, or the value of `image.experimentalObjectFit` if set. + - `position`: Defines the position of the image crop if the aspect ratio is changed. Values match those of CSS `object-position`. Defaults to `center`, or the value of `image.experimentalObjectPosition` if set. + - `priority`: If set, eagerly loads the image. Otherwise images will be lazy-loaded. Use this for your largest above-the-fold image. Defaults to `false`. + + #### Default responsive image settings + + You can enable responsive images for all `<Image />` and `<Picture />` components by setting `image.experimentalLayout` with a default value. This can be overridden by the `layout` prop on each component. + + **Example:** + + ```js title=astro.config.mjs + { + image: { + // Used for all `<Image />` and `<Picture />` components unless overridden + experimentalLayout: 'responsive', + }, + experimental: { + responsiveImages: true, + }, + } + ``` + + ```astro + --- + import { Image } from 'astro:assets'; + import myImage from '../assets/my_image.png'; + --- + + <Image src={myImage} alt="This will use responsive layout" width={800} height={600} /> + + <Image src={myImage} alt="This will use full-width layout" layout="full-width" /> + + <Image src={myImage} alt="This will disable responsive images" layout="none" /> + ``` + + For a complete overview, and to give feedback on this experimental API, see the [Responsive Images RFC](https://github.com/withastro/roadmap/blob/responsive-images/proposals/0053-responsive-images.md). + +- [#12150](https://github.com/withastro/astro/pull/12150) [`93351bc`](https://github.com/withastro/astro/commit/93351bc78aed8f4ecff003268bad21c3b93c2f56) Thanks [@bluwy](https://github.com/bluwy)! - Adds support for passing values other than `"production"` or `"development"` to the `--mode` flag (e.g. `"staging"`, `"testing"`, or any custom value) to change the value of `import.meta.env.MODE` or the loaded `.env` file. This allows you take advantage of Vite's [mode](https://vite.dev/guide/env-and-mode#modes) feature. + + Also adds a new `--devOutput` flag for `astro build` that will output a development-based build. + + Note that changing the `mode` does not change the kind of code transform handled by Vite and Astro: + + - In `astro dev`, Astro will transform code with debug information. + - In `astro build`, Astro will transform code with the most optimized output and removes debug information. + - In `astro build --devOutput` (new flag), Astro will transform code with debug information like in `astro dev`. + + This enables various usecases like: + + ```bash + # Run the dev server connected to a "staging" API + astro dev --mode staging + + # Build a site that connects to a "staging" API + astro build --mode staging + + # Build a site that connects to a "production" API with additional debug information + astro build --devOutput + + # Build a site that connects to a "testing" API + astro build --mode testing + ``` + + The different modes can be used to load different `.env` files, e.g. `.env.staging` or `.env.production`, which can be customized for each environment, for example with different `API_URL` environment variable values. + +- [#12510](https://github.com/withastro/astro/pull/12510) [`14feaf3`](https://github.com/withastro/astro/commit/14feaf30e1a4266b8422865722a4478d39202404) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Changes the generated URL query param from `_astroAction` to `_action` when submitting a form using Actions. This avoids leaking the framework name into the URL bar, which may be considered a security issue. + +- [#11806](https://github.com/withastro/astro/pull/11806) [`f7f2338`](https://github.com/withastro/astro/commit/f7f2338c2b96975001b5c782f458710e9cc46d74) Thanks [@Princesseuh](https://github.com/Princesseuh)! - The value of the different properties on `supportedAstroFeatures` for adapters can now be objects, with a `support` and `message` properties. The content of the `message` property will be shown in the Astro CLI when the adapter is not compatible with the feature, allowing one to give a better informational message to the user. + + This is notably useful with the new `limited` value, to explain to the user why support is limited. + +- [#12071](https://github.com/withastro/astro/pull/12071) [`61d248e`](https://github.com/withastro/astro/commit/61d248e581a3bebf0ec67169813fc8ae4a2182df) Thanks [@Princesseuh](https://github.com/Princesseuh)! - `astro add` no longer automatically sets `output: 'server'`. Since the default value of output now allows for server-rendered pages, it no longer makes sense to default to full server builds when you add an adapter + +- [#11955](https://github.com/withastro/astro/pull/11955) [`d813262`](https://github.com/withastro/astro/commit/d8132626b05f150341c0628d6078fdd86b89aaed) Thanks [@matthewp](https://github.com/matthewp)! - [Server Islands](https://astro.build/blog/future-of-astro-server-islands/) introduced behind an experimental flag in [v4.12.0](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md#4120) is no longer experimental and is available for general use. + + Server islands are Astro's solution for highly cacheable pages of mixed static and dynamic content. They allow you to specify components that should run on the server, allowing the rest of the page to be more aggressively cached, or even generated statically. + + Turn any `.astro` component into a server island by adding the `server:defer` directive and optionally, fallback placeholder content. It will be rendered dynamically at runtime outside the context of the rest of the page, allowing you to add longer cache headers for the pages, or even prerender them. + + ```astro + --- + import Avatar from '../components/Avatar.astro'; + import GenericUser from '../components/GenericUser.astro'; + --- + + <header> + <h1>Page Title</h1> + <div class="header-right"> + <Avatar server:defer> + <GenericUser slot="fallback" /> + </Avatar> + </div> + </header> + ``` + + If you were previously using this feature, please remove the experimental flag from your Astro config: + + ```diff + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + experimental { + - serverIslands: true, + }, + }); + ``` + + If you have been waiting for stabilization before using server islands, you can now do so. + + Please see the [server island documentation](https://docs.astro.build/en/guides/server-islands/) for more about this feature. + +- [#12373](https://github.com/withastro/astro/pull/12373) [`d10f918`](https://github.com/withastro/astro/commit/d10f91815e63f169cff3d1daef5505aef077c76c) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Changes the default behavior for Astro Action form requests to a standard POST submission. + + In Astro 4.x, actions called from an HTML form would trigger a redirect with the result forwarded using cookies. This caused issues for large form errors and return values that exceeded the 4 KB limit of cookie-based storage. + + Astro 5.0 now renders the result of an action as a POST result without any forwarding. This will introduce a "confirm form resubmission?" dialog when a user attempts to refresh the page, though it no longer imposes a 4 KB limit on action return value. + + ## Customize form submission behavior + + If you prefer to address the "confirm form resubmission?" dialog on refresh, or to preserve action results across sessions, you can now [customize action result handling from middleware](https://5-0-0-beta.docs.astro.build/en/guides/actions/#advanced-persist-action-results-with-a-session). + + We recommend using a session storage provider [as described in our Netlify Blob example](https://5-0-0-beta.docs.astro.build/en/guides/actions/#advanced-persist-action-results-with-a-session). However, if you prefer the cookie forwarding behavior from 4.X and accept the 4 KB size limit, you can implement the pattern as shown in this sample snippet: + + ```ts + // src/middleware.ts + import { defineMiddleware } from 'astro:middleware'; + import { getActionContext } from 'astro:actions'; + + export const onRequest = defineMiddleware(async (context, next) => { + // Skip requests for prerendered pages + if (context.isPrerendered) return next(); + + const { action, setActionResult, serializeActionResult } = getActionContext(context); + + // If an action result was forwarded as a cookie, set the result + // to be accessible from `Astro.getActionResult()` + const payload = context.cookies.get('ACTION_PAYLOAD'); + if (payload) { + const { actionName, actionResult } = payload.json(); + setActionResult(actionName, actionResult); + context.cookies.delete('ACTION_PAYLOAD'); + return next(); + } + + // If an action was called from an HTML form action, + // call the action handler and redirect with the result as a cookie. + if (action?.calledFrom === 'form') { + const actionResult = await action.handler(); + + context.cookies.set('ACTION_PAYLOAD', { + actionName: action.name, + actionResult: serializeActionResult(actionResult), + }); + + if (actionResult.error) { + // Redirect back to the previous page on error + const referer = context.request.headers.get('Referer'); + if (!referer) { + throw new Error('Internal: Referer unexpectedly missing from Action POST request.'); + } + return context.redirect(referer); + } + // Redirect to the destination page on success + return context.redirect(context.originPathname); + } + + return next(); + }); + ``` + +- [#12475](https://github.com/withastro/astro/pull/12475) [`3f02d5f`](https://github.com/withastro/astro/commit/3f02d5f12b167514fff6eb9693b4e25c668e7a31) Thanks [@ascorbic](https://github.com/ascorbic)! - Changes the default content config location from `src/content/config.*` to `src/content.config.*`. + + The previous location is still supported, and is required if the `legacy.collections` flag is enabled. + +- [#11963](https://github.com/withastro/astro/pull/11963) [`0a1036e`](https://github.com/withastro/astro/commit/0a1036eef62f13c9609362874c5b88434d1e9300) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Adds a new `createCodegenDir()` function to the `astro:config:setup` hook in the Integrations API + + In 4.14, we introduced the `injectTypes` utility on the `astro:config:done` hook. It can create `.d.ts` files and make their types available to user's projects automatically. Under the hood, it creates a file in `<root>/.astro/integrations/<normalized_integration_name>`. + + While the `.astro` directory has always been the preferred place to write code generated files, it has also been prone to mistakes. For example, you can write a `.astro/types.d.ts` file, breaking Astro types. Or you can create a file that overrides a file created by another integration. + + In this release, `<root>/.astro/integrations/<normalized_integration_name>` can now be retrieved in the `astro:config:setup` hook by calling `createCodegenDir()`. It allows you to have a dedicated folder, avoiding conflicts with another integration or Astro itself. This directory is created by calling this function so it's safe to write files to it directly: + + ```js + import { writeFileSync } from 'node:fs'; + + const integration = { + name: 'my-integration', + hooks: { + 'astro:config:setup': ({ createCodegenDir }) => { + const codegenDir = createCodegenDir(); + writeFileSync(new URL('cache.json', codegenDir), '{}', 'utf-8'); + }, + }, + }; + ``` + +- [#12379](https://github.com/withastro/astro/pull/12379) [`94f4fe8`](https://github.com/withastro/astro/commit/94f4fe8180f02cf19fb617dde7d67d4f7bee8dac) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds a new components exported from `astro/components`: Welcome, to be used by the new Basics template + +- [#11806](https://github.com/withastro/astro/pull/11806) [`f7f2338`](https://github.com/withastro/astro/commit/f7f2338c2b96975001b5c782f458710e9cc46d74) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds a new `limited` value for the different properties of `supportedAstroFeatures` for adapters, which indicates that the adapter is compatible with the feature, but with some limitations. This is useful for adapters that support a feature, but not in all cases or with all options. + +- [#11925](https://github.com/withastro/astro/pull/11925) [`74722cb`](https://github.com/withastro/astro/commit/74722cb81c46d4d29c8c5a2127f896da4d8d3235) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Updates `astro/config` import to reference `astro/client` types + + When importing `astro/config`, types from `astro/client` will be made automatically available to your project. If your project `tsconfig.json` changes how references behave, you'll still have access to these types after running `astro sync`. + +- [#12081](https://github.com/withastro/astro/pull/12081) [`8679954`](https://github.com/withastro/astro/commit/8679954bf647529e0f2134053866fc507e64c5e3) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Removes the experimental `contentCollectionsCache` introduced in `3.5.0`. + + Astro Content Layer API independently solves some of the caching and performance issues with legacy content collections that this strategy attempted to address. This feature has been replaced with continued work on improvements to the content layer. If you were using this experimental feature, you must now remove the flag from your Astro config as it no longer exists: + + ```diff + export default defineConfig({ + experimental: { + - contentCollectionsCache: true + } + }) + ``` + + The `cacheManifest` boolean argument is no longer passed to the `astro:build:done` integration hook: + + ```diff + const integration = { + name: "my-integration", + hooks: { + "astro:build:done": ({ + - cacheManifest, + logger + }) => {} + } + } + ``` + +### Patch Changes + +- [#12565](https://github.com/withastro/astro/pull/12565) [`97f413f`](https://github.com/withastro/astro/commit/97f413f1189fd626dffac8b48b166684c7e77627) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes a bug where content types were not generated when first running astro dev unless src/content exists + +- [#11987](https://github.com/withastro/astro/pull/11987) [`bf90a53`](https://github.com/withastro/astro/commit/bf90a5343f9cd1bb46f30e4b331e7ae675f5e720) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - `render()` signature now takes `renderOptions` as 2nd argument + + The signature for `app.render()` has changed, and the second argument is now an options object called `renderOptions` with more options for customizing rendering. + + The `renderOptions` are: + + - `addCookieHeader`: Determines whether Astro will set the `Set-Cookie` header, otherwise the adapter is expected to do so itself. + - `clientAddress`: The client IP address used to set `Astro.clientAddress`. + - `locals`: An object of locals that's set to `Astro.locals`. + - `routeData`: An object specifying the route to use. + +- [#12522](https://github.com/withastro/astro/pull/12522) [`33b0e30`](https://github.com/withastro/astro/commit/33b0e305fe4ecabc30ffa823454395c973f92454) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes a bug where content config was ignored if it was outside of content dir and has a parent dir with an underscore + +- [#12424](https://github.com/withastro/astro/pull/12424) [`4364bff`](https://github.com/withastro/astro/commit/4364bff27332e52f92da72392620a36110daee42) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where an incorrect usage of Astro actions was lost when porting the fix from v4 to v5 + +- [#12438](https://github.com/withastro/astro/pull/12438) [`c8f877c`](https://github.com/withastro/astro/commit/c8f877cad2d8f1780f70045413872d5b9d32ebed) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes a bug where legacy content types were generated for content layer collections if they were in the content directory + +- [#12035](https://github.com/withastro/astro/pull/12035) [`325a57c`](https://github.com/withastro/astro/commit/325a57c543d88eab5e3ab32ee1bbfb534aed9c7c) Thanks [@ascorbic](https://github.com/ascorbic)! - Correctly parse values returned from inline loader + +- [#11960](https://github.com/withastro/astro/pull/11960) [`4410130`](https://github.com/withastro/astro/commit/4410130df722eae494caaa46b17c8eeb6223f160) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes an issue where the refresh context data was not passed correctly to content layer loaders + +- [#11878](https://github.com/withastro/astro/pull/11878) [`334948c`](https://github.com/withastro/astro/commit/334948ced29ed9ab03992f2174547bb9ee3a20c0) Thanks [@ascorbic](https://github.com/ascorbic)! - Adds a new function `refreshContent` to the `astro:server:setup` hook that allows integrations to refresh the content layer. This can be used, for example, to register a webhook endpoint during dev, or to open a socket to a CMS to listen for changes. + + By default, `refreshContent` will refresh all collections. You can optionally pass a `loaders` property, which is an array of loader names. If provided, only collections that use those loaders will be refreshed. For example, A CMS integration could use this property to only refresh its own collections. + + You can also pass a `context` object to the loaders. This can be used to pass arbitrary data, such as the webhook body, or an event from the websocket. + + ```ts + { + name: 'my-integration', + hooks: { + 'astro:server:setup': async ({ server, refreshContent }) => { + server.middlewares.use('/_refresh', async (req, res) => { + if(req.method !== 'POST') { + res.statusCode = 405 + res.end('Method Not Allowed'); + return + } + let body = ''; + req.on('data', chunk => { + body += chunk.toString(); + }); + req.on('end', async () => { + try { + const webhookBody = JSON.parse(body); + await refreshContent({ + context: { webhookBody }, + loaders: ['my-loader'] + }); + res.writeHead(200, { 'Content-Type': 'application/json' }); + res.end(JSON.stringify({ message: 'Content refreshed successfully' })); + } catch (error) { + res.writeHead(500, { 'Content-Type': 'application/json' }); + res.end(JSON.stringify({ error: 'Failed to refresh content: ' + error.message })); + } + }); + }); + } + } + } + ``` + +- [#11991](https://github.com/withastro/astro/pull/11991) [`d7a396c`](https://github.com/withastro/astro/commit/d7a396ca3eedc1b32b4ea113cbacb4ccb08384c9) Thanks [@matthewp](https://github.com/matthewp)! - Update error link to on-demand rendering guide + +- [#12127](https://github.com/withastro/astro/pull/12127) [`55e9cd8`](https://github.com/withastro/astro/commit/55e9cd88551ac56ec4cab9a9f3fd9ba49b8934b9) Thanks [@ascorbic](https://github.com/ascorbic)! - Prevents Vite emitting an error when restarting itself + +- [#12516](https://github.com/withastro/astro/pull/12516) [`cb9322c`](https://github.com/withastro/astro/commit/cb9322c763b5cd8e43afe77d30e86a0b7d72f894) Thanks [@stramel](https://github.com/stramel)! - Handle multiple root nodes on SVG files + +- [#11974](https://github.com/withastro/astro/pull/11974) [`60211de`](https://github.com/withastro/astro/commit/60211defbfb2992ba17d1369e71c146d8928b09a) Thanks [@ascorbic](https://github.com/ascorbic)! - Exports the `RenderResult` type + +- [#12578](https://github.com/withastro/astro/pull/12578) [`07b9ca8`](https://github.com/withastro/astro/commit/07b9ca802eb4bbfc14c4e421f8a047fef3a7b439) Thanks [@WesSouza](https://github.com/WesSouza)! - Explicitly import index.ts to fix types when moduleResolution is NodeNext + +- [#11791](https://github.com/withastro/astro/pull/11791) [`9393243`](https://github.com/withastro/astro/commit/93932432e7239a1d31c68ea916945302286268e9) Thanks [@bluwy](https://github.com/bluwy)! - Updates Astro's default `<script>` rendering strategy and removes the `experimental.directRenderScript` option as this is now the default behavior: scripts are always rendered directly. This new strategy prevents scripts from being executed in pages where they are not used. + + Scripts will directly render as declared in Astro files (including existing features like TypeScript, importing `node_modules`, and deduplicating scripts). You can also now conditionally render scripts in your Astro file. + + However, this means scripts are no longer hoisted to the `<head>`, multiple scripts on a page are no longer bundled together, and the `<script>` tag may interfere with the CSS styling. + + As this is a potentially breaking change to your script behavior, please review your `<script>` tags and ensure that they behave as expected. + +- [#12011](https://github.com/withastro/astro/pull/12011) [`cfdaab2`](https://github.com/withastro/astro/commit/cfdaab257cd167e0d4631ab66d9406754b3c1836) Thanks [@ArmandPhilippot](https://github.com/ArmandPhilippot)! - Fixes a type and an example in documenting the `security.checkOrigin` property of Astro config. + +- [#12168](https://github.com/withastro/astro/pull/12168) [`1cd3085`](https://github.com/withastro/astro/commit/1cd30852a3bdae1847ad4e835e503598ca5fdf5c) Thanks [@ascorbic](https://github.com/ascorbic)! - Allows "slug" as a field in content layer data + +- [#12302](https://github.com/withastro/astro/pull/12302) [`7196c24`](https://github.com/withastro/astro/commit/7196c244ea75d2f2aafbec332d91cb681f0a4cb7) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where the origin check middleware run for prendered pages + +- [#12341](https://github.com/withastro/astro/pull/12341) [`c1786d6`](https://github.com/withastro/astro/commit/c1786d64c4d8b25ed28f5e178531952466158e04) Thanks [@ematipico](https://github.com/ematipico)! - Fixes and issue where `Astro.currentLocale` always returned the default locale when consumed inside a server island. + +- [#11732](https://github.com/withastro/astro/pull/11732) [`4cd6c43`](https://github.com/withastro/astro/commit/4cd6c43e221e40345dfb433f9c63395f886091fd) Thanks [@matthewp](https://github.com/matthewp)! - Use GET requests with preloading for Server Islands + + Server Island requests include the props used to render the island as well as any slots passed in (excluding the fallback slot). Since browsers have a max 4mb URL length we default to using a POST request to avoid overflowing this length. + + However in reality most usage of Server Islands are fairly isolated and won't exceed this limit, so a GET request is possible by passing this same information via search parameters. + + Using GET means we can also include a `<link rel="preload">` tag to speed up the request. + + This change implements this, with safe fallback to POST. + +- [#11952](https://github.com/withastro/astro/pull/11952) [`50a0146`](https://github.com/withastro/astro/commit/50a0146e9aff78a245914125f34719cfb32c585f) Thanks [@ascorbic](https://github.com/ascorbic)! - Adds support for array patterns in the built-in `glob()` content collections loader + + The glob loader can now accept an array of multiple patterns as well as string patterns. This allows you to more easily combine multiple patterns into a single collection, and also means you can use negative matches to exclude files from the collection. + + ```ts + const probes = defineCollection({ + // Load all markdown files in the space-probes directory, except for those that start with "voyager-" + loader: glob({ pattern: ['*.md', '!voyager-*'], base: 'src/data/space-probes' }), + schema: z.object({ + name: z.string(), + type: z.enum(['Space Probe', 'Mars Rover', 'Comet Lander']), + launch_date: z.date(), + status: z.enum(['Active', 'Inactive', 'Decommissioned']), + destination: z.string(), + operator: z.string(), + notable_discoveries: z.array(z.string()), + }), + }); + ``` + +- [#12022](https://github.com/withastro/astro/pull/12022) [`ddc3a08`](https://github.com/withastro/astro/commit/ddc3a08e8facdaf0b0298ee5a7adb73a53e1575e) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Properly handle including trailing slash on the image endpoint route based on the trailingSlash config + +- [#12169](https://github.com/withastro/astro/pull/12169) [`15fa9ba`](https://github.com/withastro/astro/commit/15fa9babf31a9b8ab8fc8e611c931c178137e2f9) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a bug where configured redirects were incorrectly constructed when reading the file system. + + This caused an issue where configuring a redirect in `astro.config.mjs` like `{ /old: /new }`, failed to trigger the correct redirect in the dev server. + +- [#11914](https://github.com/withastro/astro/pull/11914) [`b5d827b`](https://github.com/withastro/astro/commit/b5d827ba6852d046c33643f795e1542bc2818b2c) Thanks [@ascorbic](https://github.com/ascorbic)! - Exports types for all `LoaderContext` properties from `astro/loaders` to make it easier to use them in custom loaders. + The `ScopedDataStore` interface (which was previously internal) is renamed to `DataStore`, to reflect the fact that it's the only public API for the data store. + +- [#12270](https://github.com/withastro/astro/pull/12270) [`25192a0`](https://github.com/withastro/astro/commit/25192a059975f5a31a9c43e5d605541f4e9618bc) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a bug where the params weren't correctly computed when rendering URLs with non-English characters + +- [#11927](https://github.com/withastro/astro/pull/11927) [`5b4e3ab`](https://github.com/withastro/astro/commit/5b4e3abbb152146b71c1af05d33c96211000b2a6) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Updates the `env` configuration reference docs to include a full API reference for `envField`. + +- [#12591](https://github.com/withastro/astro/pull/12591) [`b731b3d`](https://github.com/withastro/astro/commit/b731b3de73262f8ab9544b1228ea9e693e488b6c) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes a bug where a catchall route would match an image endpoint request + +- [#12073](https://github.com/withastro/astro/pull/12073) [`acf264d`](https://github.com/withastro/astro/commit/acf264d8c003718cda5a0b9ce5fb7ac1cd6641b6) Thanks [@bluwy](https://github.com/bluwy)! - Replaces `ora` with `yocto-spinner` + +- [#12339](https://github.com/withastro/astro/pull/12339) [`bdb75a8`](https://github.com/withastro/astro/commit/bdb75a87f24d7f032797483164fb2f82aa691fee) Thanks [@ematipico](https://github.com/ematipico)! - Adds an error when `Astro.rewrite()` is used to rewrite an on-demand route with a static route when using the `"server"` output. + + This is a forbidden rewrite because Astro can't retrieve the emitted static route at runtime. This route is served by the hosting platform, and not Astro itself. + +- [#12511](https://github.com/withastro/astro/pull/12511) [`d023682`](https://github.com/withastro/astro/commit/d023682d6c6d8797f15f3c0f65893a4aa62e3b5b) Thanks [@stramel](https://github.com/stramel)! - Fix SVG Component sprite references + +- [#12486](https://github.com/withastro/astro/pull/12486) [`dc3d842`](https://github.com/withastro/astro/commit/dc3d842e4c6f3b7e59da8a13447a1450013e10dc) Thanks [@matthewp](https://github.com/matthewp)! - Call server island early so it can set headers + +- [#12016](https://github.com/withastro/astro/pull/12016) [`837ee3a`](https://github.com/withastro/astro/commit/837ee3a4aa6b33362bd680d4a7fc786ed8639444) Thanks [@matthewp](https://github.com/matthewp)! - Fixes actions with large amount of validation errors + +- [#11943](https://github.com/withastro/astro/pull/11943) [`fa4671c`](https://github.com/withastro/astro/commit/fa4671ca283266092cf4f52357836d2f57817089) Thanks [@sarah11918](https://github.com/sarah11918)! - Updates error messages that assume content collections are located in `src/content/` with more generic language + +- [#12030](https://github.com/withastro/astro/pull/12030) [`10a756a`](https://github.com/withastro/astro/commit/10a756ad872ab0311524fca5438bff13d4df25c1) Thanks [@ascorbic](https://github.com/ascorbic)! - Resolves image paths in content layer with initial slash as project-relative + + When using the `image()` schema helper, previously paths with an initial slash were treated as public URLs. This was to match the behavior of markdown images. However this is a change from before, where paths with an initial slash were treated as project-relative. This change restores the previous behavior, so that paths with an initial slash are treated as project-relative. + +- [#12009](https://github.com/withastro/astro/pull/12009) [`f10a3b7`](https://github.com/withastro/astro/commit/f10a3b7fe6892bd2f4f98ad602a64cfe6efde061) Thanks [@matthewp](https://github.com/matthewp)! - Fixes use of Vitest with Astro 5 + +- [#12075](https://github.com/withastro/astro/pull/12075) [`a19530e`](https://github.com/withastro/astro/commit/a19530e377b7d7afad58a33b23c0a5df1c376819) Thanks [@bluwy](https://github.com/bluwy)! - Parses frontmatter ourselves + +- [#12552](https://github.com/withastro/astro/pull/12552) [`15f000c`](https://github.com/withastro/astro/commit/15f000c3e7bc5308c39107095e5af4258c2373a5) Thanks [@avanderbergh](https://github.com/avanderbergh)! - Fixed an issue where modifying the `Request.headers` prototype during prerendering caused a build error. Removed conflicting value and writable properties from the `headers` descriptor to prevent `Invalid property descriptor` errors. + +- [#12070](https://github.com/withastro/astro/pull/12070) [`9693ad4`](https://github.com/withastro/astro/commit/9693ad4ffafb02ed1ea02beb3420ba864724b293) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where the check origin middleware was incorrectly injected when the build output was `"static"` + +- [#12169](https://github.com/withastro/astro/pull/12169) [`15fa9ba`](https://github.com/withastro/astro/commit/15fa9babf31a9b8ab8fc8e611c931c178137e2f9) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a bug where the dev server was not providing a consistent user experience for configured redirects. + + With the fix, when you configure a redirect in `astro.config.mjs` like this `{ /old: "/new" }`, the dev server return an HTML response that matches the one emitted by a static build. + +- Updated dependencies [[`3ab3b4e`](https://github.com/withastro/astro/commit/3ab3b4efbcdd2aabea5f949deedf51a5acefae59), [`5608338`](https://github.com/withastro/astro/commit/560833843c6d3ce2b6c6c473ec4ae70e744bf255), [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7), [`560ef15`](https://github.com/withastro/astro/commit/560ef15ad23bd137b56ef1048eb2df548b99fdce), [`83a2a64`](https://github.com/withastro/astro/commit/83a2a648418ad30f4eb781d1c1b5f2d8a8ac846e), [`3ab3b4e`](https://github.com/withastro/astro/commit/3ab3b4efbcdd2aabea5f949deedf51a5acefae59), [`a19530e`](https://github.com/withastro/astro/commit/a19530e377b7d7afad58a33b23c0a5df1c376819), [`1dc8f5e`](https://github.com/withastro/astro/commit/1dc8f5eb7c515c89aadc85cfa0a300d4f65e8671)]: + - @astrojs/markdown-remark@6.0.0 + - @astrojs/telemetry@3.2.0 + - @astrojs/internal-helpers@0.4.2 + ## 5.0.0-beta.12 ### Major Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 8ba692122..f89d3c9b7 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "5.0.0-beta.12", + "version": "5.0.0", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/create-astro/CHANGELOG.md b/packages/create-astro/CHANGELOG.md index 273b8948f..c41a4edb0 100644 --- a/packages/create-astro/CHANGELOG.md +++ b/packages/create-astro/CHANGELOG.md @@ -1,5 +1,18 @@ # create-astro +## 4.11.0 + +### Minor Changes + +- [#12539](https://github.com/withastro/astro/pull/12539) [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7) Thanks [@bluwy](https://github.com/bluwy)! - Drops node 21 support + +- [#12083](https://github.com/withastro/astro/pull/12083) [`9263e96`](https://github.com/withastro/astro/commit/9263e965932b9a6a116801c063c6b7105c39643e) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Reworks the experience of creating a new Astro project using the `create astro` CLI command. + + - Updates the list of templates to include Starlight and combines the "minimal" and "basics" templates into a new, refreshed "Basics" template to serve as the single, minimal Astro project starter. + - Removes the TypeScript question. Astro is TypeScript-only, so this question was often misleading. The "Strict" preset is now the default, but it can still be changed manually in `tsconfig.json`. + - `astro check` is no longer automatically added to the build script. + - Added a new `--add` flag to install additional integrations after creating a project. For example, `pnpm create astro --add react` will create a new Astro project and install the React integration. + ## 4.11.0-beta.1 ### Minor Changes diff --git a/packages/create-astro/package.json b/packages/create-astro/package.json index dd3076c2c..0f3800220 100644 --- a/packages/create-astro/package.json +++ b/packages/create-astro/package.json @@ -1,6 +1,6 @@ { "name": "create-astro", - "version": "4.11.0-beta.1", + "version": "4.11.0", "type": "module", "author": "withastro", "license": "MIT", diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md index e8165782c..7a04ee4eb 100644 --- a/packages/db/CHANGELOG.md +++ b/packages/db/CHANGELOG.md @@ -1,5 +1,22 @@ # @astrojs/db +## 0.14.0 + +### Minor Changes + +- [#12008](https://github.com/withastro/astro/pull/12008) [`5608338`](https://github.com/withastro/astro/commit/560833843c6d3ce2b6c6c473ec4ae70e744bf255) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release. + + Starting from this release, no breaking changes will be introduced unless absolutely necessary. + + To learn how to upgrade, check out the [Astro v5.0 upgrade guide in our beta docs site](https://5-0-0-beta.docs.astro.build/en/guides/upgrade-to/v5/). + +### Patch Changes + +- [#12073](https://github.com/withastro/astro/pull/12073) [`acf264d`](https://github.com/withastro/astro/commit/acf264d8c003718cda5a0b9ce5fb7ac1cd6641b6) Thanks [@bluwy](https://github.com/bluwy)! - Replaces `ora` with `yocto-spinner` + +- Updated dependencies [[`acf264d`](https://github.com/withastro/astro/commit/acf264d8c003718cda5a0b9ce5fb7ac1cd6641b6)]: + - @astrojs/studio@0.1.2 + ## 0.14.0-beta.2 ### Patch Changes diff --git a/packages/db/package.json b/packages/db/package.json index 031f6628d..e4783c163 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/db", - "version": "0.14.0-beta.2", + "version": "0.14.0", "description": "Add libSQL and Astro Studio support to your Astro site", "license": "MIT", "repository": { diff --git a/packages/integrations/markdoc/CHANGELOG.md b/packages/integrations/markdoc/CHANGELOG.md index 33099edb5..77b6fc5f9 100644 --- a/packages/integrations/markdoc/CHANGELOG.md +++ b/packages/integrations/markdoc/CHANGELOG.md @@ -1,5 +1,24 @@ # @astrojs/markdoc +## 0.12.0 + +### Minor Changes + +- [#12539](https://github.com/withastro/astro/pull/12539) [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7) Thanks [@bluwy](https://github.com/bluwy)! - Drops node 21 support + +### Patch Changes + +- [#11825](https://github.com/withastro/astro/pull/11825) [`560ef15`](https://github.com/withastro/astro/commit/560ef15ad23bd137b56ef1048eb2df548b99fdce) Thanks [@bluwy](https://github.com/bluwy)! - Uses latest version of `@astrojs/markdown-remark` with updated Shiki APIs + +- [#12075](https://github.com/withastro/astro/pull/12075) [`a19530e`](https://github.com/withastro/astro/commit/a19530e377b7d7afad58a33b23c0a5df1c376819) Thanks [@bluwy](https://github.com/bluwy)! - Parses frontmatter ourselves + +- [#12584](https://github.com/withastro/astro/pull/12584) [`fa07002`](https://github.com/withastro/astro/commit/fa07002352147d45da193f28fd6e02d2d42dc67a) Thanks [@ascorbic](https://github.com/ascorbic)! - Correctly renders boolean HTML attributes + +- Updated dependencies [[`3ab3b4e`](https://github.com/withastro/astro/commit/3ab3b4efbcdd2aabea5f949deedf51a5acefae59), [`5608338`](https://github.com/withastro/astro/commit/560833843c6d3ce2b6c6c473ec4ae70e744bf255), [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7), [`560ef15`](https://github.com/withastro/astro/commit/560ef15ad23bd137b56ef1048eb2df548b99fdce), [`83a2a64`](https://github.com/withastro/astro/commit/83a2a648418ad30f4eb781d1c1b5f2d8a8ac846e), [`3ab3b4e`](https://github.com/withastro/astro/commit/3ab3b4efbcdd2aabea5f949deedf51a5acefae59), [`a19530e`](https://github.com/withastro/astro/commit/a19530e377b7d7afad58a33b23c0a5df1c376819), [`1dc8f5e`](https://github.com/withastro/astro/commit/1dc8f5eb7c515c89aadc85cfa0a300d4f65e8671)]: + - @astrojs/markdown-remark@6.0.0 + - @astrojs/prism@3.2.0 + - @astrojs/internal-helpers@0.4.2 + ## 0.12.0-beta.1 ### Minor Changes diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index 49359a8da..cd2b4c330 100644 --- a/packages/integrations/markdoc/package.json +++ b/packages/integrations/markdoc/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/markdoc", "description": "Add support for Markdoc in your Astro site", - "version": "0.12.0-beta.1", + "version": "0.12.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/mdx/CHANGELOG.md b/packages/integrations/mdx/CHANGELOG.md index ab7d9f23a..6c7c6b7e7 100644 --- a/packages/integrations/mdx/CHANGELOG.md +++ b/packages/integrations/mdx/CHANGELOG.md @@ -1,5 +1,40 @@ # @astrojs/mdx +## 4.0.0 + +### Major Changes + +- [#12231](https://github.com/withastro/astro/pull/12231) [`90ae100`](https://github.com/withastro/astro/commit/90ae100cf482529828febed591172433309bc12e) Thanks [@bluwy](https://github.com/bluwy)! - Handles the breaking change in Astro where content pages (including `.mdx` pages located within `src/pages/`) no longer respond with `charset=utf-8` in the `Content-Type` header. + + For MDX pages without layouts, `@astrojs/mdx` will automatically add the `<meta charset="utf-8">` tag to the page by default. This reduces the boilerplate needed to write with non-ASCII characters. If your MDX pages have a layout, the layout component should include the `<meta charset="utf-8">` tag. + + If you require `charset=utf-8` to render your page correctly, make sure that your layout components have the `<meta charset="utf-8">` tag added. + +- [#12008](https://github.com/withastro/astro/pull/12008) [`5608338`](https://github.com/withastro/astro/commit/560833843c6d3ce2b6c6c473ec4ae70e744bf255) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release. + + Starting from this release, no breaking changes will be introduced unless absolutely necessary. + + To learn how to upgrade, check out the [Astro v5.0 upgrade guide in our beta docs site](https://5-0-0-beta.docs.astro.build/en/guides/upgrade-to/v5/). + +### Minor Changes + +- [#12539](https://github.com/withastro/astro/pull/12539) [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7) Thanks [@bluwy](https://github.com/bluwy)! - Drops node 21 support + +- [#11741](https://github.com/withastro/astro/pull/11741) [`6617491`](https://github.com/withastro/astro/commit/6617491c3bc2bde87f7867d7dec2580781852cfc) Thanks [@bluwy](https://github.com/bluwy)! - Updates adapter server entrypoint to use `@astrojs/mdx/server.js` + + This is an internal change. Handling JSX in your `.mdx` files has been moved from Astro internals and is now the responsibility of this integration. You should not notice a change in your project, and no update to your code is required. + +### Patch Changes + +- [#12075](https://github.com/withastro/astro/pull/12075) [`a19530e`](https://github.com/withastro/astro/commit/a19530e377b7d7afad58a33b23c0a5df1c376819) Thanks [@bluwy](https://github.com/bluwy)! - Parses frontmatter ourselves + +- [#11861](https://github.com/withastro/astro/pull/11861) [`3ab3b4e`](https://github.com/withastro/astro/commit/3ab3b4efbcdd2aabea5f949deedf51a5acefae59) Thanks [@bluwy](https://github.com/bluwy)! - Updates `@astrojs/markdown-remark` and handle its breaking changes + +- [#12533](https://github.com/withastro/astro/pull/12533) [`1b61fdf`](https://github.com/withastro/astro/commit/1b61fdf038d2627c6dad1a7f1426f60a4616ad93) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a case where the MDX renderer couldn't be loaded when used as a direct dependency of an Astro integration. + +- Updated dependencies [[`3ab3b4e`](https://github.com/withastro/astro/commit/3ab3b4efbcdd2aabea5f949deedf51a5acefae59), [`5608338`](https://github.com/withastro/astro/commit/560833843c6d3ce2b6c6c473ec4ae70e744bf255), [`560ef15`](https://github.com/withastro/astro/commit/560ef15ad23bd137b56ef1048eb2df548b99fdce), [`83a2a64`](https://github.com/withastro/astro/commit/83a2a648418ad30f4eb781d1c1b5f2d8a8ac846e), [`3ab3b4e`](https://github.com/withastro/astro/commit/3ab3b4efbcdd2aabea5f949deedf51a5acefae59), [`a19530e`](https://github.com/withastro/astro/commit/a19530e377b7d7afad58a33b23c0a5df1c376819)]: + - @astrojs/markdown-remark@6.0.0 + ## 4.0.0-beta.5 ### Minor Changes diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index e1e8ed679..5dcbbcca8 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/mdx", "description": "Add support for MDX pages in your Astro site", - "version": "4.0.0-beta.5", + "version": "4.0.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/node/CHANGELOG.md b/packages/integrations/node/CHANGELOG.md new file mode 100644 index 000000000..8aa72afef --- /dev/null +++ b/packages/integrations/node/CHANGELOG.md @@ -0,0 +1,24 @@ +# @astrojs/node + +## 1.0.0 + +### Major Changes + +- [#11679](https://github.com/withastro/astro/pull/11679) [`ea71b90`](https://github.com/withastro/astro/commit/ea71b90c9c08ddd1d3397c78e2e273fb799f7dbd) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Adds stable support for `astro:env` + +- [#11770](https://github.com/withastro/astro/pull/11770) [`cfa6a47`](https://github.com/withastro/astro/commit/cfa6a47ac7a541f99fdad46a68d0cca6e5816cd5) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Removed support for the Squoosh image service. As the underlying library `libsquoosh` is no longer maintained, and the image service sees very little usage we have decided to remove it from Astro. + + Our recommendation is to use the base Sharp image service, which is more powerful, faster, and more actively maintained. + + ```diff + - import { squooshImageService } from "astro/config"; + import { defineConfig } from "astro/config"; + + export default defineConfig({ + - image: { + - service: squooshImageService() + - } + }); + ``` + + If you are using this service, and cannot migrate to the base Sharp image service, a third-party extraction of the previous service is available here: https://github.com/Princesseuh/astro-image-service-squoosh diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index 134ba5d86..df99228ed 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/node", - "version": "0.0.0", + "version": "1.0.0", "private": true, "type": "module", "keywords": [], diff --git a/packages/integrations/preact/CHANGELOG.md b/packages/integrations/preact/CHANGELOG.md index df9e5e562..e6895b1a7 100644 --- a/packages/integrations/preact/CHANGELOG.md +++ b/packages/integrations/preact/CHANGELOG.md @@ -1,5 +1,15 @@ # @astrojs/preact +## 4.0.0 + +### Major Changes + +- [#12524](https://github.com/withastro/astro/pull/12524) [`9f44019`](https://github.com/withastro/astro/commit/9f440196dc39f36fce0198bf4c97131160e5bcc1) Thanks [@bluwy](https://github.com/bluwy)! - Updates Vite dependency to v6 to match Astro v5 + +### Minor Changes + +- [#12539](https://github.com/withastro/astro/pull/12539) [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7) Thanks [@bluwy](https://github.com/bluwy)! - Drops node 21 support + ## 4.0.0-beta.1 ### Major Changes diff --git a/packages/integrations/preact/package.json b/packages/integrations/preact/package.json index fbe08a628..e90779e9b 100644 --- a/packages/integrations/preact/package.json +++ b/packages/integrations/preact/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/preact", "description": "Use Preact components within Astro", - "version": "4.0.0-beta.1", + "version": "4.0.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/react/CHANGELOG.md b/packages/integrations/react/CHANGELOG.md index 82857652a..ad8fdd730 100644 --- a/packages/integrations/react/CHANGELOG.md +++ b/packages/integrations/react/CHANGELOG.md @@ -1,5 +1,17 @@ # @astrojs/react +## 4.0.0 + +### Major Changes + +- [#12524](https://github.com/withastro/astro/pull/12524) [`9f44019`](https://github.com/withastro/astro/commit/9f440196dc39f36fce0198bf4c97131160e5bcc1) Thanks [@bluwy](https://github.com/bluwy)! - Updates Vite dependency to v6 to match Astro v5 + +### Minor Changes + +- [#12539](https://github.com/withastro/astro/pull/12539) [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7) Thanks [@bluwy](https://github.com/bluwy)! - Drops node 21 support + +- [#12510](https://github.com/withastro/astro/pull/12510) [`14feaf3`](https://github.com/withastro/astro/commit/14feaf30e1a4266b8422865722a4478d39202404) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Changes the generated URL query param from `_astroAction` to `_action` when submitting a form using Actions. This avoids leaking the framework name into the URL bar, which may be considered a security issue. + ## 4.0.0-beta.2 ### Major Changes diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index 52e02780e..b7302a804 100644 --- a/packages/integrations/react/package.json +++ b/packages/integrations/react/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/react", "description": "Use React components within Astro", - "version": "4.0.0-beta.2", + "version": "4.0.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/sitemap/package.json b/packages/integrations/sitemap/package.json index ec4c02b82..9f0c5afb6 100644 --- a/packages/integrations/sitemap/package.json +++ b/packages/integrations/sitemap/package.json @@ -38,7 +38,7 @@ "zod": "^3.23.8" }, "devDependencies": { - "@astrojs/node": "^8.3.3", + "@astrojs/node": "^1.0.0", "astro": "workspace:*", "astro-scripts": "workspace:*", "xml2js": "0.6.2" diff --git a/packages/integrations/solid/CHANGELOG.md b/packages/integrations/solid/CHANGELOG.md index edbc1f650..6172a8ed9 100644 --- a/packages/integrations/solid/CHANGELOG.md +++ b/packages/integrations/solid/CHANGELOG.md @@ -1,5 +1,19 @@ # @astrojs/solid-js +## 5.0.0 + +### Major Changes + +- [#12524](https://github.com/withastro/astro/pull/12524) [`9f44019`](https://github.com/withastro/astro/commit/9f440196dc39f36fce0198bf4c97131160e5bcc1) Thanks [@bluwy](https://github.com/bluwy)! - Updates Vite dependency to v6 to match Astro v5 + +### Minor Changes + +- [#12539](https://github.com/withastro/astro/pull/12539) [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7) Thanks [@bluwy](https://github.com/bluwy)! - Drops node 21 support + +### Patch Changes + +- [#12524](https://github.com/withastro/astro/pull/12524) [`9f44019`](https://github.com/withastro/astro/commit/9f440196dc39f36fce0198bf4c97131160e5bcc1) Thanks [@bluwy](https://github.com/bluwy)! - Updates vite-plugin-solid to handle Vite 6 + ## 5.0.0-beta.1 ### Major Changes diff --git a/packages/integrations/solid/package.json b/packages/integrations/solid/package.json index fed068a94..987bc37d7 100644 --- a/packages/integrations/solid/package.json +++ b/packages/integrations/solid/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/solid-js", - "version": "5.0.0-beta.1", + "version": "5.0.0", "description": "Use Solid components within Astro", "type": "module", "types": "./dist/index.d.ts", diff --git a/packages/integrations/svelte/CHANGELOG.md b/packages/integrations/svelte/CHANGELOG.md index 1cd98c9d1..2ef23d18a 100644 --- a/packages/integrations/svelte/CHANGELOG.md +++ b/packages/integrations/svelte/CHANGELOG.md @@ -1,5 +1,25 @@ # @astrojs/svelte +## 7.0.0 + +### Major Changes + +- [#12060](https://github.com/withastro/astro/pull/12060) [`cb5d3ae`](https://github.com/withastro/astro/commit/cb5d3ae6ee6af646c9d7d46a9d8f551edac3092e) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Updates peer dependency range to support Astro 5 + +- [#12524](https://github.com/withastro/astro/pull/12524) [`9f44019`](https://github.com/withastro/astro/commit/9f440196dc39f36fce0198bf4c97131160e5bcc1) Thanks [@bluwy](https://github.com/bluwy)! - Updates `@sveltejs/vite-plugin-svelte` to v5 to handle Vite 6 + +- [#12524](https://github.com/withastro/astro/pull/12524) [`9f44019`](https://github.com/withastro/astro/commit/9f440196dc39f36fce0198bf4c97131160e5bcc1) Thanks [@bluwy](https://github.com/bluwy)! - Updates Vite dependency to v6 to match Astro v5 + +### Minor Changes + +- [#12539](https://github.com/withastro/astro/pull/12539) [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7) Thanks [@bluwy](https://github.com/bluwy)! - Drops node 21 support + +### Patch Changes + +- [#12102](https://github.com/withastro/astro/pull/12102) [`dcc1e89`](https://github.com/withastro/astro/commit/dcc1e895abbad1311719803363c933541c0ad984) Thanks [@hermit99](https://github.com/hermit99)! - Fixes an Reference Error that occurred during client transitions + +- [#12551](https://github.com/withastro/astro/pull/12551) [`b21a075`](https://github.com/withastro/astro/commit/b21a07500284a3621be4d509f5aa67c0a8fcbf07) Thanks [@ematipico](https://github.com/ematipico)! - New release to include changes from 5.7.3 + ## 7.0.0-beta.1 ### Major Changes diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index 50000913e..ead2e167c 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/svelte", - "version": "7.0.0-beta.1", + "version": "7.0.0", "description": "Use Svelte components within Astro", "type": "module", "types": "./dist/index.d.ts", diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md new file mode 100644 index 000000000..7f70d3d55 --- /dev/null +++ b/packages/integrations/vercel/CHANGELOG.md @@ -0,0 +1,34 @@ +# @astrojs/vercel + +## 1.0.0 + +### Major Changes + +- [#11679](https://github.com/withastro/astro/pull/11679) [`ea71b90`](https://github.com/withastro/astro/commit/ea71b90c9c08ddd1d3397c78e2e273fb799f7dbd) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Adds stable support for `astro:env` + +- [#11770](https://github.com/withastro/astro/pull/11770) [`cfa6a47`](https://github.com/withastro/astro/commit/cfa6a47ac7a541f99fdad46a68d0cca6e5816cd5) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Removed support for the Squoosh image service. As the underlying library `libsquoosh` is no longer maintained, and the image service sees very little usage we have decided to remove it from Astro. + + Our recommendation is to use the base Sharp image service, which is more powerful, faster, and more actively maintained. + + ```diff + - import { squooshImageService } from "astro/config"; + import { defineConfig } from "astro/config"; + + export default defineConfig({ + - image: { + - service: squooshImageService() + - } + }); + ``` + + If you are using this service, and cannot migrate to the base Sharp image service, a third-party extraction of the previous service is available here: https://github.com/Princesseuh/astro-image-service-squoosh + +- [#11714](https://github.com/withastro/astro/pull/11714) [`8a53517`](https://github.com/withastro/astro/commit/8a5351737d6a14fc55f1dafad8f3b04079e81af6) Thanks [@matthewp](https://github.com/matthewp)! - Remove support for functionPerRoute + + This change removes support for the `functionPerRoute` option both in Astro and `@astrojs/vercel`. + + This option made it so that each route got built as separate entrypoints so that they could be loaded as separate functions. The hope was that by doing this it would decrease the size of each function. However in practice routes use most of the same code, and increases in function size limitations made the potential upsides less important. + + Additionally there are downsides to functionPerRoute, such as hitting limits on the number of functions per project. The feature also never worked with some Astro features like i18n domains and request rewriting. + + Given this, the feature has been removed from Astro. diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 57beba344..af0e3c02c 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/vercel", - "version": "0.0.0", + "version": "1.0.0", "private": true, "type": "module", "keywords": [], diff --git a/packages/integrations/vue/CHANGELOG.md b/packages/integrations/vue/CHANGELOG.md index 08d1b8e08..6c821e0a3 100644 --- a/packages/integrations/vue/CHANGELOG.md +++ b/packages/integrations/vue/CHANGELOG.md @@ -1,5 +1,21 @@ # @astrojs/vue +## 5.0.0 + +### Major Changes + +- [#12060](https://github.com/withastro/astro/pull/12060) [`cb5d3ae`](https://github.com/withastro/astro/commit/cb5d3ae6ee6af646c9d7d46a9d8f551edac3092e) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Updates peer dependency range to support Astro 5 + +- [#12524](https://github.com/withastro/astro/pull/12524) [`9f44019`](https://github.com/withastro/astro/commit/9f440196dc39f36fce0198bf4c97131160e5bcc1) Thanks [@bluwy](https://github.com/bluwy)! - Updates Vite dependency to v6 to match Astro v5 + +### Minor Changes + +- [#12539](https://github.com/withastro/astro/pull/12539) [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7) Thanks [@bluwy](https://github.com/bluwy)! - Drops node 21 support + +### Patch Changes + +- [#12551](https://github.com/withastro/astro/pull/12551) [`81b0bf5`](https://github.com/withastro/astro/commit/81b0bf5734735a0633bfc1089151e174ba9fbc83) Thanks [@ematipico](https://github.com/ematipico)! - New release to include changes from 4.5.2 + ## 5.0.0-beta.3 ### Major Changes diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index 2a286cbcf..314c94316 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/vue", - "version": "5.0.0-beta.3", + "version": "5.0.0", "description": "Use Vue components within Astro", "type": "module", "types": "./dist/index.d.ts", diff --git a/packages/integrations/web-vitals/CHANGELOG.md b/packages/integrations/web-vitals/CHANGELOG.md index dede426c6..a2e3a6a92 100644 --- a/packages/integrations/web-vitals/CHANGELOG.md +++ b/packages/integrations/web-vitals/CHANGELOG.md @@ -1,5 +1,15 @@ # @astrojs/web-vitals +## 3.0.0 + +### Major Changes + +- [#12008](https://github.com/withastro/astro/pull/12008) [`5608338`](https://github.com/withastro/astro/commit/560833843c6d3ce2b6c6c473ec4ae70e744bf255) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release. + + Starting from this release, no breaking changes will be introduced unless absolutely necessary. + + To learn how to upgrade, check out the [Astro v5.0 upgrade guide in our beta docs site](https://5-0-0-beta.docs.astro.build/en/guides/upgrade-to/v5/). + ## 3.0.0-beta.1 ### Major Changes diff --git a/packages/integrations/web-vitals/package.json b/packages/integrations/web-vitals/package.json index d06582b15..4e18f7a41 100644 --- a/packages/integrations/web-vitals/package.json +++ b/packages/integrations/web-vitals/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/web-vitals", "description": "Track your website’s performance with Astro DB", - "version": "3.0.0-beta.1", + "version": "3.0.0", "type": "module", "author": "withastro", "license": "MIT", diff --git a/packages/internal-helpers/CHANGELOG.md b/packages/internal-helpers/CHANGELOG.md index 5b4b064dd..0d0824882 100644 --- a/packages/internal-helpers/CHANGELOG.md +++ b/packages/internal-helpers/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/internal-helpers +## 0.4.2 + +### Patch Changes + +- [#12559](https://github.com/withastro/astro/pull/12559) [`1dc8f5e`](https://github.com/withastro/astro/commit/1dc8f5eb7c515c89aadc85cfa0a300d4f65e8671) Thanks [@delucis](https://github.com/delucis)! - Fixes usage of `fileURLToPath()` to anticipate the changed signature of this method in Node 22.1.0 + ## 0.4.1 ### Patch Changes diff --git a/packages/internal-helpers/package.json b/packages/internal-helpers/package.json index 9f5ebfbb0..292061403 100644 --- a/packages/internal-helpers/package.json +++ b/packages/internal-helpers/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/internal-helpers", "description": "Internal helpers used by core Astro packages.", - "version": "0.4.1", + "version": "0.4.2", "type": "module", "author": "withastro", "license": "MIT", diff --git a/packages/markdown/remark/CHANGELOG.md b/packages/markdown/remark/CHANGELOG.md index 41113119a..683600f29 100644 --- a/packages/markdown/remark/CHANGELOG.md +++ b/packages/markdown/remark/CHANGELOG.md @@ -1,5 +1,42 @@ # @astrojs/markdown-remark +## 6.0.0 + +### Major Changes + +- [#11861](https://github.com/withastro/astro/pull/11861) [`3ab3b4e`](https://github.com/withastro/astro/commit/3ab3b4efbcdd2aabea5f949deedf51a5acefae59) Thanks [@bluwy](https://github.com/bluwy)! - Cleans up Astro-specfic metadata attached to `vfile.data` in Remark and Rehype plugins. Previously, the metadata was attached in different locations with inconsistent names. The metadata is now renamed as below: + + - `vfile.data.__astroHeadings` -> `vfile.data.astro.headings` + - `vfile.data.imagePaths` -> `vfile.data.astro.imagePaths` + + The types of `imagePaths` has also been updated from `Set<string>` to `string[]`. The `vfile.data.astro.frontmatter` metadata is left unchanged. + + While we don't consider these APIs public, they can be accessed by Remark and Rehype plugins that want to re-use Astro's metadata. If you are using these APIs, make sure to access them in the new locations. + +- [#12008](https://github.com/withastro/astro/pull/12008) [`5608338`](https://github.com/withastro/astro/commit/560833843c6d3ce2b6c6c473ec4ae70e744bf255) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release. + + Starting from this release, no breaking changes will be introduced unless absolutely necessary. + + To learn how to upgrade, check out the [Astro v5.0 upgrade guide in our beta docs site](https://5-0-0-beta.docs.astro.build/en/guides/upgrade-to/v5/). + +- [#11825](https://github.com/withastro/astro/pull/11825) [`560ef15`](https://github.com/withastro/astro/commit/560ef15ad23bd137b56ef1048eb2df548b99fdce) Thanks [@bluwy](https://github.com/bluwy)! - Updates return object of `createShikiHighlighter` as `codeToHast` and `codeToHtml` to allow generating either the hast or html string directly + +- [#11661](https://github.com/withastro/astro/pull/11661) [`83a2a64`](https://github.com/withastro/astro/commit/83a2a648418ad30f4eb781d1c1b5f2d8a8ac846e) Thanks [@bluwy](https://github.com/bluwy)! - Renames the following CSS variables theme color token names to better align with the Shiki v1 defaults: + + - `--astro-code-color-text` => `--astro-code-foreground` + - `--astro-code-color-background` => `--astro-code-background` + + You can perform a global find and replace in your project to migrate to the new token names. + +- [#11861](https://github.com/withastro/astro/pull/11861) [`3ab3b4e`](https://github.com/withastro/astro/commit/3ab3b4efbcdd2aabea5f949deedf51a5acefae59) Thanks [@bluwy](https://github.com/bluwy)! - Removes `InvalidAstroDataError`, `safelyGetAstroData`, and `setVfileFrontmatter` APIs in favour of `isFrontmatterValid` + +### Patch Changes + +- [#12075](https://github.com/withastro/astro/pull/12075) [`a19530e`](https://github.com/withastro/astro/commit/a19530e377b7d7afad58a33b23c0a5df1c376819) Thanks [@bluwy](https://github.com/bluwy)! - Parses frontmatter ourselves + +- Updated dependencies [[`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7)]: + - @astrojs/prism@3.2.0 + ## 6.0.0-beta.3 ### Patch Changes diff --git a/packages/markdown/remark/package.json b/packages/markdown/remark/package.json index 25bee2b4d..a9c7f03be 100644 --- a/packages/markdown/remark/package.json +++ b/packages/markdown/remark/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/markdown-remark", - "version": "6.0.0-beta.3", + "version": "6.0.0", "type": "module", "author": "withastro", "license": "MIT", diff --git a/packages/studio/CHANGELOG.md b/packages/studio/CHANGELOG.md index cbb514628..6947b1d03 100644 --- a/packages/studio/CHANGELOG.md +++ b/packages/studio/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/studio +## 0.1.2 + +### Patch Changes + +- [#12073](https://github.com/withastro/astro/pull/12073) [`acf264d`](https://github.com/withastro/astro/commit/acf264d8c003718cda5a0b9ce5fb7ac1cd6641b6) Thanks [@bluwy](https://github.com/bluwy)! - Replaces `ora` with `yocto-spinner` + ## 0.1.2-beta.0 ### Patch Changes diff --git a/packages/studio/package.json b/packages/studio/package.json index 51ac46c97..445788665 100644 --- a/packages/studio/package.json +++ b/packages/studio/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/studio", - "version": "0.1.2-beta.0", + "version": "0.1.2", "description": "Internal package powering integrations between Astro projects and Astro Studio", "license": "MIT", "repository": { diff --git a/packages/telemetry/CHANGELOG.md b/packages/telemetry/CHANGELOG.md index 9752882bc..cfd638ab4 100644 --- a/packages/telemetry/CHANGELOG.md +++ b/packages/telemetry/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/telemetry +## 3.2.0 + +### Minor Changes + +- [#12539](https://github.com/withastro/astro/pull/12539) [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7) Thanks [@bluwy](https://github.com/bluwy)! - Drops node 21 support + ## 3.2.0-beta.0 ### Minor Changes diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index 084aa509f..5c49696f9 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/telemetry", - "version": "3.2.0-beta.0", + "version": "3.2.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/underscore-redirects/CHANGELOG.md b/packages/underscore-redirects/CHANGELOG.md index e857dc417..95bb95f44 100644 --- a/packages/underscore-redirects/CHANGELOG.md +++ b/packages/underscore-redirects/CHANGELOG.md @@ -1,5 +1,17 @@ # @astrojs/underscore-redirects +## 0.4.0 + +### Minor Changes + +- [#12008](https://github.com/withastro/astro/pull/12008) [`5608338`](https://github.com/withastro/astro/commit/560833843c6d3ce2b6c6c473ec4ae70e744bf255) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release. + + Starting from this release, no breaking changes will be introduced unless absolutely necessary. + + To learn how to upgrade, check out the [Astro v5.0 upgrade guide in our beta docs site](https://5-0-0-beta.docs.astro.build/en/guides/upgrade-to/v5/). + +- [#11989](https://github.com/withastro/astro/pull/11989) [`3e70853`](https://github.com/withastro/astro/commit/3e70853b767b124bf867072b1c67474dd0b51c3f) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Updates the type from `RouteData` to `IntegrationRouteData` + ## 0.4.0-beta.1 ### Minor Changes diff --git a/packages/underscore-redirects/package.json b/packages/underscore-redirects/package.json index 8e0d3941a..c2a1c6b0b 100644 --- a/packages/underscore-redirects/package.json +++ b/packages/underscore-redirects/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/underscore-redirects", "description": "Utilities to generate _redirects files in Astro projects", - "version": "0.4.0-beta.1", + "version": "0.4.0", "type": "module", "author": "withastro", "license": "MIT", diff --git a/packages/upgrade/CHANGELOG.md b/packages/upgrade/CHANGELOG.md index 251294b6f..56cfc202c 100644 --- a/packages/upgrade/CHANGELOG.md +++ b/packages/upgrade/CHANGELOG.md @@ -1,5 +1,15 @@ # @astrojs/upgrade +## 0.4.0 + +### Minor Changes + +- [#12539](https://github.com/withastro/astro/pull/12539) [`827093e`](https://github.com/withastro/astro/commit/827093e6175549771f9d93ddf3f2be4c2c60f0b7) Thanks [@bluwy](https://github.com/bluwy)! - Drops node 21 support + +### Patch Changes + +- [#12577](https://github.com/withastro/astro/pull/12577) [`b139390`](https://github.com/withastro/astro/commit/b139390deb738f96759cb787fe9e784be71f2134) Thanks [@apatel369](https://github.com/apatel369)! - Fixes an issue where `@astrojs/upgrade` announces integration updates for already up to date packages + ## 0.4.0-beta.0 ### Minor Changes diff --git a/packages/upgrade/package.json b/packages/upgrade/package.json index 6fdd3f1f5..4496d2b53 100644 --- a/packages/upgrade/package.json +++ b/packages/upgrade/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/upgrade", - "version": "0.4.0-beta.0", + "version": "0.4.0", "type": "module", "author": "withastro", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fd3dd8190..7d0c5c661 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -142,13 +142,13 @@ importers: examples/basics: dependencies: astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro examples/blog: dependencies: '@astrojs/mdx': - specifier: ^4.0.0-beta.5 + specifier: ^4.0.0 version: link:../../packages/integrations/mdx '@astrojs/rss': specifier: ^4.0.9 @@ -157,22 +157,22 @@ importers: specifier: ^3.2.1 version: link:../../packages/integrations/sitemap astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro examples/container-with-vitest: dependencies: '@astrojs/react': - specifier: ^4.0.0-beta.2 + specifier: ^4.0.0 version: link:../../packages/integrations/react astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro react: specifier: ^18.3.1 @@ -203,25 +203,25 @@ importers: specifier: ^3.14.3 version: 3.14.3 astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro examples/framework-multiple: dependencies: '@astrojs/preact': - specifier: ^4.0.0-beta.1 + specifier: ^4.0.0 version: link:../../packages/integrations/preact '@astrojs/react': - specifier: ^4.0.0-beta.2 + specifier: ^4.0.0 version: link:../../packages/integrations/react '@astrojs/solid-js': - specifier: ^5.0.0-beta.1 + specifier: ^5.0.0 version: link:../../packages/integrations/solid '@astrojs/svelte': - specifier: ^7.0.0-beta.1 + specifier: ^7.0.0 version: link:../../packages/integrations/svelte '@astrojs/vue': - specifier: ^5.0.0-beta.3 + specifier: ^5.0.0 version: link:../../packages/integrations/vue '@types/react': specifier: ^18.3.12 @@ -230,7 +230,7 @@ importers: specifier: ^18.3.1 version: 18.3.1 astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro preact: specifier: ^10.24.3 @@ -254,13 +254,13 @@ importers: examples/framework-preact: dependencies: '@astrojs/preact': - specifier: ^4.0.0-beta.1 + specifier: ^4.0.0 version: link:../../packages/integrations/preact '@preact/signals': specifier: ^1.3.0 version: 1.3.0(preact@10.24.3) astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro preact: specifier: ^10.24.3 @@ -269,7 +269,7 @@ importers: examples/framework-react: dependencies: '@astrojs/react': - specifier: ^4.0.0-beta.2 + specifier: ^4.0.0 version: link:../../packages/integrations/react '@types/react': specifier: ^18.3.12 @@ -278,7 +278,7 @@ importers: specifier: ^18.3.1 version: 18.3.1 astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro react: specifier: ^18.3.1 @@ -290,10 +290,10 @@ importers: examples/framework-solid: dependencies: '@astrojs/solid-js': - specifier: ^5.0.0-beta.1 + specifier: ^5.0.0 version: link:../../packages/integrations/solid astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro solid-js: specifier: ^1.9.3 @@ -302,10 +302,10 @@ importers: examples/framework-svelte: dependencies: '@astrojs/svelte': - specifier: ^7.0.0-beta.1 + specifier: ^7.0.0 version: link:../../packages/integrations/svelte astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro svelte: specifier: ^5.1.16 @@ -314,10 +314,10 @@ importers: examples/framework-vue: dependencies: '@astrojs/vue': - specifier: ^5.0.0-beta.3 + specifier: ^5.0.0 version: link:../../packages/integrations/vue astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro vue: specifier: ^3.5.12 @@ -329,25 +329,25 @@ importers: specifier: ^9.0.0-alpha.1 version: 9.0.0-alpha.1(astro@packages+astro) astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro examples/minimal: dependencies: astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro examples/ssr: @@ -356,10 +356,10 @@ importers: specifier: ^9.0.0-alpha.1 version: 9.0.0-alpha.1(astro@packages+astro) '@astrojs/svelte': - specifier: ^7.0.0-beta.1 + specifier: ^7.0.0 version: link:../../packages/integrations/svelte astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro svelte: specifier: ^5.1.16 @@ -368,7 +368,7 @@ importers: examples/starlog: dependencies: astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro sass: specifier: ^1.80.6 @@ -380,28 +380,28 @@ importers: examples/toolbar-app: devDependencies: astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro examples/with-markdoc: dependencies: '@astrojs/markdoc': - specifier: ^0.12.0-beta.1 + specifier: ^0.12.0 version: link:../../packages/integrations/markdoc astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro examples/with-mdx: dependencies: '@astrojs/mdx': - specifier: ^4.0.0-beta.5 + specifier: ^4.0.0 version: link:../../packages/integrations/mdx '@astrojs/preact': - specifier: ^4.0.0-beta.1 + specifier: ^4.0.0 version: link:../../packages/integrations/preact astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro preact: specifier: ^10.24.3 @@ -410,13 +410,13 @@ importers: examples/with-nanostores: dependencies: '@astrojs/preact': - specifier: ^4.0.0-beta.1 + specifier: ^4.0.0 version: link:../../packages/integrations/preact '@nanostores/preact': specifier: ^0.5.2 version: 0.5.2(nanostores@0.11.3)(preact@10.24.3) astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro nanostores: specifier: ^0.11.3 @@ -428,7 +428,7 @@ importers: examples/with-tailwindcss: dependencies: '@astrojs/mdx': - specifier: ^4.0.0-beta.5 + specifier: ^4.0.0 version: link:../../packages/integrations/mdx '@astrojs/tailwind': specifier: ^5.1.2 @@ -437,7 +437,7 @@ importers: specifier: ^1.6.4 version: 1.6.4 astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro autoprefixer: specifier: ^10.4.20 @@ -455,7 +455,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^5.0.0-beta.12 + specifier: ^5.0.0 version: link:../../packages/astro vitest: specifier: ^2.1.6 @@ -5057,8 +5057,8 @@ importers: version: 3.23.8 devDependencies: '@astrojs/node': - specifier: ^8.3.3 - version: 8.3.4(astro@packages+astro) + specifier: ^1.0.0 + version: link:../node astro: specifier: workspace:* version: link:../../astro |