Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive
Back to changelog

Scheduled Publishing moved into Sanity Studio core ++

Install or upgrade Sanity Studio

To initiate a new Sanity Studio project or upgrade an existing one, please refer to our comprehensive guide on Installing and Upgrading Sanity Studio.

If you are updating from a version earlier than 3.37.0, you should also check out this article to ensure your dependencies are up to date.

✨ Highlights

Scheduled Publishing is now part of the core Sanity Studio package

The Scheduled Publishing feature, which up until this release has been available as a plugin for Sanity Studio, has been moved into the core sanity package and enabled by default. Scheduled Publishing is available on all paid plans and trials.

If you wish to opt out of Scheduled Publishing, you can do so in your Studio configuration

// sanity.config.ts 
export default defineConfig({ 
   // ....
   scheduledPublishing: {
       enabled: false, 
     }
  )

Go to docs and feature announcement blog post to learn more.

Migrating from the Scheduled Publishing plugin to the new built-in configuration:

If you are already using Scheduled Publishing plugin, the first step is to get rid of it and update your studio to the latest release. If you already updated your studio you might have gotten an alert about this.

Run the following command in your project root to uninstall the plugin:

npm uninstall @sanity/scheduled-publishing

If you are already using Scheduled Publishing plugin, the first step is to get rid of it and update your studio to the latest release. If you already updated your studio you might have gotten an alert about this.

Run the following command in your project root to uninstall the plugin:

npm uninstall @sanity/scheduled-publishing

Next, remove the plugin from your studio configuration. Typically you'll find this in ./sanity.config.ts|js. Find the scheduledPublishing plugin and do the following changes in your configuration file:

Before:

import {scheduledPublishing} from '@sanity/scheduled-publishing'

export default defineConfig({
    //....
    plugins: [
      scheduledPublishing({
        // e.g. 12/25/2024 6:30 AM
        inputDateTimeFormat: 'MM/dd/yyyy h:mm a',
      })
    ]
})

After:

-  import {scheduledPublishing} from '@sanity/scheduled-publishing'


export default defineConfig({ 
    // ...
    plugins: [
-     scheduledPublishing({
-       inputDateTimeFormat: 'MM/dd/yyyy h:mm a',
-     })
    ],
+   scheduledPublishing: {
+       enabled: true,
+       inputDateTimeFormat: 'MM/dd/yyyy h:mm a',
+   }
})

If you used any of the plugin's exports, you can now import them directly from the Sanity package. For example:

-  import { ScheduleAction, resolveDocumentActions } from "@sanity/scheduled-publishing"
+  import { defineConfig, ScheduleAction, resolveDocumentActions } from "sanity"

🐛 Notable bugfixes

  • Fixes a bug that caused negations to be transformed to wildcard search prefixes if they appeared at the end of a search query.
  • Improves error handling when attempting to run a migration against invalid project configurations.
  • Fixes an issue where a document's validation panel would show a system error message when a field with a validation error was deleted.
  • Fixes a bug that caused _type to be incorrectly parsed from statements in the filter parameter of document lists.
  • Fixes an issue that sometimes caused the Studio to load indefinitely when visited from a task notification email.

Documentation affected by this release

Published April 30, 2024