🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup
Back to changelog

Introduction of Sanity TypeGen and Tasks Beta

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npm create sanity@latest

To upgrade a Sanity Studio, run this command in its folder:

npm install sanity@latest

Sanity TypeGen (beta): Generate types for your schema and GROQ queries

This release comes with Sanity TypeGen, the new tooling in the Sanity CLI that enables extracting the schema into a static representation (schema.json) and to generate TypeScript type definition for it, as well as for GROQ query results.

You can learn more about Sanity TypeGen:

If you try out Sanity TypeGen, do let us know how it went in the #typescript channel in the Sanity community or to your customer success team.

Tasks (beta): Delegate work within Sanity Studio

This update also includes the beta of Tasks for Sanity Studio. It's a way to assign tasks related to documents, delegate them to team members, and track their status across the project.

Find the new Tasks in the upper right corner of the Studio

If you wish to disable tasks, you can do so by adding the following to sanity.config.ts:

export default defineConfig({
  unstable_tasks: {
    enabled: false,

Documentation for Tasks is in the works and will be announced when ready.

🐛 Notable bugfixes

  • Fixes a bug where all fields got marked as non-optional when extracting schema with --enforce-required-fields.
  • Fixes a bug where Vision would insert a new line on cmd-return.

Problems with styled-components@5?

If you encounter an error such as TypeError: Cannot read properties of undefined (reading 'div'), please make sure your Studio doesn't depend on styled-components@5. Updating any such dependencies to styled-components@6 should resolve the error:

npm install styled-components@latest

Documentation affected by this release

Published March 27, 2024