From d54cf7ec1d8b4b4ae275fdd8806ff2bda0323a1f Mon Sep 17 00:00:00 2001 From: ellielok Date: Fri, 19 Sep 2025 07:01:12 +1000 Subject: [PATCH 1/4] Remove deprecated ViewTransitions component --- .changeset/rich-horses-begin.md | 7 +++++++ packages/astro/client.d.ts | 4 ---- packages/astro/src/transitions/vite-plugin-transitions.ts | 5 +---- 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 .changeset/rich-horses-begin.md diff --git a/.changeset/rich-horses-begin.md b/.changeset/rich-horses-begin.md new file mode 100644 index 000000000000..82117caceca1 --- /dev/null +++ b/.changeset/rich-horses-begin.md @@ -0,0 +1,7 @@ +--- +'astro': major +--- + +Remove deprecated ViewTransitions component + +The `` component has been deprecated and renamed to `` in Astro 5.0. There are no other changes than the name. diff --git a/packages/astro/client.d.ts b/packages/astro/client.d.ts index 24a8585de51f..ca9078d6a675 100644 --- a/packages/astro/client.d.ts +++ b/packages/astro/client.d.ts @@ -122,10 +122,6 @@ declare module 'astro:transitions' { export const createAnimationScope: TransitionModule['createAnimationScope']; type ClientRouterModule = typeof import('./components/ClientRouter.astro'); - /** - * @deprecated The ViewTransitions component has been renamed to ClientRouter - */ - export const ViewTransitions: ClientRouterModule['default']; export const ClientRouter: ClientRouterModule['default']; } diff --git a/packages/astro/src/transitions/vite-plugin-transitions.ts b/packages/astro/src/transitions/vite-plugin-transitions.ts index d72eb0dc9417..c2ec27e77ba4 100644 --- a/packages/astro/src/transitions/vite-plugin-transitions.ts +++ b/packages/astro/src/transitions/vite-plugin-transitions.ts @@ -30,10 +30,7 @@ export default function astroTransitions({ settings }: { settings: AstroSettings return { code: ` export * from "astro/virtual-modules/transitions.js"; - export { - default as ViewTransitions, - default as ClientRouter - } from "astro/components/ClientRouter.astro"; + export { default as ClientRouter } from "astro/components/ClientRouter.astro"; `, }; } From df648bc8cbf03872cf2f4d7e3e91e0c3b81d0405 Mon Sep 17 00:00:00 2001 From: ellielok Date: Fri, 19 Sep 2025 07:11:50 +1000 Subject: [PATCH 2/4] tweak changeset --- .changeset/rich-horses-begin.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.changeset/rich-horses-begin.md b/.changeset/rich-horses-begin.md index 82117caceca1..85f32babb546 100644 --- a/.changeset/rich-horses-begin.md +++ b/.changeset/rich-horses-begin.md @@ -2,6 +2,4 @@ 'astro': major --- -Remove deprecated ViewTransitions component - -The `` component has been deprecated and renamed to `` in Astro 5.0. There are no other changes than the name. +Removes the deprecated `` component, which has been renamed to `` in Astro 5.0. From 7b4030e3988189ea5798afb477013652fd7298f7 Mon Sep 17 00:00:00 2001 From: ellielok Date: Fri, 19 Sep 2025 21:56:23 +1000 Subject: [PATCH 3/4] Update .changeset/rich-horses-begin.md Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> --- .changeset/rich-horses-begin.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.changeset/rich-horses-begin.md b/.changeset/rich-horses-begin.md index 85f32babb546..2ffd10c37624 100644 --- a/.changeset/rich-horses-begin.md +++ b/.changeset/rich-horses-begin.md @@ -2,4 +2,25 @@ 'astro': major --- -Removes the deprecated `` component, which has been renamed to `` in Astro 5.0. +Removes the deprecated `` component + +In Astro 5.0, the `` component was renamed to `` to clarify the role of the component. The new name makes it more clear that the features you get from Astro's `` routing component are slightly different from the native CSS-based MPA router. However, a deprecated version of the `` component still existed and may have functioned in Astro 5.x. + +Astro 6.0 removes the `` component entirely and can no longer be used in your project. Update to the `` component to continue to use these features. + +#### What should I do? + +Replace all occurrences of the `ViewTransitions` import and component with `ClientRouter`: + +```diff +// src/layouts/MyLayout.astro" +- import { ViewTransitions } from 'astro:transitions'; ++ import { ClientRouter } from 'astro:transitions'; + + + ... +- ++ + + +``` From 68a2d95d540786a227c3902f07ff69759e4945ca Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Date: Fri, 19 Sep 2025 09:15:44 -0300 Subject: [PATCH 4/4] fix changeset grammar --- .changeset/rich-horses-begin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/rich-horses-begin.md b/.changeset/rich-horses-begin.md index 2ffd10c37624..580a90ef933a 100644 --- a/.changeset/rich-horses-begin.md +++ b/.changeset/rich-horses-begin.md @@ -6,7 +6,7 @@ Removes the deprecated `` component In Astro 5.0, the `` component was renamed to `` to clarify the role of the component. The new name makes it more clear that the features you get from Astro's `` routing component are slightly different from the native CSS-based MPA router. However, a deprecated version of the `` component still existed and may have functioned in Astro 5.x. -Astro 6.0 removes the `` component entirely and can no longer be used in your project. Update to the `` component to continue to use these features. +Astro 6.0 removes the `` component entirely and it can no longer be used in your project. Update to the `` component to continue to use these features. #### What should I do?