v4.20.0
Breaking Changes📦 sanityView on GitHub →
⚠ 2 breaking✨ 3 features🐛 5 fixes🔧 14 symbols
Summary
Sanity Studio v4.20.0 introduces a new CLI command for schema bloat visualization and caches generated schema fields. This release also removes CommonJS support across the codebase.
⚠️ Breaking Changes
- The codebase has been refactored to remove CommonJS (CJS) support. Ensure all dependencies and custom code are using ES Modules (ESM) syntax where applicable.
- The removal of CJS syntax might require updating custom build configurations or tooling that explicitly relied on CJS module resolution.
Migration Steps
- Run `npm install sanity@latest` to upgrade to this version.
- Review your codebase for any reliance on CommonJS syntax, as CJS has been removed.
- Refer to the comprehensive guide on [Installing and Upgrading Sanity Studio](https://www.sanity.io/docs/upgrade) for detailed upgrade instructions.
✨ New Features
- Added a new CLI command for visualizing schema bloat.
- Implemented caching for generated field objects in the schema system.
- Deleting scheduled drafts now allows for copying the content back to a draft state when appropriate.
🐛 Bug Fixes
- Fixed issues related to date and time input components.
- Ensured that module server correctly uploads .mjs files.
- Fixed an issue where `require` calls were not correctly sourced from `createRequire`.
- Correctly concatenated `previewUrl` and `targetOrigin`.
- Fixed the focus path setting for asset inputs within image components.
🔧 Affected Symbols
viteCodeMirror@sanity/clientportabletext@sanity/ui@sanity/pkg-utils@lezer/highlight@sanity/runtime-cli@rollup/plugin-node-resolve@google-cloud/storage@vitejs/plugin-reactform-data@date-fns/tzDescriptorConverter