Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/great-queens-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-makeswift": minor
---

Bump Makeswift runtime to 0.25.0 for Next v15.5 compatibility
5 changes: 3 additions & 2 deletions core/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getSiteVersion } from '@makeswift/runtime/next/server';
import { Analytics } from '@vercel/analytics/react';
import { SpeedInsights } from '@vercel/speed-insights/next';
import { clsx } from 'clsx';
import type { Metadata } from 'next';
import { draftMode } from 'next/headers';
import { notFound } from 'next/navigation';
import { NextIntlClientProvider } from 'next-intl';
import { setRequestLocale } from 'next-intl/server';
Expand Down Expand Up @@ -108,6 +108,7 @@ export default async function RootLayout({ params, children }: Props) {

const { data } = await fetchRootLayoutMetadata();
const toastNotificationCookieData = await getToastNotification();
const siteVersion = await getSiteVersion();

if (!routing.locales.includes(locale)) {
notFound();
Expand All @@ -118,7 +119,7 @@ export default async function RootLayout({ params, children }: Props) {
setRequestLocale(locale);

return (
<MakeswiftProvider previewMode={(await draftMode()).isEnabled}>
<MakeswiftProvider siteVersion={siteVersion}>
<html className={clsx(fonts.map((f) => f.variable))} lang={locale}>
<head>
<SiteTheme />
Expand Down
8 changes: 4 additions & 4 deletions core/lib/makeswift/provider.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
'use client';

import { ReactRuntimeProvider, RootStyleRegistry } from '@makeswift/runtime/next';
import { ReactRuntimeProvider, RootStyleRegistry, type SiteVersion } from '@makeswift/runtime/next';

import { runtime } from '~/lib/makeswift/runtime';
import '~/lib/makeswift/components';

export function MakeswiftProvider({
children,
previewMode,
siteVersion,
}: {
children: React.ReactNode;
previewMode: boolean;
siteVersion: SiteVersion | null;
}) {
return (
<ReactRuntimeProvider previewMode={previewMode} runtime={runtime}>
<ReactRuntimeProvider runtime={runtime} siteVersion={siteVersion}>
<RootStyleRegistry enableCssReset={false}>{children}</RootStyleRegistry>
</ReactRuntimeProvider>
);
Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@conform-to/react": "^1.6.1",
"@conform-to/zod": "^1.6.1",
"@icons-pack/react-simple-icons": "^11.2.0",
"@makeswift/runtime": "^0.24.6",
"@makeswift/runtime": "^0.25.0",
"@radix-ui/react-accordion": "^1.2.11",
"@radix-ui/react-checkbox": "^1.3.2",
"@radix-ui/react-dialog": "^1.1.14",
Expand Down
Loading
Loading