Skip to content

v3.36.0

Compare
Choose a tag to compare
@juice49 juice49 released this 26 Mar 18:08
· 1331 commits to next since this release

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

✨ Highlights

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.

image

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

export default defineConfig({
  ...restOfConfig,
  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 new line on cmd-return.

On 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

This error is caused by an ESM/CJS compability issue in @sanity/ui.

📓 Full changelog

Author Message Commit
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.12.1 (#6109) 2014ef5
renovate[bot] chore(lockfile): update dependency @sanity/react-loader to v1.9.5 (#6104) 0817d8d
renovate[bot] fix(deps): update dependency @sanity/ui to ^2.0.12 (#6107) 4886b00
renovate[bot] fix(deps): update dependency @sanity/client to ^6.15.7 (#6106) 69a5d6d
Sindre Gulseth fix: move typegen cli into @sanity/cli (#6111) 3f37c21
Tommy Petty fix(comments): update close icon to be consistent (#6096) 89fd7ec
renovate[bot] chore(deps): update dependency @sanity/visual-editing to v1.8.4 (#6100) 046c090
renovate[bot] chore(deps): update dependency turbo to ^1.13.0 (#6114) 1352e84
Sindre Gulseth chore(typegen): show schema extraction and typegen in help texts (#6122) ec3b25e
Pedro Bonamin fix(pte): PTE inline block object modal closing on validation state changes (#6113) a272c71
Sindre Gulseth fix(schema): correctly assert optional fields with enforce required fields (#6121) f568e14
Espen Hovlandsdal chore: disable import/extensions rule for get-it middleware import (#6127) aca88e9
Sindre Gulseth fix(schemaExtract): guard for list options not being an array (#6128) e4f28e5
Sindre Gulseth chore(codegen): track ratio between unknown nodes and all type nodes (#6125) 3822da2
Sindre Gulseth fix(vision): fixes bug where codemirror would insert a new line on cmd-return (#6123) 971ba9f
Pedro Bonamin fix(tasks): update description input to create blocks edx-1206 (#6126) 852bfca
Pedro Bonamin feat(tasks): add tasks empty states (#6130) 22afbb4
Sindre Gulseth chore(codegen): add cl as codeowners for {code,type}gen (#6118) 94d0934
Sindre Gulseth feat(codegen): attempt to parse groq queries with parameter in slices (#6117) 97c0b0c
shur feat: indicate in metadata that the quickstart option was used in project creation (#6065) 468e76c