v0.132.2
Upgrade with:
sanity upgrade
And install the latest Command Line Interface (CLI) with:
npm install --global @sanity/cli
✨ Highlights
🚜More reliable import
The sanity dataset import
CLI command is now more fault tolerant, retrying in the case of network failures and similar (up to a maximum number of retries, obviously).
➡️Pass arguments to sanity exec
scripts
You can now pass arguments to scripts executed through sanity exec
by using subargs:
sanity exec --with-user-token -- --your-script --flags=here
👻 External CSS without CSS modules
When using third-party React components and want to import related CSS files, Sanity will by default convert the CSS to CSS modules. This won't usually work as expected, since the class names change. To force Sanity to use unprefixed CSS classes, you can import using the raw
query parameter. For instance:
import 'some-react-component/styles.css?raw'
See PR #849 for more background information.
🐛 Notable bugfixes
- Fix a bug where selecting a paragraph style from within a dialog would close the dialog
- The block editor will no longer crash when selecting a block from an array without any text blocks
- The
--visibility
flag onsanity dataset create
now actually works 😳 @sanity/image-url
can now parse full asset URLs, enabling you to add image transformation parameters to the URL programatically.
📓 Full changelog
Author | Message | Commit
------------ | ------------- | -------------
Espen Hovlandsdal | [import] Add retry handling on write operations (#832) | d8e9f1742
Espen Hovlandsdal | [plugin-loader] Fix loading of namespaced configs (#836) | 6f7e34095
Espen Hovlandsdal | [core] Fix visibility mode flag on dataset creation (#833) | 77c7f3b37
Espen Hovlandsdal | [preview] Log EventListenerOptions warning only in development mode (#838) | 752e80eb6
Bjørge Næss | [preview] Refactor and expose WithVisibility helper component (#840) | 10f78f0ab
Bjørge Næss | [chore] Upgrade prettier and add prettify script (#841) | f9de6fb6a
Bjørge Næss | [chore] Run prettier on all js files | e0edb423a
Espen Hovlandsdal | [import] Fix serialization of numeric object keys (#842) | 86fda82af
Espen Hovlandsdal | [chore] Add --all
flag to symlink script to blindly symlink all Sanity-modules (#844) | b72666777
Espen Hovlandsdal | [form-builder] Pass parent path of slug field to source function (#845) | 6c17675e3
Espen Hovlandsdal | [image-url] Support parsing asset objects with only URL (#846) | da749500e
Espen Hovlandsdal | [test-studio] Add array of objects containing blocks to blocks schema | fb1a0ef54
Knut Melvær | [readme] Add slack badge (#850) | bf9b4d783
Espen Hovlandsdal | [core] Pass subargs onto exec target (#848) | b72c68b3f
Thomas Drevon | [form-builder] Remove patchChannel prop requirement (#851) | b298cab60
Kristoffer J. Sivertsen | [components] Fix bug where nested block input dialogs would close when selecting style (#847) | 2f8defb87
Kristoffer J. Sivertsen | [desk-tool] Less text on publish button. Explanation in tooltip (#839) | 5e3bb029d
Espen Hovlandsdal | [server] Allow importing CSS with ?raw
to bypass CSS modules (#849) | 3a5cfcaba