Releases: sanity-io/sanity
v3.40.0
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
Presence cursors in the Portable Text Editor
Sanity Studio has always supported real-time collaboration, but you have yet to be able to see where others are working within the Portable Text Editor. By upgrading, you'll get a similar experience to Google Docs when editing block content.
This release also includes bug fixes for the Portable Text Editor:
- The Portable Text Editor will now remove the invisible Stega-encoded characters if you copy-paste from a preview using Visual Editing
- The cursor will not move out of viewpoint when deleting a character in PTE.
- Creating an annotation at the bottom of a PTE will no longer scroll you to the top.
- Fixes an issue where changing positions of items of an array within PTE would launch a cryptic error
Comments and Tasks are now out of beta
Comments and Tasks are now officially out of beta; hence, we have updated the configuration APIs. Both comments and tasks are enabled by default and for all document types.
Comments configuration migration
Configuration during beta:
// ./sanity.config.ts|js
export default defineConfig({
// ... rest of config
document: {
unstable_comments: {
enabled: false,
},
},
});
New configuration (remove unstable_
):
// ./sanity.config.ts|js
export default defineConfig({
// ... rest of config
document: {
- unstable_comments: {
+ comments: {
enabled: false,
},
},
});
Tasks configuration migration
Configuration during beta:
// ./sanity.config.ts|js
export default defineConfig({
// ... rest of config
unstable_tasks: { enabled: false },
})
New configuration (remove unstable_
):
// ./sanity.config.ts|js
export default defineConfig({
// ... rest of config
- unstable_tasks: { enabled: false },
+ tasks: { enabled: false },
})
Sanity TypeGen improvements
Thanks for all the feedback about Sanity TypeGen so far! This release ships several improvements and bug fixes:
- Sanity Typegen now supports
count
in GROQ projections - TypeGen code (
sanity.types.ts
) is now formatted when a project has a Prettier configuration - The TypeGen search path now includes
src
,app
, andsanity
folders by default - Various bug fixes for type generation
- Fixes an issue where
typegen
command would fail on relative imports - Fixes a bug where we could not extract or validate schema when the
sanity-plugin-mux-input
plugin was installed.
Do continue to give us feedback in #typescript in the community!
🐛 Notable bugfixes
- Fixes ambiguous aria-labels on some Status buttons
- Fixes issue with inline text comments that would include an inline object.
- Fixes toast message for document duplicate action
📓 Full changelog
Author | Message | Commit |
---|---|---|
ecospark[bot] | chore(deps): dedupe pnpm-lock.yaml (#6463) | a2faad2 |
renovate[bot] | chore(deps): update dependency @sanity/pkg-utils to v6.8.4 (#6460) | 34a1ae6 |
Sindre Gulseth | fix(cli): mock matchMedia window function (#6472) | ea715e8 |
Bjørge Næss | chore: add perf runner to workspace (#6427) | 9af065a |
Sindre Gulseth | fix(typegen): fixes a bug where we imported the wrong relative path (#6457) | e1bd1f0 |
renovate[bot] | chore(deps): update dependency @sanity/tsdoc to v1.0.39 (#6464) | f6af636 |
Sindre Gulseth | feat(typegen): also search for queries in app and sanity folders (#6475) | 03cbb12 |
Sindre Gulseth | chore: upgrade groq-js (#6474) | 68bb282 |
ecospark[bot] | chore(deps): dedupe pnpm-lock.yaml (#6476) | 076b2fc |
renovate[bot] | chore(deps): update dependency @sanity/visual-editing to v1.8.15 (#6465) | 2f7674c |
renovate[bot] | chore(lockfile): update dependency @sanity/react-loader to v1.9.14 (#6466) | 9887e7c |
renovate[bot] | chore(lockfile): update dependency date-fns-tz to v2.0.1 (#6467) | 14b4365 |
renovate[bot] | chore(lockfile): update dependency i18next to v23.11.2 (#6468) | 3fcfa42 |
renovate[bot] | chore(lockfile): update dependency zod to v3.23.4 (#6470) | bef170b |
renovate[bot] | chore(lockfile): update dependency next to v14.2.2 (#6469) | cb957a6 |
renovate[bot] | chore(lockfile): update dependency react-focus-lock to v2.12.1 (#6471) | 05a019a |
renovate[bot] | chore(deps): update dependency @sanity/pkg-utils to v6.8.6 (#6482) | c903cde |
renovate[bot] | chore(deps): update react monorepo (#6484) | 3c8a329 |
renovate[bot] | chore(deps): update dependency @sanity/tsdoc to v1.0.40 (#6483) | 0163210 |
renovate[bot] | fix(deps): update dependency @sanity/presentation to v1.12.8 (#6485) | 05aad5c |
renovate[bot] | chore(deps): update react monorepo to ^18.3.0 (#6490) | 144bb21 |
renovate[bot] | chore(lockfile): update dependency @types/react-is to v18.3.0 (#6491) | 2225589 |
Cody Olsen | chore: setup next test that embeds the test studio (#6487) | edefb66 |
Bjørge Næss | fix(test): remove hydrateroot warning test (#6494) | d50a0f1 |
ecospark[bot] | chore(deps): dedupe pnpm-lock.yaml (#6493) | c1f9071 |
Rostislav Melkumyan | feat: set print width to 40 (#6068) | 2e24fcd |
renovate[bot] | chore(deps): update dependency @sanity/pkg-utils to v6.8.7 (#6496) | 2b840ba |
renovate[bot] | chore(deps): update dependency turbo to ^1.13.3 (#6497) | fc80d2b |
renovate[bot] | chore(lockfile): update dependency @sanity/logos to v2.1.11 (#6498) | 69b3c64 |
renovate[bot] | chore(lockfile): update dependency @sanity/react-loader to v1.9.15 (#6499) | c8b1d5e |
renovate[bot] | chore(deps): update dependency @sanity/visual-editing to v1.8.16 (#6500) | 2dff2bd |
renovate[bot] | fix(deps): update dependency @sanity/presentation to v1.12.10 (#6501) | 06ef31d |
Herman Wikner | feat(core): implement presence cursors (#6081) | 1522806 |
renovate[bot] | fix(deps): Update react monorepo (#6502) | fa9d145 |
Espen Hovlandsdal | chore(lint): add certain unicorn eslint rules (#6352) | ba83971 |
Espen Hovlandsdal | test: increase timeout for cross-dataset reference test | afea9cf |
Espen Hovlandsdal | chore: fix incorrect path used in workshop story | 61daf0c |
ecospark[bot] | chore(deps): dedupe pnpm-lock.yaml (#6506) | 6486e34 |
RitaDias | fix(structure): uncaught error while swapping images in array in PTE (#6399) | c9bfc31 |
renovate[bot] | chore(deps): update dependency @types/react to v18.3.1 (#6507) | 311d722 |
Nina Andal Aarvik | fix(core): change scrollintoview block to be nearest (#6328) | 509757c |
Nina Andal Aarvik | fix(core): set scroll boundary to nearest (#6310) | 0dae0da |
RitaDias | fix(@sanity): issue where hidden unicode characters were bloating document in PTE (#6440) | ffa68ec |
Per-Kristian Nordnes | chore: add codeowners to block-tools | 479e71f |
ecospark[bot] | chore(deps): dedupe pnpm-lock.yaml (#6508) | ff26edd |
renovate[bot] | chore(deps): update dependency @sanity/pkg-utils to v6.8.8 (#6509) | 4bb667d |
cngonzalez | feat: use prefersLatestPublished parameter in DocumentPaneProvider (#6486) | 3da55ae |
cngonzalez | fix: prevent looping requests to keyvalue in recent searches (#6480) | 232385e |
Binoy Patel | feat(singletons): add a singleton package exports | 884fca1 |
Binoy Patel | feat(singletons): add eslint rule for boundaries | bfd9a30 |
Binoy Patel | refactor(core): move ConnectorContext to singletons | 3008a1c |
Binoy Patel | refactor(core): move PreviewCardContext to singletons | 30cc592 |
Binoy Patel | refactor(core): move scrollContext to singletons | 5ca1b00 |
Binoy Patel | refactor(core): move ZIndexContext to singletons | d1a1d40 |
Binoy Patel | refactor(core): move DiffContext to singletons | ef08d0a |
Binoy Patel | refactor(core): move DocumentChangeContext to singletons | 0509e58 |
Binoy Patel | refactor(core): move FormBuilderContext to singletons | 0f9cf43 |
Binoy Patel | refactor(core): move DocumentIdContext to singletons | 79343e4 |
Binoy Patel | refactor(core): move FormValueContext to singletons | 2b46b43 |
Binoy Patel | refactor(core): move GetFormValueContext to singletons | 3dc7e62 |
Binoy Patel | refactor(core): move HoveredFieldContext to singletons | dbedca6 |
Binoy Patel | refactor(core): move FieldActionsContext to singletons | c7374f7 |
Binoy Patel | refactor(core): move VirtualizerScrollInstanceContext to singletons | 372774e |
Binoy Patel | refactor(core): move SortableItemIdContext to singletons | ffea136 |
Binoy Patel | refactor(core): move PortableTextMarkersContext to singletons | ed8f318 |
Binoy Patel | refactor(core): move PortableTextMemberItemsContext to singletons | 6325629 |
Binoy Patel | refactor(core): move ReferenceItemRefContext to singletons | a25a30b |
Binoy Patel | refactor(core): move DocumentFieldActionsContext to singletons | 6f08a7d |
Binoy Patel | refactor(core): move FormCallbacksContext to singletons | 2518910 |
Binoy Patel | refactor(core): move PresenceContext to singletons | 6a02f80 |
Binoy Patel | refactor(core): move ReferenceInputOptionsConte... |
v3.39.1
Installation and upgrading
To initiate a new Studio without installing the CLI globally:
npm create sanity@latest
To upgrade a v3 Studio, run this command in its folder:
npm install sanity@latest
🐛 Notable bugfixes
- Disables the new search API introduced in v3.38.0 due to a few discovered issues. We'll re-enable it in a future release.
- Fixes an issue when using the "movie database" template when running
npm create sanity
📓 Full changelog
Author | Message | Commit |
---|---|---|
Espen Hovlandsdal | fix(cli): remove comments from moviedb template, hide location field (#6488) | 80f8daf |
Espen Hovlandsdal | fix(search): revert to old search API for now (#6503) | 8a08212 |
v3.39.0
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
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:
// sanity.config.ts
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',
+ }
})
🐛 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 thefilter
parameter of document lists. - Fixes an issue that sometimes caused the Studio to load indefinitely when visited from a task notification email.
Author | Message | Commit |
---|---|---|
cngonzalez | fix: refactor checkoutPair to allow mutations for liveEdit documents (#6393) | f6ae402 |
Ash | fix(core): prevent transformation of negation tokens into wildcard prefix tokens (#6396) | f28ef7e |
Bjørge Næss | fix(migrate): forward possible API error response to error thrown for non 2xx (#6387) | 9316475 |
Rico Kahler | refactor(tasks, comments): core plugins (#6333) | 3c917d2 |
renovate[bot] | chore(deps): update dependency @sanity/tsdoc to v1.0.34 (#6402) | 5fc2775 |
renovate[bot] | chore(lockfile): update dependency @sanity/react-loader to v1.9.12 (#6405) | d3e924e |
renovate[bot] | chore(lockfile): update dependency @sanity/preview-url-secret to v1.6.9 (#6404) | 4c6f1e2 |
renovate[bot] | chore(deps): update dependency @sanity/visual-editing to v1.8.12 (#6403) | 6802d29 |
renovate[bot] | fix(deps): update dependency @sanity/client to ^6.15.17 (#6406) | 82e505f |
renovate[bot] | fix(deps): update dependency @sanity/presentation to v1.12.5 (#6407) | 98bb233 |
renovate[bot] | fix(deps): update dependency @sanity/ui to ^2.1.4 (#6408) | 59cad0b |
renovate[bot] | fix(deps): update dependency get-it to ^8.4.26 (#6409) | 159f542 |
renovate[bot] | chore(deps): update dependency @sanity/pkg-utils to v6.7.1 (#6410) | e5252e1 |
Pedro Bonamin | fix(codeowners): update codeowners for tasks and comments (#6414) | d286050 |
Rico Kahler | test: add sanity-plugin-hotspot-array (#6401) | d591b18 |
Binoy Patel | fix: TS import paths importing index.ts twice incorrectly (#6415) | 6066e92 |
Pedro Bonamin | fix(tasks): update tasks upsell provider client version (#6413) | 61a887c |
renovate[bot] | chore(deps): update dependency @sanity/pkg-utils to v6.8.0 (#6421) | 72e34f8 |
renovate[bot] | chore(lockfile): update dependency zod to v3.22.5 (#6420) | 5c7352c |
Cody Olsen | refactor: use @sanity/prettier-config (#6423) |
e75e390 |
renovate[bot] | chore(deps): update dependency recast to ^0.23.6 (#6422) | 2b30eb6 |
Bjørge Næss | chore: turn server actions on by default in test-studio (#6425) | dd61ead |
RitaDias | fix(@sanity): issue where hidden unicode characters were bloating document in PTE (#6424) | ce46077 |
Per-Kristian Nordnes | Revert "fix(@sanity): issue where hidden unicode characters were bloating document in PTE (#6424)" | cac48bb |
Per-Kristian Nordnes | fix(portable-text-editor): support collapsed range decorations (#6428) | 2d02d62 |
renovate[bot] | fix(deps): update dependency get-it to ^8.4.27 (#6434) | 5fb7ddf |
renovate[bot] | chore(deps): update dependency @sanity/visual-editing to v1.8.13 (#6432) | f4e482d |
renovate[bot] | fix(deps): update dependency @sanity/client to ^6.15.19 (#6433) | 4e32715 |
renovate[bot] | chore(deps): update dependency @sanity/pkg-utils to v6.8.1 (#6431) | 26b8c76 |
renovate[bot] | chore(lockfile): update dependency @sanity/react-loader to v1.9.13 (#6436) | 846cf68 |
renovate[bot] | chore(lockfile): update dependency @sanity/preview-url-secret to v1.6.10 (#6435) | 7b20162 |
renovate[bot] | fix(deps): update dependency @sanity/presentation to v1.12.6 (#6437) | 3eb44db |
renovate[bot] | chore(deps): update dependency @sanity/visual-editing to v1.8.14 (#6438) | 177b4b5 |
renovate[bot] | chore(deps): update dependency @sanity/tsdoc to v1.0.36 (#6444) | 8f05301 |
renovate[bot] | chore(deps): update peter-evans/create-pull-request digest to 9153d83 (#6443) | 035c59d |
Tommy Petty | fix(structure): update to not crash validation panel if unable to get path title (#6417) | d5f8fb6 |
renovate[bot] | chore(lockfile): update dependency @sanity/eventsource to v5.0.2 (#6445) | b8f3666 |
Herman Wikner | fix(comments): conditional rendering of CommentsProvider (#6412) |
379396e |
Per-Kristian Nordnes | perf(portable-text-editor): improve range deocration render perf (#6441) | c9b1ebb |
Rico Kahler | fix(structure): resolve static types in document list filters (#6439) | 048ce0b |
Rico Kahler | fix(core): fix autocomplete for defineType in VSCode (#6447) |
3ff78f6 |
Ash | test(e2e): fix unawaited assertion (#6442) | 37b6291 |
renovate[bot] | fix(deps): update dependency @sanity/presentation to v1.12.7 (#6448) | f9634f4 |
Pedro Bonamin | fix(tasks): update taskURL for notification target (#6395) | 7c8cebf |
Sindre Gulseth | fix(typegen): fixes a case where we track ratio as NaN (#6309) | b0f405e |
renovate[bot] | fix(deps): update dependency @sanity/client to ^6.15.20 (#6461) | d7f1067 |
Cody Olsen | chore: remove _internalBrowser from typesVersions (#6451) |
c1f1fdf |
Rico Kahler | chore(deps): bump @sanity/export (#6462) | 348a3a9 |
Pedro Bonamin | feat(scheduled-publishing): move scheduled publishing into core. (#6416) | a6fc5af |
v3.38.0
Installation and upgrading
Install
To initiate a new Studio without installing the CLI globally:
npm create sanity@latest
Upgrade
In most cases upgrading your studio is as straight-forward as installing the latest version:
npm install sanity@latest
For more information, visit the article on upgrading Sanity Studio in the docs.
If you are upgrading from a version earlier than 3.37.0, you also need to upgrade styled-components and @sanity/ui. To learn more, visit this help article on keeping dependencies up to date.
✨ Highlights
- Improved global search with better performance and new features.
- Custom styles are now displayed in the Portable Text Editor (PTE) style selector.
Enhanced Global Search
We've optimized the search functionality in the Studio for increased performance, especially in workspaces with large schemas. This improvement includes support for wildcard (*
) and negation (-
) tokens in search queries, allowing for more flexible and powerful search options. This enhanced search feature uses an internal API that is not yet documented for public use.
If you need to revert to the previous search behavior for any reason, you can disable the new search functionality by setting search.enableLegacySearch
to true
in your configuration.
🐛 Notable bugfixes
- Fixes a crash in the image hotspot and cropping tool within Next.js embedded Studios.
- Improves focus handling in PTE and the document pane.
- Fixes an edge case where PTE threw exceptions after resizing the validation panel.
- Fixes issue where annotations in PTE would incorrectly retain markup if all fields were null.
- Resolves an issue where custom sort orders, or sort orders in lists that are not
documentTypeList
s, would send invalid requests to the persistent user settings backend. - Fixes regression that hid tool buttons when Sanity Studio was embedded in Next.js applications.
- Fixes a bug where the caret was not visible on code-formatted text within the PTE when using the dark scheme.
- Fixes an issue where the component for custom PTE styles was not being rendered in the style selector.
- Fixes an issue where copying strikethrough text from a google doc would remove the strikethrough once pasted in the PTE.
- Fixes tooltip text for the publish button to correctly display "yesterday" without the "ago" suffix when appropriate.
📓 Full changelog
Author | Message | Commit |
---|---|---|
Nina Andal Aarvik | fix(structure): remove 'ago' suffix when published time was yesterday (#6137) | 66495e5 |
Cody Olsen | chore: fix pnpm dev by bumping @sanity/assist (#6306) |
a87ea4e |
cngonzalez | fix: resolve PTE inconsistency by passing serverActionsEnabled to documentEvents (#6299) | 4123260 |
Espen Hovlandsdal | chore: move @sanity/export out of monorepo (#6314) |
331e46c |
renovate[bot] | chore(lockfile): update dependency @sanity/assist to v3.0.3 (#6316) | 8941037 |
renovate[bot] | chore(deps): update dependency @sanity/tsdoc to v1.0.22 (#6315) | 87c627d |
renovate[bot] | chore(deps): update dependency typescript to v5.4.5 (#6318) | 166a7c6 |
Cody Olsen | chore: support IDE's using older TypeScript versions on the monorepo (#6308) | a4e097f |
Herman Wikner | fix(core): hidden caret on code formatted text (#6307) | 1c8cff0 |
shur | fix: update TelemetryUserProperties to use machinePlatform instead of platform (#6312) | bc6be95 |
Cody Olsen | chore(deps): bump @sanity/pkg-utils & simplify build scripts (#6319) |
2dd907a |
Nina Andal Aarvik | fix(structure): remove padding prop in contextMenuButton (#6097) | b3860ed |
renovate[bot] | fix(deps): update dependency get-it to ^8.4.19 (#6325) | a7755ac |
Cody Olsen | chore: improve test output of test:exports (#6304) |
090c45d |
renovate[bot] | chore(lockfile): update dependency mendoza to v3.0.7 (#6324) | 4d1f1ba |
renovate[bot] | chore(deps): update dependency @portabletext/toolkit to ^2.0.15 (#6322) | 093ab19 |
renovate[bot] | chore(deps): update dependency @sanity/tsdoc to v1.0.23 (#6329) | b1773b9 |
renovate[bot] | fix(deps): update dependency @sanity/client to ^6.15.13 (#6331) | 2c4671a |
Binoy Patel | chore: fix start-studio build (#6336) | e6c2d11 |
cngonzalez | fix: use pane key in settings for document lists that do not have types available (#6335) | 57749e5 |
Espen Hovlandsdal | chore: move @sanity/import out of monorepo (#6313) |
9ea56b9 |
Espen Hovlandsdal | chore: use node: prefix for node module imports (#6321) |
433a7aa |
Cody Olsen | fix: regression hiding tool buttons when embedded on Next.js (#6338) | d30cfd9 |
renovate[bot] | fix(deps): update dependency get-it to ^8.4.21 (#6332) | 98626ec |
renovate[bot] | chore(deps): update dependency @sanity/visual-editing to v1.8.8 (#6330) | 89409bd |
renovate[bot] | chore(deps): update dependency @sanity/pkg-utils to v6.6.1 (#6342) | f772f88 |
renovate[bot] | fix(deps): update dependency @sanity/ui to ^2.1.3 (#6344) | e5c763a |
renovate[bot] | chore(deps): update dependency @sanity/tsdoc to v1.0.26 (#6341) | d986c31 |
Tommy Petty | fix(pte): fix an issue where when PTE throws exception after resize (#6152) | cf75a0b |
Tommy Petty | fix(cli): add note about webhooks in migration run command (#6112) | 9baf406 |
Binoy Patel | chore: remove * as React imports (#6350) | 04a68cf |
Espen Hovlandsdal | refactor(cli): use fs methods for reading package.json files (#6351) | 0339647 |
renovate[bot] | chore(deps): update react monorepo (#6353) | 3e03e1b |
renovate[bot] | chore(deps): update dependency @sanity/pkg-utils to v6.6.3 (#6354) | a27604d |
renovate[bot] | chore(deps): update dependency @sanity/tsdoc to v1.0.29 (#6356) | 6f7d186 |
renovate[bot] | chore(deps): update dependency prettier-plugin-packagejson to ^2.5.0 (#6357) | a380e49 |
renovate[bot] | fix(deps): update dependency get-it to ^8.4.23 (#6362) | f08cf40 |
renovate[bot] | chore(deps): update dependency @sanity/tsdoc to v1.0.30 (#6361) | a211e2d |
renovate[bot] | chore(deps): update peter-evans/create-pull-request digest to c55203c (#6363) | 6736e29 |
renovate[bot] | chore(deps): update pnpm to v8.15.7 (#6364) ... |
v3.37.2
Installation and upgrading
To initiate a new Studio without installing the CLI globally:
npm create sanity@latest
We recommend that you check out the instructions for the Sanity Studio v3.37.0 release before upgrading. If you have already updated your dependencies as described in that document (i.e., you are updating from v3.37.0), you can proceed with updating your studio as normal:
To upgrade a v3 Studio, run this command in its folder:
npm install sanity@latest
🐛 Notable bugfixes
- Fixes an issue where
sanity typegen generate
would crash due to an incorrect babel configuration path - Fixes an issue where
sanity typegen generate
would crash if the output directory did not exist
📓 Full changelog
Author | Message | Commit |
---|---|---|
renovate[bot] | chore(deps): update dependency @sanity/tsdoc to v1.0.17 (#6289) | 2e99f2a |
renovate[bot] | chore(deps): update react monorepo (#6290) | f51142c |
renovate[bot] | chore(deps): update dependency @sanity/assist to v3 (#6291) | c119f38 |
Cody Olsen | refactor(test-exports): mark tests that are expected to fail as todo (#6292) |
911a3e2 |
renovate[bot] | chore(lockfile): update dependency @sanity/logos to v2.1.10 (#6293) | 6f66d80 |
renovate[bot] | chore(deps): update dependency @sanity/icons to ^2.11.8 (#6294) | 387c2bd |
renovate[bot] | chore(lockfile): update dependency @sanity/color to v3.0.6 (#6295) | a3061ee |
Espen Hovlandsdal | fix(codegen): prevent crash due to incorrect babel config path (#6298) | fc784d1 |
Espen Hovlandsdal | fix(cli): ensure output path for types exist before writing (#6300) | e75bffe |
renovate[bot] | fix(deps): update dependency @sanity/ui to ^2.1.2 (#6301) | 9ebe73d |
v3.37.1
Installation and upgrading
To initiate a new Studio without installing the CLI globally:
npm create sanity@latest
We recommend that you check out the instructions for the Sanity Studio v3.37.0 release before upgrading. If you have already updated your dependencies as described in that document (I.e., you are updating from v3.37.0), you can proceed with updating your studio as normal:
npm install sanity@latest
🐛 Notable bugfixes
- Fixes a regression in v3.37.0 that affected embedded studios in certain environments and test runners
- Fixes an issue where newly created studios used an outdated version of styled-components
📓 Full changelog
Author | Message | Commit |
---|---|---|
cngonzalez | fix: disable server actions in test studio (#6270) | f1451a9 |
renovate[bot] | chore(deps): update dependency @sanity/tsdoc to v1.0.16 (#6272) | 7df486d |
renovate[bot] | chore(lockfile): update dependency @sanity/google-maps-input to v4.0.1 (#6273) | d64152f |
renovate[bot] | chore(lockfile): update dependency @sanity/logos to v2.1.9 (#6274) | 7a89479 |
renovate[bot] | chore(lockfile): update dependency @sanity/react-loader to v1.9.9 (#6276) | 0729968 |
renovate[bot] | chore(lockfile): update dependency sanity-plugin-mux-input to v2.3.4 (#6277) | 49a5538 |
renovate[bot] | chore(deps): update dependency @sanity/eslint-config-studio to v4 (#6197) | 0b792e3 |
Cody Olsen | chore(deps): update dependency @sanity/pkg-utils to v6 (#6280) | d9992cc |
renovate[bot] | chore(lockfile): update dependency @sanity/assist to v2.0.5 (#6279) | a1efe06 |
Cody Olsen | fix: bump styled-components used by npm create sanity (#6281) |
61dbbe2 |
renovate[bot] | fix(deps): update dependency @sanity/ui to ^2.1.1 (#6283) | 90c7c57 |
Cody Olsen | chore: add @repo/test-exports suite (#6284) |
9d2a437 |
Cody Olsen | fix: restore node ESM strict mode support (#6287) | 46563c8 |
v3.37.0
⚠️ This upgrade requires [email protected]
and @sanity/ui@2
This release comes with version requirements for the following packages:
[email protected]
(required for all Studio projects)@sanity/ui@2
(optional)
If you're maintaining a plugin for Sanity Studio, we recommend upgrading its dependencies too.
styled-components
(required)
We have seen incompatibility issues when styled-components@5
is used outside of the Vite configuration that ships with sanity
, for example, when the Studio is embedded in a Next.js or Remix project.
Styled Components is a required dependency for Sanity Studio projects. By upgrading it, you can also delete the @types/styled-components
and react-is
dependencies that were required with styled-components@5
:
# npm
npm install sanity@latest styled-components@^6.1
npm rm @types/styled-components react-is
# pnpm
pnpm install sanity@latest styled-components@^6.1
pnpm rm @types/styled-components react-is
# yarn
yarn add sanity@latest styled-components@^6.1
yarn rm @types/styled-components react-is
Note: if you have local customizations in your Sanity Studio that are using styled-components
you may need to make some minor adjustments to the customization code. For more details, please consult the styled-components migration guide.
@sanity/ui
Studio projects that use @sanity/ui
for customizations and have it as a dependency in package.json
needs to upgrade to @sanity/ui@2
:
# npm
npm install "@sanity/ui@^2"
# pnpm
pnpm install "@sanity/ui@^2"
# yarn
yarn add "@sanity/ui@^2"
✨ Highlights
Tasks (Beta)
Sanity Studio now ships with Tasks. You can now:
- Target tasks for specific documents
- Assigned tasks to Studio members
- Comment on tasks, and use @-mentions
- Resolve tasks
Tasks ships enabled by default. If you want to disable tasks in your Studio, you can do so with this configuration:
// ./sanity.config.ts|js
export default defineConfig({
// ... rest of config
unstable_tasks: { enabled: false },
})
Learn more about Tasks in the documentation:
Other features
- Resolves "Masquerading as CJS and ESM" type errors
- Adds ESM with .mjs exports for full support of Node.js' native ESM mode while still offering support for
.esm.js
exports for legacy bundlers - Adds missing
sideEffects: false
conditions to package.json files, improving tree-shaking and reducing bundle sizes for embedded Sanity Studio projects - Simplifies the Shopify schema starter template
🐛 Notable bugfixes
- Fixes a bug where wrongly formatted configuration would be inserted into tsconfig.json when
sanity init
was run inside of a Next.js project - Fixes an issue where importing
.scss
or.sass
files from the studio configuration or a descendant file would cause certain CLI commands to crash - Improves error message when extracted schema (from
sanity schema extract
) could not be found when runningsanity typegen generate
- Fixes an issue where the CLI might suggest deprecated Sanity v2 commands if you mistype a command name
- Makes the
current
field on slugs required when used with the--enforce-required-fields
flag insanity typegen
contexts - Fixes a bug where running
npx sanity init
in a Next.js project would break thetsconfig.json
configuration
📓 Full changelog
Author | Message | Commit |
---|---|---|
Cody Olsen | chore(renovate): pin framer-motion to known stable (#6166) | b54852a |
ecospark[bot] | chore(prettier): fix unformatted files 🤖 ✨ (#6168) | 19891dc |
renovate[bot] | chore(deps): update dependency @sanity/icons to ^2.11.6 (#6169) | 9f50f6d |
renovate[bot] | chore(deps): update dependency turbo to ^1.13.2 (#6170) | 073b5b8 |
renovate[bot] | chore(deps): update dependency vite to ^4.5.3 (#6171) | b14d324 |
renovate[bot] | chore(lockfile): update dependency @portabletext/react to v3.0.15 (#6172) | fbc7183 |
renovate[bot] | chore(lockfile): update dependency @sanity/color to v3.0.4 (#6173) | cdf561e |
renovate[bot] | chore(lockfile): update dependency @sanity/logos to v2.1.8 (#6175) | ffb6ddd |
renovate[bot] | fix(deps): Update react monorepo (#6176) | c4f24d2 |
renovate[bot] | fix(deps): update dependency @sanity/client to ^6.15.9 (#6177) | fbeb6fb |
renovate[bot] | chore(deps): update dependency use-hot-module-reload to v2 (#6180) | 39bf293 |
Cody Olsen | Revert "chore(deps): update dependency use-hot-module-reload to v2 (#6180)" (#6182) | 3b8c28c |
renovate[bot] | fix(deps): update dependency @sanity/ui to ^2.0.13 (#6178) | 4f1b36d |
renovate[bot] | fix(deps): update dependency get-it to ^8.4.17 (#6179) | ee16280 |
Cody Olsen | fix(deps): pin framer-motion to the same version used by @sanity/ui (#6183) |
7120aa8 |
Cody Olsen | chore: fix typings error | b369d92 |
ecospark[bot] | chore(deps): dedupe pnpm-lock.yaml (#6184) | b4f9ba5 |
renovate[bot] | chore(deps): lock file maintenance (#6186) | a32e5d5 |
Cody Olsen | chore: pin @sanity/eslint-config-i18n |
89fac9f |
Cody Olsen | chore: pin @playwright/test |
1f4700c |
Cody Olsen | chore: pin @playwright/experimental-ct-react |
e09a5ef |
renovate[bot] | chore(deps): lock file maintenance (#6187) | dcbb7a4 |
Cody Olsen | fix: use named styled import for better ESM runtime compat (#6185) |
b544abb |
Herman Wikner | fix(comments): weaken references in content snapshot (#6131) | d1f1a4c |
renovate[bot] | chore(deps): update dependency @sanity/pkg-utils to ^4.4.4 (#6191) | 199f310 |
renovate[bot] | chore(deps): update dependency @sanity/visual-editing to v1.8.5 (#6194) | 3113498 |
renovate[bot] | chore(lockfile): update dependency @sanity/react-loader to v1.9.6 (#6195) | f41b784 |
renovate[bot] | chore(deps): update linters to v7 (#6192) | 4247e4f |
Cody Olsen | refactor: support strict: true in @sanity/schema codebase (#6207) |
605bd62 |
Cody Olsen | chore: reduce test flakiness by increasing timeout to 60s (#6208) | 1cecb45 |
Simeon Griggs | simplify 'shopify' template schema (#6161) | 69ff15f |
Pedro Bonamin | fix(tasks): disable autocomplete on 'assign to' input (#6193) | da49af0 |
Espen Hovlandsdal | fix(schema): make current field for slugs required (#6205) |
e420b6f |
renovate[bot] | fix(deps): update dependency @sanity/ui to ^2.0.14 (#6209) | f4d2e7e |
Espen Hovlandsdal | fix(cli): do not suggest v2 cli commands on "no such command" error (#6211) | 69ff7ff |
Espen Hovlandsdal | fix(cli): improve error handling on missing extracted schema (#6204) | 4fb0e66 |
renovate[bot] | chore(deps): update dependency use-hot-module-reload to v2 (#6217) | 4385ca8 |
renovate[bot] | chore(deps): replace dependency is-hotkey with is-hotkey-esm ^1.0.0 (#6218) | 12f25d5 |
renovate[bot] | chore(deps): update dependency @portabletext/toolkit to ^2.0.14 (#6219) | a72b652 |
renovate[bot] | chore(deps): update dependency @types/arrify to ^1.0.4 (#6220) | 25a95a0 |
renovate[bot] | fix(deps): update dependency get-it to ^8.4.18 (#6222) | 70f0963 |
renovate[bot] | chore(lockfile): update dependency @portabletext/react to v3.0.17 (#6221) | a4de075 |
renovate[bot] | fix(deps): update dependency @sanity/client to ^6.15.10 (#6228) | ba323ae |
renovate[bot] | chore(deps): update dependency @babel/preset-env to ^7.24.4 (#6226) | 7c60f3e |
renovate[bot] | chore(lockfile): update dependency @sanity/icons to v2.11.7 (#6174) | 1af2e4f |
renovate[bot] | chore(deps): update dependency @sanity/icons to ^2.11.7 (#6231) | 830f403 |
renovate[bot] | fix(deps): update dependency @sanity/ui to ^2.0.15 (#6229) | a6eb947 |
renovate[bot] | chore(lockfile): update dependency @sanity/color to v3.0.5 (#6232) | 7887f0d |
renovate[bot] | chore(lockfile): update dependency @sanity/logos to v2.1.9 (#6233) | c1b72fc |
Espen Hovlandsdal | fix(cli): use stub file loader for scss, sass extensions (#6215) | 80f4f22 |
renovate[bot] | fix(deps): update dependency @sanity/presentation to v1.12.2 (#6235) | acbb08a |
renovate[bot] | chore(deps): update dependency @sanity/visual-editing to v1.8.6 (#6237) | f0f6537 |
Cody Olsen | refactor(renovate): ignore slate and slate-react as they're bumped manually (#6242) |
6fc2bbb |
ecospark[bot] | chore(prettier): fix unformatted files 🤖 ✨ (#6243) | ef33857 |
Bjørge Næss | fix(cli): formalize requirement of styled-components@6 and @sanity/ui@2 (#6234) | 5fe2d47 |
renovate[bot] | chore(lockfile): update dependency @sanity/preview-url-secret to v1.6.6 (#6238) | a4be162 |
renovate[bot] | chore(lockfile): update dependency @sanity/react-loader to v1.9.7 (#6239) | debb2cc |
Cody Olsen | refactor(CI): use the official github app token generator action (#6230) | 40dff99 |
renovate[bot] | fix(deps): update dependency @sanity/ui to ^2.0.16 (#6241) | 58c319a |
Binoy Patel | chore(core): remove unusued ChangeIndicatorContext (#6214) | e978813 |
Pedro Bonamin | fix(core): add readOnly prop to dragHandle (#6190) | 234d009 |
renovate[bot] | chore(deps): update dependency @sanity/visual-editing to v1.8.7 (#6248) | 4a31e88 |
renovate[bot] | chore(lockfile): update dependency @sanity/preview-url-secret to v1.6.7 (#6249) | e89a8b3 |
renovate[bot] | chore(lockfile): update dependency @sanity/react-loader to v1.9.9 (#6250) | 736a96e |
renovate[bot] | fix(deps): update dependency @sanity/presentation to v1.12.3 (#6251) | 0959294 |
renovate[bot] | chore(lockfile): update dependency sanity-plugin-mux-input to v2.3.0 (#6252) | 5666099 |
renovate[bot] | fix(deps): update dependency ... |
v3.36.4
Installation and upgrading
To initiate a new Studio without installing the CLI globally:
npm create sanity@latest
To upgrade a v3 Studio, run this command in its folder:
npm install sanity@latest
🐛 Notable bugfixes
- Fixes an issue in the Portable Text editor in which annotations were not opening (bug introduced in v3.36.3)
- Fixes a potential cross-origin error from being shown in the developer console
📓 Full changelog
Author | Message | Commit |
---|---|---|
Pedro Bonamin | fix(core): remove custom options in comments upsell request (#6201) | 46c7ce8 |
Pedro Bonamin | fix(structure): annotations not opening in portable text editor (#6198) | 907c904 |
v3.36.3
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
Notable changes
- Increases the default height of the Portable Text editor
Notable bugfixes
- Fixes the
--enforce-required-fields
flag for thesanity typegen generate
command not correctly respecting validation rules - Fixes a few focus issues where the Portable Text editor would sometimes jump to the start of a block or scroll to a previously opened block on focus inside of the Presentation tool
- Fixes an issue in which when the tasks panel is open, searching for content in the Cmd + K search changes target document rather than searches the studio
📓 Full changelog
Author | Message | Commit |
---|---|---|
Tommy Petty | fix(pte): update default height of PTE in Form (#6119) | 5756753 |
Sindre Gulseth | fix(schema-extraction): check for _required field in validation rules (#6151) | 5ba26a5 |
Cody Olsen | chore: add prettier-plugin-packagejson (#6155) | 8f7fe70 |
renovate[bot] | chore(deps): update pnpm to v8.15.6 (#6154) | 07b0745 |
renovate[bot] | chore(lockfile): update dependency framer-motion to v11.0.24 (#6144) | 954c892 |
Rupert Dunk | fix(structure): improve document pane path handling (#6129) | 9b4d105 |
renovate[bot] | chore(deps): update babel monorepo (#6159) | eb97fe2 |
renovate[bot] | chore(deps): update dependency @types/babel__traverse to ^7.20.5 (#6160) | 16f32c9 |
Sindre Gulseth | feat(schema): handle assetRequired when extracting schema with enforceRequiredFields (#6157) | cd52979 |
Sindre Gulseth | chore(deps): upgrade groq-js to latest (#6162) | 8db7485 |
Pedro Bonamin | fix(tasks): don't open tasks search on hotkey + enter (#6165) | d387316 |
ecospark[bot] | chore(deps): dedupe pnpm-lock.yaml (#6164) | 74a7a75 |
Sindre Gulseth | chore(codegen): add enforceRequriedFields to spinner output (#6163) | b68e650 |
v3.36.2
Installation and upgrading
To initiate a new Studio without installing the CLI globally:
npm create sanity@latest
To upgrade a v3 Studio, run this command in its folder:
npm install sanity@latest
🐛 Notable bugfixes
- Fixes an issue where clicking "Publish" and possible other actions would throw the error
Sanity LocaleContext value missing
. - Fixes an issue in which users' names were sometimes displayed in lowercase in the tasks assignee list.
📓 Full changelog
Author | Message | Commit |
---|---|---|
Pedro Bonamin | fix(tasks): don't lowercase users when searching in the assignee menu (#6138) | 27643c8 |
cngonzalez | fix: add default listFormat locale where LocaleProvider may not be available (#6147) | 3c4d4cf |