Installation and upgrading
To initiate a new Studio without installing the CLI globally:
npx create-sanity@latest
To upgrade an existing Studio (v3):
npm install sanity@latest
✨ Highlights
New init flags: --bare
, --env
The npm create sanity
and sanity init
CLI commands now have two new flags available:
--bare
- skips the installation of a Sanity Studio. Instead, it takes you through the project and dataset creation process and prints the project ID and dataset names to the console.--env [path]
- detects the framework used in the current directory and creates a.env
file with the correct prefix for environment variables. Thepath
is optional; the default value is.env
, but you can change it to anything beginning with.env
, for example,.env.local.example
.
These flags are useful when you want to integrate an application with a new or existing project, when you have some existing Studio code you want to set up, or when you only need the Content Lake capabilities.
Improved performance on large arrays
Lists of objects and references are now virtualized in the Sanity Studio UI. This should significantly improve performance in documents with large arrays.
Improvements for custom Vite configuration
Any custom Vite configuration defined in sanity.cli.ts
will now be merged with the default configuration using Vite’s merge logic. This improvement will make it easier customize the Vite configuration without having to deeply understand the defaults. The configuration now also has improved TypeScript types.
Other features
- The schema validator now checks for fields that use the
block
type outside of an array, which is not currently supported (thanks @pauloborges!)
🐛 Notable bugfixes
- Resolves an error that occurred when attempting to create a document of a certain type with an empty object as the initial value, resulting in a permission error
- Addresses an issue where CSS files were not properly updated with a configured Studio base path
- Fixes a bug that caused the Studio to crash when trying to fetch user data without proper permissions
- Resolves a problem where multiple sorting options could be selected at the same time in a dropdown menu
- Addresses an issue where long filenames/MIME types were not truncated in the file picker list
- Resolves a bug that caused the Portable Text Editor to crash when encountering an invalid value.
📓 Full changelog
Author | Message | Commit |
---|---|---|
Espen Hovlandsdal | test(cli): resolve user email for configured test token (#4353) | 868fc61 |
Espen Hovlandsdal | test(cli): use --detach for dataset copy for faster runs (#4357)
| d085af0 |
Binoy Patel | chore(perf): add perf test for large document (#4356) | 5c319e9 |
renovate[bot] | fix(deps): update dependency scroll-into-view-if-needed to v3.0.10 (#4328) | 0e598ba |
Binoy Patel | fix(core): fix permissions when initialValue is empty object (#4360) | 937421a |
Binoy Patel | fix(cli): fix basePath not assigned to css files (#4354) | 7126000 |
Noah Gentile | fix(cli): apply user vite config in preview
| 9432959 |
Noah Gentile | feat(cli): merge user vite config object | 53f7808 |
Noah Gentile | feat(cli): align with vite config fn behavior | 437a1b4 |
Noah Gentile | refactor(cli): mock vite typings | b43b69a |
Paulo Borges | fix(schema): validate that object has no standalone block fields (#4199) | c131116 |
Espen Hovlandsdal | test(e2e): bump initial setup timeout to 120s | 11c5efb |
Espen Hovlandsdal | chore: fix prettify script not specifying path | 538d31c |
Per-Kristian Nordnes | refactor(portable-text-editor): ignore operations or patches targeting inside non-editable objects of the editor (#4334) | 8e7a323 |
Binoy Patel | fix(core): clear unused references in an array when clicked outside (#4361) | cb9ef3a |
Binoy Patel | chore(cli): fix basePath test flakiness (#4366) | 0cd32eb |
shur | fix: log inability to fetch user for avatars, prevent studio crash (#4367) | bcc240d |
renovate[bot] | chore(deps): update devdependencies (non-major) (#4329) | 3cd83d4 |
Nina Andal Aarvik | fix(core): add ellipsis textOverflow to type in file picker list (#4348) | fcbea4b |
Nina Andal Aarvik | fix(desk): compare selected on sortOrderRaw instead of sortOrder (#4345) | 16cf235 |
Benjamin Akar | feat(cli): add --bare and --env flags to sanity init (#4290)
| 345d319 |
Cody Olsen | chore(CI): create yarn lockfile maintenance action (#4370) | f7fd7a1 |
ecospark[bot] | chore(deps): lock file maintenance (#4371) | 2657ad0 |
Cody Olsen | chore(renovatebot): ignore the v2 text fixture deps | bbb3a41 |
renovate[bot] | chore(deps): lock file maintenance (#4372) | 0270793 |
renovate[bot] | fix(deps): update dependency @types/three to ^0.150.0 (#4382) | 629acf4 |
renovate[bot] | fix(deps): update dependency three to ^0.151.0 (#4383) | f6f9b8c |
Per-Kristian Nordnes | fix(portable-text-editor): invalid Portable Text value causing crash (#4364) | 2a15433 |
Marius Lundgård | fix(core): fix typos in config reducer error messages | 72b37a5 |
Cody Olsen | fix: refactor desk tool intent resolver to reduce remounts (#4363) | e888f51 |
Marius Lundgård | fix(deps): update @sanity/icons
| 2f0ec12 |
renovate[bot] | chore(deps): lock file maintenance (#4387) | 9e9d286 |
Bjørge Næss | fix(perf-runner): add support for running tests against recent tags only (#4386) | 036c029 |
Nina Andal Aarvik | fix(core): capitalize type name if item type lacks title in pte (#4385) | df16d46 |
Binoy Patel | fix(core): add virtualization to array of objects and references (#4299) | 09afa59 |