0.24.0
, please review the 0.24.0 upgrade
guide first.
v0.25.0
of the runtime introduces new mechanisms for viewing different
versions of your site, including support for shareable links and previewing
scheduled/past publishes. It also includes several internal improvements and bug
fixes.
Refer to the official release
notes
for the full list of changes.
0.25.0
of the runtime requires a minimum of Node.js v20.
MakeswiftSiteVersion
replaced with SiteVersion
MakeswiftSiteVersion
type with SiteVersion
, which is now
the return type of the getSiteVersion
function. Any client method that accepts
a siteVersion
option (including getPageSnapshot
, getComponentSnapshot
, and
getPages
) should only be using the value returned by getSiteVersion
. If
you’re already using getSiteVersion
for these methods (as recommended by our
installation guides), no changes should be required.
ReactRuntimeProvider
takes a siteVersion
prop<ReactRuntimeProvider>
’s previewMode
prop has been replaced with the
required siteVersion
prop. The value passed for this prop should be set
by the same getSiteVersion
function.
getSiteVersion
function to get the value
to be passed to the siteVersion
prop of <ReactRuntimeProvider>
. If you
followed our installation guide and created a <MakeswiftProvider>
component in
src/makeswift/provider.tsx
, you can update the props of this component:
siteVersion
prop in the
root layout (layout.tsx
):
getStaticProps
function in your optional catch-all route to replace previewMode
with
siteVersion
in its returned data so that it becomes available in the
_app.tsx
file:
_app.tsx
file and pass it to the
<ReactRuntimeProvider>
.
getSitemap
methodgetSitemap
client method, which was deprecated in
v0.19.0
,
has been removed. See the v0.19.0 upgrade guide
on how to use the client.getPages
method to create a sitemap instead.
PageProvider
component and usePageId
hookPageProvider
component and usePageId
hook have been removed from the
runtime. These exports were obsolete and not being used for any functionality.