From 15f000c3e7bc5308c39107095e5af4258c2373a5 Mon Sep 17 00:00:00 2001 From: Adriaan van der Bergh Date: Mon, 2 Dec 2024 15:35:11 +0100 Subject: [PATCH 01/17] fix: remove value and writable properties from headers descriptor (#12552) --- .changeset/tame-hats-fold.md | 5 +++++ packages/astro/src/core/request.ts | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .changeset/tame-hats-fold.md diff --git a/.changeset/tame-hats-fold.md b/.changeset/tame-hats-fold.md new file mode 100644 index 000000000000..e369aa8d4ca5 --- /dev/null +++ b/.changeset/tame-hats-fold.md @@ -0,0 +1,5 @@ +--- +'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/packages/astro/src/core/request.ts b/packages/astro/src/core/request.ts index 3ace80ba8fc9..624bee879850 100644 --- a/packages/astro/src/core/request.ts +++ b/packages/astro/src/core/request.ts @@ -70,9 +70,13 @@ export function createRequest({ }); if (isPrerendered) { - // Warn when accessing headers in prerendered pages - const _headers = request.headers; - const headersDesc = Object.getOwnPropertyDescriptor(request, 'headers') || {}; + // Warn when accessing headers in SSG mode + let _headers = request.headers; + + // We need to remove descriptor's value and writable properties because we're adding getters and setters. + const { value, writable, ...headersDesc } = + Object.getOwnPropertyDescriptor(request, 'headers') || {}; + Object.defineProperty(request, 'headers', { ...headersDesc, get() { @@ -82,6 +86,9 @@ export function createRequest({ ); return _headers; }, + set(newHeaders: Headers) { + _headers = newHeaders; + }, }); } else if (clientAddress) { // clientAddress is stored to be read by RenderContext, only if the request is for a page that will be on-demand rendered From fa07002352147d45da193f28fd6e02d2d42dc67a Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Mon, 2 Dec 2024 14:37:00 +0000 Subject: [PATCH 02/17] fix(markdoc): correctly render boolean HTML attributes (#12584) --- .changeset/twenty-lobsters-think.md | 5 +++ .../markdoc/src/html/tagdefs/html.tag.ts | 39 +++++++++++++++++++ .../render-html/src/content/blog/simple.mdoc | 4 ++ .../markdoc/test/render-html.test.js | 5 +++ 4 files changed, 53 insertions(+) create mode 100644 .changeset/twenty-lobsters-think.md diff --git a/.changeset/twenty-lobsters-think.md b/.changeset/twenty-lobsters-think.md new file mode 100644 index 000000000000..de52155c19eb --- /dev/null +++ b/.changeset/twenty-lobsters-think.md @@ -0,0 +1,5 @@ +--- +'@astrojs/markdoc': patch +--- + +Correctly renders boolean HTML attributes diff --git a/packages/integrations/markdoc/src/html/tagdefs/html.tag.ts b/packages/integrations/markdoc/src/html/tagdefs/html.tag.ts index 92d086d1aad7..0c094227dfd9 100644 --- a/packages/integrations/markdoc/src/html/tagdefs/html.tag.ts +++ b/packages/integrations/markdoc/src/html/tagdefs/html.tag.ts @@ -1,6 +1,37 @@ import type { Config, Schema } from '@markdoc/markdoc'; import Markdoc from '@markdoc/markdoc'; +const booleanAttributes = new Set([ + 'allowfullscreen', + 'async', + 'autofocus', + 'autoplay', + 'checked', + 'controls', + 'default', + 'defer', + 'disabled', + 'disablepictureinpicture', + 'disableremoteplayback', + 'download', + 'formnovalidate', + 'hidden', + 'inert', + 'ismap', + 'itemscope', + 'loop', + 'multiple', + 'muted', + 'nomodule', + 'novalidate', + 'open', + 'playsinline', + 'readonly', + 'required', + 'reversed', + 'selected', +]); + // local import { parseInlineCSSToReactLikeObject } from '../css/parse-inline-css-to-react.js'; @@ -18,6 +49,14 @@ export const htmlTag: Schema = { // pull out any "unsafe" attributes which need additional processing const { style, ...safeAttributes } = unsafeAttributes as Record; + // Convert boolean attributes to boolean literals + for (const [key, value] of Object.entries(safeAttributes)) { + if (booleanAttributes.has(key)) { + // If the attribute exists, ensure its value is a boolean + safeAttributes[key] = value === '' || value === true || value === 'true'; + } + } + // if the inline "style" attribute is present we need to parse the HTML into a react-like React.CSSProperties object if (typeof style === 'string') { const styleObject = parseInlineCSSToReactLikeObject(style); diff --git a/packages/integrations/markdoc/test/fixtures/render-html/src/content/blog/simple.mdoc b/packages/integrations/markdoc/test/fixtures/render-html/src/content/blog/simple.mdoc index eaea6646a873..30b9b7f8fb51 100644 --- a/packages/integrations/markdoc/test/fixtures/render-html/src/content/blog/simple.mdoc +++ b/packages/integrations/markdoc/test/fixtures/render-html/src/content/blog/simple.mdoc @@ -9,3 +9,7 @@ This is a simple Markdoc postThis is a paragraph!

This is a span inside a paragraph!

+ + \ No newline at end of file diff --git a/packages/integrations/markdoc/test/render-html.test.js b/packages/integrations/markdoc/test/render-html.test.js index 6f877d1e50b9..5bf7fe5cef8c 100644 --- a/packages/integrations/markdoc/test/render-html.test.js +++ b/packages/integrations/markdoc/test/render-html.test.js @@ -123,6 +123,11 @@ function renderSimpleChecks(html) { const p3 = document.querySelector('article > p:nth-of-type(3)'); assert.equal(p3.children.length, 1); assert.equal(p3.textContent, 'This is a span inside a paragraph!'); + + const video = document.querySelector('video'); + assert.ok(video, 'A video element should exist'); + assert.ok(video.hasAttribute('autoplay'), 'The video element should have the autoplay attribute'); + assert.ok(video.hasAttribute('muted'), 'The video element should have the muted attribute'); } /** @param {string} html */ From b139390deb738f96759cb787fe9e784be71f2134 Mon Sep 17 00:00:00 2001 From: Arpan Patel Date: Mon, 2 Dec 2024 08:38:05 -0600 Subject: [PATCH 03/17] fix(upgrade): enhance version comparison by normalizing `targetVersion` (#12577) --- .changeset/dirty-bees-repair.md | 5 +++++ packages/upgrade/src/actions/install.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/dirty-bees-repair.md diff --git a/.changeset/dirty-bees-repair.md b/.changeset/dirty-bees-repair.md new file mode 100644 index 000000000000..98fc2f714e5d --- /dev/null +++ b/.changeset/dirty-bees-repair.md @@ -0,0 +1,5 @@ +--- +'@astrojs/upgrade': patch +--- + +Fixes an issue where `@astrojs/upgrade` announces integration updates for already up to date packages diff --git a/packages/upgrade/src/actions/install.ts b/packages/upgrade/src/actions/install.ts index f031729e411d..6e593b976b25 100644 --- a/packages/upgrade/src/actions/install.ts +++ b/packages/upgrade/src/actions/install.ts @@ -90,8 +90,8 @@ function filterPackages(ctx: Pick) { const devDependencies: PackageInfo[] = []; for (const packageInfo of ctx.packages) { const { currentVersion, targetVersion, isDevDependency } = packageInfo; - // Remove prefix from `currentVersion` before comparing - if (currentVersion.replace(/^\D+/, '') === targetVersion) { + // Remove prefix from version before comparing + if (currentVersion.replace(/^\D+/, '') === targetVersion.replace(/^\D+/, '')) { current.push(packageInfo); } else { const arr = isDevDependency ? devDependencies : dependencies; From 07b9ca802eb4bbfc14c4e421f8a047fef3a7b439 Mon Sep 17 00:00:00 2001 From: Wes Souza Date: Mon, 2 Dec 2024 09:48:01 -0500 Subject: [PATCH 04/17] fix(actions): explicitly import index.ts to fix types when moduleResolution is NodeNext (#12578) --- .changeset/empty-jobs-impress.md | 5 +++++ packages/astro/src/actions/integration.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/empty-jobs-impress.md diff --git a/.changeset/empty-jobs-impress.md b/.changeset/empty-jobs-impress.md new file mode 100644 index 000000000000..09a57fe39130 --- /dev/null +++ b/.changeset/empty-jobs-impress.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Explicitly import index.ts to fix types when moduleResolution is NodeNext diff --git a/packages/astro/src/actions/integration.ts b/packages/astro/src/actions/integration.ts index 13d76e8b6023..535d15ae5c9e 100644 --- a/packages/astro/src/actions/integration.ts +++ b/packages/astro/src/actions/integration.ts @@ -38,7 +38,7 @@ export default function astroIntegrationActionsRouteHandler({ } const stringifiedActionsImport = JSON.stringify( - viteID(new URL('./actions', params.config.srcDir)), + viteID(new URL('./actions/index.ts', params.config.srcDir)), ); settings.injectedTypes.push({ filename: ACTIONS_TYPES_FILE, From 315c5f3b2a468585134f8cf4d7783abdb2521c93 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Mon, 2 Dec 2024 15:39:22 +0000 Subject: [PATCH 05/17] Merge commit from fork * fix: enforce check origin logic * address feedback --- packages/astro/src/core/app/middlewares.ts | 51 +++++++++++++++------ packages/astro/test/csrf-protection.test.js | 16 +++++++ 2 files changed, 52 insertions(+), 15 deletions(-) diff --git a/packages/astro/src/core/app/middlewares.ts b/packages/astro/src/core/app/middlewares.ts index 1c7d6cde04cf..6a804627d75e 100644 --- a/packages/astro/src/core/app/middlewares.ts +++ b/packages/astro/src/core/app/middlewares.ts @@ -25,22 +25,43 @@ export function createOriginCheckMiddleware(): MiddlewareHandler { if (isPrerendered) { return next(); } - const contentType = request.headers.get('content-type'); - if (contentType) { - if (FORM_CONTENT_TYPES.includes(contentType.toLowerCase())) { - const forbidden = - (request.method === 'POST' || - request.method === 'PUT' || - request.method === 'PATCH' || - request.method === 'DELETE') && - request.headers.get('origin') !== url.origin; - if (forbidden) { - return new Response(`Cross-site ${request.method} form submissions are forbidden`, { - status: 403, - }); - } + if (request.method === "GET") { + return next(); + } + const sameOrigin = + (request.method === 'POST' || + request.method === 'PUT' || + request.method === 'PATCH' || + request.method === 'DELETE') && + request.headers.get('origin') === url.origin; + + const hasContentType = request.headers.has('content-type') + if (hasContentType) { + const formLikeHeader = hasFormLikeHeader(request.headers.get('content-type')); + if (formLikeHeader && !sameOrigin) { + return new Response(`Cross-site ${request.method} form submissions are forbidden`, { + status: 403, + }); + } + } else { + if (!sameOrigin) { + return new Response(`Cross-site ${request.method} form submissions are forbidden`, { + status: 403, + }); } } - return next(); + + return next() }); } + +function hasFormLikeHeader(contentType: string | null): boolean { + if (contentType) { + for (const FORM_CONTENT_TYPE of FORM_CONTENT_TYPES) { + if (contentType.toLowerCase().includes(FORM_CONTENT_TYPE)) { + return true; + } + } + } + return false; +} diff --git a/packages/astro/test/csrf-protection.test.js b/packages/astro/test/csrf-protection.test.js index 25aa9d059050..f8067000d23c 100644 --- a/packages/astro/test/csrf-protection.test.js +++ b/packages/astro/test/csrf-protection.test.js @@ -46,6 +46,22 @@ describe('CSRF origin check', () => { }); response = await app.render(request); assert.equal(response.status, 403); + + request = new Request('http://example.com/api/', { + headers: { origin: 'http://loreum.com', 'content-type': 'application/x-www-form-urlencoded; some-other-value' }, + method: 'POST', + }); + response = await app.render(request); + assert.equal(response.status, 403); + + request = new Request('http://example.com/api/', { + headers: { origin: 'http://loreum.com', }, + method: 'POST', + credentials: 'include', + body: new Blob(["a=b"],{}) + }); + response = await app.render(request); + assert.equal(response.status, 403); }); it("return 403 when the origin doesn't match and calling a PUT", async () => { From 10c6b8d720f9c8d6d09b630011caab9d1fa92afe Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Mon, 2 Dec 2024 15:40:23 +0000 Subject: [PATCH 06/17] [ci] format --- packages/astro/src/core/app/middlewares.ts | 8 ++++---- packages/astro/test/csrf-protection.test.js | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/astro/src/core/app/middlewares.ts b/packages/astro/src/core/app/middlewares.ts index 6a804627d75e..7c589f0c4dce 100644 --- a/packages/astro/src/core/app/middlewares.ts +++ b/packages/astro/src/core/app/middlewares.ts @@ -25,7 +25,7 @@ export function createOriginCheckMiddleware(): MiddlewareHandler { if (isPrerendered) { return next(); } - if (request.method === "GET") { + if (request.method === 'GET') { return next(); } const sameOrigin = @@ -34,8 +34,8 @@ export function createOriginCheckMiddleware(): MiddlewareHandler { request.method === 'PATCH' || request.method === 'DELETE') && request.headers.get('origin') === url.origin; - - const hasContentType = request.headers.has('content-type') + + const hasContentType = request.headers.has('content-type'); if (hasContentType) { const formLikeHeader = hasFormLikeHeader(request.headers.get('content-type')); if (formLikeHeader && !sameOrigin) { @@ -51,7 +51,7 @@ export function createOriginCheckMiddleware(): MiddlewareHandler { } } - return next() + return next(); }); } diff --git a/packages/astro/test/csrf-protection.test.js b/packages/astro/test/csrf-protection.test.js index f8067000d23c..5b70e36505f6 100644 --- a/packages/astro/test/csrf-protection.test.js +++ b/packages/astro/test/csrf-protection.test.js @@ -48,17 +48,20 @@ describe('CSRF origin check', () => { assert.equal(response.status, 403); request = new Request('http://example.com/api/', { - headers: { origin: 'http://loreum.com', 'content-type': 'application/x-www-form-urlencoded; some-other-value' }, + headers: { + origin: 'http://loreum.com', + 'content-type': 'application/x-www-form-urlencoded; some-other-value', + }, method: 'POST', }); response = await app.render(request); assert.equal(response.status, 403); request = new Request('http://example.com/api/', { - headers: { origin: 'http://loreum.com', }, + headers: { origin: 'http://loreum.com' }, method: 'POST', credentials: 'include', - body: new Blob(["a=b"],{}) + body: new Blob(['a=b'], {}), }); response = await app.render(request); assert.equal(response.status, 403); From 3a76353248009c1960344a4d2d28d56ccb50bade Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Mon, 2 Dec 2024 17:03:55 +0000 Subject: [PATCH 07/17] fix: update tests (#12586) Co-authored-by: matthewp <361671+matthewp@users.noreply.github.com> --- .../astro/test/fixtures/astro-cookies/astro.config.mjs | 7 +++++++ packages/astro/test/fixtures/redirects/astro.config.mjs | 7 +++++++ packages/astro/test/fixtures/reroute/astro.config.mjs | 5 ++++- .../astro/test/fixtures/rewrite-server/astro.config.mjs | 5 ++++- .../astro/test/fixtures/ssr-error-pages/astro.config.mjs | 7 +++++++ 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 packages/astro/test/fixtures/astro-cookies/astro.config.mjs create mode 100644 packages/astro/test/fixtures/redirects/astro.config.mjs create mode 100644 packages/astro/test/fixtures/ssr-error-pages/astro.config.mjs diff --git a/packages/astro/test/fixtures/astro-cookies/astro.config.mjs b/packages/astro/test/fixtures/astro-cookies/astro.config.mjs new file mode 100644 index 000000000000..1ddc69dcc089 --- /dev/null +++ b/packages/astro/test/fixtures/astro-cookies/astro.config.mjs @@ -0,0 +1,7 @@ +import { defineConfig } from "astro/config"; + +export default defineConfig({ + security: { + checkOrigin: false + } +}) diff --git a/packages/astro/test/fixtures/redirects/astro.config.mjs b/packages/astro/test/fixtures/redirects/astro.config.mjs new file mode 100644 index 000000000000..1ddc69dcc089 --- /dev/null +++ b/packages/astro/test/fixtures/redirects/astro.config.mjs @@ -0,0 +1,7 @@ +import { defineConfig } from "astro/config"; + +export default defineConfig({ + security: { + checkOrigin: false + } +}) diff --git a/packages/astro/test/fixtures/reroute/astro.config.mjs b/packages/astro/test/fixtures/reroute/astro.config.mjs index c800d0ddaacc..b03ed31e2232 100644 --- a/packages/astro/test/fixtures/reroute/astro.config.mjs +++ b/packages/astro/test/fixtures/reroute/astro.config.mjs @@ -2,5 +2,8 @@ import {defineConfig} from 'astro/config'; // https://astro.build/config export default defineConfig({ - site: "https://example.com" + site: "https://example.com", + security: { + checkOrigin: false + } }); diff --git a/packages/astro/test/fixtures/rewrite-server/astro.config.mjs b/packages/astro/test/fixtures/rewrite-server/astro.config.mjs index ecd3b251872e..14db3602c48e 100644 --- a/packages/astro/test/fixtures/rewrite-server/astro.config.mjs +++ b/packages/astro/test/fixtures/rewrite-server/astro.config.mjs @@ -3,5 +3,8 @@ import {defineConfig} from 'astro/config'; // https://astro.build/config export default defineConfig({ output: "server", - site: "https://example.com" + site: "https://example.com", + security: { + checkOrigin: false + } }); diff --git a/packages/astro/test/fixtures/ssr-error-pages/astro.config.mjs b/packages/astro/test/fixtures/ssr-error-pages/astro.config.mjs new file mode 100644 index 000000000000..1ddc69dcc089 --- /dev/null +++ b/packages/astro/test/fixtures/ssr-error-pages/astro.config.mjs @@ -0,0 +1,7 @@ +import { defineConfig } from "astro/config"; + +export default defineConfig({ + security: { + checkOrigin: false + } +}) From 1dc8f5eb7c515c89aadc85cfa0a300d4f65e8671 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Tue, 3 Dec 2024 00:16:53 +0100 Subject: [PATCH 08/17] Node 22 housekeeping (#12559) --- .changeset/tasty-snails-protect.md | 5 +++++ packages/internal-helpers/src/fs.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/tasty-snails-protect.md diff --git a/.changeset/tasty-snails-protect.md b/.changeset/tasty-snails-protect.md new file mode 100644 index 000000000000..cbd945ca0ddb --- /dev/null +++ b/.changeset/tasty-snails-protect.md @@ -0,0 +1,5 @@ +--- +"@astrojs/internal-helpers": patch +--- + +Fixes usage of `fileURLToPath()` to anticipate the changed signature of this method in Node 22.1.0 diff --git a/packages/internal-helpers/src/fs.ts b/packages/internal-helpers/src/fs.ts index c9f27810ad35..5630040bbea3 100644 --- a/packages/internal-helpers/src/fs.ts +++ b/packages/internal-helpers/src/fs.ts @@ -45,8 +45,8 @@ export async function copyFilesToFolder( outDir: URL, exclude: URL[] = [], ): Promise { - const excludeList = exclude.map(fileURLToPath); - const fileList = files.map(fileURLToPath).filter((f) => !excludeList.includes(f)); + const excludeList = exclude.map((url) => fileURLToPath(url)); + const fileList = files.map((url) => fileURLToPath(url)).filter((f) => !excludeList.includes(f)); if (files.length === 0) throw new Error('No files found to copy'); From 3a144b1a69679730bb1d721aae2a28008b8a9064 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Tue, 3 Dec 2024 11:00:43 +0100 Subject: [PATCH 09/17] Update examples for v5 (#12588) * Revert "chore: downgrade examples to not use beta releases (#12557)" This reverts commit 6031962ab5f56457de986eb82bd24807e926ba1b. * Update blog template for new content collections * Update portfolio template for new content collections * Update starlog template for new content collections --- examples/basics/package.json | 2 +- examples/blog/package.json | 4 +- .../{content/config.ts => content.config.ts} | 4 +- examples/blog/src/pages/blog/[...slug].astro | 5 +- examples/blog/src/pages/blog/index.astro | 2 +- examples/blog/src/pages/rss.xml.js | 2 +- examples/component/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-multiple/package.json | 12 +- examples/framework-preact/package.json | 4 +- examples/framework-react/package.json | 4 +- examples/framework-solid/package.json | 4 +- examples/framework-svelte/package.json | 4 +- examples/framework-vue/package.json | 4 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/minimal/package.json | 2 +- examples/portfolio/package.json | 2 +- .../src/components/PortfolioPreview.astro | 4 +- examples/portfolio/src/content.config.ts | 4 +- .../portfolio/src/pages/work/[...slug].astro | 5 +- examples/ssr/package.json | 6 +- examples/starlog/src/content.config.ts | 3 + examples/starlog/src/pages/index.astro | 6 +- .../starlog/src/pages/releases/[slug].astro | 6 +- examples/toolbar-app/package.json | 2 +- examples/with-markdoc/package.json | 4 +- examples/with-mdx/package.json | 6 +- examples/with-nanostores/package.json | 4 +- examples/with-tailwindcss/package.json | 4 +- pnpm-lock.yaml | 858 ++---------------- 31 files changed, 143 insertions(+), 832 deletions(-) rename examples/blog/src/{content/config.ts => content.config.ts} (68%) diff --git a/examples/basics/package.json b/examples/basics/package.json index 52a016f2dc21..7358c6132290 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -10,6 +10,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.16.16" + "astro": "^5.0.0-beta.12" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index ddbe48af3cb0..b62b24f521df 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -10,9 +10,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^3.1.9", + "@astrojs/mdx": "^4.0.0-beta.5", "@astrojs/rss": "^4.0.9", "@astrojs/sitemap": "^3.2.1", - "astro": "^4.16.16" + "astro": "^5.0.0-beta.12" } } diff --git a/examples/blog/src/content/config.ts b/examples/blog/src/content.config.ts similarity index 68% rename from examples/blog/src/content/config.ts rename to examples/blog/src/content.config.ts index 667a31cc7391..7d92b1a3bf77 100644 --- a/examples/blog/src/content/config.ts +++ b/examples/blog/src/content.config.ts @@ -1,7 +1,9 @@ +import { glob } from 'astro/loaders'; import { defineCollection, z } from 'astro:content'; const blog = defineCollection({ - type: 'content', + // Load Markdown and MDX files in the `src/content/blog/` directory. + loader: glob({ base: './src/content/blog', pattern: '**/*.{md,mdx}' }), // Type-check frontmatter using a schema schema: z.object({ title: z.string(), diff --git a/examples/blog/src/pages/blog/[...slug].astro b/examples/blog/src/pages/blog/[...slug].astro index 07dbce26bcba..096bd1e828e4 100644 --- a/examples/blog/src/pages/blog/[...slug].astro +++ b/examples/blog/src/pages/blog/[...slug].astro @@ -1,18 +1,19 @@ --- import { type CollectionEntry, getCollection } from 'astro:content'; import BlogPost from '../../layouts/BlogPost.astro'; +import { render } from 'astro:content'; export async function getStaticPaths() { const posts = await getCollection('blog'); return posts.map((post) => ({ - params: { slug: post.slug }, + params: { slug: post.id }, props: post, })); } type Props = CollectionEntry<'blog'>; const post = Astro.props; -const { Content } = await post.render(); +const { Content } = await render(post); --- diff --git a/examples/blog/src/pages/blog/index.astro b/examples/blog/src/pages/blog/index.astro index a1019da5b997..1d8d02aa5be9 100644 --- a/examples/blog/src/pages/blog/index.astro +++ b/examples/blog/src/pages/blog/index.astro @@ -93,7 +93,7 @@ const posts = (await getCollection('blog')).sort( { posts.map((post) => (
  • - +

    {post.data.title}

    diff --git a/examples/blog/src/pages/rss.xml.js b/examples/blog/src/pages/rss.xml.js index 9ff9801e0b30..ae5e4c4ec6ef 100644 --- a/examples/blog/src/pages/rss.xml.js +++ b/examples/blog/src/pages/rss.xml.js @@ -10,7 +10,7 @@ export async function GET(context) { site: context.site, items: posts.map((post) => ({ ...post.data, - link: `/blog/${post.slug}/`, + link: `/blog/${post.id}/`, })), }); } diff --git a/examples/component/package.json b/examples/component/package.json index dbab39cf6620..5a6600d8f1f8 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.16.16" + "astro": "^5.0.0-beta.12" }, "peerDependencies": { "astro": "^4.0.0 || ^5.0.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index e4986e52dbc2..d9ab81afdb2a 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": "^4.16.16" + "astro": "^5.0.0-beta.12" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 8cb92e051aed..3b42d453020e 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -10,14 +10,14 @@ "astro": "astro" }, "dependencies": { - "@astrojs/preact": "^3.5.4", - "@astrojs/react": "^3.6.3", - "@astrojs/solid-js": "^4.4.4", - "@astrojs/svelte": "^6.0.2", - "@astrojs/vue": "^4.5.3", + "@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", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", - "astro": "^4.16.16", + "astro": "^5.0.0-beta.12", "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 164e06413dae..8cf537c20e4a 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -10,9 +10,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/preact": "^3.5.4", + "@astrojs/preact": "^4.0.0-beta.1", "@preact/signals": "^1.3.0", - "astro": "^4.16.16", + "astro": "^5.0.0-beta.12", "preact": "^10.24.3" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index efffd2d07198..420f9b53da60 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -10,10 +10,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/react": "^3.6.3", + "@astrojs/react": "^4.0.0-beta.2", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", - "astro": "^4.16.16", + "astro": "^5.0.0-beta.12", "react": "^18.3.1", "react-dom": "^18.3.1" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 6525264e3718..e7e655845cf3 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -10,8 +10,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/solid-js": "^4.4.4", - "astro": "^4.16.16", + "@astrojs/solid-js": "^5.0.0-beta.1", + "astro": "^5.0.0-beta.12", "solid-js": "^1.9.3" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 673ebc81ea83..fb4ea7dce794 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -10,8 +10,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/svelte": "^6.0.2", - "astro": "^4.16.16", + "@astrojs/svelte": "^7.0.0-beta.1", + "astro": "^5.0.0-beta.12", "svelte": "^5.1.16" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index d64a436112cd..7c89c8af22b7 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -10,8 +10,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/vue": "^4.5.3", - "astro": "^4.16.16", + "@astrojs/vue": "^5.0.0-beta.3", + "astro": "^5.0.0-beta.12", "vue": "^3.5.12" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index b37932d9841e..901e5b032898 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -11,6 +11,6 @@ }, "dependencies": { "@astrojs/node": "^9.0.0-alpha.1", - "astro": "^4.16.16" + "astro": "^5.0.0-beta.12" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index 88be398e50b7..1cb8f3173747 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.16.16" + "astro": "^5.0.0-beta.12" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 187ff03e2c19..3d1a93a21a8e 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -10,6 +10,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.16.16" + "astro": "^5.0.0-beta.12" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 17d2c51feb06..6f98dd56b54d 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -10,6 +10,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.16.16" + "astro": "^5.0.0-beta.12" } } diff --git a/examples/portfolio/src/components/PortfolioPreview.astro b/examples/portfolio/src/components/PortfolioPreview.astro index dbeac403ea1a..f26bae0e2f17 100644 --- a/examples/portfolio/src/components/PortfolioPreview.astro +++ b/examples/portfolio/src/components/PortfolioPreview.astro @@ -5,10 +5,10 @@ interface Props { project: CollectionEntry<'work'>; } -const { data, slug } = Astro.props.project; +const { data, id } = Astro.props.project; --- - + {data.title} {data.img_alt diff --git a/examples/portfolio/src/content.config.ts b/examples/portfolio/src/content.config.ts index 06c6bab51f49..689ddde5ae44 100644 --- a/examples/portfolio/src/content.config.ts +++ b/examples/portfolio/src/content.config.ts @@ -1,8 +1,10 @@ +import { glob } from 'astro/loaders'; import { defineCollection, z } from 'astro:content'; export const collections = { work: defineCollection({ - type: 'content', + // Load Markdown files in the src/content/work directory. + loader: glob({ base: './src/content/work', pattern: '**/*.md', }), schema: z.object({ title: z.string(), description: z.string(), diff --git a/examples/portfolio/src/pages/work/[...slug].astro b/examples/portfolio/src/pages/work/[...slug].astro index 84ed133a4d3f..90eb3ba8d028 100644 --- a/examples/portfolio/src/pages/work/[...slug].astro +++ b/examples/portfolio/src/pages/work/[...slug].astro @@ -7,6 +7,7 @@ import ContactCTA from '../../components/ContactCTA.astro'; import Hero from '../../components/Hero.astro'; import Icon from '../../components/Icon.astro'; import Pill from '../../components/Pill.astro'; +import { render } from 'astro:content'; interface Props { entry: CollectionEntry<'work'>; @@ -18,13 +19,13 @@ interface Props { export async function getStaticPaths() { const work = await getCollection('work'); return work.map((entry) => ({ - params: { slug: entry.slug }, + params: { slug: entry.id }, props: { entry }, })); } const { entry } = Astro.props; -const { Content } = await entry.render(); +const { Content } = await render(entry); --- diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 951bf8ca9ac7..feb2f7584166 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -11,9 +11,9 @@ "server": "node dist/server/entry.mjs" }, "dependencies": { - "@astrojs/node": "^8.3.4", - "@astrojs/svelte": "^6.0.2", - "astro": "^4.16.16", + "@astrojs/node": "^9.0.0-alpha.1", + "@astrojs/svelte": "^7.0.0-beta.1", + "astro": "^5.0.0-beta.12", "svelte": "^5.1.16" } } diff --git a/examples/starlog/src/content.config.ts b/examples/starlog/src/content.config.ts index 5cc4c697f7e4..26986525aa54 100644 --- a/examples/starlog/src/content.config.ts +++ b/examples/starlog/src/content.config.ts @@ -1,6 +1,9 @@ +import { glob } from 'astro/loaders'; import { defineCollection, z } from 'astro:content'; const releases = defineCollection({ + // Load Markdown files in the src/content/releases directory. + loader: glob({ base: './src/content/releases', pattern: '**/*.md' }), // Type-check frontmatter using a schema schema: ({ image }) => z.object({ diff --git a/examples/starlog/src/pages/index.astro b/examples/starlog/src/pages/index.astro index b7e6ea0f5c73..3cf04af6271c 100644 --- a/examples/starlog/src/pages/index.astro +++ b/examples/starlog/src/pages/index.astro @@ -1,5 +1,5 @@ --- -import { getCollection } from 'astro:content'; +import { getCollection, render } from 'astro:content'; import FormattedDate from '../components/FormattedDate.astro'; import Layout from '../layouts/IndexLayout.astro'; @@ -17,14 +17,14 @@ posts.sort((a, b) => +b.data.date - +a.data.date);

  • - {post.render().then(({ Content }) => ( + {render(post).then(({ Content }) => ( ))}
    diff --git a/examples/starlog/src/pages/releases/[slug].astro b/examples/starlog/src/pages/releases/[slug].astro index 88fa74d3caea..8c3119a8f48d 100644 --- a/examples/starlog/src/pages/releases/[slug].astro +++ b/examples/starlog/src/pages/releases/[slug].astro @@ -1,19 +1,19 @@ --- -import { getCollection } from 'astro:content'; +import { getCollection, render } from 'astro:content'; import Layout from '../../layouts/PostLayout.astro'; export async function getStaticPaths() { const releases = await getCollection('releases'); return releases.map((release) => ({ - params: { slug: release.slug }, + params: { slug: release.id }, props: { release }, })); } const { release } = Astro.props; -const { Content } = await release.render(); +const { Content } = await render(release); --- diff --git a/examples/toolbar-app/package.json b/examples/toolbar-app/package.json index cfbe73c5f157..d20a982eea42 100644 --- a/examples/toolbar-app/package.json +++ b/examples/toolbar-app/package.json @@ -15,6 +15,6 @@ "./app": "./dist/app.js" }, "devDependencies": { - "astro": "^4.16.16" + "astro": "^5.0.0-beta.12" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index ffe873052fd2..8a127bcc072d 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/markdoc": "^0.11.5", - "astro": "^4.16.16" + "@astrojs/markdoc": "^0.12.0-beta.1", + "astro": "^5.0.0-beta.12" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 51e365af48b0..1f39f55174ea 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -10,9 +10,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^3.1.9", - "@astrojs/preact": "^3.5.4", - "astro": "^4.16.16", + "@astrojs/mdx": "^4.0.0-beta.5", + "@astrojs/preact": "^4.0.0-beta.1", + "astro": "^5.0.0-beta.12", "preact": "^10.24.3" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 37a2d069a1cb..6094c5fd1e13 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -10,9 +10,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/preact": "^3.5.4", + "@astrojs/preact": "^4.0.0-beta.1", "@nanostores/preact": "^0.5.2", - "astro": "^4.16.16", + "astro": "^5.0.0-beta.12", "nanostores": "^0.11.3", "preact": "^10.24.3" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index f310b9116cbe..168953fb72c4 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -10,10 +10,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^3.1.9", + "@astrojs/mdx": "^4.0.0-beta.5", "@astrojs/tailwind": "^5.1.2", "@types/canvas-confetti": "^1.6.4", - "astro": "^4.16.16", + "astro": "^5.0.0-beta.12", "autoprefixer": "^10.4.20", "canvas-confetti": "^1.9.3", "postcss": "^8.4.49", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e128779deaeb..fd3dd8190fcc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -142,14 +142,14 @@ importers: examples/basics: dependencies: astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro examples/blog: dependencies: '@astrojs/mdx': - specifier: ^3.1.9 - version: 3.1.9(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2)) + specifier: ^4.0.0-beta.5 + version: link:../../packages/integrations/mdx '@astrojs/rss': specifier: ^4.0.9 version: link:../../packages/astro-rss @@ -157,14 +157,14 @@ importers: specifier: ^3.2.1 version: link:../../packages/integrations/sitemap astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro examples/container-with-vitest: dependencies: @@ -203,26 +203,26 @@ importers: specifier: ^3.14.3 version: 3.14.3 astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro examples/framework-multiple: dependencies: '@astrojs/preact': - specifier: ^3.5.4 - version: 3.5.4(@babel/core@7.26.0)(@types/node@18.19.50)(preact@10.24.3)(sass@1.81.0) + specifier: ^4.0.0-beta.1 + version: link:../../packages/integrations/preact '@astrojs/react': - specifier: ^3.6.3 - version: 3.6.3(@types/node@18.19.50)(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.81.0) + specifier: ^4.0.0-beta.2 + version: link:../../packages/integrations/react '@astrojs/solid-js': - specifier: ^4.4.4 - version: 4.4.4(@types/node@18.19.50)(sass@1.81.0)(solid-js@1.9.3) + specifier: ^5.0.0-beta.1 + version: link:../../packages/integrations/solid '@astrojs/svelte': - specifier: ^6.0.2 - version: 6.0.2(@types/node@18.19.50)(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2))(sass@1.81.0)(svelte@5.2.3)(typescript@5.7.2) + specifier: ^7.0.0-beta.1 + version: link:../../packages/integrations/svelte '@astrojs/vue': - specifier: ^4.5.3 - version: 4.5.3(@types/node@18.19.50)(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2))(rollup@4.27.4)(sass@1.81.0)(vue@3.5.12(typescript@5.7.2)) + specifier: ^5.0.0-beta.3 + version: link:../../packages/integrations/vue '@types/react': specifier: ^18.3.12 version: 18.3.12 @@ -230,8 +230,8 @@ importers: specifier: ^18.3.1 version: 18.3.1 astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro preact: specifier: ^10.24.3 version: 10.24.3 @@ -254,14 +254,14 @@ importers: examples/framework-preact: dependencies: '@astrojs/preact': - specifier: ^3.5.4 - version: 3.5.4(@babel/core@7.26.0)(@types/node@18.19.50)(preact@10.24.3)(sass@1.81.0) + specifier: ^4.0.0-beta.1 + version: link:../../packages/integrations/preact '@preact/signals': specifier: ^1.3.0 version: 1.3.0(preact@10.24.3) astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro preact: specifier: ^10.24.3 version: 10.24.3 @@ -269,8 +269,8 @@ importers: examples/framework-react: dependencies: '@astrojs/react': - specifier: ^3.6.3 - version: 3.6.3(@types/node@18.19.50)(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.81.0) + specifier: ^4.0.0-beta.2 + version: link:../../packages/integrations/react '@types/react': specifier: ^18.3.12 version: 18.3.12 @@ -278,8 +278,8 @@ importers: specifier: ^18.3.1 version: 18.3.1 astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro react: specifier: ^18.3.1 version: 18.3.1 @@ -290,11 +290,11 @@ importers: examples/framework-solid: dependencies: '@astrojs/solid-js': - specifier: ^4.4.4 - version: 4.4.4(@types/node@18.19.50)(sass@1.81.0)(solid-js@1.9.3) + specifier: ^5.0.0-beta.1 + version: link:../../packages/integrations/solid astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro solid-js: specifier: ^1.9.3 version: 1.9.3 @@ -302,11 +302,11 @@ importers: examples/framework-svelte: dependencies: '@astrojs/svelte': - specifier: ^6.0.2 - version: 6.0.2(@types/node@18.19.50)(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2))(sass@1.81.0)(svelte@5.2.3)(typescript@5.7.2) + specifier: ^7.0.0-beta.1 + version: link:../../packages/integrations/svelte astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro svelte: specifier: ^5.1.16 version: 5.2.3 @@ -314,11 +314,11 @@ importers: examples/framework-vue: dependencies: '@astrojs/vue': - specifier: ^4.5.3 - version: 4.5.3(@types/node@18.19.50)(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2))(rollup@4.27.4)(sass@1.81.0)(vue@3.5.12(typescript@5.7.2)) + specifier: ^5.0.0-beta.3 + version: link:../../packages/integrations/vue astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro vue: specifier: ^3.5.12 version: 3.5.12(typescript@5.7.2) @@ -327,40 +327,40 @@ importers: dependencies: '@astrojs/node': specifier: ^9.0.0-alpha.1 - version: 9.0.0-alpha.1(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2)) + version: 9.0.0-alpha.1(astro@packages+astro) astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro examples/minimal: dependencies: astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro examples/ssr: dependencies: '@astrojs/node': - specifier: ^8.3.4 - version: 8.3.4(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2)) + specifier: ^9.0.0-alpha.1 + version: 9.0.0-alpha.1(astro@packages+astro) '@astrojs/svelte': - specifier: ^6.0.2 - version: 6.0.2(@types/node@18.19.50)(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2))(sass@1.81.0)(svelte@5.2.3)(typescript@5.7.2) + specifier: ^7.0.0-beta.1 + version: link:../../packages/integrations/svelte astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro svelte: specifier: ^5.1.16 version: 5.2.3 @@ -380,29 +380,29 @@ importers: examples/toolbar-app: devDependencies: astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro examples/with-markdoc: dependencies: '@astrojs/markdoc': - specifier: ^0.11.5 - version: 0.11.5(@types/react@18.3.12)(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2))(react@18.3.1) + specifier: ^0.12.0-beta.1 + version: link:../../packages/integrations/markdoc astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro examples/with-mdx: dependencies: '@astrojs/mdx': - specifier: ^3.1.9 - version: 3.1.9(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2)) + specifier: ^4.0.0-beta.5 + version: link:../../packages/integrations/mdx '@astrojs/preact': - specifier: ^3.5.4 - version: 3.5.4(@babel/core@7.26.0)(@types/node@18.19.50)(preact@10.24.3)(sass@1.81.0) + specifier: ^4.0.0-beta.1 + version: link:../../packages/integrations/preact astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro preact: specifier: ^10.24.3 version: 10.24.3 @@ -410,14 +410,14 @@ importers: examples/with-nanostores: dependencies: '@astrojs/preact': - specifier: ^3.5.4 - version: 3.5.4(@babel/core@7.26.0)(@types/node@18.19.50)(preact@10.24.3)(sass@1.81.0) + specifier: ^4.0.0-beta.1 + 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: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro nanostores: specifier: ^0.11.3 version: 0.11.3 @@ -428,8 +428,8 @@ importers: examples/with-tailwindcss: dependencies: '@astrojs/mdx': - specifier: ^3.1.9 - version: 3.1.9(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2)) + specifier: ^4.0.0-beta.5 + version: link:../../packages/integrations/mdx '@astrojs/tailwind': specifier: ^5.1.2 version: link:../../packages/integrations/tailwind @@ -437,8 +437,8 @@ importers: specifier: ^1.6.4 version: 1.6.4 astro: - specifier: ^4.16.16 - version: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + specifier: ^5.0.0-beta.12 + version: link:../../packages/astro autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.49) @@ -5608,9 +5608,6 @@ packages: '@astrojs/compiler@2.10.3': resolution: {integrity: sha512-bL/O7YBxsFt55YHU021oL+xz+B/9HvGNId3F9xURN16aeqDK9juHGktdkCSXz+U4nqFACq6ZFvWomOzhV+zfPw==} - '@astrojs/internal-helpers@0.4.1': - resolution: {integrity: sha512-bMf9jFihO8YP940uD70SI/RDzIhUHJAolWVcO1v5PUivxGKvfLZTLTVVxEYzGYyPsA3ivdLNqMnL5VgmQySa+g==} - '@astrojs/language-server@2.15.0': resolution: {integrity: sha512-wJHSjGApm5X8Rg1GvkevoatZBfvaFizY4kCPvuSYgs3jGCobuY3KstJGKC1yNLsRJlDweHruP+J54iKn9vEKoA==} hasBin: true @@ -5623,21 +5620,6 @@ packages: prettier-plugin-astro: optional: true - '@astrojs/markdoc@0.11.5': - resolution: {integrity: sha512-paNSvJgUgld5kSU4RZelHYgvNKZSMWX2QX7SzWEeyPBTQ8gwOe30eJjq3czIbg7Se+8NcGtq7v5FU7lOyXxmnw==} - engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} - peerDependencies: - astro: ^3.0.0 || ^4.0.0 - - '@astrojs/markdown-remark@5.3.0': - resolution: {integrity: sha512-r0Ikqr0e6ozPb5bvhup1qdWnSPUvQu6tub4ZLYaKyG50BXZ0ej6FhGz3GpChKpH7kglRFPObJd/bDyf2VM9pkg==} - - '@astrojs/mdx@3.1.9': - resolution: {integrity: sha512-3jPD4Bff6lIA20RQoonnZkRtZ9T3i0HFm6fcDF7BMsKIZ+xBP2KXzQWiuGu62lrVCmU612N+SQVGl5e0fI+zWg==} - engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} - peerDependencies: - astro: ^4.8.0 - '@astrojs/node@8.3.4': resolution: {integrity: sha512-xzQs39goN7xh9np9rypGmbgZj3AmmjNxEMj9ZWz5aBERlqqFF3n8A/w/uaJeZ/bkHS60l1BXVS0tgsQt9MFqBA==} peerDependencies: @@ -5648,54 +5630,6 @@ packages: peerDependencies: astro: ^5.0.0-alpha.0 - '@astrojs/preact@3.5.4': - resolution: {integrity: sha512-NCS88C3JV/ZaFlBLLzYGvAvSrHsO2kaBgxMNDf9c0/OSywyY9D2NOBHWmwmiMP8tBtDbW5f8sfyL0XrjhguKgw==} - engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} - peerDependencies: - preact: ^10.6.5 - - '@astrojs/prism@3.1.0': - resolution: {integrity: sha512-Z9IYjuXSArkAUx3N6xj6+Bnvx8OdUSHA8YoOgyepp3+zJmtVYJIl/I18GozdJVW1p5u/CNpl3Km7/gwTJK85cw==} - engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} - - '@astrojs/react@3.6.3': - resolution: {integrity: sha512-5ihLQDH5Runddug5AZYlnp/Q5T81QxhwnWJXA9rchBAdh11c6UhBbv9Kdk7b2PkXoEU70CGWBP9hSh0VCR58eA==} - engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} - peerDependencies: - '@types/react': ^17.0.50 || ^18.0.21 - '@types/react-dom': ^17.0.17 || ^18.0.6 - react: ^17.0.2 || ^18.0.0 || ^19.0.0-beta - react-dom: ^17.0.2 || ^18.0.0 || ^19.0.0-beta - - '@astrojs/solid-js@4.4.4': - resolution: {integrity: sha512-6zu9gFWEb+4V8SumlzMG3UbnXP2tVSy3eLI8cKNNPoMjcMMHK39efxHP38EPiCD0NnlTfyFh3KqaXp/2hmWh6Q==} - engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} - peerDependencies: - solid-devtools: ^0.30.1 - solid-js: ^1.8.5 - peerDependenciesMeta: - solid-devtools: - optional: true - - '@astrojs/svelte@6.0.2': - resolution: {integrity: sha512-Jn60LLH+AbjtLIOQuL0SUI0fxMwpT89VraoGkEwF33ZgCT59H8fMQOj9eNf632P/SHRbKpD+Q+PJjODn5OcKoQ==} - engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} - peerDependencies: - astro: ^4.0.0 - svelte: ^5.1.16 - typescript: ^5.3.3 - - '@astrojs/telemetry@3.1.0': - resolution: {integrity: sha512-/ca/+D8MIKEC8/A9cSaPUqQNZm+Es/ZinRv0ZAzvu2ios7POQSsVD+VOj7/hypWNsNM3T7RpfgNq7H2TU1KEHA==} - engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} - - '@astrojs/vue@4.5.3': - resolution: {integrity: sha512-OP4qV48HKYlx5sbgadpzGofWpuvSi3Ae37PJHpFtGX7ryHNdZr96jUMlZmyW6x7sx5/hw89tNl+GjsNlKr6Gxg==} - engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} - peerDependencies: - astro: ^4.0.0 - vue: ^3.2.30 - '@astrojs/yaml2ts@0.2.1': resolution: {integrity: sha512-CBaNwDQJz20E5WxzQh4thLVfhB3JEEGz72wRA+oJp6fQR37QLAqXZJU0mHC+yqMOQ6oj0GfRPJrz6hjf+zm6zA==} @@ -7116,14 +7050,6 @@ packages: peerDependencies: solid-js: ^1.8.6 - '@sveltejs/vite-plugin-svelte-inspector@3.0.1': - resolution: {integrity: sha512-2CKypmj1sM4GE7HjllT7UKmo4Q6L5xFRd7VMGEWhYnZ+wc6AUVU01IBd7yUi6WnFndEwWoMNOd6e8UjoN0nbvQ==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22} - peerDependencies: - '@sveltejs/vite-plugin-svelte': ^4.0.0-next.0||^4.0.0 - svelte: ^5.0.0-next.96 || ^5.0.0 - vite: ^5.0.0 - '@sveltejs/vite-plugin-svelte-inspector@4.0.1': resolution: {integrity: sha512-J/Nmb2Q2y7mck2hyCX4ckVHcR5tu2J+MtBEQqpDrrgELZ2uvraQcK/ioCV61AqkdXFgriksOKIceDcQmqnGhVw==} engines: {node: ^18.0.0 || ^20.0.0 || >=22} @@ -7132,13 +7058,6 @@ packages: svelte: ^5.0.0 vite: ^6.0.0 - '@sveltejs/vite-plugin-svelte@4.0.2': - resolution: {integrity: sha512-Y9r/fWy539XlAC7+5wfNJ4zH6TygUYoQ0Eegzp0zDDqhJ54+92gOyOX1l4MO1cJSx0O+Gp13YePT5XEa3+kX0w==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22} - peerDependencies: - svelte: ^5.0.0-next.96 || ^5.0.0 - vite: ^5.0.0 - '@sveltejs/vite-plugin-svelte@5.0.1': resolution: {integrity: sha512-D5l5+STmywGoLST07T9mrqqFFU+xgv5fqyTWM+VbxTvQ6jujNn4h3lQNCvlwVYs4Erov8i0K5Rwr3LQtmBYmBw==} engines: {node: ^18.0.0 || ^20.0.0 || >=22} @@ -7664,11 +7583,6 @@ packages: resolution: {integrity: sha512-ufS/aOBXQKAe6hZ5NbiHUsC01o0ZcEwS+nNhd/mr1avLV+NbgYJEbwY8VRorzLs/GH5COOTaxl2795DkGIUTcw==} engines: {node: '>=18.14.1'} - astro@4.16.16: - resolution: {integrity: sha512-H1CttrV6+JFrDBQx0Mcbq5i5AeLhCbztB786+9wEu3svWL/QPNeCGqF0dgNORAYmP+rODGCPu/y9qKSh87iLuA==} - engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'} - hasBin: true - async-listen@3.0.1: resolution: {integrity: sha512-cWMaNwUJnf37C/S5TfCkk/15MwbPRwVYALA2jtjkbHjCmAPiDXyNJy2q3p1KAZzDLHAWyarUWSujUoHR4pEgrA==} engines: {node: '>= 14'} @@ -7861,14 +7775,6 @@ packages: resolution: {integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - cli-cursor@5.0.0: - resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} - engines: {node: '>=18'} - - cli-spinners@2.9.2: - resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} - engines: {node: '>=6'} - cli-table3@0.6.5: resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} engines: {node: 10.* || >= 12.*} @@ -8442,10 +8348,6 @@ packages: resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} engines: {node: '>=12.0.0'} - extend-shallow@2.0.1: - resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} - engines: {node: '>=0.10.0'} - extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} @@ -8651,10 +8553,6 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - gray-matter@4.0.3: - resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} - engines: {node: '>=6.0'} - has-async-hooks@1.0.0: resolution: {integrity: sha512-YF0VPGjkxr7AyyQQNykX8zK4PvtEDsUJAPqwu06UFz1lb6EvI53sPh5H1kWxg8NXI5LsfRCZ8uX9NkYDZBb/mw==} @@ -8853,10 +8751,6 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} hasBin: true - is-extendable@0.1.1: - resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} - engines: {node: '>=0.10.0'} - is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -8881,10 +8775,6 @@ packages: engines: {node: '>=14.16'} hasBin: true - is-interactive@2.0.0: - resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==} - engines: {node: '>=12'} - is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -8907,14 +8797,6 @@ packages: resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} engines: {node: '>=4'} - is-unicode-supported@1.3.0: - resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} - engines: {node: '>=12'} - - is-unicode-supported@2.1.0: - resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} - engines: {node: '>=18'} - is-what@4.1.16: resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==} engines: {node: '>=12.13'} @@ -9008,10 +8890,6 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - kind-of@6.0.3: - resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} - engines: {node: '>=0.10.0'} - kleur@3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} @@ -9097,10 +8975,6 @@ packages: lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - log-symbols@6.0.0: - resolution: {integrity: sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==} - engines: {node: '>=18'} - log-update@5.0.1: resolution: {integrity: sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -9387,10 +9261,6 @@ packages: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} engines: {node: '>=12'} - mimic-function@5.0.1: - resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} - engines: {node: '>=18'} - minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -9580,10 +9450,6 @@ packages: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} - onetime@7.0.0: - resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} - engines: {node: '>=18'} - oniguruma-to-es@0.4.1: resolution: {integrity: sha512-rNcEohFz095QKGRovP/yqPIKc+nP+Sjs4YTHMv33nMePGKrq/r2eu9Yh4646M5XluGJsUnmwoXuiXE69KDs+fQ==} @@ -9602,10 +9468,6 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} - ora@8.1.1: - resolution: {integrity: sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==} - engines: {node: '>=18'} - os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} @@ -10257,10 +10119,6 @@ packages: resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - restore-cursor@5.1.0: - resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} - engines: {node: '>=18'} - retext-latin@4.0.0: resolution: {integrity: sha512-hv9woG7Fy0M9IlRQloq/N6atV82NxLGveq+3H2WOi79dtIYWN8OaxogDm77f8YnVXJL2VD3bbqowu5E3EMhBYA==} @@ -10336,10 +10194,6 @@ packages: resolution: {integrity: sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==} engines: {node: ^14.0.0 || >=16.0.0} - section-matter@1.0.0: - resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} - engines: {node: '>=4'} - semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -10495,10 +10349,6 @@ packages: std-env@3.8.0: resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} - stdin-discarder@0.2.2: - resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==} - engines: {node: '>=18'} - stream-replace-string@2.0.0: resolution: {integrity: sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==} @@ -10525,10 +10375,6 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} - strip-bom-string@1.0.0: - resolution: {integrity: sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==} - engines: {node: '>=0.10.0'} - strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -10963,37 +10809,6 @@ packages: peerDependencies: vue: '>=3.2.13' - vite@5.4.11: - resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - sass-embedded: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - vite@6.0.1: resolution: {integrity: sha512-Ldn6gorLGr4mCdFnmeAOLweJxZ34HjKnDm4HGo6P66IEqTxQb36VEdFJQENKxWjupNfoIjvRUnswjn1hpYEpjQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -11456,8 +11271,6 @@ snapshots: '@astrojs/compiler@2.10.3': {} - '@astrojs/internal-helpers@0.4.1': {} - '@astrojs/language-server@2.15.0(prettier-plugin-astro@0.14.1)(prettier@3.4.1)(typescript@5.7.2)': dependencies: '@astrojs/compiler': 2.10.3 @@ -11484,73 +11297,6 @@ snapshots: transitivePeerDependencies: - typescript - '@astrojs/markdoc@0.11.5(@types/react@18.3.12)(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2))(react@18.3.1)': - dependencies: - '@astrojs/internal-helpers': 0.4.1 - '@astrojs/markdown-remark': 5.3.0 - '@astrojs/prism': 3.1.0 - '@markdoc/markdoc': 0.4.0(@types/react@18.3.12)(react@18.3.1) - astro: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) - esbuild: 0.21.5 - github-slugger: 2.0.0 - gray-matter: 4.0.3 - htmlparser2: 9.1.0 - transitivePeerDependencies: - - '@types/react' - - react - - supports-color - - '@astrojs/markdown-remark@5.3.0': - dependencies: - '@astrojs/prism': 3.1.0 - github-slugger: 2.0.0 - hast-util-from-html: 2.0.3 - hast-util-to-text: 4.0.2 - import-meta-resolve: 4.1.0 - mdast-util-definitions: 6.0.0 - rehype-raw: 7.0.0 - rehype-stringify: 10.0.1 - remark-gfm: 4.0.0 - remark-parse: 11.0.0 - remark-rehype: 11.1.1 - remark-smartypants: 3.0.2 - shiki: 1.23.1 - unified: 11.0.5 - unist-util-remove-position: 5.0.0 - unist-util-visit: 5.0.0 - unist-util-visit-parents: 6.0.1 - vfile: 6.0.3 - transitivePeerDependencies: - - supports-color - - '@astrojs/mdx@3.1.9(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2))': - dependencies: - '@astrojs/markdown-remark': 5.3.0 - '@mdx-js/mdx': 3.1.0(acorn@8.14.0) - acorn: 8.14.0 - astro: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) - es-module-lexer: 1.5.4 - estree-util-visit: 2.0.0 - gray-matter: 4.0.3 - hast-util-to-html: 9.0.3 - kleur: 4.1.5 - rehype-raw: 7.0.0 - remark-gfm: 4.0.0 - remark-smartypants: 3.0.2 - source-map: 0.7.4 - unist-util-visit: 5.0.0 - vfile: 6.0.3 - transitivePeerDependencies: - - supports-color - - '@astrojs/node@8.3.4(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2))': - dependencies: - astro: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) - send: 0.19.0 - server-destroy: 1.0.1 - transitivePeerDependencies: - - supports-color - '@astrojs/node@8.3.4(astro@packages+astro)': dependencies: astro: link:packages/astro @@ -11559,130 +11305,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/node@9.0.0-alpha.1(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2))': + '@astrojs/node@9.0.0-alpha.1(astro@packages+astro)': dependencies: - astro: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) + astro: link:packages/astro send: 0.18.0 server-destroy: 1.0.1 transitivePeerDependencies: - supports-color - '@astrojs/preact@3.5.4(@babel/core@7.26.0)(@types/node@18.19.50)(preact@10.24.3)(sass@1.81.0)': - dependencies: - '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.0) - '@babel/plugin-transform-react-jsx-development': 7.25.9(@babel/core@7.26.0) - '@preact/preset-vite': 2.8.2(@babel/core@7.26.0)(preact@10.24.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - '@preact/signals': 1.3.0(preact@10.24.3) - babel-plugin-transform-hook-names: 1.0.2(@babel/core@7.26.0) - preact: 10.24.3 - preact-render-to-string: 6.5.11(preact@10.24.3) - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - transitivePeerDependencies: - - '@babel/core' - - '@types/node' - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - '@astrojs/prism@3.1.0': - dependencies: - prismjs: 1.29.0 - - '@astrojs/react@3.6.3(@types/node@18.19.50)(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.81.0)': - dependencies: - '@types/react': 18.3.12 - '@types/react-dom': 18.3.1 - '@vitejs/plugin-react': 4.3.4(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - ultrahtml: 1.5.3 - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - '@astrojs/solid-js@4.4.4(@types/node@18.19.50)(sass@1.81.0)(solid-js@1.9.3)': - dependencies: - solid-js: 1.9.3 - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - vite-plugin-solid: 2.11.0(solid-js@1.9.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - transitivePeerDependencies: - - '@testing-library/jest-dom' - - '@types/node' - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - '@astrojs/svelte@6.0.2(@types/node@18.19.50)(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2))(sass@1.81.0)(svelte@5.2.3)(typescript@5.7.2)': - dependencies: - '@sveltejs/vite-plugin-svelte': 4.0.2(svelte@5.2.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - astro: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) - svelte: 5.2.3 - svelte2tsx: 0.7.22(svelte@5.2.3)(typescript@5.7.2) - typescript: 5.7.2 - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - '@astrojs/telemetry@3.1.0': - dependencies: - ci-info: 4.1.0 - debug: 4.3.7 - dlv: 1.1.3 - dset: 3.1.4 - is-docker: 3.0.0 - is-wsl: 3.1.0 - which-pm-runs: 1.1.0 - transitivePeerDependencies: - - supports-color - - '@astrojs/vue@4.5.3(@types/node@18.19.50)(astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2))(rollup@4.27.4)(sass@1.81.0)(vue@3.5.12(typescript@5.7.2))': - dependencies: - '@vitejs/plugin-vue': 5.2.1(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))(vue@3.5.12(typescript@5.7.2)) - '@vitejs/plugin-vue-jsx': 4.0.1(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))(vue@3.5.12(typescript@5.7.2)) - '@vue/compiler-sfc': 3.5.13 - astro: 4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2) - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - vite-plugin-vue-devtools: 7.6.4(rollup@4.27.4)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))(vue@3.5.12(typescript@5.7.2)) - vue: 3.5.12(typescript@5.7.2) - transitivePeerDependencies: - - '@nuxt/kit' - - '@types/node' - - less - - lightningcss - - rollup - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - '@astrojs/yaml2ts@0.2.1': dependencies: yaml: 2.5.1 @@ -12922,26 +12552,6 @@ snapshots: '@polka/url@1.0.0-next.25': {} - '@preact/preset-vite@2.8.2(@babel/core@7.26.0)(preact@10.24.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))': - dependencies: - '@babel/core': 7.26.0 - '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.0) - '@babel/plugin-transform-react-jsx-development': 7.25.9(@babel/core@7.26.0) - '@prefresh/vite': 2.4.5(preact@10.24.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - '@rollup/pluginutils': 4.2.1 - babel-plugin-transform-hook-names: 1.0.2(@babel/core@7.26.0) - debug: 4.3.7 - kolorist: 1.8.0 - magic-string: 0.30.5 - node-html-parser: 6.1.13 - resolve: 1.22.8 - source-map: 0.7.4 - stack-trace: 1.0.0-pre2 - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - transitivePeerDependencies: - - preact - - supports-color - '@preact/preset-vite@2.8.2(@babel/core@7.26.0)(preact@10.25.0)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))': dependencies: '@babel/core': 7.26.0 @@ -12976,28 +12586,12 @@ snapshots: '@prefresh/babel-plugin@0.5.1': {} - '@prefresh/core@1.5.2(preact@10.24.3)': - dependencies: - preact: 10.24.3 - '@prefresh/core@1.5.2(preact@10.25.0)': dependencies: preact: 10.25.0 '@prefresh/utils@1.2.0': {} - '@prefresh/vite@2.4.5(preact@10.24.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))': - dependencies: - '@babel/core': 7.26.0 - '@prefresh/babel-plugin': 0.5.1 - '@prefresh/core': 1.5.2(preact@10.24.3) - '@prefresh/utils': 1.2.0 - '@rollup/pluginutils': 4.2.1 - preact: 10.24.3 - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - transitivePeerDependencies: - - supports-color - '@prefresh/vite@2.4.5(preact@10.25.0)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))': dependencies: '@babel/core': 7.26.0 @@ -13110,15 +12704,6 @@ snapshots: dependencies: solid-js: 1.9.3 - '@sveltejs/vite-plugin-svelte-inspector@3.0.1(@sveltejs/vite-plugin-svelte@4.0.2(svelte@5.2.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)))(svelte@5.2.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))': - dependencies: - '@sveltejs/vite-plugin-svelte': 4.0.2(svelte@5.2.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - debug: 4.3.7 - svelte: 5.2.3 - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - transitivePeerDependencies: - - supports-color - '@sveltejs/vite-plugin-svelte-inspector@4.0.1(@sveltejs/vite-plugin-svelte@5.0.1(svelte@5.2.9)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)))(svelte@5.2.9)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))': dependencies: '@sveltejs/vite-plugin-svelte': 5.0.1(svelte@5.2.9)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)) @@ -13128,19 +12713,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@4.0.2(svelte@5.2.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))': - dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 3.0.1(@sveltejs/vite-plugin-svelte@4.0.2(svelte@5.2.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)))(svelte@5.2.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - debug: 4.3.7 - deepmerge: 4.3.1 - kleur: 4.1.5 - magic-string: 0.30.14 - svelte: 5.2.3 - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - vitefu: 1.0.4(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - transitivePeerDependencies: - - supports-color - '@sveltejs/vite-plugin-svelte@5.0.1(svelte@5.2.9)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))': dependencies: '@sveltejs/vite-plugin-svelte-inspector': 4.0.1(@sveltejs/vite-plugin-svelte@5.0.1(svelte@5.2.9)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)))(svelte@5.2.9)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)) @@ -13420,17 +12992,6 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-react@4.3.4(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))': - dependencies: - '@babel/core': 7.26.0 - '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0) - '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0) - '@types/babel__core': 7.20.5 - react-refresh: 0.14.2 - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - transitivePeerDependencies: - - supports-color - '@vitejs/plugin-react@4.3.4(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))': dependencies: '@babel/core': 7.26.0 @@ -13442,16 +13003,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue-jsx@4.0.1(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))(vue@3.5.12(typescript@5.7.2))': - dependencies: - '@babel/core': 7.26.0 - '@babel/plugin-transform-typescript': 7.25.2(@babel/core@7.26.0) - '@vue/babel-plugin-jsx': 1.2.5(@babel/core@7.26.0) - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - vue: 3.5.12(typescript@5.7.2) - transitivePeerDependencies: - - supports-color - '@vitejs/plugin-vue-jsx@4.0.1(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2))': dependencies: '@babel/core': 7.26.0 @@ -13462,11 +13013,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue@5.2.1(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))(vue@3.5.12(typescript@5.7.2))': - dependencies: - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - vue: 3.5.12(typescript@5.7.2) - '@vitejs/plugin-vue@5.2.1(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2))': dependencies: vite: 6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) @@ -13588,7 +13134,7 @@ snapshots: '@babel/helper-module-imports': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 '@babel/parser': 7.26.2 - '@vue/compiler-sfc': 3.5.13 + '@vue/compiler-sfc': 3.5.12 transitivePeerDependencies: - supports-color @@ -13652,18 +13198,6 @@ snapshots: '@vue/compiler-dom': 3.5.13 '@vue/shared': 3.5.13 - '@vue/devtools-core@7.6.4(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))(vue@3.5.12(typescript@5.7.2))': - dependencies: - '@vue/devtools-kit': 7.6.4 - '@vue/devtools-shared': 7.6.4 - mitt: 3.0.1 - nanoid: 3.3.7 - pathe: 1.1.2 - vite-hot-client: 0.2.3(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - vue: 3.5.12(typescript@5.7.2) - transitivePeerDependencies: - - vite - '@vue/devtools-core@7.6.4(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2))': dependencies: '@vue/devtools-kit': 7.6.4 @@ -13854,85 +13388,6 @@ snapshots: marked-smartypants: 1.1.8(marked@12.0.2) ultrahtml: 1.5.3 - astro@4.16.16(@types/node@18.19.50)(rollup@4.27.4)(sass@1.81.0)(typescript@5.7.2): - dependencies: - '@astrojs/compiler': 2.10.3 - '@astrojs/internal-helpers': 0.4.1 - '@astrojs/markdown-remark': 5.3.0 - '@astrojs/telemetry': 3.1.0 - '@babel/core': 7.26.0 - '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.0) - '@babel/types': 7.26.0 - '@oslojs/encoding': 1.1.0 - '@rollup/pluginutils': 5.1.3(rollup@4.27.4) - '@types/babel__core': 7.20.5 - '@types/cookie': 0.6.0 - acorn: 8.14.0 - aria-query: 5.3.2 - axobject-query: 4.1.0 - boxen: 8.0.1 - ci-info: 4.1.0 - clsx: 2.1.1 - common-ancestor-path: 1.0.1 - cookie: 0.7.2 - cssesc: 3.0.0 - debug: 4.3.7 - deterministic-object-hash: 2.0.2 - devalue: 5.1.1 - diff: 5.2.0 - dlv: 1.1.3 - dset: 3.1.4 - es-module-lexer: 1.5.4 - esbuild: 0.21.5 - estree-walker: 3.0.3 - fast-glob: 3.3.2 - flattie: 1.1.1 - github-slugger: 2.0.0 - gray-matter: 4.0.3 - html-escaper: 3.0.3 - http-cache-semantics: 4.1.1 - js-yaml: 4.1.0 - kleur: 4.1.5 - magic-string: 0.30.14 - magicast: 0.3.5 - micromatch: 4.0.8 - mrmime: 2.0.0 - neotraverse: 0.6.18 - ora: 8.1.1 - p-limit: 6.1.0 - p-queue: 8.0.1 - preferred-pm: 4.0.0 - prompts: 2.4.2 - rehype: 13.0.2 - semver: 7.6.3 - shiki: 1.23.1 - tinyexec: 0.3.1 - tsconfck: 3.1.4(typescript@5.7.2) - unist-util-visit: 5.0.0 - vfile: 6.0.3 - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - vitefu: 1.0.4(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - which-pm: 3.0.0 - xxhash-wasm: 1.1.0 - yargs-parser: 21.1.1 - zod: 3.23.8 - zod-to-json-schema: 3.23.5(zod@3.23.8) - zod-to-ts: 1.2.0(typescript@5.7.2)(zod@3.23.8) - optionalDependencies: - sharp: 0.33.3 - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - rollup - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - typescript - async-listen@3.0.1: {} asynckit@0.4.0: {} @@ -14159,12 +13614,6 @@ snapshots: dependencies: restore-cursor: 4.0.0 - cli-cursor@5.0.0: - dependencies: - restore-cursor: 5.1.0 - - cli-spinners@2.9.2: {} - cli-table3@0.6.5: dependencies: string-width: 4.2.3 @@ -14671,10 +14120,6 @@ snapshots: expect-type@1.1.0: {} - extend-shallow@2.0.1: - dependencies: - is-extendable: 0.1.1 - extend@3.0.2: {} extendable-error@0.1.7: {} @@ -14877,13 +14322,6 @@ snapshots: graphemer@1.4.0: {} - gray-matter@4.0.3: - dependencies: - js-yaml: 3.14.1 - kind-of: 6.0.3 - section-matter: 1.0.0 - strip-bom-string: 1.0.0 - has-async-hooks@1.0.0: {} has-flag@4.0.0: {} @@ -15189,8 +14627,6 @@ snapshots: is-docker@3.0.0: {} - is-extendable@0.1.1: {} - is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} @@ -15207,8 +14643,6 @@ snapshots: dependencies: is-docker: 3.0.0 - is-interactive@2.0.0: {} - is-number@7.0.0: {} is-plain-obj@4.1.0: {} @@ -15225,10 +14659,6 @@ snapshots: dependencies: better-path-resolve: 1.0.0 - is-unicode-supported@1.3.0: {} - - is-unicode-supported@2.1.0: {} - is-what@4.1.16: {} is-windows@1.0.2: {} @@ -15326,8 +14756,6 @@ snapshots: dependencies: json-buffer: 3.0.1 - kind-of@6.0.3: {} - kleur@3.0.3: {} kleur@4.1.5: {} @@ -15425,11 +14853,6 @@ snapshots: lodash@4.17.21: {} - log-symbols@6.0.0: - dependencies: - chalk: 5.3.0 - is-unicode-supported: 1.3.0 - log-update@5.0.1: dependencies: ansi-escapes: 5.0.0 @@ -15999,8 +15422,6 @@ snapshots: mimic-fn@4.0.0: {} - mimic-function@5.0.1: {} - minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 @@ -16157,10 +15578,6 @@ snapshots: dependencies: mimic-fn: 4.0.0 - onetime@7.0.0: - dependencies: - mimic-function: 5.0.1 - oniguruma-to-es@0.4.1: dependencies: emoji-regex-xs: 1.0.0 @@ -16189,18 +15606,6 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 - ora@8.1.1: - dependencies: - chalk: 5.3.0 - cli-cursor: 5.0.0 - cli-spinners: 2.9.2 - is-interactive: 2.0.0 - is-unicode-supported: 2.1.0 - log-symbols: 6.0.0 - stdin-discarder: 0.2.2 - string-width: 7.2.0 - strip-ansi: 7.1.0 - os-tmpdir@1.0.2: {} outdent@0.5.0: {} @@ -16614,10 +16019,6 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - preact-render-to-string@6.5.11(preact@10.24.3): - dependencies: - preact: 10.24.3 - preact-render-to-string@6.5.11(preact@10.25.0): dependencies: preact: 10.25.0 @@ -16961,11 +16362,6 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 - restore-cursor@5.1.0: - dependencies: - onetime: 7.0.0 - signal-exit: 4.1.0 - retext-latin@4.0.0: dependencies: '@types/nlcst': 2.0.3 @@ -17069,11 +16465,6 @@ snapshots: refa: 0.12.1 regexp-ast-analysis: 0.7.1 - section-matter@1.0.0: - dependencies: - extend-shallow: 2.0.1 - kind-of: 6.0.3 - semver@6.3.1: {} semver@7.6.3: {} @@ -17276,8 +16667,6 @@ snapshots: std-env@3.8.0: {} - stdin-discarder@0.2.2: {} - stream-replace-string@2.0.0: {} string-width@4.2.3: @@ -17311,8 +16700,6 @@ snapshots: dependencies: ansi-regex: 6.1.0 - strip-bom-string@1.0.0: {} - strip-bom@3.0.0: {} strip-final-newline@3.0.0: {} @@ -17364,13 +16751,6 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte2tsx@0.7.22(svelte@5.2.3)(typescript@5.7.2): - dependencies: - dedent-js: 1.0.1 - pascal-case: 3.1.2 - svelte: 5.2.3 - typescript: 5.7.2 - svelte2tsx@0.7.22(svelte@5.2.9)(typescript@5.7.2): dependencies: dedent-js: 1.0.1 @@ -17768,10 +17148,6 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-hot-client@0.2.3(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)): - dependencies: - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - vite-hot-client@0.2.3(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)): dependencies: vite: 6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) @@ -17797,22 +17173,6 @@ snapshots: - tsx - yaml - vite-plugin-inspect@0.8.7(rollup@4.27.4)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)): - dependencies: - '@antfu/utils': 0.7.10 - '@rollup/pluginutils': 5.1.3(rollup@4.27.4) - debug: 4.3.7 - error-stack-parser-es: 0.1.5 - fs-extra: 11.2.0 - open: 10.1.0 - perfect-debounce: 1.0.0 - picocolors: 1.1.1 - sirv: 2.0.4 - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - transitivePeerDependencies: - - rollup - - supports-color - vite-plugin-inspect@0.8.7(rollup@4.27.4)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)): dependencies: '@antfu/utils': 0.7.10 @@ -17829,19 +17189,6 @@ snapshots: - rollup - supports-color - vite-plugin-solid@2.11.0(solid-js@1.9.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)): - dependencies: - '@babel/core': 7.26.0 - '@types/babel__core': 7.20.5 - babel-preset-solid: 1.8.22(@babel/core@7.26.0) - merge-anything: 5.1.7 - solid-js: 1.9.3 - solid-refresh: 0.6.3(solid-js@1.9.3) - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - vitefu: 1.0.4(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - transitivePeerDependencies: - - supports-color - vite-plugin-solid@2.11.0(solid-js@1.9.3)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)): dependencies: '@babel/core': 7.26.0 @@ -17855,22 +17202,6 @@ snapshots: transitivePeerDependencies: - supports-color - vite-plugin-vue-devtools@7.6.4(rollup@4.27.4)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))(vue@3.5.12(typescript@5.7.2)): - dependencies: - '@vue/devtools-core': 7.6.4(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))(vue@3.5.12(typescript@5.7.2)) - '@vue/devtools-kit': 7.6.4 - '@vue/devtools-shared': 7.6.4 - execa: 8.0.1 - sirv: 3.0.0 - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - vite-plugin-inspect: 0.8.7(rollup@4.27.4)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - vite-plugin-vue-inspector: 5.2.0(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) - transitivePeerDependencies: - - '@nuxt/kit' - - rollup - - supports-color - - vue - vite-plugin-vue-devtools@7.6.4(rollup@4.27.4)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2)): dependencies: '@vue/devtools-core': 7.6.4(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2)) @@ -17887,21 +17218,6 @@ snapshots: - supports-color - vue - vite-plugin-vue-inspector@5.2.0(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)): - dependencies: - '@babel/core': 7.26.0 - '@babel/plugin-proposal-decorators': 7.24.7(@babel/core@7.26.0) - '@babel/plugin-syntax-import-attributes': 7.25.6(@babel/core@7.26.0) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.0) - '@babel/plugin-transform-typescript': 7.25.2(@babel/core@7.26.0) - '@vue/babel-plugin-jsx': 1.2.5(@babel/core@7.26.0) - '@vue/compiler-dom': 3.5.12 - kolorist: 1.8.0 - magic-string: 0.30.14 - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - transitivePeerDependencies: - - supports-color - vite-plugin-vue-inspector@5.2.0(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)): dependencies: '@babel/core': 7.26.0 @@ -17922,16 +17238,6 @@ snapshots: svgo: 3.3.2 vue: 3.5.13(typescript@5.7.2) - vite@5.4.11(@types/node@18.19.50)(sass@1.81.0): - dependencies: - esbuild: 0.21.5 - postcss: 8.4.49 - rollup: 4.27.4 - optionalDependencies: - '@types/node': 18.19.50 - fsevents: 2.3.3 - sass: 1.81.0 - vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1): dependencies: esbuild: 0.24.0 @@ -17944,10 +17250,6 @@ snapshots: sass: 1.81.0 yaml: 2.5.1 - vitefu@1.0.4(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)): - optionalDependencies: - vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) - vitefu@1.0.4(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)): optionalDependencies: vite: 6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) From b731b3de73262f8ab9544b1228ea9e693e488b6c Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Tue, 3 Dec 2024 10:51:34 +0000 Subject: [PATCH 10/17] fix: make image endpoint highest priority (#12591) * fix: make image endpoint highest priority * Use config for endpoint * Add test --- .changeset/plenty-carrots-nail.md | 5 +++++ packages/astro/src/assets/endpoint/config.ts | 6 +++--- .../src/pages/{index.astro => [...catchall].astro} | 0 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/plenty-carrots-nail.md rename packages/astro/test/fixtures/core-image-ssr/src/pages/{index.astro => [...catchall].astro} (100%) diff --git a/.changeset/plenty-carrots-nail.md b/.changeset/plenty-carrots-nail.md new file mode 100644 index 000000000000..706366b40cce --- /dev/null +++ b/.changeset/plenty-carrots-nail.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes a bug where a catchall route would match an image endpoint request diff --git a/packages/astro/src/assets/endpoint/config.ts b/packages/astro/src/assets/endpoint/config.ts index b9309d446997..cce5cde5fc37 100644 --- a/packages/astro/src/assets/endpoint/config.ts +++ b/packages/astro/src/assets/endpoint/config.ts @@ -13,7 +13,7 @@ export function injectImageEndpoint( mode: 'dev' | 'build', cwd?: string, ) { - manifest.routes.push(getImageEndpointData(settings, mode, cwd)); + manifest.routes.unshift(getImageEndpointData(settings, mode, cwd)); } export function ensureImageEndpointRoute( @@ -22,8 +22,8 @@ export function ensureImageEndpointRoute( mode: 'dev' | 'build', cwd?: string, ) { - if (!manifest.routes.some((route) => route.route === '/_image')) { - manifest.routes.push(getImageEndpointData(settings, mode, cwd)); + if (!manifest.routes.some((route) => route.route === settings.config.image.endpoint.route)) { + manifest.routes.unshift(getImageEndpointData(settings, mode, cwd)); } } diff --git a/packages/astro/test/fixtures/core-image-ssr/src/pages/index.astro b/packages/astro/test/fixtures/core-image-ssr/src/pages/[...catchall].astro similarity index 100% rename from packages/astro/test/fixtures/core-image-ssr/src/pages/index.astro rename to packages/astro/test/fixtures/core-image-ssr/src/pages/[...catchall].astro From bc18c3cfe220022e152fd0a8f617f6b4fc3ad8b4 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Tue, 3 Dec 2024 10:52:51 +0000 Subject: [PATCH 11/17] chore: exit pre-mode (#12553) --- .changeset/config.json | 2 +- .changeset/pre.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index 7920f52b81f8..030941db2347 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -4,7 +4,7 @@ "commit": false, "linked": [], "access": "public", - "baseBranch": "next", + "baseBranch": "main", "updateInternalDependencies": "patch", "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { "onlyUpdatePeerDependentsWhenOutOfRange": true diff --git a/.changeset/pre.json b/.changeset/pre.json index 9dd14d8a442a..88b57d43a462 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -1,5 +1,5 @@ { - "mode": "pre", + "mode": "exit", "tag": "beta", "initialVersions": { "astro": "5.0.0-alpha.9", From fcdd37f684833eeb00dcecad21d9f4308cd6caa4 Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Tue, 3 Dec 2024 02:56:34 -0800 Subject: [PATCH 12/17] [ci] release (#12567) Co-authored-by: github-actions[bot] --- .changeset/afraid-apricots-buy.md | 20 - .changeset/blue-boats-relax.md | 9 - .changeset/blue-gorillas-accept.md | 5 - .changeset/blue-sloths-stare.md | 14 - .changeset/blue-socks-doubt.md | 30 - .changeset/brave-elephants-fly.md | 21 - .changeset/breezy-brooms-count.md | 5 - .changeset/breezy-colts-promise.md | 5 - .changeset/bright-keys-sell.md | 5 - .changeset/brown-bulldogs-share.md | 5 - .changeset/chatty-teachers-sit.md | 5 - .changeset/chilly-terms-know.md | 15 - .changeset/clean-camels-drive.md | 7 - .changeset/clean-donuts-walk.md | 13 - .changeset/clean-moles-rest.md | 5 - .changeset/cold-bananas-hear.md | 5 - .changeset/cool-mangos-shop.md | 25 - .changeset/cuddly-shoes-press.md | 5 - .changeset/curvy-walls-kneel.md | 45 - .changeset/dirty-bees-repair.md | 5 - .changeset/dirty-cooks-explode.md | 9 - .changeset/dry-lamps-smile.md | 5 - .changeset/dry-worms-knock.md | 18 - .changeset/dull-moles-talk.md | 5 - .changeset/eight-days-sort.md | 14 - .changeset/eight-seahorses-attend.md | 5 - .changeset/eighty-bags-cross.md | 5 - .changeset/eighty-boxes-applaud.md | 48 - .changeset/eighty-crabs-cross.md | 5 - .changeset/eighty-donkeys-fly.md | 14 - .changeset/eighty-ligers-punch.md | 5 - .changeset/empty-houses-melt.md | 5 - .changeset/empty-jobs-impress.md | 5 - .changeset/fair-ears-compare.md | 16 - .changeset/five-jars-hear.md | 11 - .changeset/fluffy-jars-live.md | 7 - .changeset/forty-trains-notice.md | 5 - .changeset/fresh-pandas-drive.md | 5 - .changeset/funny-wolves-dream.md | 5 - .changeset/fuzzy-pugs-live.md | 21 - .changeset/gentle-scissors-bow.md | 5 - .changeset/giant-ravens-look.md | 50 - .changeset/giant-rocks-thank.md | 21 - .changeset/gorgeous-foxes-divide.md | 5 - .changeset/healthy-ads-scream.md | 13 - .changeset/heavy-peas-sneeze.md | 6 - .changeset/heavy-seahorses-poke.md | 102 -- .changeset/hip-wombats-exercise.md | 11 - .changeset/honest-dingos-add.md | 23 - .changeset/hot-camels-move.md | 5 - .changeset/hungry-jokes-try.md | 5 - .changeset/itchy-toys-march.md | 17 - .changeset/large-zebras-sniff.md | 9 - .changeset/lemon-frogs-wait.md | 5 - .changeset/light-pears-accept.md | 7 - .changeset/long-lions-do.md | 22 - .changeset/long-months-rule.md | 19 - .changeset/loud-cougars-grow.md | 7 - .changeset/lovely-pianos-breathe.md | 68 - .changeset/many-garlics-lick.md | 14 - .changeset/mean-donkeys-switch.md | 6 - .changeset/metal-birds-admire.md | 5 - .changeset/modern-bears-deny.md | 16 - .changeset/moody-waves-think.md | 11 - .changeset/nasty-crabs-worry.md | 25 - .changeset/neat-dots-hear.md | 11 - .changeset/neat-queens-learn.md | 5 - .changeset/old-actors-learn.md | 10 - .changeset/old-zebras-teach.md | 19 - .changeset/perfect-fans-fly.md | 7 - .changeset/pink-yaks-exercise.md | 5 - .changeset/plenty-carrots-nail.md | 5 - .changeset/polite-roses-fail.md | 5 - .changeset/poor-dots-add.md | 7 - .changeset/poor-frogs-dream.md | 7 - .changeset/poor-seals-clap.md | 7 - .changeset/pre.json | 146 -- .changeset/pretty-walls-camp.md | 5 - .changeset/proud-games-repair.md | 7 - .changeset/proud-terms-swim.md | 90 -- .changeset/quick-ads-exercise.md | 10 - .changeset/quick-onions-leave.md | 47 - .changeset/red-paws-juggle.md | 5 - .changeset/rotten-dodos-judge.md | 5 - .changeset/rotten-phones-scream.md | 5 - .changeset/selfish-cats-crash.md | 5 - .changeset/selfish-impalas-grin.md | 6 - .changeset/sharp-worms-sniff.md | 5 - .changeset/sixty-coins-worry.md | 31 - .changeset/sixty-fishes-flow.md | 6 - .changeset/sixty-oranges-walk.md | 7 - .changeset/slimy-jeans-train.md | 9 - .changeset/slimy-mice-dance.md | 5 - .changeset/slimy-queens-hang.md | 7 - .changeset/small-ties-sort.md | 50 - .changeset/smooth-panthers-heal.md | 5 - .changeset/spotty-garlics-cheat.md | 22 - .changeset/strange-sheep-film.md | 40 - .changeset/strong-months-grab.md | 11 - .changeset/sweet-timers-smash.md | 8 - .changeset/tall-waves-impress.md | 62 - .changeset/tame-hats-fold.md | 5 - .changeset/tame-pumpkins-swim.md | 5 - .changeset/tame-rats-cross.md | 5 - .changeset/tasty-snails-protect.md | 5 - .changeset/ten-students-repair.md | 14 - .changeset/ten-walls-tap.md | 24 - .changeset/thirty-clocks-jump.md | 7 - .changeset/three-days-cough.md | 7 - .changeset/three-olives-reflect.md | 25 - .changeset/tough-planets-dress.md | 5 - .changeset/twelve-comics-march.md | 5 - .changeset/twenty-cobras-push.md | 32 - .changeset/twenty-lobsters-think.md | 5 - .changeset/unlucky-bobcats-sit.md | 5 - .changeset/violet-goats-grab.md | 7 - .changeset/wet-foxes-walk.md | 28 - .changeset/wise-carrots-float.md | 29 - .changeset/young-terms-hammer.md | 5 - examples/basics/package.json | 2 +- examples/blog/package.json | 4 +- examples/component/package.json | 2 +- examples/container-with-vitest/package.json | 4 +- examples/framework-alpine/package.json | 2 +- examples/framework-multiple/package.json | 12 +- examples/framework-preact/package.json | 4 +- examples/framework-react/package.json | 4 +- examples/framework-solid/package.json | 4 +- examples/framework-svelte/package.json | 4 +- examples/framework-vue/package.json | 4 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/minimal/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 4 +- examples/starlog/package.json | 2 +- examples/toolbar-app/package.json | 2 +- examples/with-markdoc/package.json | 4 +- examples/with-mdx/package.json | 6 +- examples/with-nanostores/package.json | 4 +- examples/with-tailwindcss/package.json | 4 +- examples/with-vitest/package.json | 2 +- packages/astro-prism/CHANGELOG.md | 6 + packages/astro-prism/package.json | 2 +- packages/astro/CHANGELOG.md | 1290 +++++++++++++++++ packages/astro/package.json | 2 +- packages/create-astro/CHANGELOG.md | 13 + packages/create-astro/package.json | 2 +- packages/db/CHANGELOG.md | 17 + packages/db/package.json | 2 +- packages/integrations/markdoc/CHANGELOG.md | 19 + packages/integrations/markdoc/package.json | 2 +- packages/integrations/mdx/CHANGELOG.md | 35 + packages/integrations/mdx/package.json | 2 +- packages/integrations/node/CHANGELOG.md | 24 + packages/integrations/node/package.json | 2 +- packages/integrations/preact/CHANGELOG.md | 10 + packages/integrations/preact/package.json | 2 +- packages/integrations/react/CHANGELOG.md | 12 + packages/integrations/react/package.json | 2 +- packages/integrations/sitemap/package.json | 2 +- packages/integrations/solid/CHANGELOG.md | 14 + packages/integrations/solid/package.json | 2 +- packages/integrations/svelte/CHANGELOG.md | 20 + packages/integrations/svelte/package.json | 2 +- packages/integrations/vercel/CHANGELOG.md | 34 + packages/integrations/vercel/package.json | 2 +- packages/integrations/vue/CHANGELOG.md | 16 + packages/integrations/vue/package.json | 2 +- packages/integrations/web-vitals/CHANGELOG.md | 10 + packages/integrations/web-vitals/package.json | 2 +- packages/internal-helpers/CHANGELOG.md | 6 + packages/internal-helpers/package.json | 2 +- packages/markdown/remark/CHANGELOG.md | 37 + packages/markdown/remark/package.json | 2 +- packages/studio/CHANGELOG.md | 6 + packages/studio/package.json | 2 +- packages/telemetry/CHANGELOG.md | 6 + packages/telemetry/package.json | 2 +- packages/underscore-redirects/CHANGELOG.md | 12 + packages/underscore-redirects/package.json | 2 +- packages/upgrade/CHANGELOG.md | 10 + packages/upgrade/package.json | 2 +- pnpm-lock.yaml | 86 +- 184 files changed, 1702 insertions(+), 1949 deletions(-) delete mode 100644 .changeset/afraid-apricots-buy.md delete mode 100644 .changeset/blue-boats-relax.md delete mode 100644 .changeset/blue-gorillas-accept.md delete mode 100644 .changeset/blue-sloths-stare.md delete mode 100644 .changeset/blue-socks-doubt.md delete mode 100644 .changeset/brave-elephants-fly.md delete mode 100644 .changeset/breezy-brooms-count.md delete mode 100644 .changeset/breezy-colts-promise.md delete mode 100644 .changeset/bright-keys-sell.md delete mode 100644 .changeset/brown-bulldogs-share.md delete mode 100644 .changeset/chatty-teachers-sit.md delete mode 100644 .changeset/chilly-terms-know.md delete mode 100644 .changeset/clean-camels-drive.md delete mode 100644 .changeset/clean-donuts-walk.md delete mode 100644 .changeset/clean-moles-rest.md delete mode 100644 .changeset/cold-bananas-hear.md delete mode 100644 .changeset/cool-mangos-shop.md delete mode 100644 .changeset/cuddly-shoes-press.md delete mode 100644 .changeset/curvy-walls-kneel.md delete mode 100644 .changeset/dirty-bees-repair.md delete mode 100644 .changeset/dirty-cooks-explode.md delete mode 100644 .changeset/dry-lamps-smile.md delete mode 100644 .changeset/dry-worms-knock.md delete mode 100644 .changeset/dull-moles-talk.md delete mode 100644 .changeset/eight-days-sort.md delete mode 100644 .changeset/eight-seahorses-attend.md delete mode 100644 .changeset/eighty-bags-cross.md delete mode 100644 .changeset/eighty-boxes-applaud.md delete mode 100644 .changeset/eighty-crabs-cross.md delete mode 100644 .changeset/eighty-donkeys-fly.md delete mode 100644 .changeset/eighty-ligers-punch.md delete mode 100644 .changeset/empty-houses-melt.md delete mode 100644 .changeset/empty-jobs-impress.md delete mode 100644 .changeset/fair-ears-compare.md delete mode 100644 .changeset/five-jars-hear.md delete mode 100644 .changeset/fluffy-jars-live.md delete mode 100644 .changeset/forty-trains-notice.md delete mode 100644 .changeset/fresh-pandas-drive.md delete mode 100644 .changeset/funny-wolves-dream.md delete mode 100644 .changeset/fuzzy-pugs-live.md delete mode 100644 .changeset/gentle-scissors-bow.md delete mode 100644 .changeset/giant-ravens-look.md delete mode 100644 .changeset/giant-rocks-thank.md delete mode 100644 .changeset/gorgeous-foxes-divide.md delete mode 100644 .changeset/healthy-ads-scream.md delete mode 100644 .changeset/heavy-peas-sneeze.md delete mode 100644 .changeset/heavy-seahorses-poke.md delete mode 100644 .changeset/hip-wombats-exercise.md delete mode 100644 .changeset/honest-dingos-add.md delete mode 100644 .changeset/hot-camels-move.md delete mode 100644 .changeset/hungry-jokes-try.md delete mode 100644 .changeset/itchy-toys-march.md delete mode 100644 .changeset/large-zebras-sniff.md delete mode 100644 .changeset/lemon-frogs-wait.md delete mode 100644 .changeset/light-pears-accept.md delete mode 100644 .changeset/long-lions-do.md delete mode 100644 .changeset/long-months-rule.md delete mode 100644 .changeset/loud-cougars-grow.md delete mode 100644 .changeset/lovely-pianos-breathe.md delete mode 100644 .changeset/many-garlics-lick.md delete mode 100644 .changeset/mean-donkeys-switch.md delete mode 100644 .changeset/metal-birds-admire.md delete mode 100644 .changeset/modern-bears-deny.md delete mode 100644 .changeset/moody-waves-think.md delete mode 100644 .changeset/nasty-crabs-worry.md delete mode 100644 .changeset/neat-dots-hear.md delete mode 100644 .changeset/neat-queens-learn.md delete mode 100644 .changeset/old-actors-learn.md delete mode 100644 .changeset/old-zebras-teach.md delete mode 100644 .changeset/perfect-fans-fly.md delete mode 100644 .changeset/pink-yaks-exercise.md delete mode 100644 .changeset/plenty-carrots-nail.md delete mode 100644 .changeset/polite-roses-fail.md delete mode 100644 .changeset/poor-dots-add.md delete mode 100644 .changeset/poor-frogs-dream.md delete mode 100644 .changeset/poor-seals-clap.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/pretty-walls-camp.md delete mode 100644 .changeset/proud-games-repair.md delete mode 100644 .changeset/proud-terms-swim.md delete mode 100644 .changeset/quick-ads-exercise.md delete mode 100644 .changeset/quick-onions-leave.md delete mode 100644 .changeset/red-paws-juggle.md delete mode 100644 .changeset/rotten-dodos-judge.md delete mode 100644 .changeset/rotten-phones-scream.md delete mode 100644 .changeset/selfish-cats-crash.md delete mode 100644 .changeset/selfish-impalas-grin.md delete mode 100644 .changeset/sharp-worms-sniff.md delete mode 100644 .changeset/sixty-coins-worry.md delete mode 100644 .changeset/sixty-fishes-flow.md delete mode 100644 .changeset/sixty-oranges-walk.md delete mode 100644 .changeset/slimy-jeans-train.md delete mode 100644 .changeset/slimy-mice-dance.md delete mode 100644 .changeset/slimy-queens-hang.md delete mode 100644 .changeset/small-ties-sort.md delete mode 100644 .changeset/smooth-panthers-heal.md delete mode 100644 .changeset/spotty-garlics-cheat.md delete mode 100644 .changeset/strange-sheep-film.md delete mode 100644 .changeset/strong-months-grab.md delete mode 100644 .changeset/sweet-timers-smash.md delete mode 100644 .changeset/tall-waves-impress.md delete mode 100644 .changeset/tame-hats-fold.md delete mode 100644 .changeset/tame-pumpkins-swim.md delete mode 100644 .changeset/tame-rats-cross.md delete mode 100644 .changeset/tasty-snails-protect.md delete mode 100644 .changeset/ten-students-repair.md delete mode 100644 .changeset/ten-walls-tap.md delete mode 100644 .changeset/thirty-clocks-jump.md delete mode 100644 .changeset/three-days-cough.md delete mode 100644 .changeset/three-olives-reflect.md delete mode 100644 .changeset/tough-planets-dress.md delete mode 100644 .changeset/twelve-comics-march.md delete mode 100644 .changeset/twenty-cobras-push.md delete mode 100644 .changeset/twenty-lobsters-think.md delete mode 100644 .changeset/unlucky-bobcats-sit.md delete mode 100644 .changeset/violet-goats-grab.md delete mode 100644 .changeset/wet-foxes-walk.md delete mode 100644 .changeset/wise-carrots-float.md delete mode 100644 .changeset/young-terms-hammer.md create mode 100644 packages/integrations/node/CHANGELOG.md create mode 100644 packages/integrations/vercel/CHANGELOG.md diff --git a/.changeset/afraid-apricots-buy.md b/.changeset/afraid-apricots-buy.md deleted file mode 100644 index 8be7e9db8110..000000000000 --- 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 93d9b51ca220..000000000000 --- 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 b122a95583a0..000000000000 --- 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 53ab43b2ef8a..000000000000 --- 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 638e22e0804d..000000000000 --- 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'; ---- - - -``` - -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 0c76730279a4..000000000000 --- 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 bb64e983aed0..000000000000 --- 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 b552cb7f5e16..000000000000 --- 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 0222aaf51c53..000000000000 --- 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 c8cadb11b28c..000000000000 --- 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 9e4fd89b4558..000000000000 --- 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 ea5de66029dc..000000000000 --- 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 `/dist/nested/client/` -- `build.server` will resolve to `/dist/nested/server/` - -Previously the values were incorrectly resolved: - -- `build.client` was resolved to `/dist/nested/dist/client/` -- `build.server` was resolved to `/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 4e908a28b9ff..000000000000 --- 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 1af111a4be39..000000000000 --- 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` 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 6925bd90cf19..000000000000 --- 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 dfa9ade4af39..000000000000 --- 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 893ed22e20f4..000000000000 --- 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 65f9fe7ef4bf..000000000000 --- 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 dc04cb0af4aa..000000000000 --- 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 98fc2f714e5d..000000000000 --- 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 770ef17999d9..000000000000 --- 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 `` 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 `` tag. - -If you require `charset=utf-8` to render your page correctly, make sure that your layout components have the `` tag added. diff --git a/.changeset/dry-lamps-smile.md b/.changeset/dry-lamps-smile.md deleted file mode 100644 index 95f5172a9356..000000000000 --- 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 e8412e3be83f..000000000000 --- 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 97d3d0eb2817..000000000000 --- 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 871f53d32df6..000000000000 --- 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 72ead3c15e45..000000000000 --- 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 734ef71c1dfd..000000000000 --- 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 a732758cb93c..000000000000 --- 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}` - }, -}) ---- - - -``` - -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 57bd3b1f4322..000000000000 --- 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 8cec4623638b..000000000000 --- 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 ee7acbec3b87..000000000000 --- 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 737cf9d3dbd8..000000000000 --- 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 09a57fe39130..000000000000 --- 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 a5c3bd3ff510..000000000000 --- 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 1385c7f03bc0..000000000000 --- a/.changeset/five-jars-hear.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'astro': patch ---- - -Updates Astro's default ` + ``` + + 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 `` 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(); + --- + + + ``` + +- [#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//**/*.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//**/*{.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 + +

    +

    + + +

    +

    + + +

    +

    + ``` + + Astro v5.0 now preserves the full data attribute with its value when rendering the HTML of non-boolean attributes: + + ```diff +

    +

    + +

    + -

    + +

    + + -

    + +

    + -

    + +

    + ``` + + 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 `` 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 `` 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 `` 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; + --- + + ``` + +- [#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'; + --- + + + ``` + + 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); + --- + + + ``` + + ### 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 `` component has been renamed to ``. 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 `` or `` 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'; + --- + + A description of my image. + + ``` + + This `` component will generate the following HTML output: + + ```html title=Output + A description of my image + ``` + + #### Responsive image properties + + These are additional properties available to the `` and `` 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 `` and `` 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 `` and `` components unless overridden + experimentalLayout: 'responsive', + }, + experimental: { + responsiveImages: true, + }, + } + ``` + + ```astro + --- + import { Image } from 'astro:assets'; + import myImage from '../assets/my_image.png'; + --- + + This will use responsive layout + + This will use full-width layout + + This will disable responsive images + ``` + + 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'; + --- + +
    +

    Page Title

    +
    + + + +
    +
    + ``` + + 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 `/.astro/integrations/`. + + 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, `/.astro/integrations/` 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 `