From 4af56b0a8c25d699e93dd1dcf4d5aa9159d7a895 Mon Sep 17 00:00:00 2001 From: Fabian von Tiedemann Date: Fri, 3 Apr 2026 14:12:32 +0200 Subject: [PATCH] feat: add Astro 6 support to @keystatic/astro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bump peerDependencies astro range from "2 || 3 || 4 || 5" to "2 || 3 || 4 || 5 || 6" - Rename internal/keystatic-page.js → keystatic-page.tsx so Astro 6's SSR build pipeline correctly identifies the file as a React component. In production builds, Astro 6 matches framework renderers by file extension; a bare .js file triggers "NoMatchingRenderer" for client:only="react" components. Renaming to .tsx fixes this. Fixes #1515 --- packages/astro/internal/keystatic-astro-page.astro | 2 +- .../astro/internal/{keystatic-page.js => keystatic-page.tsx} | 0 packages/astro/package.json | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename packages/astro/internal/{keystatic-page.js => keystatic-page.tsx} (100%) diff --git a/packages/astro/internal/keystatic-astro-page.astro b/packages/astro/internal/keystatic-astro-page.astro index 75945d14d..545b6ee35 100644 --- a/packages/astro/internal/keystatic-astro-page.astro +++ b/packages/astro/internal/keystatic-astro-page.astro @@ -1,5 +1,5 @@ --- -import { Keystatic } from './keystatic-page.js'; +import { Keystatic } from './keystatic-page.tsx'; export const prerender = false; --- diff --git a/packages/astro/internal/keystatic-page.js b/packages/astro/internal/keystatic-page.tsx similarity index 100% rename from packages/astro/internal/keystatic-page.js rename to packages/astro/internal/keystatic-page.tsx diff --git a/packages/astro/package.json b/packages/astro/package.json index 115437ec5..fa56988c8 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -43,7 +43,7 @@ }, "peerDependencies": { "@keystatic/core": "*", - "astro": "2 || 3 || 4 || 5", + "astro": "2 || 3 || 4 || 5 || 6", "react": "^18.2.0 || ^19.0.0", "react-dom": "^18.2.0 || ^19.0.0" },