Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sanity/scheduled-publishing

Package Overview
Dependencies
Maintainers
51
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/scheduled-publishing

> [!IMPORTANT] > As of [v3.39.0](https://www.sanity.io/changelog/e6013ee5-8214-4e03-9593-f7b19124b8a3) of Sanity Studio, this plugin has been deprecated and the Scheduled Publishing functionality has been moved into the core studio package. > Read more an

  • 1.4.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.4K
decreased by-11.73%
Maintainers
51
Weekly downloads
 
Created
Source

[!IMPORTANT] As of v3.39.0 of Sanity Studio, this plugin has been deprecated and the Scheduled Publishing functionality has been moved into the core studio package. Read more and learn how to update your configuration in the Sanity docs.

Original README preserved here


Migrate

Remove plugin config

Upgrade Sanity and run the following command in your project root to uninstall the plugin:

npm install sanity@latest
npm uninstall @sanity/scheduled-publishing

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

// ./sanity.config.ts|js

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

export default defineConfig({
  // ...
  plugins: [
-    scheduledPublishing()
  ],
})

Your plugin declaration might be a bit more expansive if you've defined a custom time format for the plugin. Delete it all!

// ./sanity.config.ts|js

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

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

Add new configuration for Scheduled Publishing

Note that while very similar to the plugin config this goes into the top-level of your studio configuration. Setting enabled to false will opt you out of using scheduled publishing for the project.

// ./sanity.config.ts|js

+ import {defineConfig} from 'sanity'

defineConfig({
  // ....
+  scheduledPublishing: {
+    enabled: true,
+    inputDateTimeFormat: 'MM/dd/yyyy h:mm a',
+  }
)

As before, you can add a custom time format if you so wish. If left unspecified, the format will default to dd/MM/yyyy HH:mm.

Document actions and badges

They are now exported from sanity

-import {ScheduleAction, ScheduledBadge} from '@sanity/scheduled-publishing'
+ import {ScheduleAction, ScheduledBadge} from 'sanity'


Keywords

FAQs

Package last updated on 15 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc