Skip to content

Releases: sanity-io/sanity

v3.51.0

16 Jul 15:48
Compare
Choose a tag to compare

✨ Highlights

Clickable links in comments

clickable link

URLs included in comments are now rendered as clickable links, which is infinitely more useful than unclickable links.

Other features

  • Updates to configuration and blog template files when initializing a project inside a Next.js app: using an src folder in your directory if it exists, some changes to schemas and how they're imported.

🐛 Notable bugfixes

  • Fixes a regression causing platform-aware hotkeys (for example, Ctrl + Option + D for duplicating a document) not to be displayed in tooltips.

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.

📓 Full changelog

Author Message Commit
Espen Hovlandsdal fix: force arborist ^7.5.4 49f278a
ecospark[bot] chore(prettier): fix unformatted files 🤖 ✨ (#7146) 213f4b1
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#7145) 75a409a
Espen Hovlandsdal fix(core): restore platform-aware keyboard shortcuts (#6819) 512965c
renovate[bot] fix(deps): update dependency @sanity/ui to ^2.6.8 (#7144) 3fca2ef
renovate[bot] fix(deps): Update dev-non-major (#7149) 3ae92a5
Herman Wikner feat(core): clickable links in comment message (#7093) 6fad0c5
Simeon Griggs feat: update schema types formatting and init to include src (#7094) d42da14
Cody Olsen chore: remove 3d demos from test studio (#7157) 97fed17
Cody Olsen chore: setup workflow for E2E tests that @sanity/ui can run on its PRs (#7156) 88bd6c4
Rupert Dunk fix(sanity): open correct groups and fieldsets on setOpenPath (#7154) b278800
renovate[bot] fix(deps): Update dev-non-major (#7164) 41a3039

v3.50.0

11 Jul 22:05
Compare
Choose a tag to compare

✨ Highlights

New: Copy-and-paste fields and documents

This version of Sanity Studio introduces a powerful new way to work with structured content within Sanity Studio: Copy-paste support for fields and documents. You can now use the familiar copy-and-paste hotkeys (cmd/ctrl+c and cmd/ctrl+v) and the field and document actions menus to copy content across different fields and document types seamlessly.

  • Copy between different document types: You can seamlessly copy fields from one document and paste them into a different document type while maintaining the content structure.
  • Copy deeply bested structures: Easily copy entire blocks of Portable Text and arrays with complex nested structures between documents.
  • Copy full documents: Effortlessly copy full documents and integrate them into existing documents of the same or similar types.
CleanShot.2024-07-10.at.14.27.46.mp4

Beta: Array Tree Editing

Sanity offers powerful content models that let you define lists of object types and even nest these, if necessary. This enables developers to work with intuitive and convenient data structures in the API, but it has sometimes led to a cumbersome editorial experience with a lot of navigation between layers of modals.

That's why we're thrilled to introduce an improved experience for editing arrays of objects. With the array tree editing, you can browse and edit array items in one place, making working with nested content much simpler and faster.

Screenshot of new Array Tree Editor

To enable the new array tree editor, add the following to your Sanity Studio configuration:

// sanity.config.ts
export default defineConfig({
  // ...
  beta: {
    treeArrayEditing: {
      enabled: true,
    },
  },
});

Note: While in beta, the array tree editor has limited support for references. References to other documents do not appear in the array tree editor and will open in a new modal. Additionally, Portable Text fields are not fully supported.

Beta: Auto-updating Sanity Studio deployments

We're shipping improvents and fixes to Sanity Studio on a weekly basis. To make it easier to get these improvements to Sanity Studio users without requiring developer involvement, we have shipped a way to build the studio for auto-updates.

You can try this out with the new --auto-updates flag to the sanity build and sanity deploy CLI commands. This enables your Sanity Studio to automatically update to the latest minor and patch versions (3.x.x) of Sanity Studio without having to rebuild and redeploy new bundles.

Learn more about the new auto-update flag in docs.

image

Improved support for large datasets exports

To improve the export experience for users with large datasets, we have introduced a new cursor export mode in the Sanity CLI:

sanity dataset export --mode cursor

In this mode, the CLI will use cursors under the hood when exporting, which can significantly speed up the export process for larger datasets.

Note: Unlike the traditional export mode, the cursor mode does not create a snapshot of the dataset. Instead, it pulls data as it exports, which may result in inconsistencies if documents in the dataset is modified during the export process.

🐛 Notable bugfixes

  • Fixes an issue when trying to extract schemas/deploy GraphQL APIs when a sub-dependency tries to call document.execCommand at import time.
  • Fixes a warning being printed about using useClient() without specifying an API version.
  • Fixes an issue where having styled-components listed in devDependencies instead of dependencies would cause the CLI to try to install it as a dependency in a loop.

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.

📓 Full changelog

Author Message Commit
Binoy Patel fix(core): fixes url for checking studio version (#7060) a44fd5b
Sindre Gulseth refactor(typegen): use typenode to lookup referencing type names (#7038) e622011
renovate[bot] chore(deps): update dependency @sanity/tsdoc to v1.0.75 (#7005) 48a7266
Herman Wikner feat(core): focus root array item when closing tree editing dialog (#7049) 8e80b14
renovate[bot] chore(deps): update dependency turbo to ^2.0.6 (#7067) d04d061
renovate[bot] chore(deps): update dependency ts-node to ^10.9.2 (#7066) 630f558
renovate[bot] chore(deps): update dependency lerna to ^8.1.5 (#7065) 0d2f0d9
Sindre Gulseth feat(cli): Add support for exporting dataset with cursor (#7068) d019845
Jordan Lawrence chore(config): comment to clarify logo deprecation (#7075) 6d1f496
Jordan Lawrence docs(migrate): updating insert examples to showing always 3 args (#7070) 60ad7e7
Espen Hovlandsdal fix(cli): mock document.execCommand when emulating browser env (#7062) e54ae8a
Herman Wikner fix(core): handle array fields within nested objects in array items (#7069) 3c057a8
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.16.2 (#7078) 7aa5732
renovate[bot] chore(deps): update dependency @sanity/insert-menu to v1.0.7 (#7064) c3079c1
renovate[bot] chore(deps): update dependency lerna to ^8.1.6 (#7083) 5d94ce7
renovate[bot] fix(deps): update dependency @sanity/client to ^6.20.1 (#7088) baa20cb
renovate[bot] fix(deps): Update dev-non-major (#7086) 554d579
Ash feat(sanity): allow Actions API enablement based on Studio version semver constraint 47a160b
Ash test(e2e): add helper to mock Actions API feature toggle response f31671b
Ash test(e2e): re-enable tests for Actions API feature toggle and expand test cases daca8e9
Cody Olsen chore(renovate): add preset that allows internal PRs to open right away (#7087) 43616e4
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#7096) e4a237b
Cody Olsen chore(renovate): add fixtures to ignorePaths (#7081) e948e68
renovate[bot] fix(deps): update dependency @portabletext/editor to ^1.0.8 (#7101) 07771ed
renovate[bot] fix(deps): update dependency @sanity/icons to ^3.3.0 (#7098) 451e841
renovate[bot] fix(deps): Update dev-non-major (#7100) b9d98bf
renovate[bot] fix(deps): update dependency get-it to ^8.6.3 (#7108) 32024fe
renovate[bot] fix(deps): update dependency @sanity/client to ^6.20.2 (#7111) 8ec952e
RitaDias refactor(sanity): remove "features" (#7097) a5e6212
renovate[bot] fix(deps): update dependency @sanity/client to ^6.20.2 (#7110) 2e1c86a
renovate[bot] fix(deps): update dependency @sanity/bifur-client to ^0.4.1 (#7102) 048b4fb
renovate[bot] fix(deps): update dependency @sanity/ui to ^2.6.3 (#7104) 8cba533
renovate[bot] fix(deps): update dependency react-rx to ^3.1.1 (#7113) 0d4c8e6
renovate[bot] chore(deps): update dependency @sanity/tsdoc to v1.0.83 (#7080) 5b8de2d
renovate[bot] chore(deps): update dependency esbuild to ^0.23.0 (#7106) 24c8c96
Espen Hovlandsdal test(cli): use separate tarball location for cursor export test (#7118) 7025ffa
Espen Hovlandsdal fix(core): minor typo fix in i18n comment (#7115) 04c374a
Pedro Bonamin feat(router): update router to support query params in intent links (#7095) 793b2b0
renovate[bot] chore(lockfile): Update dev-non-major to v1.1.5 (#7122) 6e4ad38
Espen Hovlandsdal chore(deps): roll back esbuild dependency to 0.21.5 (#7126) b02fe6f
renovate[bot] fix(deps): update dependency react-rx to ^3.1.2 (#7123) 3030181
Cody Olsen chore(renovate): only bump esbuild within 0.21.x (#7128) 0c2103c
Espen Hovlandsdal fix(core): error reporting consent tweaks (#7131) 1552e20
Rune Botten chore(core): update copy for new version available toast (#7129) d298503
Espen Hovlandsdal fix(cli): allow styled-component as dev dependency (#7132) ff31556
Espen Hovlandsdal fix(i18n): allow locale plugins to translate "All fields" field group (#7117) 24f9936
renovate[bot] fix(deps): update dependency react-rx to ^3.1.3 (#7138) 137bf75
renovate[bot] fix(deps): update dependency @sanity/client to ^6.21.0 (#7137) a23b2a5
renovate[bot] fix(deps): Update dev-non-major (#7139) 5606d85
renovate[bot] fix(deps): update dependency @sanity/ui to ^2.6.6 (#7136) 2548de6
renovate[bot] fix(deps): Update dev-non-major (#7140) b95094c
Rune Botten chore: Update PULL_REQUEST_TEMPLATE.md (#7133) 27c13a5
Fred Carlsen feat(core): global copy paste (#6856) 53aa46b
Rico Kahler fix(deps): bump @sanity/ui ^2.6.7 (#7143) b58b0f8

v3.49.0

02 Jul 21:26
Compare
Choose a tag to compare

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

New TypeGen Features

Better GROQ Function Coverage

We have added the following improvements to type generation for GROQ query results:

Improved Union Handling in TypeGen

TypeGen now correctly expands all unions inside an object, addressing this reported issue on GitHub. Previously, only a part of a union might be returned. TypeGen now ensures that all object types in a union are expanded and included in the generated types.

// Example query
export const HomePageQuery = groq`*[_type == "page" && slug.current == "homepage"]{
  title,
  components[] {
    _type == "hero" => { title, "image": image.asset->url },
    _type == "cta" => { title, link }
  }
}`;

TyeGen will now generate the following type for the query above:

export type HomePageQueryResult = Array<{
  title: string;
  components: Array<
    | { _type: 'hero'; title: string; image: string }
    | { _type: 'cta'; title: string; link: string }
  >;
}>;

New import path for the Portable Text Editor

We’ve started work on a standalone Portable Text Editor package, and thus transitioned to using the @portabletext/editor package instead of the now deprecated @sanity/portable-text-editor package. This change includes several internal improvements and fixes. You can follow this work in this repository on GitHub — more documentation to come.

Advanced users who have used the @sanity/portable-text-editor dependecy should update to @portabletext/editor to ensure continued support and improvements.

🐛 Notable bugfixes

  • Fixes an issue where FormInput would not render fields inside a fieldset.
  • Various TypeGen bug fixes.

📓 Full changelog

Author Message Commit
Cody Olsen chore(deps): upgrade turbo to v2 (#6985) 2fb8f9b
Nina Andal Aarvik fix(core): change padding to fix tab box (#7000) 7ed682e
Herman Wikner fix(core): handle fieldset members in FormInput (#7045) b932de6
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#7034) 8820979
Herman Wikner fix(core): open PTE dialogs in tree editing dialog with openPath (#7046) d0b9ab0
renovate[bot] fix(deps): update dependency groq-js to ^1.10.0 (#7053) 628cb76
Rico Kahler refactor: use @portabletext/editor instead of @sanity/portable-text-editor (#7035) 9864985
renovate[bot] fix(deps): update dependency get-it to ^8.6.2 (#7052) b73b68c
renovate[bot] fix(deps): update dependency @sanity/export to ^3.40.0 (#7056) c44c405

v3.48.1

27 Jun 00:43
Compare
Choose a tag to compare

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.

🐛 Notable Bugfixes

  • Fixes a regression that caused the Select button to not appear for single-asset sources.
  • Fixes a bug to allow the --no-dry-run and --no-confirm CLI options to be used together. Big thanks to @pawelngei!

📓 Full changelog

Author Message Commit
Binoy Patel fix(core): update url for notify endpoint (#7022) 6e2ad73
Christian Grøngaard chore(page-building): clean up schema types (#6973) af414d5
Rostislav Melkumyan Fix(CLI): Set integration value for createProject directly in the createProject function (#7021) 2d11505
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#7028) 8c66d24
Jason Rose Fixes NO_CHANGES localization key (#7008) 666c420
Carolina Gonzalez fix: check for telemetry consent before error reporting (#7019) 83e1111
Rico Kahler fix(core): put back select button for single-asset source (#7030) 4af12eb
Rico Kahler fix(cli): allow no-confirm no-dry-run migrations (#7031) b06d143
Rico Kahler build: remove Version step from release workflow (#7032) 5006d7f

3.48.0

25 Jun 19:34
Compare
Choose a tag to compare

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.

🐛 Notable Bugfixes

  • Fixes an issue that caused trailing commas to appear when sanitizing schemas.
  • Adds periodic debug logging and improves error handling in the dataset export workflow.

📓 Full changelog

Author Message Commit
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#6994) 1d3b68d
Fred Carlsen chore(ci): upgrade pnpm setup to use node20 (#6968) e39e7f6
RitaDias test(e2e): rewrite e2e toolbar tests to component tests & update e2e expectations on others (#6967) 5aa2ee8
renovate[bot] chore(deps): update dependency recast to ^0.23.9 (#7006) b29a444
Rostislav Melkumyan fix: remove trailing commas when sanitizing (#7007) 6b9f910
Christian Grøngaard feat(core): support insert menu options in array item context menus (#6921) 784cfd3
RitaDias feat(core): array editing improvements (#6682) 6fbfcdc
Herman Wikner fix(core): tree editing dialog open issue (#7013) fcb09f9
Sindre Gulseth chore(deps): always bump @sanity/export package (#7010) fd6f56c
renovate[bot] fix(deps): update dependency @sanity/export to ^3.38.2 (#7015) d09cc9b
Rico Kahler chore: update release note template (#7017) 7e633bb
Christian Grøngaard fix: deprecate @sanity/portable-text-editor (#7020) f2ddfa7
Rico Kahler feat: utilize timestamps in build and renderDocument for AUS (#6964) a1da8cc
Rico Kahler feat: include hashes in vendor builds (#7018) 4bbe337

v3.47.1

19 Jun 11:53
Compare
Choose a tag to compare

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 a potential crash in certain javascript environments when trying to access process.env
  • Errors occuring during a migration now provides more details

📓 Full changelog

Author Message Commit
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#6975) 355e1b9
Binoy Patel fix(migrate): fixes error message to be more helpful (#6986) df89f88
Espen Hovlandsdal fix(cli): correct noop return value on esbuild-register in dev (#6990) 51ecce0
Espen Hovlandsdal fix(core): make version check not depend on process.env (#6991) 7c00b8f

v3.47.0

18 Jun 15:50
Compare
Choose a tag to compare

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

✨ Highlights

Array insert menu

This release includes a much requested upgrade of the array insert menu with various new options available. Including a new and more informative grid view, the ability to organize available schema types in groups, and filter them with a search term, and more. Check out the array article in the docs for examples.

array insert menu

Other features

Adds a type export of all the discovered Sanity schema variants resulting from running sanity typegen in the CLI. This can be useful in mocks/testing environments and used by third party tools to get a list of potential types. This union type is accessible as AllSanitySchemaTypes in the generated type definitions.

🐛 Notable bugfixes

  • Fixes an issue where a text preview image would be included into the Portable Text Editor (PTE) when pasting text from Word.
  • Fixes an issue where navigation options were not being passed as expected when calling a scoped router's navigate function.
  • Fixes an issue where the PTE wouldn't activate when you start dragging files into it.
  • Images in the Hotspot & Crop tool now render faster, and use far less memory.
  • Reduces layout shift when uploading images that replace existing image assets.
  • Fixes an issue that could cause a 409 error when restoring a document from history.
  • Fixes an issue where image and file types might be listed in their lowercase variant in array insert menus

📓 Full changelog

Author Message Commit
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#6916) 7f20f24
renovate[bot] chore(deps): update dependency @sanity/tsdoc to v1.0.72 (#6911) 7d312e4
Cody Olsen feat(deps): upgrade react-rx to v3 (#6883) c0fe9f6
renovate[bot] fix(deps): Update dev-non-major (#6915) f00ca7e
Per-Kristian Nordnes fix(core): fix issue with pasting mixed content (files and text) for pt-input (#6924) fda9387
Rupert Dunk fix(router): pass options on scoped router navigation (#6923) 2fabc2e
Fred Carlsen chore: clean playwright-ct cache on each run (#6928) 286aaed
Fred Carlsen fix(form): activate PTE input when dragging files (#6929) a2be16c
Ash chore: update lockfile (#6932) d935a3a
Cody Olsen fix: improve perf of by creating the canvas in a side effect (#6874) 5d8031b
Cody Olsen fix: layout shift when uploading images (#6930) ae142d4
renovate[bot] fix(deps): Update dev-non-major (#6941) 3300904
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.16.0 (#6942) abe562b
renovate[bot] fix(deps): update dependency @sanity/ui to ^2.3.6 (#6943) c1869b9
renovate[bot] chore(lockfile): update dependency @sanity/import to v3.37.5 (#6940) 6cfe40e
Cody Olsen fix: change useListFormat to no longer violate the rule of hooks (#6876) cae047f
Bjørge Næss fix(sanity): only include create action when restoring a deleted document (#6937) 2736835
Cody Olsen refactor: change memoization of margins to support the rule of hooks (#6875) fbf90ec
Espen Hovlandsdal fix(schema): use base type for title if no subtype title or name is given (#6947) bbe7ac0
Binoy Patel fix(cli): account for base path in the importmap (#6919) 8f28054
renovate[bot] chore(lockfile): update dependency @sanity/bifur-client to v0.4.1 (#6939) e161e0b
Nina Andal Aarvik fix(vision): center loading spinner (#6900) 5943d4f
Christian Grøngaard chore: allow clean:deps to remove test studio node_modules (#6951) 339128d
Christian Grøngaard feat(core): new insert menu for arrays with filtering, type preview support (#6853) 203f135
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#6957) 4b89dd5
renovate[bot] fix(deps): Update dev-non-major (#6958) d89acea
renovate[bot] fix(deps): update dependency @sanity/ui to ^2.4.0 (#6959) 5a38691
Sindre Gulseth feat(typegen): add all schema types exported union 5d97a0e
Sindre Gulseth Revert "feat(typegen): add all schema types exported union" e65adee
RitaDias test(e2e): update e2e flaky tests (#6927) 6b20e5f
Sindre Gulseth feat(typegen): add all schema types exported union (#6962) fa459a4
Ash test(e2e): ensure custom publish action can patch document before publication 17d0bbf
Ash fix(sanity): remove ifDraftRevisionId optimistic lock usage when publishing documents 3064705
Christian Grøngaard fix(core): make array insert menu full width if grid view is configured (#6969) 47d204c
Christian Grøngaard deps(core): update @sanity/insert-menu (#6971) de01b7c
Bjørge Næss fix(structure): don't replace url when navigating back to list after document deletion (#6953) f662ae2
Bjørge Næss refactor(core): change revision history label from 'Version' to the more accurate 'Revision' (#6956) b90820c
Espen Hovlandsdal feat(core): implement basic error reporting (#6914) 02dab2a
Binoy Patel fix(ci): importmap path on windows (#6948) 6bbf609
Carolina Gonzalez feat: notify AUS studio users of new studio versions (#6893) e9b16c8

v3.46.1

13 Jun 14:24
Compare
Choose a tag to compare

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 a bug causing Structure Tool to crash when attempting to read the scrollTop of a nonexistent element.

📓 Full changelog

Author Message Commit
Ash fix(sanity): ignore sticky overlay regions with a falsey DOM node (#6910) 4f1be6c

v3.46.0

12 Jun 17:17
Compare
Choose a tag to compare

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 projects with a large amount of users would sometimes get a request error when loading user info.
  • Form input components now have their own error boundaries, limiting crashes to a field level on a document form, instead of taking down the entire Structure Tool.
  • Fixes React 19 causing the Portable Text Editor (PTE) to crash in some scenarios.
  • Fixes an issue where searching for text within fields of type text (not string) would not yield results.
  • Fixes an issue when dragging PTE blocks.
  • Fixes a visual regression in PTE fullscreen mode where the Drop to upload files message would be positioned incorrectly.
  • Fixes a regression where pasting from Word would insert an image version of the text being pasted instead of the actual text.

📓 Full changelog

Author Message Commit
Christian Grøngaard chore(core): abstract getSchemaTypeIcon (#6844) 6693c54
Rostislav Melkumyan feat: add integration when creating a new project through cli (#6639) ac214b8
jordanl17 fix(structure): fixing issue with shift mutli select of documents (#6857) 15861f4
Espen Hovlandsdal fix(core): chunk user loading into batches of max 400 items (#6858) 4531750
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#6849) 73861ef
renovate[bot] chore(deps): update dependency @sanity/pkg-utils to v6.9.0 (#6850) 4b6d33f
renovate[bot] chore(lockfile): update dependency @sanity/bifur-client to v0.4.1 (#6860) c1c2ab2
renovate[bot] fix(deps): Update babel monorepo (#6861) 4fa813d
renovate[bot] chore(lockfile): update dependency @sanity/icons to v3.2.0 (#6864) 513601c
renovate[bot] fix(deps): update dependency @sanity/ui to ^2.3.1 (#6851) 74d4e67
renovate[bot] chore(deps): update dependency @sanity/icons to ^3.2.0 (#6863) c03c346
renovate[bot] fix(deps): Update dev-non-major (#6862) 74f8080
Carolina Gonzalez feat: add hasSanityPackageInImportMap (#6832) 8ea7d8f
Cody Olsen feat: add error boundary for form input components (#6869) 23c42ae
Cody Olsen fix: portable text editor crash on React 19 (#6870) 293e7d1
Cody Olsen refactor: replace useForwardedRef with useImperativeHandle (#6830) 23bac62
renovate[bot] fix(deps): update dependency get-it to ^8.6.0 (#6884) 9f5e29f
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#6892) 5c01ef6
Cody Olsen refactor: lift useCallback out of useAsync so it can be compiled (#6873) 08f79a4
Espen Hovlandsdal fix(search): include text type fields in search queries (#6895) 5e505ac
RitaDias test(e2e): update timeouts for opening popovers (#6871) 1befff1
Pedro Bonamin fix(scheduled-publishing): export EditScheduleForm from core (#6872) 43711d7
Rico Kahler feat: add CLI options to enable auto-updating studios (#6514) 5077c8b
Binoy Patel feat(cli): show prompt if local version doesn't match remote (#6707) 50f1e54
Binoy Patel fix(cli): allow using auto-updates in unattended mode (#6897) 61f1f8c
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#6899) 07454a1
Christian Grøngaard fix(form): avoid spreading key prop (#6887) 51eb56a
renovate[bot] fix(deps): update dependency @sanity/client to ^6.20.0 (#6886) 124dc22
Fred Carlsen fix(core): fix dragging existing blocks in pte (#6867) 0d92883
renovate[bot] chore(deps): update dependency @sanity/pkg-utils to v6.9.3 (#6903) 7f18d45
renovate[bot] chore(deps): update dependency turbo to ^1.13.4 (#6905) 576dd3f
renovate[bot] chore(deps): update dependency @vitejs/plugin-react to ^4.3.1 (#6904) 24255b4
Cody Olsen fix: regression causing ESM build errors (#6909) 0b92a8e
renovate[bot] chore(deps): update dependency esbuild to ^0.21.5 (#6908) 69496d1

v3.45.0

04 Jun 20:03
Compare
Choose a tag to compare

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

✨ Highlights

  • The studio initialization command now allows you to specify a package manager with a flag in a single line. This was previously only possible to do via an interactive CLI prompt. You can now skip this step:
npm create sanity@latest --package-manager pnpm
  • The dryRun parameter is now available in the context provided for the defineMigration command available from sanity/migrate. This allows developers to write scripts that skip certain actions (for example, mutating external data stores) if it is only a dry run. An example might look like this:
import { defineMigration } from "sanity/migrate"

/**
 * Run this migration with
 * `npx sanity migration run my-migration`
 */
export default defineMigration({
  title: "my-migration",

  // pass whether the migration is a dry-run as context
  async *migrate(documents, { dryRun }) {
    for await (const document of documents()) {
      if(dryRun) {
        // Only log the effect
        console.log(`Something happened`)
      } else {
        // Execute the side-effect
        await thirdPartyRequest()
      }
      // ... do something with the document, maybe yield patches
    }
  },
})

🐛 Notable bugfixes

  • Fixes an issue where image/file assets would not be listed in Structure lists, even if specified to do so.

📓 Full changelog

Author Message Commit
Espen Hovlandsdal fix(structure): allow searching/listing ignored types when explicitly requested (#6771) 5b66664
Cody Olsen chore: setup a separate compiled studio, bump to 19rc (#6808) 25be802
Christian Grøngaard fix(types): correct ArrayOptions (#6737) 39da169
Ash fix(sanity): align Actions API usage with correct types f07d7ae
Ash chore(deps): update @sanity/client f9f2356
RitaDias test(core): update e2e test for toolbar in PTE to be more reliable (#6811) cd901d1
Cody Olsen fix: handle circular import issue in a compiler friendly way (#6812) 8ac809f
renovate[bot] fix(deps): Update dev-non-major (#6809) a9662ec
Binoy Patel test(core): update snapshot for failing test (#6818) 52e4cfa
Christian Grøngaard chore(page-building): use first-class icons instead of media (#6752) dd7956a
Noah Gentile feat(migrate): add dryRun to context (#6816) 104162a
Cody Olsen fix: use useImperativeHandle instead of mutating a parent ref (#6813) 13158e9
ecospark[bot] chore(lint): fix linter issues 🤖 ✨ (#6825) cec43ad
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.15.13 (#6823) d0e5e95
Cody Olsen fix: regression in #6813 (#6827) 8ac0812
RitaDias test(test): update e2e pte toolbar test (#6822) 4487680
RitaDias test(sanity): update hydrate test (#6821) 0cefc21
Binoy Patel feat(cli): allow the ability to specify package manager in init command (#6820) f1ef0a6
Cody Olsen fix: call dynamic hooks in a way that can be compiled (#6814) 6e65eed
renovate[bot] chore(lockfile): update dependency prettier to v3.3.0 (#6834) f279329
ecospark[bot] chore(lint): fix linter issues 🤖 ✨ (#6836) 61fd6bb
renovate[bot] chore(deps): update dependency @sanity/pkg-utils to v6.8.19 (#6837) 700879a
shur feat: move up call to PATCH metadata after bootstrapping template files (#6828) 7d47a51
renovate[bot] chore(deps): update dependency @sanity/tsdoc to v1.0.70 (#6838) c794957
renovate[bot] fix(deps): Update dev-non-major (#6841) 48022c1
renovate[bot] chore(deps): update dependency @types/react to ^18.3.3 (#6840) 0ce52e9
renovate[bot] chore(lockfile): update dependency @sanity/import to v3.37.5 (#6842) df67883
jordanl17 feat(structure): sheet list table columns selectors style edx-1435 (#6839) 6d53c4c
Christian Grøngaard refactor(core): rename InsertMenu->InsertMenuGroups (#6845) e1fd6bf