open-index/open-npm huggingface dataset:
npm package: @sanity/scheduled-publishing
Description: > [!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
Author: Sanity.io
Latest version: 1.4.1
Deprecated: 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: https://www.sanity.io/docs/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 and learn how to update your configuration in the [Sanity docs](https://www.sanity.io/docs/scheduled-publishing).
>
> Original README preserved [here](./PLUGIN_README.md) 

---


## Migrate

### Remove plugin config

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

```sh
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:

```diff
// ./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!

```diff
// ./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.

```diff
// ./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`

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


```
npm package: @sanity/schema-descriptor-utils
Description: Utilities for converting Sanity schema descriptors to schema definitions
Author: Sanity.io
Latest version: 1.1.0

# @sanity/schema-descriptor-utils

Convert Lexicon schema descriptors into Sanity schema definitions.

## Installation

```sh
pnpm add @sanity/schema-descriptor-utils
```

> **Note:** This is a private `@sanity`-scoped package. Requires npm registry authentication.

## Usage

```ts
import {convertToDefinition} from '@sanity/schema-descriptor-utils'
import {createSchema} from 'sanity'

// Fetch a schema descriptor from the Lexicon API
const res = await fetch(`https://api.sanity.io/v1/descriptors/schemas/${descriptorId}`)
const descriptor = await res.json()

// Convert to Sanity schema definitions
const {types} = convertToDefinition(descriptor, {format: 'plain'})

// Compile into a usable schema
const schema = createSchema({name: 'default', types})
```

### Formats

The `format` option controls how the output is shaped:

- **`plain`** (default) — preserves validation rules as raw descriptor JSON. Use when you need the schema structure but handle validation separately.
- **`createSchema`** — produces output that can be passed directly to `createSchema()`. Strips validation and adds dummy fields for cross-dataset/global document references.

### Types

```ts
import type {SchemaTypeDefinition} from 'sanity'

interface SchemaSummary {
  types: Record<string, TypeDef>
  hoisted: Record<string, unknown>
  registries: string[]
}

function convertToDefinition(
  input: SchemaSummary,
  opts?: {format?: 'createSchema' | 'plain'},
): {name: string; types: Array<SchemaTypeDefinition>}
```

`SchemaSummary` matches the response shape from `GET /v1/descriptors/schemas/{descriptorId}`.

## Build

Outputs ESM and `.d.ts` type declarations via [@sanity/pkg-utils](https://github.com/sanity-io/pkg-utils).

```sh
pnpm build     # Build all formats
pnpm test      # Run tests
pnpm typecheck # Type-check without emitting
```

## Validation note

Descriptor validation format differs from the manifest format used by `@sanity/schema`. See the [descriptor validation types](https://github.com/sanity-io/sanity/blob/727b1909b79fb8f07b84a577c3cf5fc685ef462e/packages/%40sanity/schema/src/descriptors/types.ts#L154-L213) for details.

## Requirements

- Node.js ≥ 24
- pnpm