v3.45.0
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 thedefineMigration
command available fromsanity/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 |